Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / DesignOnlyAttribute.cs / 1 / DesignOnlyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class DesignOnlyAttribute : Attribute { private bool isDesignOnly = false; ///Specifies whether a property can only be set at /// design time. ////// public DesignOnlyAttribute(bool isDesignOnly) { this.isDesignOnly = isDesignOnly; } ////// Initializes a new instance of the ///class. /// /// public bool IsDesignOnly { get { return isDesignOnly; } } ////// Gets a value indicating whether a property /// can be set only at design time. /// ////// public static readonly DesignOnlyAttribute Yes = new DesignOnlyAttribute(true); ////// Specifies that a property can be set only at design time. This /// ///field is read-only. /// /// public static readonly DesignOnlyAttribute No = new DesignOnlyAttribute(false); ////// Specifies /// that a /// property can be set at design time or at run /// time. This ///field is read-only. /// /// public static readonly DesignOnlyAttribute Default = No; ////// Specifies the default value for the ///, which is . This field is /// read-only. /// /// ///public override bool IsDefaultAttribute() { return IsDesignOnly == Default.IsDesignOnly; } public override bool Equals(object obj) { if (obj == this) { return true; } DesignOnlyAttribute other = obj as DesignOnlyAttribute; return (other != null) && other.isDesignOnly == isDesignOnly; } public override int GetHashCode() { return isDesignOnly.GetHashCode(); } } } // 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; ////// [AttributeUsage(AttributeTargets.All)] public sealed class DesignOnlyAttribute : Attribute { private bool isDesignOnly = false; ///Specifies whether a property can only be set at /// design time. ////// public DesignOnlyAttribute(bool isDesignOnly) { this.isDesignOnly = isDesignOnly; } ////// Initializes a new instance of the ///class. /// /// public bool IsDesignOnly { get { return isDesignOnly; } } ////// Gets a value indicating whether a property /// can be set only at design time. /// ////// public static readonly DesignOnlyAttribute Yes = new DesignOnlyAttribute(true); ////// Specifies that a property can be set only at design time. This /// ///field is read-only. /// /// public static readonly DesignOnlyAttribute No = new DesignOnlyAttribute(false); ////// Specifies /// that a /// property can be set at design time or at run /// time. This ///field is read-only. /// /// public static readonly DesignOnlyAttribute Default = No; ////// Specifies the default value for the ///, which is . This field is /// read-only. /// /// ///public override bool IsDefaultAttribute() { return IsDesignOnly == Default.IsDesignOnly; } public override bool Equals(object obj) { if (obj == this) { return true; } DesignOnlyAttribute other = obj as DesignOnlyAttribute; return (other != null) && other.isDesignOnly == isDesignOnly; } public override int GetHashCode() { return isDesignOnly.GetHashCode(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QilUnary.cs
- DirtyTextRange.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- WinFormsSpinner.cs
- ObjectAssociationEndMapping.cs
- BigInt.cs
- DependentList.cs
- GB18030Encoding.cs
- InstallerTypeAttribute.cs
- IImplicitResourceProvider.cs
- ToolStripItemRenderEventArgs.cs
- SpecialNameAttribute.cs
- LastQueryOperator.cs
- BaseValidator.cs
- ViewStateAttachedPropertyFeature.cs
- DbBuffer.cs
- Zone.cs
- DefaultProxySection.cs
- DataSet.cs
- FileSystemEventArgs.cs
- Matrix3D.cs
- XmlDigitalSignatureProcessor.cs
- DispatchChannelSink.cs
- ExtendedProperty.cs
- HttpContext.cs
- UserControl.cs
- CommandDevice.cs
- FontWeightConverter.cs
- UTF8Encoding.cs
- TransportBindingElementImporter.cs
- AdRotator.cs
- xmlformatgeneratorstatics.cs
- AutomationFocusChangedEventArgs.cs
- DataGridCaption.cs
- ClientRolePrincipal.cs
- EntityDataSourceSelectedEventArgs.cs
- PassportIdentity.cs
- FeatureSupport.cs
- WsatServiceAddress.cs
- SHA1CryptoServiceProvider.cs
- MetaModel.cs
- TypeSystem.cs
- ImageIndexEditor.cs
- UserValidatedEventArgs.cs
- CompletedAsyncResult.cs
- CategoryGridEntry.cs
- DocumentPageHost.cs
- PlatformCulture.cs
- ConditionalAttribute.cs
- HttpApplicationFactory.cs
- ComponentEvent.cs
- WindowsIPAddress.cs
- SelfIssuedAuthAsymmetricKey.cs
- counter.cs
- UrlPropertyAttribute.cs
- FixedHyperLink.cs
- CancellationToken.cs
- ConnectionsZone.cs
- QilInvokeLateBound.cs
- EditorBrowsableAttribute.cs
- Point4DConverter.cs
- FormViewUpdatedEventArgs.cs
- VirtualPathUtility.cs
- List.cs
- ScrollViewer.cs
- DataViewSetting.cs
- ValueHandle.cs
- KeyInstance.cs
- PartialToken.cs
- SessionStateItemCollection.cs
- VirtualDirectoryMapping.cs
- DataSourceProvider.cs
- QilSortKey.cs
- VerticalAlignConverter.cs
- HtmlFormAdapter.cs
- MatrixTransform3D.cs
- TcpHostedTransportConfiguration.cs
- CoreSwitches.cs
- BamlRecordHelper.cs
- Vector3dCollection.cs
- XmlQueryStaticData.cs
- ProfileGroupSettings.cs
- MdiWindowListStrip.cs
- SessionPageStateSection.cs
- sitestring.cs
- ComponentCommands.cs
- UndoUnit.cs
- CardSpacePolicyElement.cs
- ListViewInsertedEventArgs.cs
- CompoundFileIOPermission.cs
- Mapping.cs
- WebPartConnectionsCloseVerb.cs
- XmlNodeComparer.cs
- InvokeProviderWrapper.cs
- Compiler.cs
- ExpressionPrefixAttribute.cs
- SqlBinder.cs
- PerspectiveCamera.cs
- EntryPointNotFoundException.cs
- XmlSchemas.cs