Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / DesignOnlyAttribute.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XPathAncestorIterator.cs
- HitTestWithPointDrawingContextWalker.cs
- XmlBinaryReaderSession.cs
- SessionPageStatePersister.cs
- Timer.cs
- ExpressionEvaluator.cs
- XmlBindingWorker.cs
- UrlAuthFailedErrorFormatter.cs
- SqlConnection.cs
- MessageQueueTransaction.cs
- EntityDataSourceEntitySetNameItem.cs
- ToolStripManager.cs
- ObjectConverter.cs
- WsatConfiguration.cs
- CheckBoxPopupAdapter.cs
- WebBrowserProgressChangedEventHandler.cs
- CalculatedColumn.cs
- RegistryKey.cs
- UIntPtr.cs
- QueryOptionExpression.cs
- CodeIdentifier.cs
- CLSCompliantAttribute.cs
- OleDbPropertySetGuid.cs
- DataSourceCacheDurationConverter.cs
- ScriptingProfileServiceSection.cs
- PrintingPermissionAttribute.cs
- GenericEnumConverter.cs
- OracleConnectionString.cs
- IDataContractSurrogate.cs
- Knowncolors.cs
- ParameterModifier.cs
- CodeNamespaceImport.cs
- PrivateFontCollection.cs
- GridViewRowPresenterBase.cs
- Model3D.cs
- VarRemapper.cs
- JoinQueryOperator.cs
- XPathNodeHelper.cs
- CompositeDataBoundControl.cs
- SplitContainer.cs
- PcmConverter.cs
- WebServiceEndpoint.cs
- Int32.cs
- TextTreeUndo.cs
- XPathNodeIterator.cs
- PerformanceCounterTraceRecord.cs
- Command.cs
- ParameterBuilder.cs
- CatalogPartCollection.cs
- LogExtentCollection.cs
- FragmentNavigationEventArgs.cs
- WeakReferenceEnumerator.cs
- Attribute.cs
- MULTI_QI.cs
- DataTableClearEvent.cs
- ReadOnlyCollection.cs
- OleDbRowUpdatingEvent.cs
- ExpressionPrefixAttribute.cs
- XmlSchemaChoice.cs
- XmlLoader.cs
- MachineSettingsSection.cs
- BooleanStorage.cs
- SqlFormatter.cs
- ActiveXMessageFormatter.cs
- TdsParserStateObject.cs
- TargetPerspective.cs
- ActivityBuilderHelper.cs
- OutputWindow.cs
- FormViewPageEventArgs.cs
- Size.cs
- ButtonFieldBase.cs
- Win32.cs
- IntPtr.cs
- PersonalizationProviderCollection.cs
- KeyGestureValueSerializer.cs
- FontWeightConverter.cs
- securitycriticaldataformultiplegetandset.cs
- HeaderUtility.cs
- InputReferenceExpression.cs
- GridViewRowCollection.cs
- Activity.cs
- HttpResponseInternalWrapper.cs
- SQLSingle.cs
- JsonQueryStringConverter.cs
- QueryReaderSettings.cs
- WeakReferenceKey.cs
- PrtCap_Builder.cs
- DetailsViewDeletedEventArgs.cs
- PathNode.cs
- ItemChangedEventArgs.cs
- HttpCookie.cs
- SoapFormatExtensions.cs
- PatternMatcher.cs
- HttpServerProtocol.cs
- SslStream.cs
- CustomPopupPlacement.cs
- SubqueryTrackingVisitor.cs
- PropertyKey.cs
- HtmlTextBoxAdapter.cs
- FontResourceCache.cs