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
- EnumCodeDomSerializer.cs
- PointValueSerializer.cs
- FormViewPageEventArgs.cs
- ColorTransform.cs
- SafeEventLogReadHandle.cs
- TiffBitmapEncoder.cs
- ConfigsHelper.cs
- TdsParserStateObject.cs
- EntityDataSource.cs
- RadioButtonStandardAdapter.cs
- UnsupportedPolicyOptionsException.cs
- DockingAttribute.cs
- ChineseLunisolarCalendar.cs
- Table.cs
- TypeReference.cs
- basenumberconverter.cs
- ExtractorMetadata.cs
- IERequestCache.cs
- PartialToken.cs
- ElementHost.cs
- Application.cs
- ForeignConstraint.cs
- XmlImplementation.cs
- QilInvoke.cs
- WebDisplayNameAttribute.cs
- SkipQueryOptionExpression.cs
- ByteAnimationUsingKeyFrames.cs
- Cursor.cs
- TransactionManager.cs
- HtmlPhoneCallAdapter.cs
- SystemGatewayIPAddressInformation.cs
- SmtpLoginAuthenticationModule.cs
- AddInActivator.cs
- NotifyInputEventArgs.cs
- ISCIIEncoding.cs
- SqlCacheDependencyDatabaseCollection.cs
- UidManager.cs
- ProjectionPruner.cs
- SelfIssuedTokenFactoryCredential.cs
- AnnotationMap.cs
- GridItemPattern.cs
- ServiceBehaviorAttribute.cs
- DataColumnCollection.cs
- DesignerActionUI.cs
- ContainsRowNumberChecker.cs
- EncoderBestFitFallback.cs
- ServerProtocol.cs
- SourceChangedEventArgs.cs
- ObjectParameterCollection.cs
- Int16Storage.cs
- ProtocolReflector.cs
- GlyphElement.cs
- FixUp.cs
- ToolStripDropDownDesigner.cs
- BitmapPalette.cs
- KeyNotFoundException.cs
- Padding.cs
- TextReader.cs
- ByteKeyFrameCollection.cs
- TypeReference.cs
- StringSorter.cs
- ListViewItemEventArgs.cs
- basevalidator.cs
- OleDbFactory.cs
- IISUnsafeMethods.cs
- DispatcherFrame.cs
- AnimationLayer.cs
- ServiceInstallComponent.cs
- FileUtil.cs
- _NativeSSPI.cs
- QilChoice.cs
- Rijndael.cs
- TemplateEditingFrame.cs
- DataTableReader.cs
- CheckedListBox.cs
- SchemaElement.cs
- TypeElementCollection.cs
- MetadataElement.cs
- ConfigXmlDocument.cs
- ListViewGroupItemCollection.cs
- Range.cs
- EditorPartCollection.cs
- RotationValidation.cs
- GcHandle.cs
- XmlSchemaType.cs
- RoleServiceManager.cs
- TagMapCollection.cs
- PartManifestEntry.cs
- TextLine.cs
- RegistryKey.cs
- LongSumAggregationOperator.cs
- DataBoundControlHelper.cs
- BooleanFunctions.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- PolyLineSegmentFigureLogic.cs
- MethodRental.cs
- _SslState.cs
- Table.cs
- StaticContext.cs
- TemplateParser.cs