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
- Byte.cs
- TreeViewAutomationPeer.cs
- SoapAttributeAttribute.cs
- HyperLinkColumn.cs
- XmlSerializableReader.cs
- SqlUdtInfo.cs
- DropDownList.cs
- XmlAnyElementAttributes.cs
- TypeDescriptor.cs
- ThreadStateException.cs
- SqlDataSourceCommandEventArgs.cs
- MemberMaps.cs
- CredentialCache.cs
- IndependentlyAnimatedPropertyMetadata.cs
- TabControlEvent.cs
- ComponentChangedEvent.cs
- ApplicationDirectoryMembershipCondition.cs
- ThemeDirectoryCompiler.cs
- AutomationElementCollection.cs
- OleDbSchemaGuid.cs
- OnOperation.cs
- MessageQueue.cs
- EnumerableRowCollection.cs
- Part.cs
- XmlSchemaAnyAttribute.cs
- TypeConverter.cs
- Path.cs
- TogglePatternIdentifiers.cs
- PngBitmapDecoder.cs
- DataReaderContainer.cs
- XmlSchemaAll.cs
- CombinedGeometry.cs
- MessageQueueConverter.cs
- PageClientProxyGenerator.cs
- DataRecordInternal.cs
- NamedPermissionSet.cs
- HttpModuleActionCollection.cs
- CopyAttributesAction.cs
- assemblycache.cs
- PaginationProgressEventArgs.cs
- IndexExpression.cs
- CodeDomExtensionMethods.cs
- ListViewHitTestInfo.cs
- PropertySegmentSerializationProvider.cs
- entitydatasourceentitysetnameconverter.cs
- LinkLabel.cs
- GridViewEditEventArgs.cs
- PropertyItem.cs
- BitmapInitialize.cs
- CustomAssemblyResolver.cs
- BulletChrome.cs
- ParseNumbers.cs
- ObjectStateEntry.cs
- WinEventQueueItem.cs
- DataServiceException.cs
- JsonDeserializer.cs
- WmpBitmapEncoder.cs
- GridViewUpdatedEventArgs.cs
- mediaeventargs.cs
- SortDescription.cs
- Classification.cs
- UpDownEvent.cs
- FunctionNode.cs
- MenuItemBinding.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- FontTypeConverter.cs
- validationstate.cs
- PropertyItem.cs
- UriParserTemplates.cs
- HitTestParameters3D.cs
- UnsafeNativeMethods.cs
- SizeAnimation.cs
- HttpException.cs
- TransactionProtocol.cs
- ReferencedType.cs
- WebPartCatalogCloseVerb.cs
- UnmanagedMarshal.cs
- GeneralTransform2DTo3DTo2D.cs
- Semaphore.cs
- GroupItemAutomationPeer.cs
- OleDbCommand.cs
- StreamGeometry.cs
- HwndProxyElementProvider.cs
- PrincipalPermission.cs
- ImmutableObjectAttribute.cs
- EdmToObjectNamespaceMap.cs
- BulletChrome.cs
- XPathExpr.cs
- NotFiniteNumberException.cs
- CodeGroup.cs
- CodeMemberMethod.cs
- FileUtil.cs
- ScriptControl.cs
- SafeSecurityHandles.cs
- KerberosSecurityTokenProvider.cs
- TreeNode.cs
- AnonymousIdentificationSection.cs
- DomNameTable.cs
- BypassElementCollection.cs
- DescendantBaseQuery.cs