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
- WebPartVerbsEventArgs.cs
- QilUnary.cs
- NameValuePair.cs
- StoreContentChangedEventArgs.cs
- EventlogProvider.cs
- NativeMethods.cs
- CompiledXpathExpr.cs
- ZipArchive.cs
- Glyph.cs
- UserControl.cs
- DataGridViewCellValueEventArgs.cs
- EditorResources.cs
- DetailsView.cs
- DataKeyPropertyAttribute.cs
- Debugger.cs
- CFStream.cs
- XmlTypeMapping.cs
- ConstraintCollection.cs
- PropertyCollection.cs
- Transform3D.cs
- MembershipValidatePasswordEventArgs.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ExtendedProperty.cs
- Update.cs
- Oid.cs
- ArraySegment.cs
- HtmlTableCell.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- Timer.cs
- TextServicesCompartment.cs
- SafeNativeMethods.cs
- WebPartConnectionsCancelEventArgs.cs
- GrammarBuilderDictation.cs
- CustomTrackingRecord.cs
- AlignmentXValidation.cs
- Endpoint.cs
- ExceptionUtil.cs
- DocumentEventArgs.cs
- Form.cs
- ResizeGrip.cs
- DataObjectSettingDataEventArgs.cs
- assertwrapper.cs
- WmlValidatorAdapter.cs
- BindingValueChangedEventArgs.cs
- ValidatedControlConverter.cs
- documentsequencetextcontainer.cs
- LineServicesRun.cs
- QuaternionKeyFrameCollection.cs
- FlowLayoutSettings.cs
- ImageList.cs
- VScrollProperties.cs
- ScriptComponentDescriptor.cs
- WpfSharedBamlSchemaContext.cs
- InvalidMessageContractException.cs
- DependsOnAttribute.cs
- IPHostEntry.cs
- HTMLTextWriter.cs
- FeedUtils.cs
- CodePropertyReferenceExpression.cs
- DateTimeParse.cs
- MemberListBinding.cs
- RoutedEventHandlerInfo.cs
- PersistenceProviderDirectory.cs
- DataProtection.cs
- PeerNameRecord.cs
- XmlReaderSettings.cs
- SolidColorBrush.cs
- TextHidden.cs
- SessionPageStatePersister.cs
- Line.cs
- UpDownBase.cs
- ListControlActionList.cs
- IndexingContentUnit.cs
- WorkflowViewElement.cs
- BindingContext.cs
- PageOrientation.cs
- PolyQuadraticBezierSegment.cs
- CodeCommentStatement.cs
- ContextTokenTypeConverter.cs
- RtfControlWordInfo.cs
- DeclarationUpdate.cs
- AutoGeneratedFieldProperties.cs
- XPathNode.cs
- IndexingContentUnit.cs
- PersonalizationAdministration.cs
- streamingZipPartStream.cs
- ControlHelper.cs
- DrawingContextWalker.cs
- Dictionary.cs
- PointHitTestResult.cs
- IdentityHolder.cs
- SqlPersonalizationProvider.cs
- UriTemplateCompoundPathSegment.cs
- ModelPropertyDescriptor.cs
- ColumnWidthChangingEvent.cs
- WebExceptionStatus.cs
- SecurityPolicySection.cs
- X509SecurityTokenProvider.cs
- TimeSpan.cs
- XmlAutoDetectWriter.cs