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
- Processor.cs
- StorageScalarPropertyMapping.cs
- DateTimeConverter2.cs
- XmlSchemaDocumentation.cs
- Expression.cs
- XmlSchemaRedefine.cs
- ToolStripDropDown.cs
- BitmapPalettes.cs
- PartialCachingControl.cs
- coordinator.cs
- PageClientProxyGenerator.cs
- DataGridViewRowPostPaintEventArgs.cs
- tooltip.cs
- StateMachineSubscriptionManager.cs
- EventItfInfo.cs
- ContentElement.cs
- Proxy.cs
- XamlSerializerUtil.cs
- RouteParser.cs
- EdmConstants.cs
- AssemblyHash.cs
- DispatcherTimer.cs
- ButtonFieldBase.cs
- AddInPipelineAttributes.cs
- DesignerActionGlyph.cs
- RegexCharClass.cs
- PersonalizationProviderHelper.cs
- designeractionbehavior.cs
- BinaryConverter.cs
- ValidationManager.cs
- DataShape.cs
- ScrollPatternIdentifiers.cs
- SBCSCodePageEncoding.cs
- AssociationSetMetadata.cs
- AnchorEditor.cs
- ScrollBarRenderer.cs
- OleDbPropertySetGuid.cs
- Menu.cs
- TextComposition.cs
- ThemeDictionaryExtension.cs
- RadioButtonFlatAdapter.cs
- RootProfilePropertySettingsCollection.cs
- NamespaceEmitter.cs
- MULTI_QI.cs
- ChannelPoolSettings.cs
- RectConverter.cs
- ExpressionBuilderContext.cs
- WpfMemberInvoker.cs
- CodeDirectiveCollection.cs
- InertiaExpansionBehavior.cs
- ComponentResourceManager.cs
- EventMappingSettingsCollection.cs
- InvalidateEvent.cs
- WSSecurityOneDotZeroReceiveSecurityHeader.cs
- AuthenticationModulesSection.cs
- TableLayoutCellPaintEventArgs.cs
- XmlCustomFormatter.cs
- BufferModeSettings.cs
- HtmlInputCheckBox.cs
- RtfToken.cs
- CodeAttributeArgument.cs
- BaseHashHelper.cs
- DataSourceHelper.cs
- Currency.cs
- WebBrowserNavigatingEventHandler.cs
- OracleDataAdapter.cs
- RepeatButton.cs
- MasterPage.cs
- ThemeDirectoryCompiler.cs
- columnmapkeybuilder.cs
- NestPullup.cs
- _NestedMultipleAsyncResult.cs
- HandleScope.cs
- FontCacheLogic.cs
- ListViewItem.cs
- DynamicQueryStringParameter.cs
- StrokeIntersection.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- TimeSpanParse.cs
- Rfc4050KeyFormatter.cs
- ApplyTemplatesAction.cs
- ReadOnlyDictionary.cs
- SystemIcmpV6Statistics.cs
- IgnoreDataMemberAttribute.cs
- DocumentXPathNavigator.cs
- DynamicPhysicalDiscoSearcher.cs
- ReadOnlyTernaryTree.cs
- InnerItemCollectionView.cs
- Base64Stream.cs
- ConfigUtil.cs
- DataListItemCollection.cs
- WinFormsSecurity.cs
- ProjectedWrapper.cs
- Thumb.cs
- Utils.cs
- BitmapEditor.cs
- LayoutManager.cs
- HtmlWindowCollection.cs
- CodeExporter.cs
- WebResponse.cs