Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ImmutableObjectAttribute.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextSchema.cs
- ObjectItemCachedAssemblyLoader.cs
- OdbcConnectionOpen.cs
- XmlAutoDetectWriter.cs
- ValidatedControlConverter.cs
- SqlDataSourceView.cs
- HwndTarget.cs
- FontUnit.cs
- UserMapPath.cs
- Conditional.cs
- Control.cs
- ItemType.cs
- SerializationObjectManager.cs
- DataControlField.cs
- BooleanSwitch.cs
- ToolboxItemSnapLineBehavior.cs
- EntityDataSourceChangingEventArgs.cs
- LinearGradientBrush.cs
- TimeSpan.cs
- StylusPointPropertyInfo.cs
- SoapParser.cs
- ControlIdConverter.cs
- TabletDevice.cs
- ValidationResult.cs
- CollectionExtensions.cs
- infer.cs
- MgmtConfigurationRecord.cs
- DataGridItem.cs
- TextStore.cs
- ArrayList.cs
- DataRowView.cs
- WindowsSysHeader.cs
- ImageAttributes.cs
- UITypeEditor.cs
- Win32Native.cs
- SettingsPropertyValueCollection.cs
- ConstructorExpr.cs
- RelationshipManager.cs
- CurrentChangingEventArgs.cs
- COAUTHINFO.cs
- LineVisual.cs
- InboundActivityHelper.cs
- AlignmentXValidation.cs
- RegexMatch.cs
- WindowsGraphics2.cs
- ProfileService.cs
- TableStyle.cs
- DataGridViewColumnEventArgs.cs
- CopyCodeAction.cs
- MetadataUtilsSmi.cs
- ToolStripTemplateNode.cs
- DesignerTransactionCloseEvent.cs
- TemplateContentLoader.cs
- OleDbCommand.cs
- ListViewGroupItemCollection.cs
- Assert.cs
- EmptyCollection.cs
- TextParagraphCache.cs
- WorkflowDebuggerSteppingAttribute.cs
- SmiGettersStream.cs
- InvalidEnumArgumentException.cs
- FormatConvertedBitmap.cs
- BrowserCapabilitiesFactoryBase.cs
- Int16KeyFrameCollection.cs
- DefaultProxySection.cs
- Repeater.cs
- HttpSessionStateWrapper.cs
- ContentPosition.cs
- XmlWrappingReader.cs
- ChannelManager.cs
- SoapObjectInfo.cs
- SafeNativeMethods.cs
- SecurityDocument.cs
- FileSystemEnumerable.cs
- CompilerCollection.cs
- IssuanceLicense.cs
- EnumUnknown.cs
- AlphabetConverter.cs
- NonSerializedAttribute.cs
- TrackingServices.cs
- EventLogWatcher.cs
- XmlResolver.cs
- HostedBindingBehavior.cs
- base64Transforms.cs
- CounterSampleCalculator.cs
- XmlSchemaDatatype.cs
- NullableIntMinMaxAggregationOperator.cs
- TemplateBindingExtension.cs
- AlphabeticalEnumConverter.cs
- SettingsAttributeDictionary.cs
- EntityTypeBase.cs
- BrowserInteropHelper.cs
- UnaryNode.cs
- HttpClientCertificate.cs
- PreviewPrintController.cs
- TextTreeUndo.cs
- CodeMethodReturnStatement.cs
- InfoCardHelper.cs
- DateTimeFormat.cs
- DetailsViewUpdateEventArgs.cs