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
- EpmCustomContentDeSerializer.cs
- HopperCache.cs
- IgnoreFileBuildProvider.cs
- RegexRunnerFactory.cs
- DLinqAssociationProvider.cs
- Misc.cs
- StateManagedCollection.cs
- PanelStyle.cs
- _DigestClient.cs
- XmlQueryContext.cs
- ConcurrentDictionary.cs
- UnmanagedBitmapWrapper.cs
- BitmapEffectRenderDataResource.cs
- ConfigUtil.cs
- DataGridViewCellConverter.cs
- BamlCollectionHolder.cs
- CalendarDay.cs
- XmlAttributes.cs
- SingleKeyFrameCollection.cs
- MethodRental.cs
- PartialCachingAttribute.cs
- ValidationResult.cs
- Drawing.cs
- DbTransaction.cs
- TabRenderer.cs
- AllowedAudienceUriElement.cs
- DataSourceIDConverter.cs
- MissingMemberException.cs
- ISCIIEncoding.cs
- CommandField.cs
- DBCommand.cs
- DesignerProperties.cs
- LinkButton.cs
- Axis.cs
- SQLChars.cs
- ConsoleKeyInfo.cs
- XmlParserContext.cs
- TimeIntervalCollection.cs
- XmlProcessingInstruction.cs
- FieldNameLookup.cs
- TypedElement.cs
- IFlowDocumentViewer.cs
- ListViewPagedDataSource.cs
- TextEditorCharacters.cs
- NameTable.cs
- XmlEncodedRawTextWriter.cs
- WhitespaceReader.cs
- ToolboxItemWrapper.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- _HeaderInfo.cs
- EUCJPEncoding.cs
- MinimizableAttributeTypeConverter.cs
- HttpCookieCollection.cs
- SerialErrors.cs
- RadioButtonPopupAdapter.cs
- ConfigXmlWhitespace.cs
- BoundField.cs
- DoubleAnimationUsingPath.cs
- HtmlUtf8RawTextWriter.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- ConfigurationStrings.cs
- DataRecordInfo.cs
- AuthorizationRule.cs
- KeyNotFoundException.cs
- JavascriptCallbackMessageInspector.cs
- DataControlField.cs
- TextContainerHelper.cs
- Ports.cs
- ClientType.cs
- BoundPropertyEntry.cs
- MemoryFailPoint.cs
- ZipIOLocalFileHeader.cs
- SmiRecordBuffer.cs
- NonParentingControl.cs
- ProfileSection.cs
- OdbcInfoMessageEvent.cs
- DetailsView.cs
- BidirectionalDictionary.cs
- XmlSerializableServices.cs
- PersonalizationProviderCollection.cs
- VectorCollectionValueSerializer.cs
- FloatUtil.cs
- Vector.cs
- FormsAuthenticationUserCollection.cs
- SQLDoubleStorage.cs
- SafeNativeMethods.cs
- Parsers.cs
- RangeContentEnumerator.cs
- ChooseAction.cs
- UpdatableWrapper.cs
- DataGridBoundColumn.cs
- DesignParameter.cs
- Interlocked.cs
- XmlCharType.cs
- Vector3D.cs
- ISAPIWorkerRequest.cs
- SystemColors.cs
- Hash.cs
- Int64KeyFrameCollection.cs
- ProfileSettingsCollection.cs