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
- Validator.cs
- BuildResultCache.cs
- EnvironmentPermission.cs
- SecureEnvironment.cs
- CodeAccessPermission.cs
- DecimalAnimation.cs
- QilTernary.cs
- EdmSchemaAttribute.cs
- StorageComplexPropertyMapping.cs
- InvalidTimeZoneException.cs
- Model3DGroup.cs
- ProxyWebPartManager.cs
- QilGeneratorEnv.cs
- Utils.cs
- HttpValueCollection.cs
- LocationUpdates.cs
- FigureParaClient.cs
- SqlUdtInfo.cs
- LayeredChannelFactory.cs
- RunInstallerAttribute.cs
- TokenBasedSetEnumerator.cs
- Slider.cs
- HttpDebugHandler.cs
- QilPatternFactory.cs
- LiteralControl.cs
- NavigationCommands.cs
- TextSelection.cs
- TextBounds.cs
- VectorCollectionValueSerializer.cs
- WorkflowOperationBehavior.cs
- KnowledgeBase.cs
- DirectoryInfo.cs
- WebPartConnectionsConfigureVerb.cs
- ToolStripItemClickedEventArgs.cs
- WebRequestModuleElementCollection.cs
- StylusPointPropertyInfo.cs
- UpdateException.cs
- InputLangChangeEvent.cs
- TiffBitmapDecoder.cs
- MissingManifestResourceException.cs
- WebBrowserEvent.cs
- ControlPager.cs
- SerializationInfo.cs
- MaxValueConverter.cs
- TextModifierScope.cs
- PluralizationServiceUtil.cs
- FeatureSupport.cs
- LinkDescriptor.cs
- AccessText.cs
- XmlSchemaChoice.cs
- SqlParameterCollection.cs
- WMIInterop.cs
- DataGridViewSelectedRowCollection.cs
- BaseUriHelper.cs
- RadialGradientBrush.cs
- ListViewItemCollectionEditor.cs
- Stopwatch.cs
- DataList.cs
- EtwTrace.cs
- TableProvider.cs
- ReadOnlyTernaryTree.cs
- ToolStripDropTargetManager.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- DrawingAttributesDefaultValueFactory.cs
- AsnEncodedData.cs
- GeometryDrawing.cs
- SQLDouble.cs
- DataContract.cs
- StreamWithDictionary.cs
- AnnotationDocumentPaginator.cs
- StoreAnnotationsMap.cs
- KeyValuePair.cs
- ContactManager.cs
- LineUtil.cs
- BitmapEffectvisualstate.cs
- PageTheme.cs
- OrthographicCamera.cs
- QueryAccessibilityHelpEvent.cs
- FixedStringLookup.cs
- DiscreteKeyFrames.cs
- QueueProcessor.cs
- SecurityPermission.cs
- MemberMaps.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- ListBindingHelper.cs
- XPathConvert.cs
- StoragePropertyMapping.cs
- DescendentsWalker.cs
- EventHandlersStore.cs
- ImmutableCollection.cs
- XmlIlVisitor.cs
- TransactionScope.cs
- EntityDataSourceView.cs
- MonthChangedEventArgs.cs
- AccessDataSourceView.cs
- PageThemeCodeDomTreeGenerator.cs
- SamlAuthorizationDecisionClaimResource.cs
- BasicKeyConstraint.cs
- TabOrder.cs
- RsaSecurityKey.cs