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
- Internal.cs
- MouseGestureValueSerializer.cs
- DockPattern.cs
- FileNotFoundException.cs
- Message.cs
- NameValueCollection.cs
- DataGridViewRowHeaderCell.cs
- XmlObjectSerializerReadContextComplexJson.cs
- XmlnsDictionary.cs
- ReferentialConstraint.cs
- SecureUICommand.cs
- ProgressBarRenderer.cs
- TextLine.cs
- InplaceBitmapMetadataWriter.cs
- ColumnClickEvent.cs
- MenuItemStyleCollection.cs
- FontNamesConverter.cs
- Expression.cs
- OwnerDrawPropertyBag.cs
- SignatureResourcePool.cs
- RawStylusInputCustomData.cs
- PeerNameRecord.cs
- SafeTokenHandle.cs
- ContentType.cs
- BoolExpressionVisitors.cs
- CfgArc.cs
- IPHostEntry.cs
- StructuralComparisons.cs
- ExpressionPrinter.cs
- ReceiveActivityDesignerTheme.cs
- HtmlDocument.cs
- StreamGeometryContext.cs
- GPRECT.cs
- ComboBoxItem.cs
- DataSourceCacheDurationConverter.cs
- Literal.cs
- mediaclock.cs
- EraserBehavior.cs
- InfoCardCryptoHelper.cs
- ChangesetResponse.cs
- StaticExtensionConverter.cs
- MethodToken.cs
- EntitySetBase.cs
- MulticastNotSupportedException.cs
- codemethodreferenceexpression.cs
- SiteMapPathDesigner.cs
- RoleGroupCollection.cs
- ServerIdentity.cs
- DtdParser.cs
- EqualityComparer.cs
- HostedElements.cs
- CodeSubDirectoriesCollection.cs
- FileDialog_Vista_Interop.cs
- PointAnimationUsingPath.cs
- WorkflowHostingResponseContext.cs
- ToolBarPanel.cs
- DispatcherFrame.cs
- HashCodeCombiner.cs
- CharacterHit.cs
- SmtpFailedRecipientsException.cs
- TypefaceCollection.cs
- MeshGeometry3D.cs
- sqlpipe.cs
- Control.cs
- Selector.cs
- UnmanagedMemoryAccessor.cs
- StorageEntitySetMapping.cs
- WindowsToolbarItemAsMenuItem.cs
- ThaiBuddhistCalendar.cs
- ReaderContextStackData.cs
- MetadataItemCollectionFactory.cs
- TextHidden.cs
- NumberFunctions.cs
- ListSourceHelper.cs
- CallSiteBinder.cs
- LinqDataSourceDeleteEventArgs.cs
- ListBindableAttribute.cs
- WebPartUtil.cs
- SqlProvider.cs
- XmlSignatureManifest.cs
- BaseTemplatedMobileComponentEditor.cs
- AdornerPresentationContext.cs
- FixedSOMPageConstructor.cs
- InputReportEventArgs.cs
- WebPartDisplayModeCollection.cs
- BrowserDefinition.cs
- LineGeometry.cs
- AlgoModule.cs
- SupportsEventValidationAttribute.cs
- TextBreakpoint.cs
- PersonalizationEntry.cs
- ChannelPoolSettingsElement.cs
- DocumentViewerConstants.cs
- Set.cs
- GregorianCalendar.cs
- DispatchWrapper.cs
- NextPreviousPagerField.cs
- SpecularMaterial.cs
- BlurBitmapEffect.cs
- TraceLevelStore.cs