Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BooleanToSelectiveScrollingOrientationConverter.cs
- UIElement3DAutomationPeer.cs
- WebPermission.cs
- GorillaCodec.cs
- OdbcError.cs
- XPathException.cs
- BaseDataBoundControl.cs
- AssemblyCollection.cs
- XmlnsDictionary.cs
- AssociationSetEnd.cs
- DriveNotFoundException.cs
- DetailsViewPagerRow.cs
- OLEDB_Util.cs
- _UriSyntax.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- WorkflowDefinitionDispenser.cs
- ChangeBlockUndoRecord.cs
- PropertySegmentSerializer.cs
- ImplicitInputBrush.cs
- HorizontalAlignConverter.cs
- TypefaceCollection.cs
- Overlapped.cs
- Bits.cs
- FixedSOMLineCollection.cs
- AssemblyBuilderData.cs
- DeploymentSectionCache.cs
- GeneratedContractType.cs
- XmlDataImplementation.cs
- UserControl.cs
- ClientSponsor.cs
- ArgumentOutOfRangeException.cs
- RelationshipDetailsCollection.cs
- AliasGenerator.cs
- Oid.cs
- SqlDataSourceSelectingEventArgs.cs
- EdmError.cs
- DockProviderWrapper.cs
- FloaterParagraph.cs
- UIElementAutomationPeer.cs
- CreateRefExpr.cs
- RelationshipDetailsRow.cs
- Transactions.cs
- translator.cs
- ReachVisualSerializer.cs
- SyndicationContent.cs
- OperationResponse.cs
- CacheForPrimitiveTypes.cs
- AlternateView.cs
- DataSourceIDConverter.cs
- TypeDelegator.cs
- Knowncolors.cs
- iisPickupDirectory.cs
- ModuleElement.cs
- SafeRegistryHandle.cs
- ProvidersHelper.cs
- CalendarDay.cs
- Polyline.cs
- WebBrowser.cs
- ResourcesChangeInfo.cs
- HwndHost.cs
- validation.cs
- DiscoveryInnerClientAdhocCD1.cs
- XmlSchemaAttributeGroup.cs
- NumberFormatter.cs
- Thread.cs
- CompilerGlobalScopeAttribute.cs
- DateTimeConstantAttribute.cs
- InputManager.cs
- TrackingMemoryStream.cs
- ConnectionConsumerAttribute.cs
- OleDbError.cs
- TransformerInfo.cs
- SourceFileInfo.cs
- WsatTransactionHeader.cs
- CqlQuery.cs
- SortKey.cs
- AdapterUtil.cs
- BlurEffect.cs
- ValidationErrorEventArgs.cs
- ThreadExceptionDialog.cs
- WindowsHyperlink.cs
- TdsParserSafeHandles.cs
- RootBrowserWindow.cs
- XmlSchemaSimpleType.cs
- ControlCollection.cs
- StorageTypeMapping.cs
- TerminatorSinks.cs
- SQLSingle.cs
- TypeDependencyAttribute.cs
- HtmlPanelAdapter.cs
- MsmqBindingElementBase.cs
- HTMLTextWriter.cs
- StaticFileHandler.cs
- BoundPropertyEntry.cs
- SQLStringStorage.cs
- SocketCache.cs
- Attachment.cs
- CompiledXpathExpr.cs
- SafeLocalMemHandle.cs
- QueryOutputWriter.cs