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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ZipIOLocalFileBlock.cs
- DockProviderWrapper.cs
- Asn1IntegerConverter.cs
- TextEditor.cs
- GrammarBuilderDictation.cs
- PathGradientBrush.cs
- WebPartConnectionsConnectVerb.cs
- ScriptDescriptor.cs
- Point.cs
- IdentityValidationException.cs
- ResourceSetExpression.cs
- CryptoKeySecurity.cs
- TrustSection.cs
- XamlTypeMapper.cs
- ResourceManager.cs
- KeySpline.cs
- ScrollItemPatternIdentifiers.cs
- XmlDocumentFragment.cs
- DataQuery.cs
- ObjectDataSourceDesigner.cs
- TextElement.cs
- FontUnit.cs
- CatalogPartChrome.cs
- ProcessModelInfo.cs
- TypeUtils.cs
- GridViewRowCollection.cs
- DataMisalignedException.cs
- MemoryStream.cs
- DefaultValueAttribute.cs
- SplashScreenNativeMethods.cs
- EntityDataSourceSelectedEventArgs.cs
- RecognitionEventArgs.cs
- DiscriminatorMap.cs
- XmlDeclaration.cs
- HelpKeywordAttribute.cs
- EncryptedData.cs
- DataViewListener.cs
- WebPartActionVerb.cs
- AssemblyInfo.cs
- TrackingValidationObjectDictionary.cs
- SafeFreeMibTable.cs
- XXXOnTypeBuilderInstantiation.cs
- RepeatInfo.cs
- TextWriterTraceListener.cs
- Baml6ConstructorInfo.cs
- MdiWindowListStrip.cs
- HttpHandlerAction.cs
- HtmlElementErrorEventArgs.cs
- ListBoxItemAutomationPeer.cs
- CloseSequenceResponse.cs
- CodeAttributeArgumentCollection.cs
- ButtonBaseAutomationPeer.cs
- WebResponse.cs
- CatalogPartChrome.cs
- XmlDownloadManager.cs
- HttpListenerContext.cs
- SafeBitVector32.cs
- Thickness.cs
- SurrogateSelector.cs
- WebServiceReceiveDesigner.cs
- OdbcConnectionOpen.cs
- XmlSchemaDatatype.cs
- DoubleLinkList.cs
- PathSegmentCollection.cs
- ErrorWrapper.cs
- DataServiceContext.cs
- SerializationEventsCache.cs
- UseManagedPresentationBindingElementImporter.cs
- EmptyQuery.cs
- AssociatedControlConverter.cs
- FileDialog.cs
- CompoundFileStorageReference.cs
- ImageSourceValueSerializer.cs
- MinimizableAttributeTypeConverter.cs
- DataGridTable.cs
- ScrollProperties.cs
- SocketException.cs
- XMLSyntaxException.cs
- CodeMethodReturnStatement.cs
- KeyEvent.cs
- WebPartConnectVerb.cs
- SqlDataRecord.cs
- ColorTransform.cs
- AssemblyBuilderData.cs
- SmtpSection.cs
- AnnotationResource.cs
- HTMLTagNameToTypeMapper.cs
- SoapIncludeAttribute.cs
- Identifier.cs
- TransformedBitmap.cs
- CancellationHandlerDesigner.cs
- GB18030Encoding.cs
- XsdDateTime.cs
- ListenUriMode.cs
- MenuCommand.cs
- DataGridTable.cs
- ETagAttribute.cs
- DetailsView.cs
- EntityDataSourceDataSelection.cs
- TextSegment.cs