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
- WindowInteractionStateTracker.cs
- SafeEventLogReadHandle.cs
- BaseCAMarshaler.cs
- XsltConvert.cs
- WebPartManager.cs
- ObjectStateFormatter.cs
- TableLayout.cs
- DataKeyCollection.cs
- dataobject.cs
- XmlBufferReader.cs
- DynamicPropertyHolder.cs
- NativeBuffer.cs
- DiagnosticsConfiguration.cs
- XmlRawWriterWrapper.cs
- PathFigureCollectionValueSerializer.cs
- StackSpiller.cs
- XMLSchema.cs
- XmlSiteMapProvider.cs
- QueryContinueDragEvent.cs
- Int32AnimationBase.cs
- WindowsHyperlink.cs
- TextDecorationLocationValidation.cs
- HtmlInputImage.cs
- EdmSchemaAttribute.cs
- WhitespaceReader.cs
- WebPartActionVerb.cs
- DbDataSourceEnumerator.cs
- LayoutManager.cs
- DataGridViewCellEventArgs.cs
- TraceRecords.cs
- BoolExpr.cs
- CodeSnippetExpression.cs
- EndpointDispatcher.cs
- CodeAccessSecurityEngine.cs
- FormViewUpdateEventArgs.cs
- ProtocolsSection.cs
- FileEnumerator.cs
- LinearGradientBrush.cs
- SafeNativeMethods.cs
- XmlTextAttribute.cs
- PersonalizationStateQuery.cs
- EditorOptionAttribute.cs
- BasicCellRelation.cs
- PrintingPermission.cs
- ToolStripPanelCell.cs
- ImageFormat.cs
- String.cs
- unsafenativemethodsother.cs
- ComponentEvent.cs
- WasAdminWrapper.cs
- DoubleAnimationUsingPath.cs
- OutOfMemoryException.cs
- TemplatedMailWebEventProvider.cs
- FilteredDataSetHelper.cs
- TextSerializer.cs
- RelationalExpressions.cs
- HandlerBase.cs
- InvokePatternIdentifiers.cs
- ILGenerator.cs
- DbXmlEnabledProviderManifest.cs
- Pts.cs
- DataGridView.cs
- FontStyleConverter.cs
- KeyTimeConverter.cs
- COAUTHIDENTITY.cs
- RequestStatusBarUpdateEventArgs.cs
- Missing.cs
- DecoderFallbackWithFailureFlag.cs
- LocalizableAttribute.cs
- ProfileInfo.cs
- FileInfo.cs
- ActivityInterfaces.cs
- AuthStoreRoleProvider.cs
- FileUtil.cs
- MsmqInputChannelListener.cs
- PackWebRequestFactory.cs
- Events.cs
- NoResizeSelectionBorderGlyph.cs
- ExpandableObjectConverter.cs
- SerializationTrace.cs
- WebBrowserNavigatingEventHandler.cs
- ThreadPool.cs
- TargetInvocationException.cs
- SRGSCompiler.cs
- EventMap.cs
- AsnEncodedData.cs
- SqlConnectionPoolProviderInfo.cs
- EntityTypeBase.cs
- NetworkAddressChange.cs
- EmptyWithCancelationCheckWorkItem.cs
- MenuAutoFormat.cs
- PropertyCondition.cs
- DynamicValueConverter.cs
- StrongName.cs
- WebDescriptionAttribute.cs
- StreamReader.cs
- DynamicMethod.cs
- BaseTemplateParser.cs
- AccessDataSource.cs
- PointConverter.cs