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
- TypeConverterHelper.cs
- SystemUdpStatistics.cs
- ComponentManagerBroker.cs
- GenericTextProperties.cs
- InternalsVisibleToAttribute.cs
- ImageMetadata.cs
- BitmapInitialize.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- EmbeddedMailObjectsCollection.cs
- XmlTypeMapping.cs
- autovalidator.cs
- CssStyleCollection.cs
- TextEditorTables.cs
- Cursors.cs
- CryptoConfig.cs
- Int32Rect.cs
- SymDocumentType.cs
- View.cs
- TransactionChannel.cs
- SplitterEvent.cs
- BooleanConverter.cs
- UnsafeNativeMethods.cs
- DataGridViewColumnCollection.cs
- IriParsingElement.cs
- TableLayoutColumnStyleCollection.cs
- SmtpClient.cs
- Logging.cs
- NodeFunctions.cs
- Pkcs7Recipient.cs
- StoreAnnotationsMap.cs
- ComponentSerializationService.cs
- ISAPIRuntime.cs
- UIElementAutomationPeer.cs
- EnumValidator.cs
- RepeaterItemEventArgs.cs
- LassoHelper.cs
- BoundingRectTracker.cs
- FontConverter.cs
- ComboBoxItem.cs
- Rotation3D.cs
- PriorityBinding.cs
- EntitySqlQueryState.cs
- ZoneIdentityPermission.cs
- IndicFontClient.cs
- LabelDesigner.cs
- HMACSHA384.cs
- TextShapeableCharacters.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- TextElementEnumerator.cs
- StylusShape.cs
- DataPagerFieldCollection.cs
- Color.cs
- newinstructionaction.cs
- CqlIdentifiers.cs
- InputElement.cs
- PrintPreviewDialog.cs
- CodeArgumentReferenceExpression.cs
- MembershipAdapter.cs
- ObjectSecurity.cs
- ReflectionUtil.cs
- TrackingConditionCollection.cs
- controlskin.cs
- ChildrenQuery.cs
- TextParaLineResult.cs
- TargetConverter.cs
- XmlHierarchyData.cs
- GeometryCombineModeValidation.cs
- BaseProcessor.cs
- filewebrequest.cs
- HotCommands.cs
- CounterCreationData.cs
- RoutedUICommand.cs
- FilePrompt.cs
- mediaeventargs.cs
- InvalidOleVariantTypeException.cs
- safePerfProviderHandle.cs
- SqlErrorCollection.cs
- XamlInt32CollectionSerializer.cs
- CryptoHelper.cs
- CaseInsensitiveComparer.cs
- CallbackValidator.cs
- SettingsPropertyValue.cs
- ClockGroup.cs
- StickyNoteAnnotations.cs
- DataColumnCollection.cs
- FontConverter.cs
- ResourcesGenerator.cs
- ConstraintEnumerator.cs
- XmlCodeExporter.cs
- XmlSchemaInferenceException.cs
- LayoutEvent.cs
- FlowLayout.cs
- NavigationWindowAutomationPeer.cs
- XmlILModule.cs
- EncodingInfo.cs
- MSAAEventDispatcher.cs
- DbMetaDataFactory.cs
- DXD.cs
- DbMetaDataFactory.cs
- HtmlLink.cs