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
- EventBindingService.cs
- ApplicationFileParser.cs
- ChangesetResponse.cs
- ReflectionTypeLoadException.cs
- Label.cs
- ProxyWebPartConnectionCollection.cs
- FunctionUpdateCommand.cs
- XmlNamedNodeMap.cs
- ComplexType.cs
- TriggerActionCollection.cs
- WebConvert.cs
- OleDbFactory.cs
- FindCriteriaElement.cs
- UserPreferenceChangedEventArgs.cs
- HasActivatableWorkflowEvent.cs
- CryptoHelper.cs
- RestHandlerFactory.cs
- RangeValidator.cs
- DbExpressionVisitor.cs
- MulticastDelegate.cs
- StringFunctions.cs
- XmlAutoDetectWriter.cs
- XmlSchemaComplexContentRestriction.cs
- Attributes.cs
- HttpClientCertificate.cs
- LowerCaseStringConverter.cs
- Content.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- SizeAnimation.cs
- LineServices.cs
- AspNetRouteServiceHttpHandler.cs
- RealizationContext.cs
- Base64Encoder.cs
- XmlReaderDelegator.cs
- TypeReference.cs
- NativeMethods.cs
- IPipelineRuntime.cs
- XMLSyntaxException.cs
- PrimitiveDataContract.cs
- ComProxy.cs
- WebBrowser.cs
- TextElement.cs
- OleDbStruct.cs
- Item.cs
- XPathNavigatorReader.cs
- dataSvcMapFileLoader.cs
- LassoHelper.cs
- SmtpFailedRecipientsException.cs
- Publisher.cs
- UpDownEvent.cs
- Drawing.cs
- DataSourceNameHandler.cs
- PointKeyFrameCollection.cs
- ItemsControl.cs
- WindowProviderWrapper.cs
- ValidationHelpers.cs
- RegionInfo.cs
- DataGridViewTextBoxCell.cs
- SortedList.cs
- DataContractSet.cs
- ServiceContractViewControl.cs
- CssClassPropertyAttribute.cs
- Range.cs
- EditorPartChrome.cs
- BoundColumn.cs
- ObservableCollectionDefaultValueFactory.cs
- CompiledQuery.cs
- XmlFormatMapping.cs
- HostingEnvironment.cs
- DigitShape.cs
- AssemblyBuilder.cs
- DeferredBinaryDeserializerExtension.cs
- RegexNode.cs
- CategoryAttribute.cs
- SqlBulkCopyColumnMappingCollection.cs
- EventDescriptorCollection.cs
- MsmqElementBase.cs
- DataServices.cs
- FontNamesConverter.cs
- XmlSchemaInferenceException.cs
- ShadowGlyph.cs
- ParserHooks.cs
- EntityUtil.cs
- GeometryHitTestParameters.cs
- ThemeableAttribute.cs
- CngKeyBlobFormat.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- printdlgexmarshaler.cs
- _NegoState.cs
- HtmlTableRowCollection.cs
- KeyInterop.cs
- WsdlBuildProvider.cs
- WorkflowOperationFault.cs
- TcpAppDomainProtocolHandler.cs
- ClientRuntimeConfig.cs
- Stroke2.cs
- SmiGettersStream.cs
- DbMetaDataFactory.cs
- FontResourceCache.cs
- __Filters.cs