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
- CharacterBuffer.cs
- Vector3D.cs
- DiagnosticStrings.cs
- StateDesigner.Layouts.cs
- Parameter.cs
- FileNotFoundException.cs
- AlternateViewCollection.cs
- ConstraintManager.cs
- ObjectItemAssemblyLoader.cs
- VectorConverter.cs
- ImmutableCollection.cs
- PublisherMembershipCondition.cs
- PtsHelper.cs
- PKCS1MaskGenerationMethod.cs
- InputBindingCollection.cs
- EncryptedXml.cs
- EventDescriptor.cs
- TrackBarRenderer.cs
- CheckBoxBaseAdapter.cs
- Expander.cs
- ExpressionNode.cs
- DataList.cs
- StateMachineHistory.cs
- CertificateReferenceElement.cs
- ExpressionEditorAttribute.cs
- XmlDocumentViewSchema.cs
- OrderByQueryOptionExpression.cs
- WCFModelStrings.Designer.cs
- HttpProcessUtility.cs
- HtmlContainerControl.cs
- EventLogPermissionAttribute.cs
- TextProviderWrapper.cs
- TdsParserSessionPool.cs
- ParseElementCollection.cs
- TextPattern.cs
- CheckBoxField.cs
- DBNull.cs
- LinkConverter.cs
- TogglePattern.cs
- MailWebEventProvider.cs
- ExpressionBuilderCollection.cs
- OdbcParameter.cs
- StrokeNodeOperations.cs
- XhtmlBasicTextBoxAdapter.cs
- RtfToXamlLexer.cs
- RegisterResponseInfo.cs
- XamlSerializationHelper.cs
- SelectionRange.cs
- SqlRecordBuffer.cs
- StaticExtension.cs
- DataListItem.cs
- oledbconnectionstring.cs
- WebServicesInteroperability.cs
- RemoteWebConfigurationHost.cs
- DataMemberAttribute.cs
- FormsAuthenticationUserCollection.cs
- WebContext.cs
- RuntimeDelegateArgument.cs
- ButtonStandardAdapter.cs
- DelimitedListTraceListener.cs
- ToolStripProgressBar.cs
- CheckoutException.cs
- SynchronizationContext.cs
- DesignerActionUIStateChangeEventArgs.cs
- SiteMapDataSource.cs
- HebrewCalendar.cs
- ResumeStoryboard.cs
- DesignerUtility.cs
- GroupBox.cs
- categoryentry.cs
- ResourceIDHelper.cs
- TextServicesCompartmentContext.cs
- Hex.cs
- RegionInfo.cs
- CfgParser.cs
- RangeValidator.cs
- TimelineCollection.cs
- PropertyConverter.cs
- ReadWriteSpinLock.cs
- SoapHeaderAttribute.cs
- CodeArrayCreateExpression.cs
- EditorZoneBase.cs
- TableParagraph.cs
- TransferRequestHandler.cs
- HwndTarget.cs
- ContractCodeDomInfo.cs
- LogicalExpressionTypeConverter.cs
- ToolZone.cs
- HtmlForm.cs
- Size.cs
- LiteralText.cs
- Visual.cs
- FunctionMappingTranslator.cs
- ObjectItemCollection.cs
- CompilerGeneratedAttribute.cs
- OleDbConnectionFactory.cs
- DynamicDataManager.cs
- Empty.cs
- WizardStepCollectionEditor.cs
- FormViewInsertedEventArgs.cs