Code:
/ 4.0 / 4.0 / 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.
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
- XmlSerializerSection.cs
- CaseInsensitiveHashCodeProvider.cs
- TablePattern.cs
- Geometry3D.cs
- FormsAuthenticationEventArgs.cs
- StorageMappingItemLoader.cs
- BuildResultCache.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ScaleTransform.cs
- ProxyHwnd.cs
- BindingManagerDataErrorEventArgs.cs
- UserInitiatedNavigationPermission.cs
- StringConcat.cs
- XmlSchemaInfo.cs
- SchemaTableOptionalColumn.cs
- ParameterToken.cs
- ApplicationSettingsBase.cs
- ToolboxSnapDragDropEventArgs.cs
- SqlNotificationRequest.cs
- MeasurementDCInfo.cs
- EventWaitHandle.cs
- MappingException.cs
- UpdatePanelTrigger.cs
- ListCollectionView.cs
- ResourceReferenceExpressionConverter.cs
- TriggerCollection.cs
- UnSafeCharBuffer.cs
- ParagraphVisual.cs
- WebConfigurationManager.cs
- DiagnosticTraceSource.cs
- ExceptionValidationRule.cs
- GeneralTransform.cs
- Pair.cs
- Evidence.cs
- BuildResultCache.cs
- CoTaskMemHandle.cs
- MouseBinding.cs
- EntityViewGenerationConstants.cs
- KnownTypeAttribute.cs
- SamlAuthorityBinding.cs
- TabItemWrapperAutomationPeer.cs
- BezierSegment.cs
- RelatedEnd.cs
- Tuple.cs
- XmlObjectSerializer.cs
- FontWeight.cs
- WindowCollection.cs
- XmlReturnReader.cs
- StructuralType.cs
- CommandManager.cs
- ScaleTransform.cs
- StaticSiteMapProvider.cs
- AndAlso.cs
- CertificateManager.cs
- DetailsViewRowCollection.cs
- ListBase.cs
- RadioButton.cs
- FullTextLine.cs
- XmlSiteMapProvider.cs
- EventRecord.cs
- ListViewItem.cs
- HashMembershipCondition.cs
- Control.cs
- CacheOutputQuery.cs
- XmlSchemaSimpleContent.cs
- HijriCalendar.cs
- OracleConnectionString.cs
- PropertyGeneratedEventArgs.cs
- ScriptingRoleServiceSection.cs
- ParentUndoUnit.cs
- TemplatedWizardStep.cs
- LineInfo.cs
- TextServicesHost.cs
- EventHandlers.cs
- ViewEventArgs.cs
- DataTableNewRowEvent.cs
- DataGridViewRowCollection.cs
- WebBaseEventKeyComparer.cs
- RelationshipEnd.cs
- PtsContext.cs
- Attributes.cs
- CodeCommentStatement.cs
- DocumentViewerBaseAutomationPeer.cs
- CapabilitiesRule.cs
- WindowsStartMenu.cs
- ISSmlParser.cs
- LoginName.cs
- SchemaSetCompiler.cs
- ThreadInterruptedException.cs
- InternalUserCancelledException.cs
- XamlFigureLengthSerializer.cs
- nulltextcontainer.cs
- AsyncResult.cs
- DataSourceConverter.cs
- FocusChangedEventArgs.cs
- OutputBuffer.cs
- Rect.cs
- Gdiplus.cs
- StopRoutingHandler.cs
- ListControlBuilder.cs