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
- WebServiceHost.cs
- COM2IProvidePropertyBuilderHandler.cs
- DoubleAnimationBase.cs
- EntityContainer.cs
- XmlSchemaInfo.cs
- UserMapPath.cs
- TabControlCancelEvent.cs
- HelloMessageApril2005.cs
- MenuBase.cs
- AnnotationObservableCollection.cs
- DataGridViewCellValidatingEventArgs.cs
- XmlAttributeAttribute.cs
- BasicKeyConstraint.cs
- ProcessModelSection.cs
- TableCell.cs
- ClientSettingsProvider.cs
- LocalizedNameDescriptionPair.cs
- TextTreeFixupNode.cs
- OutputCacheSettings.cs
- FileLogRecordStream.cs
- XmlSerializerVersionAttribute.cs
- TextElement.cs
- NameScope.cs
- HelpInfo.cs
- mediaeventargs.cs
- ExeConfigurationFileMap.cs
- TagNameToTypeMapper.cs
- SystemThemeKey.cs
- SharedPerformanceCounter.cs
- OneOfTypeConst.cs
- Schema.cs
- DCSafeHandle.cs
- _ConnectionGroup.cs
- SqlDataSourceQuery.cs
- PermissionSetTriple.cs
- AnnotationObservableCollection.cs
- OptimizedTemplateContent.cs
- COM2PropertyPageUITypeConverter.cs
- mediaeventshelper.cs
- EventLogEntry.cs
- FormatStringEditor.cs
- httpapplicationstate.cs
- ReflectionTypeLoadException.cs
- SystemUdpStatistics.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- SharedPersonalizationStateInfo.cs
- DataGridViewCell.cs
- DetailsViewModeEventArgs.cs
- QilPatternFactory.cs
- AffineTransform3D.cs
- Path.cs
- TextEndOfParagraph.cs
- ShaderEffect.cs
- ZipIOLocalFileBlock.cs
- QilFunction.cs
- State.cs
- SrgsDocument.cs
- HwndProxyElementProvider.cs
- MSAAEventDispatcher.cs
- DesignTimeParseData.cs
- DurableInstanceManager.cs
- BaseCAMarshaler.cs
- SoapFormatterSinks.cs
- XmlSchemaInclude.cs
- TabControlToolboxItem.cs
- ValueUnavailableException.cs
- WindowsTreeView.cs
- XmlNamespaceMapping.cs
- ItemContainerPattern.cs
- SqlDataSourceFilteringEventArgs.cs
- OutputChannelBinder.cs
- WebHeaderCollection.cs
- DataView.cs
- ResourceManager.cs
- CompModSwitches.cs
- CompModSwitches.cs
- AuthStoreRoleProvider.cs
- CodeConditionStatement.cs
- CaseInsensitiveComparer.cs
- LinearKeyFrames.cs
- XmlConvert.cs
- ConsumerConnectionPointCollection.cs
- base64Transforms.cs
- CompiledXpathExpr.cs
- DateTimePickerDesigner.cs
- ImageInfo.cs
- Color.cs
- SQLGuid.cs
- StringCollectionMarkupSerializer.cs
- ToolStripSystemRenderer.cs
- MultiDataTrigger.cs
- NetworkCredential.cs
- AdPostCacheSubstitution.cs
- CustomErrorsSectionWrapper.cs
- TypeToTreeConverter.cs
- RtfToXamlLexer.cs
- TextDecorationUnitValidation.cs
- PointAnimationBase.cs
- LinqTreeNodeEvaluator.cs
- Debugger.cs