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
- HttpProfileGroupBase.cs
- PointCollectionConverter.cs
- WS2007FederationHttpBinding.cs
- ArrayWithOffset.cs
- TypeExtensionSerializer.cs
- SerializerDescriptor.cs
- Pool.cs
- TypeValidationEventArgs.cs
- CustomSignedXml.cs
- DecimalAnimation.cs
- PropertyTab.cs
- MouseActionValueSerializer.cs
- SourceFileBuildProvider.cs
- CaseInsensitiveOrdinalStringComparer.cs
- graph.cs
- CommandValueSerializer.cs
- LiteralControl.cs
- SmtpCommands.cs
- AdvancedBindingEditor.cs
- XmlWriter.cs
- CommandPlan.cs
- MD5.cs
- DataBindingHandlerAttribute.cs
- SignalGate.cs
- Model3D.cs
- DictionarySectionHandler.cs
- DataServiceStreamResponse.cs
- FormCollection.cs
- FlowDocumentReader.cs
- Stacktrace.cs
- XsdBuildProvider.cs
- LinqDataSourceDisposeEventArgs.cs
- SelectedGridItemChangedEvent.cs
- ArrayListCollectionBase.cs
- CheckBoxList.cs
- XmlChildNodes.cs
- SqlLiftWhereClauses.cs
- documentsequencetextcontainer.cs
- DbFunctionCommandTree.cs
- RegexRunnerFactory.cs
- SimpleType.cs
- PropertyInfoSet.cs
- FunctionDescription.cs
- SmtpFailedRecipientsException.cs
- baseaxisquery.cs
- ConsumerConnectionPoint.cs
- SqlTypeConverter.cs
- LocalizeDesigner.cs
- propertyentry.cs
- ValueQuery.cs
- PrintPreviewGraphics.cs
- HitTestParameters3D.cs
- SeekStoryboard.cs
- CompilationUnit.cs
- DataGridViewRowPrePaintEventArgs.cs
- EventLogPermissionEntry.cs
- DateTime.cs
- HtmlInputControl.cs
- ReferentialConstraint.cs
- UInt64Storage.cs
- ScaleTransform3D.cs
- querybuilder.cs
- CheckBoxRenderer.cs
- CanonicalFontFamilyReference.cs
- BroadcastEventHelper.cs
- QilNode.cs
- DuplicateDetector.cs
- SoapFormatter.cs
- HandlerFactoryCache.cs
- RoleManagerModule.cs
- GeneralTransform3D.cs
- AttachInfo.cs
- CFGGrammar.cs
- HtmlTableRow.cs
- ChannelSinkStacks.cs
- StyleBamlTreeBuilder.cs
- ImageMapEventArgs.cs
- ExclusiveCanonicalizationTransform.cs
- DataIdProcessor.cs
- ExpressionPrefixAttribute.cs
- SystemFonts.cs
- FontTypeConverter.cs
- QueryCacheEntry.cs
- OutputCacheProfileCollection.cs
- XsdBuildProvider.cs
- WorkerRequest.cs
- SessionStateSection.cs
- FamilyMap.cs
- ToolBar.cs
- CalendarSelectionChangedEventArgs.cs
- DecoratedNameAttribute.cs
- EventPropertyMap.cs
- ChangesetResponse.cs
- TreeNodeStyle.cs
- StorageModelBuildProvider.cs
- SchemaExporter.cs
- KeyGestureValueSerializer.cs
- SqlGenerator.cs
- SpellerInterop.cs
- EntitySqlQueryCacheEntry.cs