Code:
/ 4.0 / 4.0 / untmp / 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. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ZoneMembershipCondition.cs
- ToolboxComponentsCreatingEventArgs.cs
- CheckBox.cs
- TemplateInstanceAttribute.cs
- DbConnectionOptions.cs
- WebConvert.cs
- ParseHttpDate.cs
- PhysicalFontFamily.cs
- ObjectStateFormatter.cs
- QueryParameter.cs
- CommandEventArgs.cs
- LayoutTableCell.cs
- DeviceContext2.cs
- StreamedWorkflowDefinitionContext.cs
- XmlSchemaAll.cs
- NetworkAddressChange.cs
- UpdateManifestForBrowserApplication.cs
- ReceiveActivity.cs
- DynamicMethod.cs
- SQLBinaryStorage.cs
- ToolStripSeparator.cs
- ProcessInfo.cs
- ParagraphVisual.cs
- DbDataReader.cs
- ProxyGenerationError.cs
- ArgumentOutOfRangeException.cs
- QilScopedVisitor.cs
- GuidelineSet.cs
- FileDialog.cs
- ServicePoint.cs
- ConfigXmlAttribute.cs
- MonthChangedEventArgs.cs
- XamlGridLengthSerializer.cs
- CharUnicodeInfo.cs
- HostedElements.cs
- HelpInfo.cs
- SafeArrayTypeMismatchException.cs
- DataGridViewHitTestInfo.cs
- dsa.cs
- RuntimeIdentifierPropertyAttribute.cs
- manifestimages.cs
- WinCategoryAttribute.cs
- StylusEditingBehavior.cs
- AsymmetricSignatureDeformatter.cs
- SystemIPv6InterfaceProperties.cs
- MemberJoinTreeNode.cs
- ExpressionBinding.cs
- IsolatedStorageFilePermission.cs
- ImageButton.cs
- ProtocolsConfigurationEntry.cs
- SubpageParaClient.cs
- ProfileModule.cs
- BackEase.cs
- TextEffect.cs
- BrowserCapabilitiesFactory.cs
- DataSvcMapFile.cs
- ArraySubsetEnumerator.cs
- ResourceIDHelper.cs
- WebConvert.cs
- TypeTypeConverter.cs
- NamedPermissionSet.cs
- ColorDialog.cs
- SiteIdentityPermission.cs
- ThaiBuddhistCalendar.cs
- InkCanvas.cs
- LazyTextWriterCreator.cs
- SecurityManager.cs
- HttpServerVarsCollection.cs
- HttpListenerRequestTraceRecord.cs
- codemethodreferenceexpression.cs
- StyleTypedPropertyAttribute.cs
- AttributeParameterInfo.cs
- PropertyGeneratedEventArgs.cs
- mediapermission.cs
- DataBoundControlHelper.cs
- Debug.cs
- securitycriticaldataformultiplegetandset.cs
- Source.cs
- HitTestWithGeometryDrawingContextWalker.cs
- QilFactory.cs
- DataGridPageChangedEventArgs.cs
- AppearanceEditorPart.cs
- TableRowCollection.cs
- PathFigureCollectionValueSerializer.cs
- DataContract.cs
- PointKeyFrameCollection.cs
- InputProcessorProfiles.cs
- CompilationUtil.cs
- BrowserCapabilitiesCodeGenerator.cs
- ProtocolsConfigurationHandler.cs
- WSFederationHttpBinding.cs
- RubberbandSelector.cs
- TagMapCollection.cs
- CheckBoxRenderer.cs
- RbTree.cs
- SnapLine.cs
- UndirectedGraph.cs
- OperandQuery.cs
- DispatchWrapper.cs
- DesignerSerializationManager.cs