Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- PointConverter.cs
- TimeSpanStorage.cs
- DataSourceControl.cs
- GridViewEditEventArgs.cs
- DetailsViewModeEventArgs.cs
- GenericAuthenticationEventArgs.cs
- TextContainer.cs
- XmlToDatasetMap.cs
- ProviderSettingsCollection.cs
- InvokePatternIdentifiers.cs
- EventManager.cs
- XPathExpr.cs
- SqlCrossApplyToCrossJoin.cs
- XmlDataProvider.cs
- XmlQueryContext.cs
- WorkflowInstanceAbortedRecord.cs
- HandlerFactoryWrapper.cs
- mediaclock.cs
- OdbcConnectionFactory.cs
- BamlResourceSerializer.cs
- SoapTypeAttribute.cs
- KeyedHashAlgorithm.cs
- InputScope.cs
- ServiceMemoryGates.cs
- SequenceFullException.cs
- KeyInstance.cs
- ReliableSessionBindingElementImporter.cs
- ListViewEditEventArgs.cs
- XmlFormatReaderGenerator.cs
- DelegateTypeInfo.cs
- RMEnrollmentPage3.cs
- MemberMaps.cs
- MetadataCache.cs
- SingleStorage.cs
- EllipseGeometry.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DynamicDataRouteHandler.cs
- EncoderParameters.cs
- EmbossBitmapEffect.cs
- ToolStripDropDownDesigner.cs
- OptimisticConcurrencyException.cs
- MaskDescriptor.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- BrowserCapabilitiesCodeGenerator.cs
- CodeAttributeArgumentCollection.cs
- ServiceProviders.cs
- XmlDataProvider.cs
- RemotingConfiguration.cs
- AppSecurityManager.cs
- PersonalizationStateInfoCollection.cs
- ZipIOCentralDirectoryBlock.cs
- BinaryParser.cs
- RequestCacheManager.cs
- WebRequestModuleElement.cs
- RouteParser.cs
- SelectionItemPattern.cs
- LassoHelper.cs
- AttributeQuery.cs
- GacUtil.cs
- TextBox.cs
- ControlValuePropertyAttribute.cs
- GridViewCancelEditEventArgs.cs
- WebEvents.cs
- FocusManager.cs
- OdbcDataAdapter.cs
- AssertSection.cs
- HttpListenerPrefixCollection.cs
- Rect.cs
- TypeDescriptionProviderAttribute.cs
- TypeSystemProvider.cs
- CodeCompileUnit.cs
- WindowsAltTab.cs
- PageRequestManager.cs
- CustomAttributeFormatException.cs
- Version.cs
- ReaderWriterLock.cs
- GeometryGroup.cs
- DataGridViewTextBoxEditingControl.cs
- CodeDOMUtility.cs
- FileNotFoundException.cs
- _OSSOCK.cs
- RegisteredDisposeScript.cs
- ListDictionaryInternal.cs
- DrawingGroup.cs
- DecimalAnimationUsingKeyFrames.cs
- HttpFileCollection.cs
- ButtonBaseAdapter.cs
- ToolStripDropDownClosedEventArgs.cs
- HandledMouseEvent.cs
- ConnectionPoolManager.cs
- Funcletizer.cs
- WebPartConnectionsConnectVerb.cs
- DataBindingCollection.cs
- MediaSystem.cs
- XmlSchemaCompilationSettings.cs
- EventHandlingScope.cs
- FrameworkPropertyMetadata.cs
- FieldMetadata.cs
- NameService.cs
- BuildResultCache.cs