Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ImmutableObjectAttribute.cs / 1305376 / 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
- RectKeyFrameCollection.cs
- ObjectContext.cs
- ObjectAnimationBase.cs
- ConfigurationManagerInternal.cs
- ImageCodecInfo.cs
- FormsAuthenticationModule.cs
- WindowsTooltip.cs
- EllipticalNodeOperations.cs
- ScrollChrome.cs
- ProfileSettings.cs
- ObjectFullSpanRewriter.cs
- SourceFileBuildProvider.cs
- OdbcError.cs
- AsymmetricKeyExchangeDeformatter.cs
- CancellationTokenSource.cs
- SiteMapDataSourceView.cs
- Material.cs
- ArgumentOutOfRangeException.cs
- ImageClickEventArgs.cs
- RadioButtonStandardAdapter.cs
- ObjectListFieldsPage.cs
- UnmanagedMarshal.cs
- InfoCardCryptoHelper.cs
- FirstMatchCodeGroup.cs
- Model3DCollection.cs
- DataRowChangeEvent.cs
- SqlProcedureAttribute.cs
- DataBoundControlHelper.cs
- BamlLocalizabilityResolver.cs
- AddInProcess.cs
- PersistNameAttribute.cs
- invalidudtexception.cs
- HTMLTagNameToTypeMapper.cs
- CqlErrorHelper.cs
- OptionUsage.cs
- HtmlTable.cs
- PropertyChangedEventManager.cs
- InstanceData.cs
- RenderDataDrawingContext.cs
- DesignerActionService.cs
- PagesSection.cs
- ParenExpr.cs
- SafeMemoryMappedViewHandle.cs
- CustomAttributeSerializer.cs
- CompareValidator.cs
- SQLBinaryStorage.cs
- userdatakeys.cs
- XmlSubtreeReader.cs
- SetMemberBinder.cs
- Vector3DConverter.cs
- QueryResponse.cs
- XmlImplementation.cs
- ErrorWebPart.cs
- PropertyGroupDescription.cs
- ZoneButton.cs
- DocumentApplicationJournalEntry.cs
- FunctionUpdateCommand.cs
- OleDbFactory.cs
- ScrollItemProviderWrapper.cs
- TextSimpleMarkerProperties.cs
- CustomAttributeFormatException.cs
- TableParagraph.cs
- GridView.cs
- Switch.cs
- ClassData.cs
- DynamicResourceExtensionConverter.cs
- ChildTable.cs
- Vector3DAnimationBase.cs
- HtmlHead.cs
- DbInsertCommandTree.cs
- ControllableStoryboardAction.cs
- URLString.cs
- TabControlEvent.cs
- DataSet.cs
- HyperLinkField.cs
- ButtonChrome.cs
- ComboBox.cs
- Size3DConverter.cs
- CipherData.cs
- MetadataArtifactLoaderCompositeFile.cs
- RectAnimationClockResource.cs
- DNS.cs
- StandardCommands.cs
- OutputCacheSection.cs
- SqlConnectionHelper.cs
- LicenseException.cs
- TreeView.cs
- WebPartPersonalization.cs
- StateDesigner.Helpers.cs
- DocumentReferenceCollection.cs
- StrokeDescriptor.cs
- MD5.cs
- CodeNamespaceImport.cs
- ConfigurationManagerHelper.cs
- CrossAppDomainChannel.cs
- DesignSurfaceServiceContainer.cs
- WebControlToolBoxItem.cs
- TableLayoutPanel.cs
- __ComObject.cs
- ThousandthOfEmRealDoubles.cs