Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; } ////// public bool Immutable { get { return immutable; } } ///[To be supplied.] ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } ImmutableObjectAttribute other = obj as ImmutableObjectAttribute; return other != null && other.Immutable == this.immutable; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// /// 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; } ////// public bool Immutable { get { return immutable; } } ///[To be supplied.] ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } ImmutableObjectAttribute other = obj as ImmutableObjectAttribute; return other != null && other.Immutable == this.immutable; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// /// 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
- XmlSchemaObject.cs
- NotSupportedException.cs
- BuilderInfo.cs
- BinaryWriter.cs
- DataSourceConverter.cs
- StrokeIntersection.cs
- DataGridViewCellStateChangedEventArgs.cs
- ExceptionRoutedEventArgs.cs
- WindowsIdentity.cs
- InternalBufferOverflowException.cs
- HttpCapabilitiesEvaluator.cs
- BindingExpressionUncommonField.cs
- WebRequest.cs
- ReachSerializationUtils.cs
- SolidBrush.cs
- CookieHandler.cs
- ActiveXHelper.cs
- TypeLibConverter.cs
- DiffuseMaterial.cs
- ThicknessAnimationBase.cs
- ElementUtil.cs
- XmlHierarchicalEnumerable.cs
- NegotiateStream.cs
- Span.cs
- OleDragDropHandler.cs
- WindowsListView.cs
- TableCellAutomationPeer.cs
- XmlSignificantWhitespace.cs
- SafeRightsManagementEnvironmentHandle.cs
- CodeBlockBuilder.cs
- XmlSchemaObjectCollection.cs
- PathStreamGeometryContext.cs
- ByteAnimationBase.cs
- Crc32Helper.cs
- CompositeKey.cs
- SeverityFilter.cs
- DisableDpiAwarenessAttribute.cs
- PeerApplication.cs
- DataGridState.cs
- DataServiceRequest.cs
- GridViewDeleteEventArgs.cs
- WebProxyScriptElement.cs
- TextCharacters.cs
- PropertyEmitter.cs
- ObjectStorage.cs
- Assert.cs
- DispatchChannelSink.cs
- HttpConfigurationContext.cs
- ImplicitInputBrush.cs
- IsolatedStorageFilePermission.cs
- ClientRuntimeConfig.cs
- DataSourceGroupCollection.cs
- ThrowHelper.cs
- ResourceDisplayNameAttribute.cs
- XmlLanguage.cs
- RoleGroup.cs
- StorageModelBuildProvider.cs
- RegistrationServices.cs
- AdapterUtil.cs
- UnsafeNativeMethods.cs
- JoinElimination.cs
- ListControl.cs
- CacheMemory.cs
- DecodeHelper.cs
- Model3DGroup.cs
- XmlUtilWriter.cs
- WebPartsPersonalization.cs
- ReaderOutput.cs
- JsonFormatGeneratorStatics.cs
- HostVisual.cs
- CqlErrorHelper.cs
- FaultCode.cs
- AssemblyUtil.cs
- ResourcePermissionBaseEntry.cs
- FastPropertyAccessor.cs
- ConfigurationStrings.cs
- FilteredDataSetHelper.cs
- KeyValueConfigurationCollection.cs
- DbLambda.cs
- CodeMethodReturnStatement.cs
- SafeRightsManagementHandle.cs
- BasePattern.cs
- MonthChangedEventArgs.cs
- ToolboxComponentsCreatingEventArgs.cs
- OdbcEnvironmentHandle.cs
- GenericXmlSecurityTokenAuthenticator.cs
- AssociationProvider.cs
- RemoteArgument.cs
- AmbientProperties.cs
- XmlFormatExtensionAttribute.cs
- HtmlEncodedRawTextWriter.cs
- SmtpReplyReader.cs
- SessionStateUtil.cs
- CommandPlan.cs
- ImmutableCollection.cs
- ListControlDesigner.cs
- DictionarySectionHandler.cs
- MobileControlBuilder.cs
- SpecialFolderEnumConverter.cs
- TagMapInfo.cs