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
- ChildrenQuery.cs
- Color.cs
- ToolConsole.cs
- ToolStripDropTargetManager.cs
- XmlCharType.cs
- ServiceBuildProvider.cs
- RuntimeConfig.cs
- ObjectQuery.cs
- SByte.cs
- EncodingDataItem.cs
- SerialPort.cs
- OneOfElement.cs
- GACIdentityPermission.cs
- TextBoxDesigner.cs
- RealizationDrawingContextWalker.cs
- InvalidAsynchronousStateException.cs
- DataGridColumn.cs
- XmlSchemaElement.cs
- Splitter.cs
- TdsParser.cs
- TrustManagerMoreInformation.cs
- IDReferencePropertyAttribute.cs
- ObjectDataSourceView.cs
- XmlStreamStore.cs
- SignatureConfirmations.cs
- CommandBinding.cs
- SoapSchemaMember.cs
- RootBrowserWindowAutomationPeer.cs
- UIElement.cs
- DesignerProperties.cs
- RelationshipEndCollection.cs
- CmsInterop.cs
- HostExecutionContextManager.cs
- CustomTypeDescriptor.cs
- Binding.cs
- EventMappingSettingsCollection.cs
- shaperfactoryquerycacheentry.cs
- MemberMaps.cs
- BulletedList.cs
- DeploymentExceptionMapper.cs
- ConfigurationManagerInternal.cs
- PrintPreviewGraphics.cs
- TextDecorationCollection.cs
- GlyphingCache.cs
- XamlDesignerSerializationManager.cs
- QilReference.cs
- Win32.cs
- ListViewCancelEventArgs.cs
- SrgsSubset.cs
- XmlSchemaValidationException.cs
- OracleEncoding.cs
- documentsequencetextcontainer.cs
- MediaPlayerState.cs
- CertificateElement.cs
- AttributeTableBuilder.cs
- DesignerCapabilities.cs
- Point3DConverter.cs
- TextEditorSelection.cs
- SystemEvents.cs
- QueueNameHelper.cs
- DbConnectionOptions.cs
- Config.cs
- SqlDataSourceSelectingEventArgs.cs
- ColorConvertedBitmap.cs
- RelationshipDetailsCollection.cs
- ComboBoxHelper.cs
- ListBoxChrome.cs
- HttpCacheVary.cs
- PocoEntityKeyStrategy.cs
- ExtensionMethods.cs
- SplashScreen.cs
- SystemIcmpV4Statistics.cs
- CommandBinding.cs
- TextTreeUndoUnit.cs
- XmlStringTable.cs
- MultiPageTextView.cs
- StringOutput.cs
- XmlSchemaComplexContent.cs
- PageAdapter.cs
- SystemMulticastIPAddressInformation.cs
- TreeBuilderBamlTranslator.cs
- ResourceExpression.cs
- SimplePropertyEntry.cs
- Tracer.cs
- baseshape.cs
- OdbcConnectionOpen.cs
- CodeVariableDeclarationStatement.cs
- StyleBamlRecordReader.cs
- DocumentViewerBaseAutomationPeer.cs
- DataGridViewImageColumn.cs
- PerformanceCounterLib.cs
- Grammar.cs
- ApplicationId.cs
- DesigntimeLicenseContext.cs
- ConnectionStringsSection.cs
- FramingChannels.cs
- TextEditorTables.cs
- Closure.cs
- ServiceChannel.cs
- RowsCopiedEventArgs.cs