Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- _StreamFramer.cs
- CheckPair.cs
- ClientSettingsStore.cs
- HotSpotCollection.cs
- StoreAnnotationsMap.cs
- BamlLocalizabilityResolver.cs
- SharedDp.cs
- DataSourceHelper.cs
- GridLengthConverter.cs
- XPathNavigator.cs
- XmlSchemaObject.cs
- SqlGatherConsumedAliases.cs
- CapacityStreamGeometryContext.cs
- ImageField.cs
- ActivityDesigner.cs
- HiddenField.cs
- ReadOnlyHierarchicalDataSource.cs
- IImplicitResourceProvider.cs
- ISAPIRuntime.cs
- ScrollItemPatternIdentifiers.cs
- PrinterSettings.cs
- ISCIIEncoding.cs
- SecurityIdentifierConverter.cs
- ListControlConvertEventArgs.cs
- ExpressionList.cs
- XmlBindingWorker.cs
- RowsCopiedEventArgs.cs
- CompositeFontFamily.cs
- FontInfo.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- HandlerBase.cs
- ServicePerformanceCounters.cs
- KnownTypeHelper.cs
- Run.cs
- DocumentViewerAutomationPeer.cs
- DesignTable.cs
- _FtpControlStream.cs
- AnnotationStore.cs
- TextAutomationPeer.cs
- ProcessModuleCollection.cs
- Int16AnimationBase.cs
- AccessControlEntry.cs
- SizeAnimationClockResource.cs
- QuaternionAnimation.cs
- SchemaImporterExtensionElement.cs
- Trace.cs
- PassportAuthentication.cs
- EntityException.cs
- VirtualizingStackPanel.cs
- SolidColorBrush.cs
- ParenthesizePropertyNameAttribute.cs
- SvcFileManager.cs
- AsymmetricAlgorithm.cs
- XmlDataImplementation.cs
- QEncodedStream.cs
- Animatable.cs
- NamespaceQuery.cs
- ProcessModelSection.cs
- LinearGradientBrush.cs
- WebPartEditVerb.cs
- CommandSet.cs
- GenericEnumConverter.cs
- DeclaredTypeValidator.cs
- DependencyPropertyHelper.cs
- SystemResources.cs
- WebRequestModuleElement.cs
- WeakRefEnumerator.cs
- Binding.cs
- HttpFileCollectionWrapper.cs
- RecordsAffectedEventArgs.cs
- Translator.cs
- SystemDropShadowChrome.cs
- Deserializer.cs
- NetTcpSecurityElement.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- DataColumnMapping.cs
- SynchronizedPool.cs
- Clock.cs
- ContainerVisual.cs
- BamlVersionHeader.cs
- XmlDomTextWriter.cs
- LoginUtil.cs
- WebBrowserContainer.cs
- Boolean.cs
- Enum.cs
- MultilineStringConverter.cs
- ISAPIRuntime.cs
- X509Chain.cs
- WindowsToolbarItemAsMenuItem.cs
- FixedSOMPageConstructor.cs
- DeflateEmulationStream.cs
- TableRowsCollectionEditor.cs
- ScriptHandlerFactory.cs
- XmlSchemaImport.cs
- SafeReadContext.cs
- TraceEventCache.cs
- CheckoutException.cs
- HierarchicalDataSourceDesigner.cs
- RequiredFieldValidator.cs
- CrossSiteScriptingValidation.cs