Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / DesignerCategoryAttribute.cs / 1 / DesignerCategoryAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.ComponentModel; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] public sealed class DesignerCategoryAttribute : Attribute { private string category; private string typeId; ///Specifies that the designer for a class belongs to a certain /// category. ////// public static readonly DesignerCategoryAttribute Component = new DesignerCategoryAttribute("Component"); ////// Specifies that a component marked with this category uses a /// component designer. This ///field is read-only. /// /// public static readonly DesignerCategoryAttribute Default = new DesignerCategoryAttribute(); ////// Specifies that a component marked with this category cannot use a visual /// designer. This ///field is read-only. /// /// public static readonly DesignerCategoryAttribute Form = new DesignerCategoryAttribute("Form"); ////// Specifies that a component marked with this category uses a form designer. /// This ///field is read-only. /// /// public static readonly DesignerCategoryAttribute Generic = new DesignerCategoryAttribute("Designer"); ////// Specifies that a component marked with this category uses a generic designer. /// This ///field is read-only. /// /// public DesignerCategoryAttribute() { category = string.Empty; } ////// Initializes a new instance of the ///class with the /// default category. /// /// public DesignerCategoryAttribute(string category) { this.category = category; } ////// Initializes a new instance of the ///class with /// the given category name. /// /// public string Category { get { return category; } } ////// Gets the name of the category. /// ////// /// public override object TypeId { get { if (typeId == null) { typeId = GetType().FullName + Category; } return typeId; } } ////// This defines a unique ID for this attribute type. It is used /// by filtering algorithms to identify two attributes that are /// the same type. For most attributes, this just returns the /// Type instance for the attribute. DesignerAttribute overrides /// this to include the name of the category /// ////// ////// ////// public override bool Equals(object obj){ if (obj == this) { return true; } DesignerCategoryAttribute other = obj as DesignerCategoryAttribute; return (other != null) && other.category == category; } /// /// public override int GetHashCode() { return category.GetHashCode(); } ///[To be supplied.] ////// ////// ////// public override bool IsDefaultAttribute() { return category.Equals(Default.Category); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ServicePointManagerElement.cs
- FloaterParagraph.cs
- Debugger.cs
- RelationshipFixer.cs
- XmlSchemaSimpleTypeList.cs
- WebServiceTypeData.cs
- BindUriHelper.cs
- sqlstateclientmanager.cs
- UmAlQuraCalendar.cs
- Stream.cs
- ClientBuildManager.cs
- InputLanguageManager.cs
- Model3DGroup.cs
- WebPartMenu.cs
- HeaderUtility.cs
- SqlDataAdapter.cs
- HTMLTagNameToTypeMapper.cs
- ConfigurationValue.cs
- GC.cs
- WindowsNonControl.cs
- SqlMethodAttribute.cs
- MetadataArtifactLoaderResource.cs
- PointConverter.cs
- TraceHandlerErrorFormatter.cs
- RawStylusActions.cs
- MsmqIntegrationSecurityElement.cs
- UniqueIdentifierService.cs
- XPathNavigatorKeyComparer.cs
- Int32CAMarshaler.cs
- DbFunctionCommandTree.cs
- PopOutPanel.cs
- ThicknessConverter.cs
- FileUtil.cs
- XmlCompatibilityReader.cs
- FontDriver.cs
- MethodToken.cs
- XmlSchemaValidator.cs
- SqlConnectionString.cs
- ObjectIDGenerator.cs
- ScrollItemPattern.cs
- EdmFunctions.cs
- ToolConsole.cs
- SecurityTimestamp.cs
- PasswordBoxAutomationPeer.cs
- TimeStampChecker.cs
- SafeCoTaskMem.cs
- URLString.cs
- RenderDataDrawingContext.cs
- SslStreamSecurityUpgradeProvider.cs
- HttpClientCertificate.cs
- ManipulationStartingEventArgs.cs
- StringExpressionSet.cs
- StringArrayConverter.cs
- PriorityBindingExpression.cs
- Misc.cs
- Base64Encoder.cs
- MediaContextNotificationWindow.cs
- SystemPens.cs
- ValidateNames.cs
- OciLobLocator.cs
- RemoteCryptoRsaServiceProvider.cs
- MetadataCollection.cs
- ExpressionConverter.cs
- DataGridViewColumnStateChangedEventArgs.cs
- ACE.cs
- XmlArrayItemAttributes.cs
- ConnectionAcceptor.cs
- SocketConnection.cs
- EventMappingSettings.cs
- ExpressionVisitorHelpers.cs
- Link.cs
- DashStyle.cs
- ScriptControl.cs
- GeneralTransform3DTo2D.cs
- ControlPager.cs
- FileLogRecordStream.cs
- Utils.cs
- DetailsViewInsertEventArgs.cs
- DataGridRow.cs
- EntityProxyFactory.cs
- HtmlInputButton.cs
- ToolStripSplitStackLayout.cs
- DebuggerAttributes.cs
- DescendantQuery.cs
- WeakEventManager.cs
- ArrayList.cs
- Timeline.cs
- BindingSource.cs
- ServiceNotStartedException.cs
- DesignTimeValidationFeature.cs
- SecurityCredentialsManager.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- XmlSerializerSection.cs
- ReadingWritingEntityEventArgs.cs
- TextTreeFixupNode.cs
- Attributes.cs
- WindowsAuthenticationModule.cs
- TypeToken.cs
- ClonableStack.cs
- WebPartsPersonalization.cs