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
- XmlWrappingReader.cs
- SessionEndingEventArgs.cs
- SplitterPanel.cs
- DataSourceUtil.cs
- StatusBarDrawItemEvent.cs
- TreeNode.cs
- DragCompletedEventArgs.cs
- ChtmlImageAdapter.cs
- ExtensionQuery.cs
- UriGenerator.cs
- safelink.cs
- RegexCompilationInfo.cs
- CssStyleCollection.cs
- SqlMetaData.cs
- LocalizabilityAttribute.cs
- storepermission.cs
- XmlSchemaElement.cs
- XmlConvert.cs
- MemberPathMap.cs
- DependencyPropertyConverter.cs
- BrowserCapabilitiesFactoryBase.cs
- ThousandthOfEmRealDoubles.cs
- DbMetaDataColumnNames.cs
- BindingExpressionBase.cs
- BaseParagraph.cs
- TextTreeText.cs
- Single.cs
- NullableLongMinMaxAggregationOperator.cs
- ObjectListDesigner.cs
- DetailsView.cs
- DataGridViewTopLeftHeaderCell.cs
- ModuleBuilder.cs
- ResourceDescriptionAttribute.cs
- ISAPIApplicationHost.cs
- OdbcEnvironment.cs
- SendContent.cs
- IssuedTokenClientElement.cs
- RuleRef.cs
- AuthenticationModuleElement.cs
- PermissionSetTriple.cs
- UnsignedPublishLicense.cs
- COM2Enum.cs
- Line.cs
- ExpandSegmentCollection.cs
- ApplicationDirectory.cs
- GeneralTransform3DTo2D.cs
- ObjRef.cs
- ResourceKey.cs
- DropShadowEffect.cs
- SamlSecurityToken.cs
- GenericXmlSecurityToken.cs
- FontInfo.cs
- CalendarDay.cs
- DtrList.cs
- Misc.cs
- WebExceptionStatus.cs
- CfgSemanticTag.cs
- ToolstripProfessionalRenderer.cs
- RawUIStateInputReport.cs
- SizeConverter.cs
- PrintControllerWithStatusDialog.cs
- HeaderLabel.cs
- PersonalizableAttribute.cs
- TrackingLocation.cs
- invalidudtexception.cs
- XPathDescendantIterator.cs
- MemberMemberBinding.cs
- IdentityModelDictionary.cs
- UnknownWrapper.cs
- HandlerFactoryWrapper.cs
- OleDbRowUpdatingEvent.cs
- RotateTransform3D.cs
- SerializationSectionGroup.cs
- x509store.cs
- BufferedWebEventProvider.cs
- SpnEndpointIdentity.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- MSAANativeProvider.cs
- BehaviorEditorPart.cs
- DataKeyCollection.cs
- BuildProvider.cs
- XPathScanner.cs
- GradientStopCollection.cs
- SqlBooleanMismatchVisitor.cs
- EllipticalNodeOperations.cs
- WebServiceData.cs
- Utils.cs
- CollectionChangedEventManager.cs
- HttpServerVarsCollection.cs
- ButtonBase.cs
- SqlDependencyListener.cs
- ContractMapping.cs
- PropertyNames.cs
- FontUnitConverter.cs
- HttpCacheParams.cs
- Currency.cs
- DropTarget.cs
- SslStream.cs
- SettingsPropertyCollection.cs
- GeneralTransform.cs