Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / ReadOnlyAttribute.cs / 1 / ReadOnlyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class ReadOnlyAttribute : Attribute { private bool isReadOnly = false; ///Specifies whether the property this attribute is bound to /// is read-only or read/write. ////// public static readonly ReadOnlyAttribute Yes = new ReadOnlyAttribute(true); ////// Specifies that the property this attribute is bound to is read-only and /// cannot be modified in the server explorer. This ///field is /// read-only. /// /// public static readonly ReadOnlyAttribute No = new ReadOnlyAttribute(false); ////// Specifies that the property this attribute is bound to is read/write and can /// be modified at design time. This ///field is read-only. /// /// public static readonly ReadOnlyAttribute Default = No; ////// Specifies the default value for the ///, which is , that is, /// the property this attribute is bound to is read/write. This field is read-only. /// /// public ReadOnlyAttribute(bool isReadOnly) { this.isReadOnly = isReadOnly; } ////// Initializes a new instance of the ///class. /// /// public bool IsReadOnly { get { return isReadOnly; } } ////// Gets a value indicating whether the property this attribute is bound to is /// read-only. /// ////// /// public override bool Equals(object value) { if (this == value) { return true; } ReadOnlyAttribute other = value as ReadOnlyAttribute; return other != null && other.IsReadOnly == IsReadOnly; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// /// public override bool IsDefaultAttribute() { return (this.IsReadOnly == Default.IsReadOnly); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Determines if this attribute is the default. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class ReadOnlyAttribute : Attribute { private bool isReadOnly = false; ///Specifies whether the property this attribute is bound to /// is read-only or read/write. ////// public static readonly ReadOnlyAttribute Yes = new ReadOnlyAttribute(true); ////// Specifies that the property this attribute is bound to is read-only and /// cannot be modified in the server explorer. This ///field is /// read-only. /// /// public static readonly ReadOnlyAttribute No = new ReadOnlyAttribute(false); ////// Specifies that the property this attribute is bound to is read/write and can /// be modified at design time. This ///field is read-only. /// /// public static readonly ReadOnlyAttribute Default = No; ////// Specifies the default value for the ///, which is , that is, /// the property this attribute is bound to is read/write. This field is read-only. /// /// public ReadOnlyAttribute(bool isReadOnly) { this.isReadOnly = isReadOnly; } ////// Initializes a new instance of the ///class. /// /// public bool IsReadOnly { get { return isReadOnly; } } ////// Gets a value indicating whether the property this attribute is bound to is /// read-only. /// ////// /// public override bool Equals(object value) { if (this == value) { return true; } ReadOnlyAttribute other = value as ReadOnlyAttribute; return other != null && other.IsReadOnly == IsReadOnly; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// /// public override bool IsDefaultAttribute() { return (this.IsReadOnly == Default.IsReadOnly); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Determines if this attribute is the default. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlObjectSerializerReadContextComplex.cs
- RowToFieldTransformer.cs
- AppDomainFactory.cs
- FixedDocumentSequencePaginator.cs
- TagPrefixAttribute.cs
- PathSegment.cs
- StreamMarshaler.cs
- ListViewUpdateEventArgs.cs
- DataGridTable.cs
- CorrelationManager.cs
- SqlDeflator.cs
- TableSectionStyle.cs
- Win32NamedPipes.cs
- EditorAttribute.cs
- listviewsubitemcollectioneditor.cs
- InProcStateClientManager.cs
- Selector.cs
- WsdlInspector.cs
- PhysicalFontFamily.cs
- formatstringdialog.cs
- EdmMember.cs
- TransformDescriptor.cs
- Image.cs
- FlowDocumentPaginator.cs
- EntityProviderServices.cs
- SpeakInfo.cs
- ModelPerspective.cs
- ClientSettingsProvider.cs
- PatternMatchRules.cs
- DictionarySectionHandler.cs
- _FtpDataStream.cs
- BoolExpression.cs
- SqlServer2KCompatibilityAnnotation.cs
- WebPartVerb.cs
- SortKey.cs
- ImpersonateTokenRef.cs
- DrawingAttributeSerializer.cs
- XmlArrayItemAttribute.cs
- SHA1.cs
- RtType.cs
- OracleDataReader.cs
- BindingCollectionElement.cs
- TextPointer.cs
- FamilyTypeface.cs
- XmlDocument.cs
- JsonDataContract.cs
- BaseResourcesBuildProvider.cs
- StandardOleMarshalObject.cs
- InternalRelationshipCollection.cs
- Transform3DGroup.cs
- ProgressBar.cs
- CodeIdentifier.cs
- GlobalizationSection.cs
- CommentEmitter.cs
- SimpleApplicationHost.cs
- SessionEndedEventArgs.cs
- ClientUtils.cs
- XXXInfos.cs
- AssemblyAssociatedContentFileAttribute.cs
- TextRange.cs
- RootBrowserWindowProxy.cs
- Rfc2898DeriveBytes.cs
- ConcurrentStack.cs
- PopOutPanel.cs
- RegexWorker.cs
- ServiceRouteHandler.cs
- Style.cs
- XmlMtomWriter.cs
- Quad.cs
- UpDownBase.cs
- NamespaceListProperty.cs
- WindowsImpersonationContext.cs
- BrowserCapabilitiesFactory.cs
- ValidatedControlConverter.cs
- ProxySimple.cs
- FixedTextContainer.cs
- ToolBar.cs
- CounterSample.cs
- UpdateTranslator.cs
- EntityCommand.cs
- SqlProvider.cs
- ProfessionalColors.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- SelectionWordBreaker.cs
- TextParagraphProperties.cs
- ProgramNode.cs
- DataError.cs
- BinaryWriter.cs
- validationstate.cs
- DrawingBrush.cs
- PersonalizationProvider.cs
- StyleBamlTreeBuilder.cs
- Attributes.cs
- ControlPropertyNameConverter.cs
- DispatchWrapper.cs
- _AutoWebProxyScriptEngine.cs
- _HelperAsyncResults.cs
- ResolveCriteria.cs
- TableLayoutStyleCollection.cs
- WebPartActionVerb.cs