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
- TableItemPattern.cs
- XmlAttributeProperties.cs
- Root.cs
- PathGeometry.cs
- SchemaTableOptionalColumn.cs
- PresentationSource.cs
- AssociationTypeEmitter.cs
- PermissionSet.cs
- RoleManagerSection.cs
- SchemaType.cs
- PingOptions.cs
- StructuredTypeInfo.cs
- PropertyFilter.cs
- MasterPage.cs
- WebConfigurationManager.cs
- DataRowChangeEvent.cs
- RegexWorker.cs
- BaseDataList.cs
- XmlWrappingWriter.cs
- GridToolTip.cs
- PassportAuthenticationModule.cs
- relpropertyhelper.cs
- DocumentStatusResources.cs
- RefreshEventArgs.cs
- CommentAction.cs
- TableLayoutStyleCollection.cs
- ConfigurationManagerHelperFactory.cs
- PerformanceCounterPermissionAttribute.cs
- CapabilitiesState.cs
- MarkupCompiler.cs
- WebServiceFaultDesigner.cs
- DataGridViewCheckBoxColumn.cs
- QilReplaceVisitor.cs
- XsdDataContractExporter.cs
- ColorBuilder.cs
- DataColumn.cs
- FileLoadException.cs
- DocumentAutomationPeer.cs
- BinaryVersion.cs
- HiddenField.cs
- DataGridLength.cs
- ImageAnimator.cs
- RowCache.cs
- GlyphsSerializer.cs
- keycontainerpermission.cs
- SystemColorTracker.cs
- ToolStripPanelCell.cs
- OrderByExpression.cs
- RelatedView.cs
- ExpressionsCollectionConverter.cs
- path.cs
- GroupBox.cs
- OleDbCommandBuilder.cs
- TypeSystem.cs
- Win32.cs
- SR.cs
- PrimitiveCodeDomSerializer.cs
- LoginCancelEventArgs.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- BlurBitmapEffect.cs
- DataServiceProcessingPipelineEventArgs.cs
- PersonalizationStateQuery.cs
- Pens.cs
- SqlMethodTransformer.cs
- ComplusEndpointConfigContainer.cs
- StrokeRenderer.cs
- ReferenceService.cs
- MessageParameterAttribute.cs
- ListenerElementsCollection.cs
- OpenTypeLayoutCache.cs
- BrowserCapabilitiesFactory.cs
- SqlCachedBuffer.cs
- XsdDuration.cs
- BaseTemplateBuildProvider.cs
- HandleCollector.cs
- RevocationPoint.cs
- StrictAndMessageFilter.cs
- CheckedListBox.cs
- ToolStripDropTargetManager.cs
- IconConverter.cs
- LiteralLink.cs
- _IPv4Address.cs
- IgnoreFlushAndCloseStream.cs
- BitmapCodecInfoInternal.cs
- ToolboxSnapDragDropEventArgs.cs
- HttpCacheVaryByContentEncodings.cs
- ControlParser.cs
- FindProgressChangedEventArgs.cs
- FontConverter.cs
- BackgroundFormatInfo.cs
- XamlHttpHandlerFactory.cs
- ParseNumbers.cs
- ReferentialConstraint.cs
- MenuEventArgs.cs
- StylusDownEventArgs.cs
- SerializationInfo.cs
- ProcessProtocolHandler.cs
- BinaryNegotiation.cs
- ADConnectionHelper.cs
- SvcMapFileSerializer.cs