Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConstraintCollection.cs
- DiscoveryDocumentReference.cs
- EdgeProfileValidation.cs
- PolyQuadraticBezierSegment.cs
- ObjectStateEntryDbDataRecord.cs
- DataSvcMapFileSerializer.cs
- CompoundFileStreamReference.cs
- BooleanStorage.cs
- Int32CollectionValueSerializer.cs
- TypeSource.cs
- PriorityBinding.cs
- TdsParserStateObject.cs
- PropVariant.cs
- XmlAtomicValue.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- HttpCacheParams.cs
- RequestCacheEntry.cs
- TreeNodeStyle.cs
- ComponentChangingEvent.cs
- SymmetricCryptoHandle.cs
- XmlObjectSerializerWriteContext.cs
- IntSecurity.cs
- LicenseException.cs
- NetTcpSecurity.cs
- InternalSafeNativeMethods.cs
- SortKey.cs
- TextDecorationCollectionConverter.cs
- DataExpression.cs
- XmlWriter.cs
- ChannelManagerService.cs
- IUnknownConstantAttribute.cs
- DynamicScriptObject.cs
- LicenseException.cs
- AnnouncementInnerClient11.cs
- PathSegmentCollection.cs
- QuaternionRotation3D.cs
- ToolBarButton.cs
- CalendarButton.cs
- ChannelEndpointElement.cs
- SoundPlayerAction.cs
- SessionEndingEventArgs.cs
- RootProfilePropertySettingsCollection.cs
- LiteralSubsegment.cs
- SerializableReadOnlyDictionary.cs
- ScriptingRoleServiceSection.cs
- SmtpNegotiateAuthenticationModule.cs
- WorkflowMarkupSerializer.cs
- HttpRuntime.cs
- BitmapCodecInfo.cs
- GroupAggregateExpr.cs
- XmlSerializer.cs
- HttpHandlerAction.cs
- OwnerDrawPropertyBag.cs
- DownloadProgressEventArgs.cs
- EnvelopedSignatureTransform.cs
- EventTrigger.cs
- ContentFilePart.cs
- CursorInteropHelper.cs
- DynamicField.cs
- EditingMode.cs
- HandleValueEditor.cs
- SymbolEqualComparer.cs
- ToolStripGrip.cs
- CodeComment.cs
- BitVector32.cs
- SelectedDatesCollection.cs
- FormViewPageEventArgs.cs
- GenericIdentity.cs
- _NegoStream.cs
- Point.cs
- ReferencedCollectionType.cs
- ToolStripLabel.cs
- XmlTextReader.cs
- Stack.cs
- SqlOuterApplyReducer.cs
- DelegatingHeader.cs
- ColorMatrix.cs
- Adorner.cs
- SqlFormatter.cs
- InvokeBase.cs
- PopOutPanel.cs
- TextDecoration.cs
- StylusButtonEventArgs.cs
- SecurityManager.cs
- SvcMapFileSerializer.cs
- TemplateBindingExtension.cs
- MouseButton.cs
- CachedFontFace.cs
- AutoGeneratedFieldProperties.cs
- DataRowExtensions.cs
- CalendarDayButton.cs
- GPRECTF.cs
- WorkflowPrinting.cs
- TextRangeProviderWrapper.cs
- CheckBoxList.cs
- User.cs
- FunctionDescription.cs
- AssociationSetMetadata.cs
- RequestResizeEvent.cs
- SuppressMessageAttribute.cs