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
- TdsParserHelperClasses.cs
- PinnedBufferMemoryStream.cs
- HttpProcessUtility.cs
- HasCopySemanticsAttribute.cs
- XmlElementAttribute.cs
- AutomationElementIdentifiers.cs
- DataGridViewSelectedColumnCollection.cs
- FramingFormat.cs
- WebServiceParameterData.cs
- TextRangeBase.cs
- NetworkStream.cs
- XmlReaderSettings.cs
- TcpStreams.cs
- OpenTypeLayoutCache.cs
- MenuItemAutomationPeer.cs
- PrincipalPermission.cs
- TextBox.cs
- UnlockCardRequest.cs
- IChannel.cs
- HostSecurityManager.cs
- LockedBorderGlyph.cs
- PerformanceCounterLib.cs
- QueuePathDialog.cs
- ExpressionLink.cs
- RoleGroup.cs
- XmlSchemaDatatype.cs
- ManualResetEvent.cs
- ApplicationId.cs
- AssemblyAttributesGoHere.cs
- CursorInteropHelper.cs
- TransactionInterop.cs
- BitmapVisualManager.cs
- InternalEnumValidatorAttribute.cs
- RequestCachePolicyConverter.cs
- QualificationDataAttribute.cs
- RemotingAttributes.cs
- DesignerActionKeyboardBehavior.cs
- DbDataSourceEnumerator.cs
- FormsAuthenticationModule.cs
- BaseAsyncResult.cs
- SoapSchemaExporter.cs
- _AutoWebProxyScriptEngine.cs
- AndMessageFilter.cs
- X509CertificateTrustedIssuerElementCollection.cs
- CategoryAttribute.cs
- Section.cs
- ThemeDictionaryExtension.cs
- LayoutEditorPart.cs
- Content.cs
- RegistryConfigurationProvider.cs
- Ticks.cs
- ConditionalWeakTable.cs
- ListDictionaryInternal.cs
- MultipartContentParser.cs
- OdbcError.cs
- StylusOverProperty.cs
- RewritingValidator.cs
- Input.cs
- CompilationRelaxations.cs
- IArgumentProvider.cs
- TraceContextEventArgs.cs
- ControllableStoryboardAction.cs
- LayoutTableCell.cs
- AuthenticatedStream.cs
- DataGridRow.cs
- UnsafeNativeMethodsCLR.cs
- WebBrowserSiteBase.cs
- BackgroundWorker.cs
- MenuCommand.cs
- HotSpotCollection.cs
- FilteredReadOnlyMetadataCollection.cs
- EventLogPermissionEntry.cs
- DocumentSequenceHighlightLayer.cs
- TypefaceMetricsCache.cs
- DataListAutoFormat.cs
- basenumberconverter.cs
- Mapping.cs
- MetadataPropertyvalue.cs
- Encoder.cs
- WebPart.cs
- StylusLogic.cs
- AddInController.cs
- PaperSource.cs
- CompilationUnit.cs
- SyndicationSerializer.cs
- PermissionListSet.cs
- XmlUtil.cs
- ManipulationStartingEventArgs.cs
- Marshal.cs
- CodeCommentStatement.cs
- ResolvedKeyFrameEntry.cs
- TypeDescriptionProviderAttribute.cs
- BaseAddressPrefixFilterElement.cs
- BufferModesCollection.cs
- StoreAnnotationsMap.cs
- ImageUrlEditor.cs
- ObjectItemConventionAssemblyLoader.cs
- CompensateDesigner.cs
- SocketAddress.cs
- QueryableDataSource.cs