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
- CodeMethodReturnStatement.cs
- MemoryMappedFileSecurity.cs
- TypeResolver.cs
- ValidatingReaderNodeData.cs
- CustomTypeDescriptor.cs
- Transform.cs
- EntityTypeEmitter.cs
- XmlCodeExporter.cs
- AttachedPropertyBrowsableAttribute.cs
- Preprocessor.cs
- ProtocolsConfiguration.cs
- AppSettings.cs
- UnionCqlBlock.cs
- HtmlEmptyTagControlBuilder.cs
- SessionState.cs
- ContentPathSegment.cs
- BaseValidator.cs
- WebResourceUtil.cs
- XhtmlBasicTextViewAdapter.cs
- ToolstripProfessionalRenderer.cs
- KeyboardDevice.cs
- InvalidEnumArgumentException.cs
- SnapLine.cs
- SoapObjectWriter.cs
- FeatureSupport.cs
- XmlWriterSettings.cs
- SiteMapDesignerDataSourceView.cs
- TripleDESCryptoServiceProvider.cs
- UseLicense.cs
- ItemMap.cs
- DrawingContextDrawingContextWalker.cs
- ReceiveContext.cs
- DropTarget.cs
- RenderCapability.cs
- PropertySourceInfo.cs
- TrackingDataItem.cs
- TextParaClient.cs
- RowToParametersTransformer.cs
- NetWebProxyFinder.cs
- DeleteBookmarkScope.cs
- WebPartDisplayModeCollection.cs
- ProcessModule.cs
- PageHandlerFactory.cs
- ReaderWriterLockWrapper.cs
- ChangesetResponse.cs
- CopyNamespacesAction.cs
- DataGridItem.cs
- SQLResource.cs
- ServerType.cs
- TextServicesHost.cs
- PlanCompilerUtil.cs
- GenericWebPart.cs
- WebServiceTypeData.cs
- IdentifierElement.cs
- XmlBinaryReader.cs
- ByteBufferPool.cs
- FontFamilyConverter.cs
- ControlPaint.cs
- ExportFileRequest.cs
- UnauthorizedAccessException.cs
- OracleRowUpdatingEventArgs.cs
- CacheVirtualItemsEvent.cs
- TripleDESCryptoServiceProvider.cs
- ExtenderControl.cs
- SignerInfo.cs
- XmlNavigatorFilter.cs
- PinnedBufferMemoryStream.cs
- DateTimePicker.cs
- PriorityBinding.cs
- Publisher.cs
- XmlSchemas.cs
- ImageSourceConverter.cs
- OdbcError.cs
- EventOpcode.cs
- ValidatingReaderNodeData.cs
- BitmapEffectInputConnector.cs
- SpellerStatusTable.cs
- TimeSpanStorage.cs
- ColorAnimation.cs
- CaseInsensitiveHashCodeProvider.cs
- ProcessThreadCollection.cs
- ConfigurationElement.cs
- Size.cs
- InkCanvasAutomationPeer.cs
- Menu.cs
- MediaPlayer.cs
- RuleProcessor.cs
- SignatureHelper.cs
- KeyValuePairs.cs
- FixedNode.cs
- Switch.cs
- IDispatchConstantAttribute.cs
- TemplateParser.cs
- CompositeCollectionView.cs
- login.cs
- HideDisabledControlAdapter.cs
- XPathException.cs
- ServiceMemoryGates.cs
- UICuesEvent.cs
- TextEditorThreadLocalStore.cs