Files
2026-06-04 11:42:34 +02:00

76 lines
2.8 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
{
/// <summary>Represents a unique command identifier that consists of a numeric command ID and a GUID menu group identifier.</summary>
// Token: 0x0200003D RID: 61
[ComVisible(true)]
public class CommandID
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.CommandID" /> class using the specified menu group GUID and command ID number.</summary>
/// <param name="menuGroup">The GUID of the group that this menu command belongs to. </param>
/// <param name="commandID">The numeric identifier of this menu command. </param>
// Token: 0x0600029B RID: 667 RVA: 0x00009598 File Offset: 0x00007798
public CommandID(Guid menuGroup, int commandID)
{
this.cID = commandID;
this.guid = menuGroup;
}
/// <summary>Gets the GUID of the menu group that the menu command identified by this <see cref="T:System.ComponentModel.Design.CommandID" /> belongs to.</summary>
/// <returns>The GUID of the command group for this command.</returns>
// Token: 0x170000BC RID: 188
// (get) Token: 0x0600029C RID: 668 RVA: 0x000095B0 File Offset: 0x000077B0
public virtual Guid Guid
{
get
{
return this.guid;
}
}
/// <summary>Gets the numeric command ID.</summary>
/// <returns>The command ID number.</returns>
// Token: 0x170000BD RID: 189
// (get) Token: 0x0600029D RID: 669 RVA: 0x000095B8 File Offset: 0x000077B8
public virtual int ID
{
get
{
return this.cID;
}
}
/// <summary>Determines whether two <see cref="T:System.ComponentModel.Design.CommandID" /> instances are equal.</summary>
/// <returns>true if the specified object is equivalent to this one; otherwise, false.</returns>
/// <param name="obj">The object to compare. </param>
// Token: 0x0600029E RID: 670 RVA: 0x000095C0 File Offset: 0x000077C0
public override bool Equals(object obj)
{
return obj is CommandID && (obj == this || (((CommandID)obj).Guid.Equals(this.guid) && ((CommandID)obj).ID.Equals(this.cID)));
}
/// <returns>A hash code for the current <see cref="T:System.Object" />.</returns>
// Token: 0x0600029F RID: 671 RVA: 0x00009620 File Offset: 0x00007820
public override int GetHashCode()
{
return this.guid.GetHashCode() ^ this.cID.GetHashCode();
}
/// <summary>Returns a <see cref="T:System.String" /> that represents the current object.</summary>
/// <returns>A string that contains the command ID information, both the GUID and integer identifier. </returns>
// Token: 0x060002A0 RID: 672 RVA: 0x0000963C File Offset: 0x0000783C
public override string ToString()
{
return this.guid.ToString() + " : " + this.cID.ToString();
}
// Token: 0x040000B8 RID: 184
private int cID;
// Token: 0x040000B9 RID: 185
private Guid guid;
}
}