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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ZipIOBlockManager.cs
- VisualStyleRenderer.cs
- BamlResourceContent.cs
- QueueProcessor.cs
- ConfigurationCollectionAttribute.cs
- SourceChangedEventArgs.cs
- TargetParameterCountException.cs
- MediaPlayerState.cs
- EnumCodeDomSerializer.cs
- XsltLoader.cs
- PeerInvitationResponse.cs
- iisPickupDirectory.cs
- AsymmetricSignatureDeformatter.cs
- TriggerAction.cs
- Crc32.cs
- TdsValueSetter.cs
- PathFigure.cs
- LOSFormatter.cs
- TrustLevel.cs
- ApplicationServiceHelper.cs
- QilCloneVisitor.cs
- TreeViewDesigner.cs
- XamlFilter.cs
- WebUtil.cs
- MetadataCache.cs
- TiffBitmapEncoder.cs
- SafeLocalMemHandle.cs
- PropertyEntry.cs
- DataObjectSettingDataEventArgs.cs
- SafeLocalMemHandle.cs
- UrlMapping.cs
- SqlBuilder.cs
- DataColumnMapping.cs
- IntSecurity.cs
- TdsParserSessionPool.cs
- RotateTransform3D.cs
- dataprotectionpermissionattribute.cs
- TextSyndicationContentKindHelper.cs
- AttributeEmitter.cs
- MailDefinition.cs
- PrintDialogDesigner.cs
- IPPacketInformation.cs
- SiteIdentityPermission.cs
- CqlErrorHelper.cs
- ChainOfResponsibility.cs
- HtmlToClrEventProxy.cs
- FilteredDataSetHelper.cs
- BuildManager.cs
- CryptoApi.cs
- TraceContextRecord.cs
- SourceFileInfo.cs
- SHA1.cs
- Compiler.cs
- ParseHttpDate.cs
- MouseCaptureWithinProperty.cs
- PageContentAsyncResult.cs
- Attribute.cs
- DocumentViewerBaseAutomationPeer.cs
- OutputScope.cs
- Button.cs
- WebPartDisplayModeCollection.cs
- ResourceFallbackManager.cs
- RecommendedAsConfigurableAttribute.cs
- HtmlImage.cs
- PageSetupDialog.cs
- ListBox.cs
- PenCursorManager.cs
- PolyLineSegment.cs
- DrawingBrush.cs
- ParserStreamGeometryContext.cs
- NumericPagerField.cs
- DrawingGroup.cs
- ProfileService.cs
- FontFamilyIdentifier.cs
- MouseGestureValueSerializer.cs
- ToggleButtonAutomationPeer.cs
- HttpRequestTraceRecord.cs
- _LoggingObject.cs
- ContractInstanceProvider.cs
- EpmSyndicationContentDeSerializer.cs
- DbDataAdapter.cs
- WebPartDisplayMode.cs
- TypeUnloadedException.cs
- DoubleSumAggregationOperator.cs
- EmptyEnumerable.cs
- XmlMapping.cs
- Polygon.cs
- DecoderBestFitFallback.cs
- IResourceProvider.cs
- ConfigXmlSignificantWhitespace.cs
- TypeAccessException.cs
- DBCSCodePageEncoding.cs
- Trace.cs
- PriorityQueue.cs
- XpsThumbnail.cs
- Vector3dCollection.cs
- IPeerNeighbor.cs
- MultipleViewPattern.cs
- cryptoapiTransform.cs
- EventSetter.cs