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
- _TransmitFileOverlappedAsyncResult.cs
- RowToParametersTransformer.cs
- WindowsSspiNegotiation.cs
- DocumentsTrace.cs
- login.cs
- ExpanderAutomationPeer.cs
- MailWebEventProvider.cs
- ValidatorCompatibilityHelper.cs
- X509ChainPolicy.cs
- XmlChildEnumerator.cs
- Publisher.cs
- ExpressionNode.cs
- XsltSettings.cs
- LongCountAggregationOperator.cs
- TextRunCacheImp.cs
- ToolStripPanelRenderEventArgs.cs
- BevelBitmapEffect.cs
- DefaultProxySection.cs
- JournalEntry.cs
- TraceUtility.cs
- MLangCodePageEncoding.cs
- CallbackHandler.cs
- PackageDigitalSignatureManager.cs
- WinOEToolBoxItem.cs
- Rect3D.cs
- NativeMethods.cs
- HttpHandlersSection.cs
- DebugView.cs
- DataSet.cs
- Part.cs
- SeverityFilter.cs
- XmlSchemaCollection.cs
- PolicyLevel.cs
- ReaderWriterLockWrapper.cs
- UInt32.cs
- WebPartConnectionCollection.cs
- DataServiceStreamResponse.cs
- SqlInternalConnectionTds.cs
- UrlAuthFailedErrorFormatter.cs
- Int32Animation.cs
- UITypeEditor.cs
- UnknownBitmapEncoder.cs
- ResourceExpressionBuilder.cs
- XamlStyleSerializer.cs
- InkCanvasInnerCanvas.cs
- RecognizerInfo.cs
- EditCommandColumn.cs
- XmlDataSourceNodeDescriptor.cs
- FunctionDetailsReader.cs
- StringComparer.cs
- TrackingExtract.cs
- Point3D.cs
- SafeNativeMethods.cs
- COM2AboutBoxPropertyDescriptor.cs
- fixedPageContentExtractor.cs
- StreamHelper.cs
- CodeExporter.cs
- CacheVirtualItemsEvent.cs
- ScriptResourceAttribute.cs
- Misc.cs
- SignedXml.cs
- ResolveResponse.cs
- ChannelServices.cs
- ErrorProvider.cs
- FontDifferentiator.cs
- TextEmbeddedObject.cs
- ValidationPropertyAttribute.cs
- AuthorizationRule.cs
- XmlnsCache.cs
- SecureUICommand.cs
- BufferedGenericXmlSecurityToken.cs
- OleDbStruct.cs
- ToolStripContentPanel.cs
- DateTimeFormatInfoScanner.cs
- EmptyReadOnlyDictionaryInternal.cs
- BitmapMetadataBlob.cs
- FormatConvertedBitmap.cs
- SessionSwitchEventArgs.cs
- CommandSet.cs
- WrappingXamlSchemaContext.cs
- HMACSHA384.cs
- XmlSchemaParticle.cs
- ResXResourceSet.cs
- Polygon.cs
- DesignerCategoryAttribute.cs
- WebBrowserPermission.cs
- BufferedGraphicsContext.cs
- Process.cs
- MimeBasePart.cs
- PageAsyncTaskManager.cs
- UpdateProgress.cs
- LineVisual.cs
- AnonymousIdentificationSection.cs
- UnmanagedMemoryStreamWrapper.cs
- XPathNodeList.cs
- XmlnsCache.cs
- WebBaseEventKeyComparer.cs
- PeerMessageDispatcher.cs
- TransformerInfo.cs
- ListViewDeletedEventArgs.cs