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
- AlignmentYValidation.cs
- NameTable.cs
- String.cs
- UrlMappingsModule.cs
- AssertSection.cs
- EventProperty.cs
- Rect3D.cs
- ExceptionUtility.cs
- CancellationHandler.cs
- DesignerActionHeaderItem.cs
- CustomErrorsSection.cs
- _NtlmClient.cs
- DocumentViewer.cs
- Converter.cs
- ImmutableDispatchRuntime.cs
- TypeProvider.cs
- ActivityIdHeader.cs
- SymbolTable.cs
- basecomparevalidator.cs
- Transactions.cs
- SQLString.cs
- JsonServiceDocumentSerializer.cs
- SetterBase.cs
- CheckBoxStandardAdapter.cs
- ConfigXmlText.cs
- IsolatedStorage.cs
- ShaderRenderModeValidation.cs
- FigureParaClient.cs
- AutomationPatternInfo.cs
- contentDescriptor.cs
- DisposableCollectionWrapper.cs
- AspNetSynchronizationContext.cs
- ADConnectionHelper.cs
- EntityConnectionStringBuilder.cs
- MarkupWriter.cs
- TypeLibConverter.cs
- InitializerFacet.cs
- DrawingState.cs
- ImageAnimator.cs
- Calendar.cs
- ToolStrip.cs
- DataFormats.cs
- MergePropertyDescriptor.cs
- ColumnCollection.cs
- DataGridRow.cs
- DataGridViewAccessibleObject.cs
- TypeLibConverter.cs
- arc.cs
- GenerateHelper.cs
- Convert.cs
- PropertiesTab.cs
- Control.cs
- CachedPathData.cs
- EntityConnection.cs
- InheritanceService.cs
- DataBindingValueUIHandler.cs
- HandleExceptionArgs.cs
- CompiledELinqQueryState.cs
- TableAdapterManagerMethodGenerator.cs
- TableCell.cs
- CodeAttachEventStatement.cs
- ConnectionProviderAttribute.cs
- GenericEnumConverter.cs
- InvokePattern.cs
- GlyphRun.cs
- PenContext.cs
- XmlSchemaInferenceException.cs
- FormsAuthenticationCredentials.cs
- RequestSecurityTokenSerializer.cs
- DataSysAttribute.cs
- CheckBoxFlatAdapter.cs
- StaticResourceExtension.cs
- HotSpotCollection.cs
- SR.cs
- HttpCookieCollection.cs
- SmtpAuthenticationManager.cs
- MaskedTextBoxDesigner.cs
- XmlArrayItemAttribute.cs
- WebPartZoneBase.cs
- KeyValueConfigurationElement.cs
- BoundField.cs
- EntitySetBaseCollection.cs
- GregorianCalendarHelper.cs
- DataGridAddNewRow.cs
- UInt64.cs
- VirtualPathProvider.cs
- WebSysDisplayNameAttribute.cs
- BitmapFrameDecode.cs
- Method.cs
- SystemIPv6InterfaceProperties.cs
- VolatileResourceManager.cs
- DbDeleteCommandTree.cs
- webproxy.cs
- CodeCatchClauseCollection.cs
- Match.cs
- entitydatasourceentitysetnameconverter.cs
- _SingleItemRequestCache.cs
- DeclaredTypeValidatorAttribute.cs
- CorrelationExtension.cs
- StackSpiller.Temps.cs