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
- PropertyNames.cs
- ManualResetEventSlim.cs
- ComplexPropertyEntry.cs
- TransformProviderWrapper.cs
- HandleValueEditor.cs
- D3DImage.cs
- Ops.cs
- ProviderMetadataCachedInformation.cs
- MergePropertyDescriptor.cs
- AudioDeviceOut.cs
- SectionVisual.cs
- PartialList.cs
- Model3D.cs
- ComponentSerializationService.cs
- LinqToSqlWrapper.cs
- BitmapVisualManager.cs
- EventProviderClassic.cs
- SeekStoryboard.cs
- EditCommandColumn.cs
- SqlFlattener.cs
- PageThemeBuildProvider.cs
- KeyboardEventArgs.cs
- StringCollection.cs
- Hex.cs
- ListItemParagraph.cs
- XMLSchema.cs
- StringArrayConverter.cs
- Debug.cs
- PackageRelationship.cs
- ParamArrayAttribute.cs
- FaultHandlingFilter.cs
- PrincipalPermission.cs
- Event.cs
- WindowsEditBox.cs
- MethodRental.cs
- DependencyObjectType.cs
- BamlRecordHelper.cs
- HasCopySemanticsAttribute.cs
- IndentedWriter.cs
- DataServiceCollectionOfT.cs
- CodeThrowExceptionStatement.cs
- ValueConversionAttribute.cs
- PropertyIDSet.cs
- DataGridViewDataConnection.cs
- Composition.cs
- Serializer.cs
- Enum.cs
- MultiTouchSystemGestureLogic.cs
- ParameterCollection.cs
- TransformGroup.cs
- FormsAuthenticationModule.cs
- TargetParameterCountException.cs
- SocketPermission.cs
- StringUtil.cs
- RootNamespaceAttribute.cs
- JsonStringDataContract.cs
- InvalidOperationException.cs
- DynamicRouteExpression.cs
- DocumentOrderQuery.cs
- ListViewItemEventArgs.cs
- XMLSyntaxException.cs
- TaskFileService.cs
- Help.cs
- altserialization.cs
- PageAsyncTaskManager.cs
- DocumentXmlWriter.cs
- MimeWriter.cs
- ChildrenQuery.cs
- WorkflowServiceHostFactory.cs
- DeploymentExceptionMapper.cs
- TransactionScopeDesigner.cs
- IFlowDocumentViewer.cs
- Site.cs
- NumberAction.cs
- IdentitySection.cs
- SystemWebExtensionsSectionGroup.cs
- EdmMember.cs
- XsdValidatingReader.cs
- SafeUserTokenHandle.cs
- hresults.cs
- DataTablePropertyDescriptor.cs
- indexingfiltermarshaler.cs
- Collection.cs
- WebBaseEventKeyComparer.cs
- RangeExpression.cs
- CodeDOMUtility.cs
- ISAPIRuntime.cs
- ListViewInsertionMark.cs
- TextStore.cs
- Menu.cs
- TraceContextEventArgs.cs
- ModelUIElement3D.cs
- OleDbParameter.cs
- ApplicationFileParser.cs
- TypeNameConverter.cs
- NumericUpDownAccelerationCollection.cs
- CollectionView.cs
- AsyncStreamReader.cs
- Duration.cs
- DiagnosticTrace.cs