Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- EpmSourceTree.cs
- FileSystemEventArgs.cs
- SmtpAuthenticationManager.cs
- OptimizedTemplateContent.cs
- XmlValueConverter.cs
- TraceHandler.cs
- ActivityXRefPropertyEditor.cs
- ReachPageContentSerializer.cs
- CacheHelper.cs
- LayoutInformation.cs
- ElementsClipboardData.cs
- Light.cs
- TranslateTransform3D.cs
- RequestQueryProcessor.cs
- GeneratedView.cs
- FactoryGenerator.cs
- Documentation.cs
- SqlBulkCopy.cs
- SplitContainer.cs
- XmlLoader.cs
- CompiledQueryCacheKey.cs
- DataGridViewCellMouseEventArgs.cs
- DispatcherSynchronizationContext.cs
- Html32TextWriter.cs
- StatusBarDrawItemEvent.cs
- ZoneButton.cs
- Axis.cs
- TemplateComponentConnector.cs
- _CacheStreams.cs
- TemplatingOptionsDialog.cs
- BlurBitmapEffect.cs
- Operator.cs
- ChangesetResponse.cs
- UnsettableComboBox.cs
- TypeReference.cs
- SchemaComplexType.cs
- HtmlInputFile.cs
- Run.cs
- RenderData.cs
- EditingMode.cs
- TdsParserSessionPool.cs
- SecurityContext.cs
- AnnotationStore.cs
- AdapterUtil.cs
- TextServicesCompartment.cs
- SequentialWorkflowHeaderFooter.cs
- ChainedAsyncResult.cs
- DataControlFieldCollection.cs
- ObjectDataSourceSelectingEventArgs.cs
- TabControlEvent.cs
- XmlILCommand.cs
- AlignmentXValidation.cs
- SecurityTokenRequirement.cs
- CompiledRegexRunner.cs
- ParameterModifier.cs
- XmlSchemaInclude.cs
- SiteMapDataSource.cs
- Sql8ExpressionRewriter.cs
- ConfigurationValues.cs
- XmlRootAttribute.cs
- ContentType.cs
- RotateTransform.cs
- IndexedGlyphRun.cs
- ServerIdentity.cs
- MessageBox.cs
- ChildrenQuery.cs
- KeyboardEventArgs.cs
- CodeVariableReferenceExpression.cs
- UnhandledExceptionEventArgs.cs
- HierarchicalDataSourceDesigner.cs
- PathFigureCollection.cs
- HandlerBase.cs
- ReadOnlyCollectionBase.cs
- ActivityExecutor.cs
- PageParserFilter.cs
- StrongNamePublicKeyBlob.cs
- ConfigurationErrorsException.cs
- CellCreator.cs
- NullRuntimeConfig.cs
- RtfControlWordInfo.cs
- RoleManagerSection.cs
- HostVisual.cs
- UrlPath.cs
- ProfileGroupSettingsCollection.cs
- TextRenderer.cs
- ListItem.cs
- SchemaNamespaceManager.cs
- AddingNewEventArgs.cs
- LocatorGroup.cs
- TextEffect.cs
- TdsParameterSetter.cs
- PrintPageEvent.cs
- FileDialog_Vista_Interop.cs
- listitem.cs
- EditorPartChrome.cs
- XmlSecureResolver.cs
- SqlDataSourceQueryConverter.cs
- HtmlImage.cs
- Metadata.cs
- BitmapInitialize.cs