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
- TickBar.cs
- SafePEFileHandle.cs
- Command.cs
- GlyphShapingProperties.cs
- ListCollectionView.cs
- MessageQueueCriteria.cs
- ListGeneralPage.cs
- ValueHandle.cs
- QueueProcessor.cs
- DodSequenceMerge.cs
- XDeferredAxisSource.cs
- ControlEvent.cs
- EmptyQuery.cs
- linebase.cs
- DependentList.cs
- SortKey.cs
- PerformanceCounterPermissionEntryCollection.cs
- IsolatedStorageFilePermission.cs
- BaseDataList.cs
- ToolStripPanelCell.cs
- DataGridViewButtonCell.cs
- DocumentApplicationJournalEntry.cs
- TextTreeInsertElementUndoUnit.cs
- ExpressionBuilderCollection.cs
- ExpressionDumper.cs
- ProgressBarRenderer.cs
- StylusPointPropertyUnit.cs
- XamlTreeBuilder.cs
- TdsRecordBufferSetter.cs
- PingReply.cs
- Converter.cs
- EntityDataSourceSelectingEventArgs.cs
- LiteralControl.cs
- ListenerElementsCollection.cs
- path.cs
- AsyncOperationManager.cs
- Guid.cs
- ProgressBar.cs
- ExtentKey.cs
- X509CertificateValidator.cs
- ScrollProperties.cs
- BufferModesCollection.cs
- CultureInfo.cs
- HashJoinQueryOperatorEnumerator.cs
- Component.cs
- SerialReceived.cs
- ApplicationInterop.cs
- MenuItem.cs
- SignatureToken.cs
- EdmTypeAttribute.cs
- DBConnectionString.cs
- DeploymentSection.cs
- InputQueue.cs
- Trace.cs
- ListViewItem.cs
- StorageAssociationSetMapping.cs
- SpellerError.cs
- PolyQuadraticBezierSegment.cs
- _AcceptOverlappedAsyncResult.cs
- Stack.cs
- SqlParameterizer.cs
- TrustLevelCollection.cs
- ActivitySurrogateSelector.cs
- TdsParserSessionPool.cs
- MatrixStack.cs
- Byte.cs
- XmlChildNodes.cs
- DerivedKeySecurityToken.cs
- UnsafeNativeMethods.cs
- CommandValueSerializer.cs
- WebSysDefaultValueAttribute.cs
- TemplateComponentConnector.cs
- RevocationPoint.cs
- SiteMap.cs
- GlobalProxySelection.cs
- SqlStream.cs
- WsatServiceCertificate.cs
- CompositeActivityValidator.cs
- MethodBuilderInstantiation.cs
- TemplateEditingFrame.cs
- XhtmlBasicControlAdapter.cs
- WindowsStatic.cs
- Focus.cs
- HttpAsyncResult.cs
- CatalogZoneBase.cs
- GridViewCommandEventArgs.cs
- TrustManagerPromptUI.cs
- InvalidFilterCriteriaException.cs
- RegionInfo.cs
- ObjectDataProvider.cs
- FlowSwitch.cs
- AnnouncementSendsAsyncResult.cs
- OdbcDataReader.cs
- WindowsRichEdit.cs
- Model3DGroup.cs
- URLString.cs
- EdmConstants.cs
- AdvancedBindingEditor.cs
- Constraint.cs
- CopyOnWriteList.cs