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
- InkPresenter.cs
- VersionConverter.cs
- KeyedCollection.cs
- BaseValidator.cs
- InvokeHandlers.cs
- FindCompletedEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- SortQuery.cs
- ComboBox.cs
- FloatSumAggregationOperator.cs
- XmlDataContract.cs
- FontWeight.cs
- SafeFileHandle.cs
- StsCommunicationException.cs
- OleDbCommand.cs
- MailWebEventProvider.cs
- ColumnWidthChangedEvent.cs
- GeneralTransform3DGroup.cs
- oledbconnectionstring.cs
- CodeTypeDelegate.cs
- EntityKey.cs
- TraceProvider.cs
- UnsafeNativeMethods.cs
- SQLCharsStorage.cs
- QueryExpression.cs
- DesignerObjectListAdapter.cs
- AutomationEvent.cs
- ReaderWriterLock.cs
- DataGridViewUtilities.cs
- MdiWindowListItemConverter.cs
- NativeStructs.cs
- ElementUtil.cs
- ResourceReader.cs
- _OverlappedAsyncResult.cs
- SupportingTokenProviderSpecification.cs
- _NetworkingPerfCounters.cs
- ApplyHostConfigurationBehavior.cs
- SizeAnimationClockResource.cs
- AuthenticationConfig.cs
- ToolZone.cs
- DiscoveryServiceExtension.cs
- PreviousTrackingServiceAttribute.cs
- LinkLabelLinkClickedEvent.cs
- XmlTextReaderImpl.cs
- ApplicationSecurityManager.cs
- PagesChangedEventArgs.cs
- RegistrationServices.cs
- ClientTargetSection.cs
- XamlStyleSerializer.cs
- PenThreadWorker.cs
- LineMetrics.cs
- CodeSubDirectoriesCollection.cs
- TreeViewTemplateSelector.cs
- Int32CAMarshaler.cs
- XmlSchemaExporter.cs
- TableStyle.cs
- GridItemProviderWrapper.cs
- AsymmetricKeyExchangeDeformatter.cs
- SystemResourceKey.cs
- MouseWheelEventArgs.cs
- Tablet.cs
- ping.cs
- WebBaseEventKeyComparer.cs
- CodeParameterDeclarationExpression.cs
- FormsAuthenticationUserCollection.cs
- ProfileSection.cs
- SchemaElementDecl.cs
- DependencyPropertyDescriptor.cs
- ExitEventArgs.cs
- LinkUtilities.cs
- Directory.cs
- URL.cs
- DocumentAutomationPeer.cs
- ConfigurationValidatorAttribute.cs
- DecimalFormatter.cs
- CqlParser.cs
- Matrix.cs
- ConfigurationValue.cs
- NonSerializedAttribute.cs
- GZipDecoder.cs
- AnimatedTypeHelpers.cs
- PathSegment.cs
- GradientStopCollection.cs
- DbConnectionStringBuilder.cs
- PropertyMetadata.cs
- xdrvalidator.cs
- XamlGridLengthSerializer.cs
- ValueQuery.cs
- SafeNativeMethods.cs
- TableItemStyle.cs
- SmtpClient.cs
- WpfGeneratedKnownTypes.cs
- TextFormattingConverter.cs
- PeerNearMe.cs
- WebPermission.cs
- ConnectionsZone.cs
- SingleConverter.cs
- XmlCharCheckingWriter.cs
- SessionIDManager.cs
- Thumb.cs