Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Design / CommandID.cs / 1305376 / 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. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RoleGroup.cs
- Clause.cs
- HwndSource.cs
- FlowDocumentView.cs
- UIElementParaClient.cs
- GCHandleCookieTable.cs
- MdiWindowListStrip.cs
- VerticalConnector.xaml.cs
- SourceFileInfo.cs
- SQLMembershipProvider.cs
- KeyConverter.cs
- OutKeywords.cs
- ReceiveContext.cs
- AttachmentService.cs
- XPathException.cs
- DateTimeConverter.cs
- XmlRawWriter.cs
- FixedElement.cs
- Point3DCollectionConverter.cs
- AllMembershipCondition.cs
- StreamWriter.cs
- Comparer.cs
- XmlElement.cs
- SecurityCredentialsManager.cs
- XmlSchemaSimpleType.cs
- WebPartCatalogAddVerb.cs
- InputMethodStateTypeInfo.cs
- LockedHandleGlyph.cs
- ListenerAdapter.cs
- ServiceXNameTypeConverter.cs
- BaseTemplateParser.cs
- HGlobalSafeHandle.cs
- RectConverter.cs
- HttpModuleActionCollection.cs
- Odbc32.cs
- Identity.cs
- AssociationTypeEmitter.cs
- ApplicationActivator.cs
- EventLogTraceListener.cs
- NonParentingControl.cs
- XappLauncher.cs
- SHA1Cng.cs
- X509CertificateClaimSet.cs
- AnimationException.cs
- KeyedCollection.cs
- TableChangeProcessor.cs
- ScriptControlManager.cs
- TransformCollection.cs
- DataGridTable.cs
- DBConnection.cs
- _RegBlobWebProxyDataBuilder.cs
- XmlEncodedRawTextWriter.cs
- RuntimeConfigLKG.cs
- MultiByteCodec.cs
- MarkupCompiler.cs
- ClassImporter.cs
- _ContextAwareResult.cs
- RMEnrollmentPage1.cs
- ResponseBodyWriter.cs
- QilReplaceVisitor.cs
- SmiConnection.cs
- ClientData.cs
- DtrList.cs
- HtmlEncodedRawTextWriter.cs
- ReadWriteSpinLock.cs
- HttpDictionary.cs
- documentsequencetextcontainer.cs
- FormatVersion.cs
- PagePropertiesChangingEventArgs.cs
- StickyNote.cs
- XamlFilter.cs
- GridViewColumnHeaderAutomationPeer.cs
- PropertyPath.cs
- XmlDocumentFragment.cs
- PropertyDescriptor.cs
- FixedLineResult.cs
- WpfXamlLoader.cs
- WebPartTracker.cs
- AliasGenerator.cs
- JulianCalendar.cs
- UpWmlPageAdapter.cs
- VisualTreeHelper.cs
- UnitySerializationHolder.cs
- Font.cs
- TextDpi.cs
- DeploymentSection.cs
- XmlStreamStore.cs
- IndexedEnumerable.cs
- _Semaphore.cs
- InvokeHandlers.cs
- SurrogateEncoder.cs
- SqlCommandSet.cs
- DatatypeImplementation.cs
- AsymmetricKeyExchangeDeformatter.cs
- MarkupObject.cs
- CompositeTypefaceMetrics.cs
- PseudoWebRequest.cs
- ToolStripOverflowButton.cs
- ColorAnimation.cs
- XPathMultyIterator.cs