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;
}
///
/// [To be supplied.]
///
public bool Immutable {
get {
return immutable;
}
}
///
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
ImmutableObjectAttribute other = obj as ImmutableObjectAttribute;
return other != null && other.Immutable == this.immutable;
}
///
///
/// Returns the hashcode for this object.
///
///
public override int GetHashCode() {
return base.GetHashCode();
}
///
///
///
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;
}
///
/// [To be supplied.]
///
public bool Immutable {
get {
return immutable;
}
}
///
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
ImmutableObjectAttribute other = obj as ImmutableObjectAttribute;
return other != null && other.Immutable == this.immutable;
}
///
///
/// Returns the hashcode for this object.
///
///
public override int GetHashCode() {
return base.GetHashCode();
}
///
///
///
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
- GridItemPattern.cs
- ApplicationBuildProvider.cs
- XmlNamespaceDeclarationsAttribute.cs
- EventPropertyMap.cs
- OutOfProcStateClientManager.cs
- brushes.cs
- WebPartCancelEventArgs.cs
- HtmlControl.cs
- OleDbErrorCollection.cs
- PlatformNotSupportedException.cs
- ExpressionEditor.cs
- ButtonBaseAdapter.cs
- SystemException.cs
- StringValidatorAttribute.cs
- NavigationWindow.cs
- ToolboxService.cs
- ProfileParameter.cs
- DecoderNLS.cs
- MarkupCompilePass1.cs
- GridViewCommandEventArgs.cs
- ObjectAssociationEndMapping.cs
- PropertyConverter.cs
- DocumentPageTextView.cs
- Stroke2.cs
- ArrayConverter.cs
- SvcMapFileLoader.cs
- CodeExpressionStatement.cs
- TrackingQuery.cs
- ProfileSettingsCollection.cs
- TrustLevel.cs
- WindowsTokenRoleProvider.cs
- DiscoveryDocumentReference.cs
- SchemaDeclBase.cs
- HttpCacheVary.cs
- Stream.cs
- WebAdminConfigurationHelper.cs
- ConnectionManagementSection.cs
- DefaultBinder.cs
- Win32SafeHandles.cs
- XpsResourcePolicy.cs
- ObfuscationAttribute.cs
- TagMapInfo.cs
- HttpModuleActionCollection.cs
- JournalEntryListConverter.cs
- CacheSection.cs
- XamlStyleSerializer.cs
- ThumbAutomationPeer.cs
- RepeaterItemCollection.cs
- SecurityVersion.cs
- TypefaceMap.cs
- InvokeProviderWrapper.cs
- PersonalizationStateQuery.cs
- BorderSidesEditor.cs
- ModulesEntry.cs
- LinkConverter.cs
- AmbientEnvironment.cs
- ListViewItem.cs
- TrailingSpaceComparer.cs
- WebPartConnectionsConnectVerb.cs
- NavigationPropertySingletonExpression.cs
- DynamicContractTypeBuilder.cs
- ComponentRenameEvent.cs
- TrackingCondition.cs
- OutputScope.cs
- ResizingMessageFilter.cs
- OrthographicCamera.cs
- QueuePathEditor.cs
- HTTPNotFoundHandler.cs
- Module.cs
- DecoderNLS.cs
- GPRECTF.cs
- Tracking.cs
- ListSortDescriptionCollection.cs
- TemplateControl.cs
- ChildChangedEventArgs.cs
- DocumentOutline.cs
- GetTokenRequest.cs
- Identifier.cs
- LockingPersistenceProvider.cs
- CompiledQueryCacheKey.cs
- MemberMaps.cs
- Debug.cs
- AnnotationComponentManager.cs
- MultitargetUtil.cs
- followingquery.cs
- CapacityStreamGeometryContext.cs
- PrintingPermission.cs
- XPathAncestorIterator.cs
- RC2.cs
- RouteParameter.cs
- DataStreams.cs
- RowUpdatedEventArgs.cs
- AssemblyName.cs
- PassportAuthenticationEventArgs.cs
- cookie.cs
- UrlMappingsSection.cs
- DbConnectionPoolGroupProviderInfo.cs
- FlowLayoutSettings.cs
- WebServiceData.cs
- Visual3DCollection.cs