Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / ImmutableObjectAttribute.cs / 1 / ImmutableObjectAttribute.cs
namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// Specifies that a object has no sub properties that are editable. /// [AttributeUsage(AttributeTargets.All)] public sealed class ImmutableObjectAttribute : Attribute { ////// Specifies that a object has no sub properties that are editable. /// /// This is usually used in the properties window to determine if an expandable object /// should be rendered as read-only. /// public static readonly ImmutableObjectAttribute Yes = new ImmutableObjectAttribute(true); ////// Specifies that a object has at least one editable sub-property. /// /// This is usually used in the properties window to determine if an expandable object /// should be rendered as read-only. /// public static readonly ImmutableObjectAttribute No = new ImmutableObjectAttribute(false); ////// Defaults to ImmutableObjectAttribute.No /// public static readonly ImmutableObjectAttribute Default = No; private bool immutable = true; ////// Constructs an ImmutableObjectAttribute object. /// /// public ImmutableObjectAttribute(bool immutable) { this.immutable = immutable; } ////// public bool Immutable { get { return immutable; } } ///[To be supplied.] ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } ImmutableObjectAttribute other = obj as ImmutableObjectAttribute; return other != null && other.Immutable == this.immutable; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// Specifies that a object has no sub properties that are editable. /// [AttributeUsage(AttributeTargets.All)] public sealed class ImmutableObjectAttribute : Attribute { ////// Specifies that a object has no sub properties that are editable. /// /// This is usually used in the properties window to determine if an expandable object /// should be rendered as read-only. /// public static readonly ImmutableObjectAttribute Yes = new ImmutableObjectAttribute(true); ////// Specifies that a object has at least one editable sub-property. /// /// This is usually used in the properties window to determine if an expandable object /// should be rendered as read-only. /// public static readonly ImmutableObjectAttribute No = new ImmutableObjectAttribute(false); ////// Defaults to ImmutableObjectAttribute.No /// public static readonly ImmutableObjectAttribute Default = No; private bool immutable = true; ////// Constructs an ImmutableObjectAttribute object. /// /// public ImmutableObjectAttribute(bool immutable) { this.immutable = immutable; } ////// public bool Immutable { get { return immutable; } } ///[To be supplied.] ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } ImmutableObjectAttribute other = obj as ImmutableObjectAttribute; return other != null && other.Immutable == this.immutable; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PersonalizationState.cs
- ListViewContainer.cs
- precedingquery.cs
- TargetException.cs
- ISAPIRuntime.cs
- ResourceDescriptionAttribute.cs
- VirtualPath.cs
- KeyTimeConverter.cs
- ExpressionServices.cs
- SafeUserTokenHandle.cs
- BindingEntityInfo.cs
- HostedController.cs
- ProtocolElement.cs
- CharacterShapingProperties.cs
- SessionStateUtil.cs
- StorageTypeMapping.cs
- dataprotectionpermission.cs
- JsonFormatWriterGenerator.cs
- DataException.cs
- DefaultSettingsSection.cs
- PageSettings.cs
- DrawListViewItemEventArgs.cs
- PngBitmapEncoder.cs
- PreviewKeyDownEventArgs.cs
- SimpleHandlerBuildProvider.cs
- SqlBuilder.cs
- PixelFormats.cs
- GradientStopCollection.cs
- HyperLinkStyle.cs
- milrender.cs
- HierarchicalDataSourceControl.cs
- EventBookmark.cs
- SqlBuilder.cs
- UTF8Encoding.cs
- TdsParserSessionPool.cs
- FontUnitConverter.cs
- XmlDocumentFragment.cs
- DataObjectMethodAttribute.cs
- mactripleDES.cs
- CrossAppDomainChannel.cs
- ThemeableAttribute.cs
- EdmType.cs
- UnsafeNativeMethods.cs
- ILGen.cs
- ConstNode.cs
- MetadataWorkspace.cs
- Terminate.cs
- QilGenerator.cs
- AssemblyInfo.cs
- InfoCardAsymmetricCrypto.cs
- HwndSource.cs
- DebugView.cs
- ItemCollection.cs
- Semaphore.cs
- HostingEnvironmentSection.cs
- ColorConvertedBitmapExtension.cs
- PixelShader.cs
- UntrustedRecipientException.cs
- MemberMaps.cs
- GlyphsSerializer.cs
- DataSourceXmlAttributeAttribute.cs
- SupportsEventValidationAttribute.cs
- InspectionWorker.cs
- CustomValidator.cs
- ComplexPropertyEntry.cs
- XPathMessageFilterElementCollection.cs
- ClientTargetCollection.cs
- SharedConnectionWorkflowTransactionService.cs
- ScrollEventArgs.cs
- QueryPageSettingsEventArgs.cs
- XPathAncestorIterator.cs
- NativeObjectSecurity.cs
- DropSource.cs
- PeerMaintainer.cs
- TextTreeRootNode.cs
- DataGridDetailsPresenter.cs
- StatementContext.cs
- Facet.cs
- LocalBuilder.cs
- IconBitmapDecoder.cs
- InvokeMethodActivity.cs
- PageCatalogPart.cs
- WsatTransactionHeader.cs
- ConfigXmlDocument.cs
- CookieProtection.cs
- ListItemParagraph.cs
- _UncName.cs
- ValueConversionAttribute.cs
- ViewCellSlot.cs
- ServiceNotStartedException.cs
- NeutralResourcesLanguageAttribute.cs
- DataGridColumnCollection.cs
- xml.cs
- SQLInt16Storage.cs
- XmlSerializerVersionAttribute.cs
- _AutoWebProxyScriptHelper.cs
- FormsAuthenticationConfiguration.cs
- OutputCacheSection.cs
- WCFModelStrings.Designer.cs
- PathTooLongException.cs