Code:
/ DotNET / DotNET / 8.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
- SqlColumnizer.cs
- EventLogLink.cs
- SqlBulkCopy.cs
- ToolStripPanelDesigner.cs
- XmlAttributes.cs
- EventTrigger.cs
- ActivationArguments.cs
- DataStorage.cs
- GridViewUpdatedEventArgs.cs
- Boolean.cs
- KeyFrames.cs
- SerializationAttributes.cs
- ExpandSegment.cs
- IntSecurity.cs
- UshortList2.cs
- Ref.cs
- MSAANativeProvider.cs
- ConsoleCancelEventArgs.cs
- X509ChainElement.cs
- StringValidatorAttribute.cs
- RegisteredArrayDeclaration.cs
- StretchValidation.cs
- HatchBrush.cs
- MenuBase.cs
- Sql8ConformanceChecker.cs
- MsmqChannelFactory.cs
- Synchronization.cs
- ResolveRequestResponseAsyncResult.cs
- DataServiceProviderWrapper.cs
- SoundPlayer.cs
- FileDialog.cs
- ActivityDesigner.cs
- ErrorsHelper.cs
- InkPresenter.cs
- TreeNodeEventArgs.cs
- DataGridViewButtonColumn.cs
- CallbackBehaviorAttribute.cs
- UserControl.cs
- ExtentKey.cs
- WebPartActionVerb.cs
- SystemIPGlobalProperties.cs
- DesignerTransaction.cs
- GradientStopCollection.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- NullReferenceException.cs
- LogEntryHeaderSerializer.cs
- ListViewDeleteEventArgs.cs
- TableCell.cs
- EdgeModeValidation.cs
- NetStream.cs
- CompositeCollectionView.cs
- ConfigurationLockCollection.cs
- DataServices.cs
- InitializationEventAttribute.cs
- SimpleWebHandlerParser.cs
- AllowedAudienceUriElement.cs
- FixedTextPointer.cs
- HopperCache.cs
- ResourceCategoryAttribute.cs
- Stackframe.cs
- IHttpResponseInternal.cs
- PerformanceCounterManager.cs
- XPathScanner.cs
- CharKeyFrameCollection.cs
- SmiContextFactory.cs
- NumberFunctions.cs
- SecurityPolicySection.cs
- IISUnsafeMethods.cs
- DictionaryBase.cs
- ProxyManager.cs
- CounterNameConverter.cs
- DiagnosticTraceSource.cs
- PolyLineSegment.cs
- WebSysDisplayNameAttribute.cs
- ClipboardProcessor.cs
- LabelLiteral.cs
- _FtpDataStream.cs
- BulletDecorator.cs
- TreeNodeStyle.cs
- EncoderBestFitFallback.cs
- AssemblyBuilderData.cs
- PointValueSerializer.cs
- SortableBindingList.cs
- ServiceObjectContainer.cs
- AppDomainFactory.cs
- ExclusiveHandleList.cs
- CollectionsUtil.cs
- Typography.cs
- FocusWithinProperty.cs
- LoginUtil.cs
- DbConnectionPoolCounters.cs
- RadioButtonRenderer.cs
- ThousandthOfEmRealDoubles.cs
- AttachedPropertyDescriptor.cs
- XomlSerializationHelpers.cs
- TreeNodeStyle.cs
- WebBrowserDesigner.cs
- CqlWriter.cs
- XmlSchemaComplexContentExtension.cs
- RowsCopiedEventArgs.cs