Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TextEditorThreadLocalStore.cs
- RegionIterator.cs
- FileSystemWatcher.cs
- UrlRoutingHandler.cs
- TransformProviderWrapper.cs
- Int32Animation.cs
- AppDomainAttributes.cs
- DependencyPropertyAttribute.cs
- UnsafeCollabNativeMethods.cs
- Polyline.cs
- StateMachineWorkflowDesigner.cs
- Point3DKeyFrameCollection.cs
- MobileUserControl.cs
- SHA256Managed.cs
- DataConnectionHelper.cs
- MatrixUtil.cs
- ScriptComponentDescriptor.cs
- DocumentViewerAutomationPeer.cs
- UnsafeNativeMethods.cs
- SamlAssertionKeyIdentifierClause.cs
- ImageField.cs
- SkewTransform.cs
- WebPartDisplayModeEventArgs.cs
- AssemblyCollection.cs
- TargetParameterCountException.cs
- XmlSchemaComplexContentRestriction.cs
- UDPClient.cs
- KerberosRequestorSecurityToken.cs
- DataBindingCollection.cs
- RC2CryptoServiceProvider.cs
- Setter.cs
- GenericQueueSurrogate.cs
- ContextMenu.cs
- WorkflowTimerService.cs
- ThrowHelper.cs
- QueryConverter.cs
- EditingCoordinator.cs
- HttpChannelListener.cs
- ToolStripItemEventArgs.cs
- SoapCodeExporter.cs
- HttpRuntimeSection.cs
- CodeMemberMethod.cs
- Wildcard.cs
- TimeStampChecker.cs
- PointLight.cs
- SymmetricKeyWrap.cs
- Line.cs
- DataContract.cs
- ComponentCollection.cs
- LogExtent.cs
- DbSetClause.cs
- LocalizeDesigner.cs
- ProcessModule.cs
- ConstraintCollection.cs
- CachedCompositeFamily.cs
- Classification.cs
- DictionarySectionHandler.cs
- DataSourceHelper.cs
- DES.cs
- PersistenceContextEnlistment.cs
- FaultHandlingFilter.cs
- HttpListenerRequest.cs
- ServiceModelSecurityTokenTypes.cs
- RelatedPropertyManager.cs
- ProxyGenerationError.cs
- ImagingCache.cs
- SaveFileDialog.cs
- Number.cs
- SqlTransaction.cs
- ErasingStroke.cs
- LocalBuilder.cs
- CaseStatement.cs
- SizeF.cs
- DataGridViewRowCancelEventArgs.cs
- WindowsScrollBarBits.cs
- FontCollection.cs
- DbDataSourceEnumerator.cs
- PlainXmlDeserializer.cs
- TextDecorationCollectionConverter.cs
- CreateUserErrorEventArgs.cs
- ByteConverter.cs
- DataProviderNameConverter.cs
- ArraySet.cs
- XsltLibrary.cs
- BaseHashHelper.cs
- SHA256CryptoServiceProvider.cs
- DataRelationCollection.cs
- SqlDataSourceCache.cs
- DataFormat.cs
- KeyValuePairs.cs
- PackageDigitalSignatureManager.cs
- ServiceDiscoveryBehavior.cs
- DefaultBindingPropertyAttribute.cs
- StreamReader.cs
- ParenthesizePropertyNameAttribute.cs
- EmptyEnumerator.cs
- LogWriteRestartAreaState.cs
- AtomMaterializerLog.cs
- XmlTextAttribute.cs
- GridSplitter.cs