Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ComponentResourceKeyConverter.cs
- FormClosingEvent.cs
- XhtmlConformanceSection.cs
- FixedBufferAttribute.cs
- DbConnectionPoolOptions.cs
- DataRelationCollection.cs
- SplashScreen.cs
- ZipIOFileItemStream.cs
- BaseInfoTable.cs
- _FtpDataStream.cs
- IxmlLineInfo.cs
- CfgRule.cs
- ToolStripPanelDesigner.cs
- OdbcConnectionString.cs
- CapiSymmetricAlgorithm.cs
- ActionFrame.cs
- util.cs
- SpecularMaterial.cs
- XhtmlConformanceSection.cs
- URLMembershipCondition.cs
- GacUtil.cs
- TextParagraphProperties.cs
- CacheChildrenQuery.cs
- InkSerializer.cs
- CommandDevice.cs
- TraceSection.cs
- MDIWindowDialog.cs
- ReturnType.cs
- ImplicitInputBrush.cs
- WindowsSspiNegotiation.cs
- SessionSwitchEventArgs.cs
- ProtocolsConfiguration.cs
- UndirectedGraph.cs
- NameTable.cs
- QilName.cs
- ProtocolsSection.cs
- Span.cs
- ThrowHelper.cs
- DnsEndpointIdentity.cs
- WorkflowDesignerMessageFilter.cs
- GeneralTransformGroup.cs
- SurrogateSelector.cs
- ListViewContainer.cs
- _NegoState.cs
- TextPenaltyModule.cs
- FileVersionInfo.cs
- ArraySortHelper.cs
- BuildProviderCollection.cs
- EdmTypeAttribute.cs
- ReferenceSchema.cs
- DispatcherSynchronizationContext.cs
- ValidationEventArgs.cs
- SQLDouble.cs
- ElementAtQueryOperator.cs
- UshortList2.cs
- UrlMappingsSection.cs
- InProcStateClientManager.cs
- QueryCacheEntry.cs
- HtmlCalendarAdapter.cs
- RightsManagementInformation.cs
- RbTree.cs
- FileDialog_Vista_Interop.cs
- PointUtil.cs
- SimpleWorkerRequest.cs
- TextDecorationCollectionConverter.cs
- ProofTokenCryptoHandle.cs
- OletxDependentTransaction.cs
- ConfigsHelper.cs
- _StreamFramer.cs
- CancelEventArgs.cs
- ApplicationSecurityManager.cs
- WmlSelectionListAdapter.cs
- CatalogZoneBase.cs
- SymbolType.cs
- BooleanConverter.cs
- DocumentPageView.cs
- FamilyMap.cs
- ListView.cs
- DocumentViewerBase.cs
- UniqueEventHelper.cs
- StyleHelper.cs
- DataSvcMapFileSerializer.cs
- MenuItemStyle.cs
- StorageAssociationSetMapping.cs
- SessionStateModule.cs
- DataGridViewBand.cs
- Code.cs
- SslStream.cs
- DelegateHelpers.Generated.cs
- TrackingServices.cs
- TreeView.cs
- CodeTypeDeclaration.cs
- HttpWebRequestElement.cs
- path.cs
- RelationshipEndCollection.cs
- DataContractSerializer.cs
- ContentIterators.cs
- ProcessHost.cs
- DataServiceRequest.cs
- LocatorBase.cs