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
- HitTestResult.cs
- ModuleConfigurationInfo.cs
- SmiMetaData.cs
- TextBoxAutomationPeer.cs
- ListViewPagedDataSource.cs
- JsonEnumDataContract.cs
- LineMetrics.cs
- OdbcError.cs
- SimpleHandlerFactory.cs
- SecondaryIndex.cs
- OverloadGroupAttribute.cs
- VisualBasicReference.cs
- DbParameterHelper.cs
- OrderedEnumerableRowCollection.cs
- SHA384Managed.cs
- BackgroundFormatInfo.cs
- TypeConverterHelper.cs
- TreeNodeConverter.cs
- MailMessage.cs
- ProtocolReflector.cs
- DPCustomTypeDescriptor.cs
- WebControlAdapter.cs
- XPathLexer.cs
- ImageInfo.cs
- TdsParserStaticMethods.cs
- TreeViewItemAutomationPeer.cs
- AnnotationResource.cs
- Win32Exception.cs
- HtmlInputText.cs
- EdmComplexPropertyAttribute.cs
- MatrixIndependentAnimationStorage.cs
- TypeTypeConverter.cs
- RelationalExpressions.cs
- TaskCanceledException.cs
- Unit.cs
- SelectorAutomationPeer.cs
- HebrewNumber.cs
- TagPrefixCollection.cs
- Cloud.cs
- DocumentViewerAutomationPeer.cs
- LabelAutomationPeer.cs
- StsCommunicationException.cs
- TrackingServices.cs
- KnownIds.cs
- UIElement.cs
- QuadraticEase.cs
- XamlSerializerUtil.cs
- AccessDataSourceView.cs
- DocumentViewerConstants.cs
- ConfigurationSettings.cs
- CngKeyBlobFormat.cs
- Intellisense.cs
- PreservationFileReader.cs
- CompilerResults.cs
- XmlText.cs
- VirtualPathUtility.cs
- SchemaNamespaceManager.cs
- FileRegion.cs
- DBSqlParserColumnCollection.cs
- ToolStripPanel.cs
- HttpCacheVaryByContentEncodings.cs
- DesignerAutoFormatStyle.cs
- PrivilegedConfigurationManager.cs
- DataGridViewMethods.cs
- WizardPanelChangingEventArgs.cs
- XmlSerializableWriter.cs
- JapaneseCalendar.cs
- PeerNode.cs
- DataShape.cs
- TaiwanLunisolarCalendar.cs
- ToolStripPanel.cs
- OutOfProcStateClientManager.cs
- ElementNotEnabledException.cs
- Utility.cs
- InvalidCommandTreeException.cs
- IgnoreSectionHandler.cs
- MetadataPropertyvalue.cs
- RelationshipEndMember.cs
- ScriptingWebServicesSectionGroup.cs
- SequentialWorkflowHeaderFooter.cs
- DataGridViewCellMouseEventArgs.cs
- TextTreeText.cs
- LinqDataSourceSelectEventArgs.cs
- IteratorDescriptor.cs
- MsmqInputMessagePool.cs
- ObjectDataProvider.cs
- ReadOnlyDataSource.cs
- SafeSecurityHelper.cs
- CurrencyWrapper.cs
- ServiceKnownTypeAttribute.cs
- ThicknessAnimation.cs
- IntellisenseTextBox.cs
- DesignerEventService.cs
- LassoSelectionBehavior.cs
- CatchDesigner.xaml.cs
- StringDictionaryWithComparer.cs
- SafeThreadHandle.cs
- ViewManagerAttribute.cs
- DoubleLink.cs
- XPathConvert.cs