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
- BindingGraph.cs
- HashFinalRequest.cs
- ObjectParameterCollection.cs
- Config.cs
- CompilerParameters.cs
- WebException.cs
- DBBindings.cs
- basevalidator.cs
- PagedDataSource.cs
- CompiledRegexRunner.cs
- TextEditorLists.cs
- StylusEventArgs.cs
- ToolTipService.cs
- PassportIdentity.cs
- TouchEventArgs.cs
- Shared.cs
- RulePatternOps.cs
- UrlMappingsModule.cs
- TaskFileService.cs
- Panel.cs
- ManualResetEvent.cs
- Matrix.cs
- ImageDrawing.cs
- AQNBuilder.cs
- AsyncOperationManager.cs
- DBPropSet.cs
- LineServices.cs
- StringSource.cs
- ContainerControl.cs
- ApplicationFileCodeDomTreeGenerator.cs
- TextChangedEventArgs.cs
- ParseNumbers.cs
- ParallelDesigner.cs
- CompleteWizardStep.cs
- CAGDesigner.cs
- DecimalStorage.cs
- AssemblyNameUtility.cs
- CompatibleComparer.cs
- SamlConstants.cs
- DataSourceIDConverter.cs
- PenThreadPool.cs
- ResolveCriteria11.cs
- RSAPKCS1SignatureFormatter.cs
- SafeNativeMethods.cs
- ProxyHwnd.cs
- EntityReference.cs
- VoiceSynthesis.cs
- SubstitutionResponseElement.cs
- ConditionCollection.cs
- ResourceReferenceKeyNotFoundException.cs
- ServiceParser.cs
- FixedPosition.cs
- DataSetFieldSchema.cs
- XmlReaderSettings.cs
- Misc.cs
- ExplicitDiscriminatorMap.cs
- TextServicesCompartmentEventSink.cs
- DataGridViewAutoSizeModeEventArgs.cs
- AccessControlEntry.cs
- BufferModeSettings.cs
- ApplicationDirectoryMembershipCondition.cs
- KeyConstraint.cs
- LogStore.cs
- AssertFilter.cs
- NameGenerator.cs
- QilPatternFactory.cs
- XmlSchemaComplexContent.cs
- ClientScriptManager.cs
- DbConvert.cs
- ResourceDefaultValueAttribute.cs
- ConfigXmlSignificantWhitespace.cs
- activationcontext.cs
- MenuItemBinding.cs
- TaiwanLunisolarCalendar.cs
- CodeTypeMemberCollection.cs
- AsyncDataRequest.cs
- CharConverter.cs
- DataControlFieldCollection.cs
- DiscoveryExceptionDictionary.cs
- AbandonedMutexException.cs
- GraphicsContainer.cs
- ApplicationException.cs
- StreamHelper.cs
- UnsafeNativeMethodsPenimc.cs
- RadioButtonRenderer.cs
- Point4D.cs
- ScriptResourceHandler.cs
- EventProviderWriter.cs
- Part.cs
- URIFormatException.cs
- NumberFormatInfo.cs
- ProcessMonitor.cs
- Resources.Designer.cs
- DnsElement.cs
- EncodingTable.cs
- Rule.cs
- ActivityPropertyReference.cs
- CompilationPass2Task.cs
- Rect3D.cs
- ScriptReference.cs