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
- IdentityNotMappedException.cs
- DropShadowBitmapEffect.cs
- MatrixConverter.cs
- GridItemCollection.cs
- XamlSerializationHelper.cs
- PageContentCollection.cs
- PrintDocument.cs
- LabelDesigner.cs
- PropertyTabAttribute.cs
- DemultiplexingClientMessageFormatter.cs
- PeerDuplexChannelListener.cs
- EmbeddedObject.cs
- PathNode.cs
- JournalEntryStack.cs
- SecurityDocument.cs
- CommonObjectSecurity.cs
- ReadOnlyObservableCollection.cs
- XmlFormatExtensionPrefixAttribute.cs
- HtmlTitle.cs
- UInt32Storage.cs
- TextContainerHelper.cs
- XmlBoundElement.cs
- DeviceSpecificChoice.cs
- parserscommon.cs
- UriParserTemplates.cs
- DocumentEventArgs.cs
- DataListItemEventArgs.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- SignerInfo.cs
- ViewBase.cs
- AttributeCollection.cs
- BinaryMethodMessage.cs
- OleDbSchemaGuid.cs
- RequestTimeoutManager.cs
- ConnectionPoint.cs
- ProcessHostMapPath.cs
- LocatorManager.cs
- HttpGetClientProtocol.cs
- WebConfigurationManager.cs
- ReversePositionQuery.cs
- ConfigErrorGlyph.cs
- StopStoryboard.cs
- SafeMemoryMappedFileHandle.cs
- CircleHotSpot.cs
- GCHandleCookieTable.cs
- AuthenticatingEventArgs.cs
- Int32Collection.cs
- Geometry.cs
- AppDomainFactory.cs
- ScriptReferenceEventArgs.cs
- DataIdProcessor.cs
- RadioButtonPopupAdapter.cs
- TextTabProperties.cs
- SortExpressionBuilder.cs
- RtfControlWordInfo.cs
- baseaxisquery.cs
- XpsFilter.cs
- TaskHelper.cs
- TrustSection.cs
- EncoderExceptionFallback.cs
- ChameleonKey.cs
- EndpointDiscoveryMetadata.cs
- CardSpaceSelector.cs
- TextServicesCompartment.cs
- ListViewItem.cs
- HorizontalAlignConverter.cs
- HtmlAnchor.cs
- SupportsEventValidationAttribute.cs
- SqlDependencyUtils.cs
- ConstNode.cs
- ListBoxItemWrapperAutomationPeer.cs
- CryptoProvider.cs
- DataGridRelationshipRow.cs
- ImageMap.cs
- PathGeometry.cs
- HttpCookiesSection.cs
- HandlerFactoryCache.cs
- QilList.cs
- HttpPostLocalhostServerProtocol.cs
- DragEventArgs.cs
- HttpSysSettings.cs
- DoubleLinkList.cs
- ParameterCollection.cs
- ValidationErrorEventArgs.cs
- SoapIgnoreAttribute.cs
- InstanceCreationEditor.cs
- XmlSchemaImport.cs
- COM2ColorConverter.cs
- WebPartHelpVerb.cs
- Compiler.cs
- CqlLexer.cs
- GroupQuery.cs
- DesignerLabelAdapter.cs
- AssociationSet.cs
- RectangleConverter.cs
- FormParameter.cs
- LoginView.cs
- Models.cs
- WizardForm.cs
- DataBoundControlHelper.cs