Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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(); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypeGeneratedEventArgs.cs
- EditorZoneBase.cs
- BitmapMetadataEnumerator.cs
- FixUp.cs
- WebPartCloseVerb.cs
- AppDomainProtocolHandler.cs
- LeafCellTreeNode.cs
- ToolboxDataAttribute.cs
- ActivityExecutionFilter.cs
- WorkflowOperationFault.cs
- XmlBaseReader.cs
- NativeMethods.cs
- UITypeEditor.cs
- NavigatingCancelEventArgs.cs
- DataGridViewColumnStateChangedEventArgs.cs
- PieceDirectory.cs
- DataGridViewRowConverter.cs
- StorageEndPropertyMapping.cs
- StringCollection.cs
- wmiprovider.cs
- CodeGen.cs
- ResolveDuplexAsyncResult.cs
- ExpressionBindings.cs
- dtdvalidator.cs
- XmlHierarchicalEnumerable.cs
- FileSystemWatcher.cs
- TableAdapterManagerGenerator.cs
- BufferedReadStream.cs
- MultiTrigger.cs
- WebPageTraceListener.cs
- DataGridCaption.cs
- ZoneIdentityPermission.cs
- ListDesigner.cs
- EntityViewContainer.cs
- DataTableNewRowEvent.cs
- DispatcherTimer.cs
- UriTemplateLiteralQueryValue.cs
- DataGridViewEditingControlShowingEventArgs.cs
- FileChangeNotifier.cs
- ToolBar.cs
- ThemeableAttribute.cs
- sqlstateclientmanager.cs
- StaticExtensionConverter.cs
- WorkflowApplicationTerminatedException.cs
- GenericEnumerator.cs
- CodeBlockBuilder.cs
- ThreadNeutralSemaphore.cs
- Descriptor.cs
- NetCodeGroup.cs
- DSASignatureFormatter.cs
- recordstatefactory.cs
- FunctionQuery.cs
- ResourceExpressionBuilder.cs
- HwndMouseInputProvider.cs
- LayoutManager.cs
- SqlBooleanizer.cs
- Parameter.cs
- TemplateBindingExpression.cs
- altserialization.cs
- DrawingImage.cs
- CodeTypeOfExpression.cs
- DBCommandBuilder.cs
- WebPartActionVerb.cs
- HitTestResult.cs
- FontStretches.cs
- TableColumnCollection.cs
- FormViewCommandEventArgs.cs
- InstanceDataCollection.cs
- MouseBinding.cs
- ObjectPropertyMapping.cs
- ResourceDescriptionAttribute.cs
- ContainerUtilities.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- StringWriter.cs
- SubMenuStyle.cs
- SQLBinaryStorage.cs
- SettingsPropertyCollection.cs
- HitTestParameters3D.cs
- HttpClientProtocol.cs
- SQLInt32.cs
- NavigationWindow.cs
- XmlLinkedNode.cs
- XmlUnspecifiedAttribute.cs
- XmlDownloadManager.cs
- XmlCDATASection.cs
- DataPager.cs
- DataSourceView.cs
- ArgumentNullException.cs
- ValueConversionAttribute.cs
- NullableBoolConverter.cs
- KeyValueSerializer.cs
- SettingsSavedEventArgs.cs
- MultiTargetingUtil.cs
- AnnotationHighlightLayer.cs
- ToolStripItemDesigner.cs
- PolyBezierSegment.cs
- TextTreeUndo.cs
- QilInvokeEarlyBound.cs
- ToolStripLabel.cs
- RouteItem.cs