Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / Design / CommandID.cs / 1 / CommandID.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using System; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] [System.Runtime.InteropServices.ComVisible(true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class CommandID { private readonly Guid menuGroup; private readonly int commandID; ////// Represents a /// numeric Command ID and globally unique /// ID (GUID) menu identifier that together uniquely identify a command. /// ////// public CommandID(Guid menuGroup, int commandID) { this.menuGroup = menuGroup; this.commandID = commandID; } ////// Initializes a new instance of the ////// class. Creates a new command /// ID. /// /// public virtual int ID { get { return commandID; } } ////// Gets or sets the numeric command ID. /// ////// public override bool Equals(object obj) { if (!(obj is CommandID)) { return false; } CommandID cid = (CommandID)obj; return cid.menuGroup.Equals(menuGroup) && cid.commandID == commandID; } ////// Overrides Object's Equals method. /// ////// public override int GetHashCode() { return menuGroup.GetHashCode() << 2 | commandID; } ///[To be supplied.] ////// public virtual Guid Guid { get { return menuGroup; } } ////// Gets or sets the globally /// unique ID /// (GUID) of the menu group that the menu command this CommandID /// represents belongs to. /// ////// public override string ToString() { return menuGroup.ToString() + " : " + commandID.ToString(CultureInfo.CurrentCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Overrides Object's ToString method. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using System; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] [System.Runtime.InteropServices.ComVisible(true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class CommandID { private readonly Guid menuGroup; private readonly int commandID; ////// Represents a /// numeric Command ID and globally unique /// ID (GUID) menu identifier that together uniquely identify a command. /// ////// public CommandID(Guid menuGroup, int commandID) { this.menuGroup = menuGroup; this.commandID = commandID; } ////// Initializes a new instance of the ////// class. Creates a new command /// ID. /// /// public virtual int ID { get { return commandID; } } ////// Gets or sets the numeric command ID. /// ////// public override bool Equals(object obj) { if (!(obj is CommandID)) { return false; } CommandID cid = (CommandID)obj; return cid.menuGroup.Equals(menuGroup) && cid.commandID == commandID; } ////// Overrides Object's Equals method. /// ////// public override int GetHashCode() { return menuGroup.GetHashCode() << 2 | commandID; } ///[To be supplied.] ////// public virtual Guid Guid { get { return menuGroup; } } ////// Gets or sets the globally /// unique ID /// (GUID) of the menu group that the menu command this CommandID /// represents belongs to. /// ////// public override string ToString() { return menuGroup.ToString() + " : " + commandID.ToString(CultureInfo.CurrentCulture); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Overrides Object's ToString method. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GridViewColumnCollectionChangedEventArgs.cs
- FillBehavior.cs
- Helpers.cs
- regiisutil.cs
- CultureMapper.cs
- UpdateRecord.cs
- TreeWalker.cs
- XsdBuilder.cs
- DesignerAttribute.cs
- LinqDataSource.cs
- FlowLayoutSettings.cs
- FileLevelControlBuilderAttribute.cs
- CodeDefaultValueExpression.cs
- SqlInfoMessageEvent.cs
- BinaryKeyIdentifierClause.cs
- KeyNotFoundException.cs
- Propagator.JoinPropagator.cs
- XmlCustomFormatter.cs
- PolicyException.cs
- LogSwitch.cs
- SerializationInfoEnumerator.cs
- DSASignatureDeformatter.cs
- ConfigurationLockCollection.cs
- NativeCompoundFileAPIs.cs
- TrustManagerMoreInformation.cs
- MultiTrigger.cs
- GeneralTransform3DGroup.cs
- AesCryptoServiceProvider.cs
- GridViewCellAutomationPeer.cs
- DbCommandDefinition.cs
- DoubleUtil.cs
- HandledMouseEvent.cs
- BindingMemberInfo.cs
- Vars.cs
- SQLDecimal.cs
- ListViewContainer.cs
- ItemChangedEventArgs.cs
- DesignerWithHeader.cs
- FileUtil.cs
- Itemizer.cs
- MemoryFailPoint.cs
- DocumentEventArgs.cs
- Compilation.cs
- InitializationEventAttribute.cs
- ContentPlaceHolder.cs
- ClientScriptItem.cs
- KeyEvent.cs
- SafeProcessHandle.cs
- ThreadStateException.cs
- Polygon.cs
- TextOnlyOutput.cs
- PrivilegeNotHeldException.cs
- SqlDuplicator.cs
- ProviderUtil.cs
- ThreadStateException.cs
- SoapElementAttribute.cs
- ObjectItemLoadingSessionData.cs
- CopyNamespacesAction.cs
- ServiceBuildProvider.cs
- ProcessHost.cs
- WebPartHeaderCloseVerb.cs
- ImageListImageEditor.cs
- PropertyChangedEventManager.cs
- CodeTypeReference.cs
- EFColumnProvider.cs
- MethodBuilder.cs
- SimpleMailWebEventProvider.cs
- PaintEvent.cs
- TemplateBuilder.cs
- PingOptions.cs
- SQLBytes.cs
- DefaultTextStoreTextComposition.cs
- OpCellTreeNode.cs
- HtmlImage.cs
- SqlServer2KCompatibilityAnnotation.cs
- NullExtension.cs
- SchemaAttDef.cs
- ControlEvent.cs
- GacUtil.cs
- ClientRuntime.cs
- DesignSurfaceCollection.cs
- EventSetter.cs
- HtmlTitle.cs
- PerformanceCounterPermissionAttribute.cs
- PropertyChangeTracker.cs
- XmlILCommand.cs
- Guid.cs
- CaseInsensitiveComparer.cs
- CodeNamespaceImport.cs
- XmlEncoding.cs
- WorkflowMessageEventArgs.cs
- EventEntry.cs
- OperationContractAttribute.cs
- SearchForVirtualItemEventArgs.cs
- ProfileBuildProvider.cs
- GridViewDeleteEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- BuildProvider.cs
- HideDisabledControlAdapter.cs
- PictureBox.cs