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
- RuntimeHelpers.cs
- _CookieModule.cs
- WebReferencesBuildProvider.cs
- ViewSimplifier.cs
- DataGridRow.cs
- RowToParametersTransformer.cs
- Command.cs
- InputProviderSite.cs
- VectorConverter.cs
- RuntimeConfigurationRecord.cs
- PathNode.cs
- Win32PrintDialog.cs
- TranslateTransform.cs
- AssertUtility.cs
- SettingsPropertyValueCollection.cs
- HashLookup.cs
- ConfigurationLocationCollection.cs
- HotSpot.cs
- UnauthorizedWebPart.cs
- AsyncOperation.cs
- SizeKeyFrameCollection.cs
- HtmlShim.cs
- ReadOnlyCollectionBase.cs
- IPHostEntry.cs
- SliderAutomationPeer.cs
- ColorTransformHelper.cs
- PickBranchDesigner.xaml.cs
- EntityModelBuildProvider.cs
- TextUtf8RawTextWriter.cs
- MobileUserControl.cs
- Timeline.cs
- ToolCreatedEventArgs.cs
- ClientUrlResolverWrapper.cs
- IgnorePropertiesAttribute.cs
- ControlBuilderAttribute.cs
- ScrollBar.cs
- HtmlWindowCollection.cs
- PropertyConverter.cs
- GroupItemAutomationPeer.cs
- SingleTagSectionHandler.cs
- WindowsBrush.cs
- SafeEventHandle.cs
- SchemaTableOptionalColumn.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- DelegateSerializationHolder.cs
- DataIdProcessor.cs
- Pair.cs
- GZipObjectSerializer.cs
- KeyedQueue.cs
- LineUtil.cs
- UnhandledExceptionEventArgs.cs
- TextTreeDeleteContentUndoUnit.cs
- HtmlInputRadioButton.cs
- MailAddress.cs
- ToolBarDesigner.cs
- SQLMoney.cs
- UInt16Storage.cs
- ClientScriptManager.cs
- MexServiceChannelBuilder.cs
- Annotation.cs
- WebPartConnectionsEventArgs.cs
- SystemIPv4InterfaceProperties.cs
- NativeObjectSecurity.cs
- DesignerGenericWebPart.cs
- TransactionScopeDesigner.cs
- ProfileGroupSettings.cs
- Marshal.cs
- HttpListenerException.cs
- XmlNodeChangedEventManager.cs
- WebProxyScriptElement.cs
- OdbcConnectionOpen.cs
- ProcessInfo.cs
- XmlAttributeOverrides.cs
- TypedAsyncResult.cs
- XmlAtomErrorReader.cs
- sqlstateclientmanager.cs
- ImageDrawing.cs
- PathFigure.cs
- FileSystemInfo.cs
- ToolboxBitmapAttribute.cs
- Relationship.cs
- DataSource.cs
- BamlWriter.cs
- CompositeControl.cs
- ClientSession.cs
- PenThreadPool.cs
- AspNetRouteServiceHttpHandler.cs
- XmlMtomWriter.cs
- LayoutSettings.cs
- CreateDataSourceDialog.cs
- Rights.cs
- ToolStripContentPanelRenderEventArgs.cs
- VScrollBar.cs
- CheckBoxField.cs
- SessionEndingCancelEventArgs.cs
- DeclarativeCatalogPart.cs
- safex509handles.cs
- ScaleTransform3D.cs
- BeginEvent.cs
- newinstructionaction.cs