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
- OwnerDrawPropertyBag.cs
- Assembly.cs
- TemplateControlParser.cs
- HttpRequestCacheValidator.cs
- RepeatBehavior.cs
- Util.cs
- AspCompat.cs
- TriggerCollection.cs
- FamilyTypefaceCollection.cs
- StrongBox.cs
- QueryCreatedEventArgs.cs
- BrowserDefinitionCollection.cs
- PropertyGridDesigner.cs
- Int16KeyFrameCollection.cs
- CompilerWrapper.cs
- OdbcConnectionHandle.cs
- MeasureItemEvent.cs
- Baml2006ReaderSettings.cs
- ApplicationTrust.cs
- Matrix.cs
- QilGeneratorEnv.cs
- RightsManagementEncryptionTransform.cs
- ProgressBarBrushConverter.cs
- ReadOnlyNameValueCollection.cs
- LoginCancelEventArgs.cs
- ErrorProvider.cs
- XmlRootAttribute.cs
- DeferredRunTextReference.cs
- DataList.cs
- documentsequencetextcontainer.cs
- CodeNamespace.cs
- Monitor.cs
- MethodExpression.cs
- FileNameEditor.cs
- IconBitmapDecoder.cs
- CacheDependency.cs
- X509ChainPolicy.cs
- ToolStripComboBox.cs
- NameValueFileSectionHandler.cs
- TagPrefixAttribute.cs
- DataGridViewCellStyle.cs
- FastPropertyAccessor.cs
- ChannelToken.cs
- KeyboardNavigation.cs
- OdbcInfoMessageEvent.cs
- RecognizedAudio.cs
- ClientData.cs
- BmpBitmapEncoder.cs
- MsmqInputSessionChannel.cs
- ToolboxComponentsCreatingEventArgs.cs
- NaturalLanguageHyphenator.cs
- TextEditorCopyPaste.cs
- AssemblyResourceLoader.cs
- ClientBuildManager.cs
- QilSortKey.cs
- EmptyQuery.cs
- PolicyUtility.cs
- Registry.cs
- Accessible.cs
- BitmapEffectGroup.cs
- PrincipalPermission.cs
- ObjectDisposedException.cs
- externdll.cs
- CachedPathData.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- SymbolDocumentInfo.cs
- LineBreakRecord.cs
- ProjectedSlot.cs
- IODescriptionAttribute.cs
- AnnotationMap.cs
- XmlDataCollection.cs
- EmissiveMaterial.cs
- PointValueSerializer.cs
- XsltException.cs
- DataControlCommands.cs
- InputScope.cs
- CacheChildrenQuery.cs
- ReadOnlyPermissionSet.cs
- DataServiceExpressionVisitor.cs
- UIElement.cs
- BuildResultCache.cs
- _AutoWebProxyScriptEngine.cs
- DrawingCollection.cs
- WebPartUtil.cs
- WebPartZoneCollection.cs
- TypePropertyEditor.cs
- NumericPagerField.cs
- DataRecordInternal.cs
- Byte.cs
- PagerSettings.cs
- SchemaNames.cs
- StateMachineHistory.cs
- Monitor.cs
- PrintPageEvent.cs
- shaperfactory.cs
- Faults.cs
- XmlAttributes.cs
- InstanceView.cs
- DocumentApplicationJournalEntry.cs
- DynamicUpdateCommand.cs