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
- ReadOnlyPropertyMetadata.cs
- CallSiteBinder.cs
- CommunicationObjectAbortedException.cs
- ClientApiGenerator.cs
- HttpListenerPrefixCollection.cs
- SystemGatewayIPAddressInformation.cs
- RegexGroup.cs
- AssemblyCache.cs
- EntityCommandExecutionException.cs
- QueryInterceptorAttribute.cs
- EditorResources.cs
- SqlReorderer.cs
- DataGridViewRowPostPaintEventArgs.cs
- Zone.cs
- CodeChecksumPragma.cs
- SByte.cs
- SystemSounds.cs
- XmlEventCache.cs
- FixedSOMImage.cs
- AsyncOperation.cs
- MatrixUtil.cs
- AsyncWaitHandle.cs
- ValidatingReaderNodeData.cs
- DataGridAutoFormatDialog.cs
- TextDecoration.cs
- TextElement.cs
- TextElementCollectionHelper.cs
- ObjectConverter.cs
- RetriableClipboard.cs
- XmlTypeAttribute.cs
- sqlnorm.cs
- SaveWorkflowCommand.cs
- ClientScriptManagerWrapper.cs
- ResourceContainer.cs
- TemplateContent.cs
- ToolStripDropTargetManager.cs
- UIPropertyMetadata.cs
- ElementNotAvailableException.cs
- ButtonAutomationPeer.cs
- TabPanel.cs
- SqlLiftIndependentRowExpressions.cs
- Section.cs
- BatchStream.cs
- OutputScopeManager.cs
- OutOfProcStateClientManager.cs
- EventLogPermissionAttribute.cs
- serverconfig.cs
- GregorianCalendar.cs
- XmlException.cs
- EditorPartChrome.cs
- CodeSnippetStatement.cs
- SingleAnimationUsingKeyFrames.cs
- EntitySqlQueryBuilder.cs
- ToolbarAUtomationPeer.cs
- ContentIterators.cs
- AggregationMinMaxHelpers.cs
- LoginUtil.cs
- CancellationHandlerDesigner.cs
- MouseGestureValueSerializer.cs
- ObjectDataSourceSelectingEventArgs.cs
- GridViewEditEventArgs.cs
- MetadataArtifactLoaderComposite.cs
- DebugHandleTracker.cs
- Rect.cs
- safesecurityhelperavalon.cs
- IIS7UserPrincipal.cs
- Mouse.cs
- AutomationElement.cs
- SerTrace.cs
- TableDetailsCollection.cs
- TableCellAutomationPeer.cs
- VisualCollection.cs
- TemplatePagerField.cs
- UriTemplateVariablePathSegment.cs
- TemplateControlCodeDomTreeGenerator.cs
- LocatorManager.cs
- ByteStorage.cs
- CodeValidator.cs
- CircleEase.cs
- ThrowOnMultipleAssignment.cs
- FontFamily.cs
- ListItemCollection.cs
- WindowsStatusBar.cs
- EventProviderWriter.cs
- OleDbDataReader.cs
- IEnumerable.cs
- HttpBrowserCapabilitiesBase.cs
- CatalogPart.cs
- ProxyFragment.cs
- EventToken.cs
- WebConfigurationHost.cs
- XmlSchemaCollection.cs
- Exceptions.cs
- RectValueSerializer.cs
- XamlDesignerSerializationManager.cs
- ParameterToken.cs
- sqlmetadatafactory.cs
- FamilyMapCollection.cs
- ProjectionCamera.cs
- ToolZoneDesigner.cs