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
- SimpleHandlerBuildProvider.cs
- TdsRecordBufferSetter.cs
- GlyphCache.cs
- StaticResourceExtension.cs
- Ipv6Element.cs
- AstNode.cs
- Block.cs
- DataGridCell.cs
- GridItemProviderWrapper.cs
- WsdlBuildProvider.cs
- WorkerProcess.cs
- SrgsElementFactoryCompiler.cs
- AxHost.cs
- BaseAsyncResult.cs
- panel.cs
- GridViewCommandEventArgs.cs
- PropertySourceInfo.cs
- PieceDirectory.cs
- RoutedEvent.cs
- TemplateBaseAction.cs
- PathFigure.cs
- SafeRightsManagementEnvironmentHandle.cs
- CorrelationValidator.cs
- ManifestResourceInfo.cs
- IResourceProvider.cs
- ListComponentEditor.cs
- ParallelRangeManager.cs
- EUCJPEncoding.cs
- ToolStripCodeDomSerializer.cs
- ConfigurationLockCollection.cs
- StorageModelBuildProvider.cs
- CompilerCollection.cs
- VirtualDirectoryMappingCollection.cs
- MemoryStream.cs
- Point4DConverter.cs
- SoapSchemaMember.cs
- SqlDependency.cs
- WebControlToolBoxItem.cs
- PhysicalFontFamily.cs
- DateTimeOffset.cs
- ListBoxItemWrapperAutomationPeer.cs
- MethodExecutor.cs
- MDIClient.cs
- MembershipValidatePasswordEventArgs.cs
- RolePrincipal.cs
- HwndHost.cs
- AmbientLight.cs
- MergablePropertyAttribute.cs
- NavigationFailedEventArgs.cs
- RetrieveVirtualItemEventArgs.cs
- BuildManagerHost.cs
- HandlerElementCollection.cs
- DispatcherHooks.cs
- LocalIdKeyIdentifierClause.cs
- Avt.cs
- OrderByQueryOptionExpression.cs
- EventMappingSettings.cs
- AssemblyBuilder.cs
- RemoteArgument.cs
- Transform3DGroup.cs
- precedingquery.cs
- DataControlFieldsEditor.cs
- XmlNodeReader.cs
- PrivateFontCollection.cs
- BitmapEffect.cs
- ExternalDataExchangeClient.cs
- TimersDescriptionAttribute.cs
- ReceiveActivity.cs
- PrintDialog.cs
- Site.cs
- XPathBinder.cs
- _UriTypeConverter.cs
- RegexCompilationInfo.cs
- RepeaterItemCollection.cs
- LockCookie.cs
- ConfigXmlText.cs
- Geometry3D.cs
- TraceData.cs
- CodeRegionDirective.cs
- CharUnicodeInfo.cs
- HwndSubclass.cs
- ExpressionBindingCollection.cs
- WorkflowOperationBehavior.cs
- ProcessModelInfo.cs
- XmlSchemaType.cs
- ActiveXMessageFormatter.cs
- TextRunCache.cs
- Constants.cs
- CodeAttributeDeclarationCollection.cs
- ShapeTypeface.cs
- ParsedAttributeCollection.cs
- PasswordDeriveBytes.cs
- UriParserTemplates.cs
- IntegrationExceptionEventArgs.cs
- EndpointReference.cs
- FormatterConverter.cs
- DesignerOptionService.cs
- EntityDataSourceDataSelection.cs
- RelatedView.cs
- BehaviorService.cs