Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / DescriptionAttribute.cs / 1 / DescriptionAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public class DescriptionAttribute : Attribute { ///Specifies a description for a property /// or event. ////// public static readonly DescriptionAttribute Default = new DescriptionAttribute(); private string description; ///Specifies the default value for the ///, which is an /// empty string (""). This field is read-only. /// public DescriptionAttribute() : this (string.Empty) { } ///[To be supplied.] ////// public DescriptionAttribute(string description) { this.description = description; } ///Initializes a new instance of the ///class. /// public virtual string Description { get { return DescriptionValue; } } ///Gets the description stored in this attribute. ////// Read/Write property that directly modifies the string stored /// in the description attribute. The default implementation /// of the Description property simply returns this value. /// protected string DescriptionValue { get { return description; } set { description = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } DescriptionAttribute other = obj as DescriptionAttribute; return (other != null) && other.Description == Description; } public override int GetHashCode() { return Description.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public class DescriptionAttribute : Attribute { ///Specifies a description for a property /// or event. ////// public static readonly DescriptionAttribute Default = new DescriptionAttribute(); private string description; ///Specifies the default value for the ///, which is an /// empty string (""). This field is read-only. /// public DescriptionAttribute() : this (string.Empty) { } ///[To be supplied.] ////// public DescriptionAttribute(string description) { this.description = description; } ///Initializes a new instance of the ///class. /// public virtual string Description { get { return DescriptionValue; } } ///Gets the description stored in this attribute. ////// Read/Write property that directly modifies the string stored /// in the description attribute. The default implementation /// of the Description property simply returns this value. /// protected string DescriptionValue { get { return description; } set { description = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } DescriptionAttribute other = obj as DescriptionAttribute; return (other != null) && other.Description == Description; } public override int GetHashCode() { return Description.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WorkItem.cs
- ValidatorCompatibilityHelper.cs
- SqlInfoMessageEvent.cs
- MouseGesture.cs
- ConfigurationLocationCollection.cs
- FormViewPageEventArgs.cs
- TraceSource.cs
- Style.cs
- RadialGradientBrush.cs
- XmlIterators.cs
- XsltCompileContext.cs
- EDesignUtil.cs
- AbsoluteQuery.cs
- Rfc4050KeyFormatter.cs
- StagingAreaInputItem.cs
- CuspData.cs
- SafeRightsManagementQueryHandle.cs
- DeferredTextReference.cs
- TextRangeAdaptor.cs
- TypeUsage.cs
- AccessDataSourceView.cs
- XsltException.cs
- BitmapFrame.cs
- NaturalLanguageHyphenator.cs
- ExpressionsCollectionConverter.cs
- GlyphsSerializer.cs
- SingleStorage.cs
- DefaultSection.cs
- DbConnectionPoolOptions.cs
- SmtpFailedRecipientsException.cs
- TdsEnums.cs
- ListViewItemCollectionEditor.cs
- MappingItemCollection.cs
- CryptoProvider.cs
- SchemaElementDecl.cs
- FormsAuthentication.cs
- DataSourceControl.cs
- CipherData.cs
- ToolStripSplitStackLayout.cs
- BaseTemplateCodeDomTreeGenerator.cs
- MediaSystem.cs
- DynamicValidatorEventArgs.cs
- SliderAutomationPeer.cs
- AdPostCacheSubstitution.cs
- _SSPISessionCache.cs
- WSSecureConversationDec2005.cs
- DocumentGridPage.cs
- ObjectViewFactory.cs
- DataGridHeaderBorder.cs
- StreamReader.cs
- BamlLocalizableResourceKey.cs
- ActivatableWorkflowsQueryResult.cs
- ConnectionConsumerAttribute.cs
- NegotiationTokenAuthenticatorStateCache.cs
- _HeaderInfoTable.cs
- AsyncInvokeOperation.cs
- CanonicalFontFamilyReference.cs
- ModelChangedEventArgsImpl.cs
- ValidationSummary.cs
- XPathQueryGenerator.cs
- RotationValidation.cs
- ManualResetEvent.cs
- FocusTracker.cs
- DesignerTransactionCloseEvent.cs
- ContextBase.cs
- InputProcessorProfiles.cs
- InstanceHandle.cs
- ChtmlMobileTextWriter.cs
- ArglessEventHandlerProxy.cs
- ManualResetEvent.cs
- GenericEnumConverter.cs
- ToolboxComponentsCreatedEventArgs.cs
- DbgUtil.cs
- PropertyDescriptor.cs
- DatePickerAutomationPeer.cs
- HybridObjectCache.cs
- GenerateTemporaryTargetAssembly.cs
- ContractType.cs
- ExpressionBindingsDialog.cs
- AudioFormatConverter.cs
- basecomparevalidator.cs
- AuthenticationService.cs
- ListViewContainer.cs
- ErrorLog.cs
- WorkflowViewService.cs
- PointF.cs
- SubpageParaClient.cs
- EncoderNLS.cs
- NamedPipeProcessProtocolHandler.cs
- NativeMethods.cs
- HtmlInputHidden.cs
- SourceCollection.cs
- BamlReader.cs
- OrCondition.cs
- CredentialCache.cs
- StreamGeometryContext.cs
- SafeNativeMethods.cs
- ListViewItemMouseHoverEvent.cs
- ScriptReference.cs
- Context.cs