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
- CookielessHelper.cs
- DocumentApplicationJournalEntry.cs
- TimeStampChecker.cs
- PlanCompilerUtil.cs
- SqlDataSourceSelectingEventArgs.cs
- ButtonRenderer.cs
- QilValidationVisitor.cs
- CompareValidator.cs
- ProtocolImporter.cs
- HitTestResult.cs
- ToggleButton.cs
- RichTextBoxConstants.cs
- QilStrConcat.cs
- AssemblyAssociatedContentFileAttribute.cs
- SystemDropShadowChrome.cs
- EmptyControlCollection.cs
- Stylesheet.cs
- ScalarConstant.cs
- DropShadowEffect.cs
- StylusEventArgs.cs
- DispatcherSynchronizationContext.cs
- OperationCanceledException.cs
- HtmlTableRow.cs
- SQLBoolean.cs
- Point4DValueSerializer.cs
- UniqueConstraint.cs
- log.cs
- WorkflowRuntime.cs
- MultiByteCodec.cs
- SQLMembershipProvider.cs
- Win32.cs
- MasterPageCodeDomTreeGenerator.cs
- BitSet.cs
- ServiceDiscoveryBehavior.cs
- WindowsUpDown.cs
- TouchEventArgs.cs
- FixedSOMElement.cs
- KeyboardNavigation.cs
- IconConverter.cs
- BitmapEffect.cs
- DoubleAnimationUsingKeyFrames.cs
- GridItemCollection.cs
- MouseEventArgs.cs
- EpmSyndicationContentSerializer.cs
- LookupNode.cs
- RectAnimationClockResource.cs
- PlaceHolder.cs
- ViewStateChangedEventArgs.cs
- CodeChecksumPragma.cs
- OrCondition.cs
- ObjectResult.cs
- CallTemplateAction.cs
- OdbcConnectionStringbuilder.cs
- RtfFormatStack.cs
- WebEventTraceProvider.cs
- ILGenerator.cs
- BatchParser.cs
- SQLDouble.cs
- SingleSelectRootGridEntry.cs
- Storyboard.cs
- EditBehavior.cs
- Win32KeyboardDevice.cs
- ThicknessAnimationBase.cs
- LoadedOrUnloadedOperation.cs
- DesignerHierarchicalDataSourceView.cs
- TaskbarItemInfo.cs
- ConfigurationPropertyCollection.cs
- CodeArrayIndexerExpression.cs
- RangeValidator.cs
- X509ServiceCertificateAuthentication.cs
- TextStore.cs
- Utils.cs
- XmlSerializerObjectSerializer.cs
- JsonCollectionDataContract.cs
- DataSourceControl.cs
- ZipIOLocalFileDataDescriptor.cs
- DesignerObjectListAdapter.cs
- DataReaderContainer.cs
- ScrollEventArgs.cs
- TemplateContentLoader.cs
- NamedPermissionSet.cs
- PenContexts.cs
- ReflectionHelper.cs
- SignerInfo.cs
- ThicknessAnimation.cs
- StateChangeEvent.cs
- ExpandSegmentCollection.cs
- BlurBitmapEffect.cs
- ImageAttributes.cs
- ExpressionEditorAttribute.cs
- MatcherBuilder.cs
- WorkflowRuntimeSection.cs
- securitycriticaldataformultiplegetandset.cs
- ProxyWebPart.cs
- XmlAttributeAttribute.cs
- ToolboxDataAttribute.cs
- RegistryDataKey.cs
- KerberosReceiverSecurityToken.cs
- KnownIds.cs
- KerberosSecurityTokenParameters.cs