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
- TableLayoutStyle.cs
- ScrollEventArgs.cs
- FormsAuthenticationConfiguration.cs
- Win32MouseDevice.cs
- SvcMapFileLoader.cs
- ViewBox.cs
- RootDesignerSerializerAttribute.cs
- Attributes.cs
- SafeFileMappingHandle.cs
- ExtensionFile.cs
- StrokeDescriptor.cs
- Thickness.cs
- AttachedAnnotationChangedEventArgs.cs
- ReadWriteSpinLock.cs
- FontDifferentiator.cs
- HtmlEmptyTagControlBuilder.cs
- SecondaryIndexDefinition.cs
- NumberFormatInfo.cs
- TransformerInfo.cs
- FlowThrottle.cs
- DataGrid.cs
- WaitHandle.cs
- OutKeywords.cs
- ExceptionUtil.cs
- MSAAEventDispatcher.cs
- DeviceFilterEditorDialog.cs
- EntityViewContainer.cs
- ScriptHandlerFactory.cs
- DocumentSchemaValidator.cs
- ScriptResourceMapping.cs
- SerializationInfoEnumerator.cs
- AuthenticationManager.cs
- ImageMapEventArgs.cs
- UIElementPropertyUndoUnit.cs
- MenuItemBindingCollection.cs
- Authorization.cs
- ModulesEntry.cs
- PackWebResponse.cs
- StickyNoteContentControl.cs
- DetailsViewCommandEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- IdentityModelDictionary.cs
- PolyLineSegment.cs
- ReversePositionQuery.cs
- TraceUtility.cs
- KoreanLunisolarCalendar.cs
- ScrollProperties.cs
- NameObjectCollectionBase.cs
- _HeaderInfo.cs
- StatusBarPanel.cs
- RefreshPropertiesAttribute.cs
- TreeChangeInfo.cs
- TreeNodeBindingCollection.cs
- XMLSyntaxException.cs
- OciLobLocator.cs
- AuthorizationRuleCollection.cs
- ToolTip.cs
- CustomError.cs
- HandlerWithFactory.cs
- ToolStripDropDown.cs
- XhtmlBasicPhoneCallAdapter.cs
- DocumentPageHost.cs
- Point3D.cs
- HashMembershipCondition.cs
- ProgressChangedEventArgs.cs
- HttpCapabilitiesSectionHandler.cs
- GeometryModel3D.cs
- SelectionUIService.cs
- BindingExpressionBase.cs
- EntityDataSourceChangedEventArgs.cs
- FacetValueContainer.cs
- TransformerTypeCollection.cs
- MappingItemCollection.cs
- mongolianshape.cs
- BoolLiteral.cs
- DBAsyncResult.cs
- GetPageCompletedEventArgs.cs
- DateTimeUtil.cs
- TreeNodeStyleCollection.cs
- LayoutEditorPart.cs
- XmlNode.cs
- WindowsHyperlink.cs
- AutomationPropertyInfo.cs
- SamlAssertion.cs
- ProcessHostConfigUtils.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ContentPresenter.cs
- RawStylusSystemGestureInputReport.cs
- BlurEffect.cs
- SettingsBase.cs
- MimeWriter.cs
- RowUpdatingEventArgs.cs
- TriggerCollection.cs
- ExpressionEvaluator.cs
- Helpers.cs
- CodeDomDesignerLoader.cs
- Timer.cs
- CompositeActivityDesigner.cs
- HitTestDrawingContextWalker.cs
- ClientUrlResolverWrapper.cs