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
- shaperfactory.cs
- SqlInfoMessageEvent.cs
- TileBrush.cs
- ContainerParaClient.cs
- PropertyStore.cs
- ConnectionProviderAttribute.cs
- HttpResponseBase.cs
- ResourceDisplayNameAttribute.cs
- DataGridCommandEventArgs.cs
- SecurityElement.cs
- BamlLocalizabilityResolver.cs
- UrlMappingsSection.cs
- ImageField.cs
- Transform3DGroup.cs
- RawUIStateInputReport.cs
- ReadOnlyHierarchicalDataSource.cs
- Attributes.cs
- FixedTextSelectionProcessor.cs
- WindowsListViewGroup.cs
- ApplicationException.cs
- Camera.cs
- SqlProfileProvider.cs
- UriPrefixTable.cs
- XmlDeclaration.cs
- SoapTypeAttribute.cs
- DataRowView.cs
- _UncName.cs
- DataGridViewCheckBoxCell.cs
- RowBinding.cs
- WindowsHyperlink.cs
- PermissionSetEnumerator.cs
- WebPartCollection.cs
- InstanceCreationEditor.cs
- ThicknessAnimation.cs
- IdentitySection.cs
- ResolveMatches11.cs
- OleDbParameterCollection.cs
- DataObjectAttribute.cs
- UnsafePeerToPeerMethods.cs
- SessionEndingCancelEventArgs.cs
- OleDbTransaction.cs
- ControlCollection.cs
- SqlReferenceCollection.cs
- MultipleViewPattern.cs
- CompiledQuery.cs
- XslTransform.cs
- SchemaNotation.cs
- DataViewListener.cs
- CodeSnippetStatement.cs
- InsufficientMemoryException.cs
- DrawingContextDrawingContextWalker.cs
- DispatcherHookEventArgs.cs
- ExpressionConverter.cs
- NominalTypeEliminator.cs
- CodePrimitiveExpression.cs
- AnimationTimeline.cs
- ACE.cs
- MatrixUtil.cs
- Hex.cs
- WebServiceData.cs
- SafeNativeMethods.cs
- XmlSubtreeReader.cs
- LassoHelper.cs
- Evidence.cs
- BufferAllocator.cs
- OutputWindow.cs
- RegexWriter.cs
- Axis.cs
- PropertySegmentSerializer.cs
- XmlAttributeAttribute.cs
- TraceLevelStore.cs
- FlowLayout.cs
- Geometry3D.cs
- PropertySet.cs
- EdmPropertyAttribute.cs
- CellRelation.cs
- ArgumentDirectionHelper.cs
- ReadOnlyMetadataCollection.cs
- AttachmentService.cs
- ProviderConnectionPointCollection.cs
- XmlSchemaAll.cs
- ColumnMapCopier.cs
- MasterPageBuildProvider.cs
- Size3D.cs
- XamlPoint3DCollectionSerializer.cs
- HwndSource.cs
- XmlDocument.cs
- ToolboxComponentsCreatedEventArgs.cs
- BooleanExpr.cs
- ActivityDesignerHighlighter.cs
- DetailsViewInsertEventArgs.cs
- FaultPropagationRecord.cs
- ExpressionVisitor.cs
- WebPartDisplayModeCancelEventArgs.cs
- KeyInterop.cs
- ThicknessAnimationUsingKeyFrames.cs
- DataGridPageChangedEventArgs.cs
- SmtpAuthenticationManager.cs
- Nullable.cs
- UdpTransportSettings.cs