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
- CounterSample.cs
- CodeChecksumPragma.cs
- ConnectionPoint.cs
- Paragraph.cs
- PrimaryKeyTypeConverter.cs
- XmlDownloadManager.cs
- ObjectAssociationEndMapping.cs
- Rect3DConverter.cs
- SpellerHighlightLayer.cs
- x509utils.cs
- DiagnosticStrings.cs
- Converter.cs
- SocketStream.cs
- Message.cs
- BuildDependencySet.cs
- WindowManager.cs
- OdbcConnectionHandle.cs
- CapabilitiesRule.cs
- PropertyDescriptorCollection.cs
- CodeBinaryOperatorExpression.cs
- Italic.cs
- Visual3DCollection.cs
- ResourceManager.cs
- X509CertificateTokenFactoryCredential.cs
- MatrixCamera.cs
- RuleSettingsCollection.cs
- EntityViewGenerationConstants.cs
- DataGridViewRowHeaderCell.cs
- SafeSecurityHandles.cs
- TimeSpanConverter.cs
- CroppedBitmap.cs
- NetPipeSection.cs
- SponsorHelper.cs
- SingleAnimationUsingKeyFrames.cs
- FolderNameEditor.cs
- RoleManagerModule.cs
- DSASignatureDeformatter.cs
- Select.cs
- DataGridToolTip.cs
- LabelEditEvent.cs
- ErrorHandler.cs
- SvcMapFile.cs
- UniqueConstraint.cs
- SchemaNames.cs
- EnlistmentTraceIdentifier.cs
- WindowsContainer.cs
- PeerEndPoint.cs
- RealizedColumnsBlock.cs
- ConfigXmlDocument.cs
- CodeDOMUtility.cs
- ClrProviderManifest.cs
- IntegerCollectionEditor.cs
- SafeCryptoHandles.cs
- NavigationHelper.cs
- NameValueCollection.cs
- DriveInfo.cs
- CustomErrorsSection.cs
- ValueTypeFieldReference.cs
- XpsResourcePolicy.cs
- FormatterServices.cs
- DataGridViewLayoutData.cs
- TextTrailingWordEllipsis.cs
- SqlFunctionAttribute.cs
- HyperlinkAutomationPeer.cs
- CanonicalXml.cs
- InteropDesigner.xaml.cs
- EntityFrameworkVersions.cs
- ping.cs
- RawAppCommandInputReport.cs
- DataControlImageButton.cs
- WmlMobileTextWriter.cs
- XmlDocumentFragment.cs
- CodeMethodInvokeExpression.cs
- DataServiceStreamProviderWrapper.cs
- ClientTarget.cs
- Pen.cs
- FreezableCollection.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- ProtectedConfiguration.cs
- ResourceReferenceKeyNotFoundException.cs
- ReturnType.cs
- DataRowExtensions.cs
- Parser.cs
- BitmapEffectCollection.cs
- QueryPageSettingsEventArgs.cs
- GlobalizationAssembly.cs
- BackStopAuthenticationModule.cs
- DataIdProcessor.cs
- UnaryNode.cs
- MbpInfo.cs
- ClockGroup.cs
- EdgeModeValidation.cs
- DataRowExtensions.cs
- TimeSpanHelper.cs
- ListContractAdapter.cs
- IxmlLineInfo.cs
- TableColumnCollection.cs
- SafeTokenHandle.cs
- Material.cs
- DbConnectionPoolCounters.cs