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
- FlowNode.cs
- PersonalizationAdministration.cs
- EdmPropertyAttribute.cs
- ThreadExceptionEvent.cs
- Queue.cs
- RootBrowserWindow.cs
- WebPartTransformer.cs
- UiaCoreTypesApi.cs
- WebPartConnectionsConfigureVerb.cs
- JsonEnumDataContract.cs
- ParseHttpDate.cs
- SessionStateUtil.cs
- CapabilitiesState.cs
- StylusPointPropertyInfoDefaults.cs
- StaticFileHandler.cs
- RealProxy.cs
- DataControlImageButton.cs
- ConfigXmlAttribute.cs
- ArcSegment.cs
- VoiceInfo.cs
- DesignDataSource.cs
- FormatterServices.cs
- ZipIOExtraFieldElement.cs
- AccessDataSourceView.cs
- ByteFacetDescriptionElement.cs
- X509ChainPolicy.cs
- CallContext.cs
- diagnosticsswitches.cs
- Condition.cs
- XmlSerializerVersionAttribute.cs
- baseaxisquery.cs
- FillBehavior.cs
- RadioButtonDesigner.cs
- ProtocolsConfigurationEntry.cs
- SystemIcmpV4Statistics.cs
- entityreference_tresulttype.cs
- figurelengthconverter.cs
- StandardCommandToolStripMenuItem.cs
- EnumerationRangeValidationUtil.cs
- ToolStripPanelRow.cs
- Int32EqualityComparer.cs
- Rule.cs
- X509RawDataKeyIdentifierClause.cs
- DataTableClearEvent.cs
- Literal.cs
- storepermission.cs
- Label.cs
- SectionVisual.cs
- sqlmetadatafactory.cs
- Style.cs
- DataTableMappingCollection.cs
- Int16Converter.cs
- XmlUTF8TextWriter.cs
- RTLAwareMessageBox.cs
- RoutingEndpointTrait.cs
- XNodeNavigator.cs
- JsonReader.cs
- ArithmeticLiteral.cs
- FlowDocumentScrollViewer.cs
- SerializationFieldInfo.cs
- HMAC.cs
- SQLConvert.cs
- InputProcessorProfilesLoader.cs
- ConvertersCollection.cs
- ViewRendering.cs
- RoleGroupCollection.cs
- HttpCapabilitiesBase.cs
- RequestQueryProcessor.cs
- localization.cs
- SynchronizationScope.cs
- HTMLTagNameToTypeMapper.cs
- OleDbStruct.cs
- AppDomain.cs
- ConfigurationStrings.cs
- SafeFileMapViewHandle.cs
- XmlCodeExporter.cs
- CryptoProvider.cs
- ButtonField.cs
- Deflater.cs
- Vector3D.cs
- TouchFrameEventArgs.cs
- TagMapInfo.cs
- DecimalStorage.cs
- Message.cs
- InstanceDataCollectionCollection.cs
- RequestTimeoutManager.cs
- IconConverter.cs
- HttpResponseHeader.cs
- NativeRightsManagementAPIsStructures.cs
- BackStopAuthenticationModule.cs
- TimeManager.cs
- EventLogPermissionAttribute.cs
- PeerInvitationResponse.cs
- WorkflowServiceNamespace.cs
- SqlXml.cs
- HostingEnvironmentSection.cs
- PersonalizationEntry.cs
- UIElement3D.cs
- HTMLTagNameToTypeMapper.cs
- SystemIcmpV6Statistics.cs