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
- HttpApplicationStateWrapper.cs
- Polyline.cs
- LineMetrics.cs
- ParameterDataSourceExpression.cs
- ImpersonateTokenRef.cs
- Metadata.cs
- Publisher.cs
- ClientTargetCollection.cs
- ForwardPositionQuery.cs
- Parameter.cs
- MultitargetingHelpers.cs
- FillRuleValidation.cs
- DeviceContext.cs
- WorkerRequest.cs
- PublisherIdentityPermission.cs
- WebPartZone.cs
- QueryNode.cs
- CustomValidator.cs
- Cell.cs
- DLinqColumnProvider.cs
- GraphicsPathIterator.cs
- UriWriter.cs
- HttpModuleActionCollection.cs
- SQLSingleStorage.cs
- X509ClientCertificateCredentialsElement.cs
- ImageListUtils.cs
- SigningDialog.cs
- AndCondition.cs
- NegatedCellConstant.cs
- BaseParaClient.cs
- ConfigurationPropertyCollection.cs
- TableStyle.cs
- SymbolPair.cs
- BuildProvider.cs
- ViewBox.cs
- CompilerWrapper.cs
- TypeForwardedToAttribute.cs
- Int64Storage.cs
- StrokeSerializer.cs
- ScrollEvent.cs
- QuaternionRotation3D.cs
- CodeIdentifiers.cs
- JsonObjectDataContract.cs
- ConfigurationLocationCollection.cs
- ModifiableIteratorCollection.cs
- Convert.cs
- ParserOptions.cs
- SafeTokenHandle.cs
- SchemaCollectionPreprocessor.cs
- CodeTypeDelegate.cs
- RawStylusInputCustomData.cs
- AutoResetEvent.cs
- PeerApplicationLaunchInfo.cs
- DictionaryMarkupSerializer.cs
- RegionIterator.cs
- SpecialTypeDataContract.cs
- MarshalDirectiveException.cs
- ILGen.cs
- BaseCAMarshaler.cs
- EdmFunction.cs
- OdbcPermission.cs
- EventBuilder.cs
- MethodBody.cs
- ThreadExceptionEvent.cs
- TreeBuilderXamlTranslator.cs
- UnmanagedMemoryAccessor.cs
- AssociationEndMember.cs
- DataPagerFieldItem.cs
- EventManager.cs
- Validator.cs
- XmlComplianceUtil.cs
- Privilege.cs
- EventPrivateKey.cs
- ViewBox.cs
- BaseTreeIterator.cs
- WebPartPersonalization.cs
- UnmanagedMemoryStreamWrapper.cs
- ViewManager.cs
- XmlTextAttribute.cs
- UserUseLicenseDictionaryLoader.cs
- SimpleHandlerFactory.cs
- UniqueIdentifierService.cs
- StylusPointPropertyUnit.cs
- HelpKeywordAttribute.cs
- FixedElement.cs
- FilterElement.cs
- AgileSafeNativeMemoryHandle.cs
- BasicBrowserDialog.designer.cs
- XPathSingletonIterator.cs
- EntityKeyElement.cs
- assertwrapper.cs
- ErrorRuntimeConfig.cs
- FSWPathEditor.cs
- ControlCollection.cs
- Int16Converter.cs
- ComponentManagerBroker.cs
- CompiledRegexRunner.cs
- ChildTable.cs
- ToolboxComponentsCreatedEventArgs.cs
- WaitHandle.cs