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
- RuntimeConfigLKG.cs
- EntryPointNotFoundException.cs
- QilBinary.cs
- WindowsScrollBar.cs
- ApplicationContext.cs
- TdsParameterSetter.cs
- FrameworkReadOnlyPropertyMetadata.cs
- OraclePermission.cs
- LocalizedNameDescriptionPair.cs
- InputScopeConverter.cs
- InstancePersistenceCommand.cs
- DiscoveryMessageSequence.cs
- ScrollData.cs
- SqlDataSourceCommandEventArgs.cs
- ProtectedConfiguration.cs
- NetStream.cs
- AnnotationAdorner.cs
- SelectionItemPattern.cs
- Thread.cs
- SharedPerformanceCounter.cs
- XmlTextReaderImplHelpers.cs
- SrgsToken.cs
- DisplayNameAttribute.cs
- PropertyNames.cs
- EdmEntityTypeAttribute.cs
- ResourceLoader.cs
- UnsafePeerToPeerMethods.cs
- XamlWriter.cs
- TransactionInformation.cs
- BitmapEffectCollection.cs
- NativeWindow.cs
- GatewayIPAddressInformationCollection.cs
- Pointer.cs
- Command.cs
- FunctionMappingTranslator.cs
- SortFieldComparer.cs
- SecurityKeyType.cs
- DrawingBrush.cs
- SqlCacheDependency.cs
- DragCompletedEventArgs.cs
- ByteFacetDescriptionElement.cs
- FontSource.cs
- ValueQuery.cs
- UIElementParagraph.cs
- PropertyMetadata.cs
- SqlNodeAnnotations.cs
- SafePipeHandle.cs
- SeverityFilter.cs
- NullRuntimeConfig.cs
- AppDomainShutdownMonitor.cs
- WriteableOnDemandStream.cs
- EnumValAlphaComparer.cs
- HwndSubclass.cs
- IsolatedStoragePermission.cs
- LayoutUtils.cs
- AnnotationComponentChooser.cs
- NativeMethods.cs
- NameTable.cs
- ConfigXmlText.cs
- ExclusiveCanonicalizationTransform.cs
- dataprotectionpermission.cs
- StoreAnnotationsMap.cs
- EntityDataSourceDesignerHelper.cs
- XmlSchemaInferenceException.cs
- DefaultPropertyAttribute.cs
- KeyFrames.cs
- PolygonHotSpot.cs
- AuthorizationRuleCollection.cs
- EntityViewGenerationConstants.cs
- NativeBuffer.cs
- PEFileEvidenceFactory.cs
- SingleObjectCollection.cs
- FormatConvertedBitmap.cs
- MaskedTextProvider.cs
- FormViewDeletedEventArgs.cs
- TrackingDataItemValue.cs
- HtmlSelect.cs
- EntityCodeGenerator.cs
- HtmlSelect.cs
- IUnknownConstantAttribute.cs
- InvalidFilterCriteriaException.cs
- NetworkInterface.cs
- LockedActivityGlyph.cs
- Attributes.cs
- ListChangedEventArgs.cs
- StylusButtonCollection.cs
- UriScheme.cs
- ThreadLocal.cs
- FormsAuthenticationTicket.cs
- sqlmetadatafactory.cs
- XmlUtilWriter.cs
- ColumnCollectionEditor.cs
- RouteValueExpressionBuilder.cs
- SqlColumnizer.cs
- TextParaClient.cs
- HttpListenerContext.cs
- HostingEnvironmentSection.cs
- SinglePageViewer.cs
- OleDbInfoMessageEvent.cs
- DataGridViewRowEventArgs.cs