12 private string m_name;
16 private string m_processorArchitecture;
18 private string m_culture;
20 internal byte[] m_publicKeyToken;
28 byte[] array =
new byte[m_publicKeyToken.Length];
29 Array.
Copy(m_publicKeyToken, 0, array, 0, m_publicKeyToken.Length);
36 public string Name => m_name;
66 public ApplicationId(
byte[] publicKeyToken,
string name,
Version version,
string processorArchitecture,
string culture)
80 if (publicKeyToken ==
null)
84 m_publicKeyToken =
new byte[publicKeyToken.Length];
85 Array.
Copy(publicKeyToken, 0, m_publicKeyToken, 0, publicKeyToken.Length);
88 m_processorArchitecture = processorArchitecture;
96 return new ApplicationId(m_publicKeyToken, m_name, m_version, m_processorArchitecture, m_culture);
104 stringBuilder.
Append(m_name);
105 if (m_culture !=
null)
107 stringBuilder.
Append(
", culture=\"");
108 stringBuilder.
Append(m_culture);
109 stringBuilder.
Append(
"\"");
111 stringBuilder.
Append(
", version=\"");
113 stringBuilder.
Append(
"\"");
114 if (m_publicKeyToken !=
null)
116 stringBuilder.
Append(
", publicKeyToken=\"");
117 stringBuilder.
Append(Hex.EncodeHexString(m_publicKeyToken));
118 stringBuilder.
Append(
"\"");
120 if (m_processorArchitecture !=
null)
122 stringBuilder.
Append(
", processorArchitecture =\"");
123 stringBuilder.
Append(m_processorArchitecture);
124 stringBuilder.
Append(
"\"");
126 return StringBuilderCache.GetStringAndRelease(stringBuilder);
136 if (applicationId ==
null)
140 if (!
object.
Equals(m_name, applicationId.m_name) || !
object.Equals(m_version, applicationId.m_version) || !
object.Equals(m_processorArchitecture, applicationId.m_processorArchitecture) || !
object.Equals(m_culture, applicationId.m_culture))
144 if (m_publicKeyToken.Length != applicationId.m_publicKeyToken.Length)
148 for (
int i = 0; i < m_publicKeyToken.Length; i++)
150 if (m_publicKeyToken[i] != applicationId.m_publicKeyToken[i])
162 return m_name.GetHashCode() ^ m_version.
GetHashCode();
override int GetHashCode()
Returns a hash code for the current T:System.Version object.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
string Culture
Gets a string representing the culture information for the application.
ApplicationId Copy()
Creates and returns an identical copy of the current application identity.
override string ToString()
Converts the value of the current T:System.Version object to its equivalent T:System....
Provides information about, and means to manipulate, the current environment and platform....
StringBuilder Append(char value, int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to this inst...
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Represents the version number of an assembly, operating system, or the common language runtime....
override string ToString()
Creates and returns a string representation of the application identity.
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
The exception that is thrown when one of the arguments provided to a method is not valid.
static void Copy(Array sourceArray, Array destinationArray, int length)
Copies a range of elements from an T:System.Array starting at the first element and pastes them into ...
override bool Equals(object o)
Determines whether the specified T:System.ApplicationId object is equivalent to the current T:System....
string Name
Gets the name of the application.
Specifies that the class can be serialized.
ApplicationId(byte[] publicKeyToken, string name, Version version, string processorArchitecture, string culture)
Initializes a new instance of the T:System.ApplicationId class.
Contains information used to uniquely identify a manifest-based application. This class cannot be inh...
override int GetHashCode()
Gets the hash code for the current application identity.
string ProcessorArchitecture
Gets the target processor architecture for the application.
byte [] PublicKeyToken
Gets the public key token for the application.