using System;
using System.Runtime.InteropServices;
using System.Text;
namespace System
{
/// Contains information used to uniquely identify a manifest-based application. This class cannot be inherited.
/// 2
// Token: 0x02000635 RID: 1589
[ComVisible(true)]
[Serializable]
public sealed class ApplicationId
{
/// Initializes a new instance of the class.
/// The array of bytes representing the raw public key data.
/// The name of the application.
/// A object that specifies the version of the application.
/// The processor architecture of the application.
/// The culture of the application.
///
/// is null.-or-is null.-or-is null.
///
/// is an empty string.
// Token: 0x06003AFE RID: 15102 RVA: 0x000C9584 File Offset: 0x000C7784
public ApplicationId(byte[] publicKeyToken, string name, Version version, string processorArchitecture, string culture)
{
if (publicKeyToken == null)
{
throw new ArgumentNullException("publicKeyToken");
}
if (name == null)
{
throw new ArgumentNullException("name");
}
if (version == null)
{
throw new ArgumentNullException("version");
}
this._token = (byte[])publicKeyToken.Clone();
this._name = name;
this._version = version;
this._proc = processorArchitecture;
this._culture = culture;
}
/// Gets a string representing the culture information for the application.
/// The culture information for the application.
/// 2
// Token: 0x17000B49 RID: 2889
// (get) Token: 0x06003AFF RID: 15103 RVA: 0x000C9600 File Offset: 0x000C7800
public string Culture
{
get
{
return this._culture;
}
}
/// Gets the name of the application.
/// The name of the application.
/// 2
// Token: 0x17000B4A RID: 2890
// (get) Token: 0x06003B00 RID: 15104 RVA: 0x000C9608 File Offset: 0x000C7808
public string Name
{
get
{
return this._name;
}
}
/// Gets the target processor architecture for the application.
/// The processor architecture of the application.
/// 2
// Token: 0x17000B4B RID: 2891
// (get) Token: 0x06003B01 RID: 15105 RVA: 0x000C9610 File Offset: 0x000C7810
public string ProcessorArchitecture
{
get
{
return this._proc;
}
}
/// Gets the public key token for the application.
/// A byte array containing the public key token for the application.
/// 2
// Token: 0x17000B4C RID: 2892
// (get) Token: 0x06003B02 RID: 15106 RVA: 0x000C9618 File Offset: 0x000C7818
public byte[] PublicKeyToken
{
get
{
return (byte[])this._token.Clone();
}
}
/// Gets the version of the application.
/// A that specifies the version of the application.
/// 2
// Token: 0x17000B4D RID: 2893
// (get) Token: 0x06003B03 RID: 15107 RVA: 0x000C962C File Offset: 0x000C782C
public Version Version
{
get
{
return this._version;
}
}
/// Creates and returns an identical copy of the current application identity.
/// An object that represents an exact copy of the original.
/// 2
// Token: 0x06003B04 RID: 15108 RVA: 0x000C9634 File Offset: 0x000C7834
public ApplicationId Copy()
{
return new ApplicationId(this._token, this._name, this._version, this._proc, this._culture);
}
/// Determines whether the specified object is equivalent to the current .
/// true if the specified object is equivalent to the current ; otherwise, false.
/// The object to compare to the current .
/// 2
// Token: 0x06003B05 RID: 15109 RVA: 0x000C965C File Offset: 0x000C785C
public override bool Equals(object o)
{
if (o == null)
{
return false;
}
ApplicationId applicationId = o as ApplicationId;
if (applicationId == null)
{
return false;
}
if (this._name != applicationId._name)
{
return false;
}
if (this._proc != applicationId._proc)
{
return false;
}
if (this._culture != applicationId._culture)
{
return false;
}
if (!this._version.Equals(applicationId._version))
{
return false;
}
if (this._token.Length != applicationId._token.Length)
{
return false;
}
for (int i = 0; i < this._token.Length; i++)
{
if (this._token[i] != applicationId._token[i])
{
return false;
}
}
return true;
}
/// Gets the hash code for the current application identity.
/// The hash code for the current application identity.
/// 2
// Token: 0x06003B06 RID: 15110 RVA: 0x000C9728 File Offset: 0x000C7928
public override int GetHashCode()
{
int num = this._name.GetHashCode() ^ this._version.GetHashCode();
for (int i = 0; i < this._token.Length; i++)
{
num ^= (int)this._token[i];
}
return num;
}
/// Creates and returns a string representation of the application identity.
/// A string representation of the application identity.
/// 2
// Token: 0x06003B07 RID: 15111 RVA: 0x000C9774 File Offset: 0x000C7974
public override string ToString()
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append(this._name);
if (this._culture != null)
{
stringBuilder.AppendFormat(", culture=\"{0}\"", this._culture);
}
stringBuilder.AppendFormat(", version=\"{0}\", publicKeyToken=\"", this._version);
for (int i = 0; i < this._token.Length; i++)
{
stringBuilder.Append(this._token[i].ToString("X2"));
}
if (this._proc != null)
{
stringBuilder.AppendFormat("\", processorArchitecture =\"{0}\"", this._proc);
}
else
{
stringBuilder.Append("\"");
}
return stringBuilder.ToString();
}
// Token: 0x0400179A RID: 6042
private byte[] _token;
// Token: 0x0400179B RID: 6043
private string _name;
// Token: 0x0400179C RID: 6044
private Version _version;
// Token: 0x0400179D RID: 6045
private string _proc;
// Token: 0x0400179E RID: 6046
private string _culture;
}
}