Code:
/ 4.0 / 4.0 / 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. /// ///// 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
- DbDataAdapter.cs
- BulletChrome.cs
- DataColumnChangeEvent.cs
- GregorianCalendar.cs
- HostVisual.cs
- ListView.cs
- DbConnectionHelper.cs
- EventRoute.cs
- NullRuntimeConfig.cs
- XPathDocument.cs
- RenderTargetBitmap.cs
- PointCollection.cs
- CodeRegionDirective.cs
- SrgsRule.cs
- FocusWithinProperty.cs
- shaperfactoryquerycacheentry.cs
- ScriptResourceHandler.cs
- MessageQueueCriteria.cs
- FtpWebRequest.cs
- ItemsPresenter.cs
- UrlMappingsSection.cs
- DesignerActionVerbList.cs
- Error.cs
- TextModifierScope.cs
- SetState.cs
- SQLInt64.cs
- Decoder.cs
- MobileResource.cs
- FontFamilyIdentifier.cs
- ReflectionTypeLoadException.cs
- LineBreakRecord.cs
- TemplatedControlDesigner.cs
- SerializationStore.cs
- GenericPrincipal.cs
- DrawingGroup.cs
- odbcmetadatafactory.cs
- BaseProcessor.cs
- BezierSegment.cs
- ViewBase.cs
- RegisteredHiddenField.cs
- CacheHelper.cs
- HtmlUtf8RawTextWriter.cs
- CustomWebEventKey.cs
- TableItemPattern.cs
- ProfileService.cs
- PrintDocument.cs
- ServicePointManagerElement.cs
- MultiPropertyDescriptorGridEntry.cs
- TraceListener.cs
- TemplateAction.cs
- ProvidersHelper.cs
- ConsoleKeyInfo.cs
- NameObjectCollectionBase.cs
- PrintingPermissionAttribute.cs
- MessageEncoder.cs
- EllipseGeometry.cs
- NonParentingControl.cs
- BufferedReadStream.cs
- DPAPIProtectedConfigurationProvider.cs
- SoapObjectWriter.cs
- RoutedCommand.cs
- CheckBoxFlatAdapter.cs
- MouseCaptureWithinProperty.cs
- StylusCollection.cs
- OdbcConnectionOpen.cs
- HMACSHA512.cs
- IndexerReference.cs
- HyperlinkAutomationPeer.cs
- SectionXmlInfo.cs
- DataConnectionHelper.cs
- ConstraintConverter.cs
- BitmapCodecInfo.cs
- FilteredAttributeCollection.cs
- CodeTypeConstructor.cs
- PassportAuthenticationEventArgs.cs
- SelectorItemAutomationPeer.cs
- InfoCardArgumentException.cs
- AssemblyAssociatedContentFileAttribute.cs
- SynchronousReceiveElement.cs
- HttpEncoderUtility.cs
- DecoderReplacementFallback.cs
- XPathAxisIterator.cs
- MimeTypePropertyAttribute.cs
- CheckBox.cs
- ReferenceConverter.cs
- ViewBase.cs
- ScrollChrome.cs
- TaiwanCalendar.cs
- SelectedDatesCollection.cs
- WebPartUserCapability.cs
- TreeWalkHelper.cs
- File.cs
- DispatcherHooks.cs
- Adorner.cs
- ResourcePart.cs
- SchemaNamespaceManager.cs
- NativeCppClassAttribute.cs
- Select.cs
- PersistNameAttribute.cs
- MiniCustomAttributeInfo.cs