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
- Nodes.cs
- COM2ExtendedTypeConverter.cs
- DataServiceSaveChangesEventArgs.cs
- AssemblyContextControlItem.cs
- AppDomainGrammarProxy.cs
- LogicalExpressionTypeConverter.cs
- ConfigurationStrings.cs
- TextSegment.cs
- TextWriterTraceListener.cs
- DependencyObjectProvider.cs
- ToolStripDropDownButton.cs
- PropertyRecord.cs
- RoutedUICommand.cs
- ConstraintEnumerator.cs
- TimerElapsedEvenArgs.cs
- PrintDialog.cs
- StagingAreaInputItem.cs
- DateTimeFormatInfoScanner.cs
- LocalizedNameDescriptionPair.cs
- WindowsGraphics2.cs
- _NestedMultipleAsyncResult.cs
- PartitionResolver.cs
- Exceptions.cs
- PathSegment.cs
- ViewGenerator.cs
- ProfileSettings.cs
- WindowHideOrCloseTracker.cs
- StatusBarDrawItemEvent.cs
- ConnectionStringsExpressionBuilder.cs
- DateTimeConstantAttribute.cs
- xmlsaver.cs
- CompleteWizardStep.cs
- NamespaceCollection.cs
- EndOfStreamException.cs
- XmlFormatReaderGenerator.cs
- XmlWriterSettings.cs
- ComPlusTraceRecord.cs
- MutexSecurity.cs
- SimpleRecyclingCache.cs
- TableLayoutStyleCollection.cs
- DesignerForm.cs
- EastAsianLunisolarCalendar.cs
- ProfilePropertySettings.cs
- AnnouncementDispatcherAsyncResult.cs
- BaseTemplateBuildProvider.cs
- TemplatedAdorner.cs
- HttpResponseWrapper.cs
- WizardPanel.cs
- CodeIdentifiers.cs
- SecurityRuntime.cs
- WrappedIUnknown.cs
- DataGridViewCheckBoxCell.cs
- FontStretchConverter.cs
- ListViewGroupConverter.cs
- UserControl.cs
- TextTreeUndo.cs
- EncryptedKeyIdentifierClause.cs
- Floater.cs
- ValidatedControlConverter.cs
- Int64AnimationBase.cs
- DynamicPhysicalDiscoSearcher.cs
- StreamGeometry.cs
- BinaryObjectReader.cs
- TextPattern.cs
- SrgsElementList.cs
- AuthStoreRoleProvider.cs
- DependencyObject.cs
- DockProviderWrapper.cs
- CardSpaceSelector.cs
- __TransparentProxy.cs
- RectAnimation.cs
- AlternateView.cs
- MemberAccessException.cs
- SpellCheck.cs
- FieldTemplateFactory.cs
- parserscommon.cs
- _NativeSSPI.cs
- ImageButton.cs
- SupportingTokenBindingElement.cs
- RoleGroupCollection.cs
- ManualResetEvent.cs
- ExtensionDataObject.cs
- CodeCatchClause.cs
- Binding.cs
- Padding.cs
- UmAlQuraCalendar.cs
- PopupControlService.cs
- WindowsProgressbar.cs
- WorkflowInstanceTerminatedRecord.cs
- TextRangeSerialization.cs
- EntityParameterCollection.cs
- StorageAssociationTypeMapping.cs
- XmlSchemaType.cs
- MediaCommands.cs
- FixedHighlight.cs
- MarkupCompilePass2.cs
- PerformanceCounterManager.cs
- InsufficientMemoryException.cs
- SqlDelegatedTransaction.cs
- SecureUICommand.cs