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
- ErrorTableItemStyle.cs
- PeerNameResolver.cs
- SuppressIldasmAttribute.cs
- ThreadLocal.cs
- unsafenativemethodstextservices.cs
- EntityDesignerUtils.cs
- XPathDocumentIterator.cs
- IListConverters.cs
- FacetValues.cs
- RoutedEventHandlerInfo.cs
- FixedTextSelectionProcessor.cs
- TextBox.cs
- SchemaCollectionPreprocessor.cs
- FixedLineResult.cs
- PenContext.cs
- FileDataSourceCache.cs
- XmlTextEncoder.cs
- X509SecurityToken.cs
- CodeTypeReferenceSerializer.cs
- EventArgs.cs
- RectangleHotSpot.cs
- FormViewInsertEventArgs.cs
- CodeDomLocalizationProvider.cs
- Base64Decoder.cs
- AuthenticationManager.cs
- ClosableStream.cs
- ParallelDesigner.cs
- ApplicationSettingsBase.cs
- DataGridViewCellConverter.cs
- XamlPointCollectionSerializer.cs
- XmlSerializationGeneratedCode.cs
- OrderByExpression.cs
- XAMLParseException.cs
- Hash.cs
- SqlTypeSystemProvider.cs
- HtmlInputText.cs
- CorruptStoreException.cs
- ConnectionStringEditor.cs
- WCFBuildProvider.cs
- DataControlButton.cs
- RuntimeArgumentHandle.cs
- GenericTextProperties.cs
- OleDbDataReader.cs
- Comparer.cs
- DrawTreeNodeEventArgs.cs
- ViewKeyConstraint.cs
- ClickablePoint.cs
- OleDbRowUpdatedEvent.cs
- TraceContextEventArgs.cs
- MappableObjectManager.cs
- ManifestSignedXml.cs
- BezierSegment.cs
- AttributeProviderAttribute.cs
- ModuleConfigurationInfo.cs
- ConstraintManager.cs
- DataDocumentXPathNavigator.cs
- StyleSheetDesigner.cs
- PriorityQueue.cs
- NameValuePair.cs
- SqlSelectStatement.cs
- DockProviderWrapper.cs
- TextBox.cs
- BrowserTree.cs
- CapabilitiesSection.cs
- TextProviderWrapper.cs
- ReadOnlyDictionary.cs
- PathSegmentCollection.cs
- Scheduler.cs
- BinaryCommonClasses.cs
- Activity.cs
- EventMappingSettingsCollection.cs
- DynamicResourceExtensionConverter.cs
- SqlDataSourceCommandEventArgs.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- DetailsViewDeletedEventArgs.cs
- HttpHandlersSection.cs
- FillRuleValidation.cs
- MessageSecurityOverHttp.cs
- regiisutil.cs
- DataBoundControlDesigner.cs
- HiddenFieldPageStatePersister.cs
- CollectionChangedEventManager.cs
- SspiWrapper.cs
- AtomServiceDocumentSerializer.cs
- MobileComponentEditorPage.cs
- SecurityUtils.cs
- TextSegment.cs
- datacache.cs
- EntityTypeEmitter.cs
- NonPrimarySelectionGlyph.cs
- Misc.cs
- InvalidPropValue.cs
- TrustExchangeException.cs
- FormViewUpdatedEventArgs.cs
- IISMapPath.cs
- CardSpaceException.cs
- QueryTreeBuilder.cs
- ElementAtQueryOperator.cs
- SqlMethodAttribute.cs
- Soap.cs