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
- NamespaceList.cs
- XPathException.cs
- Processor.cs
- UnmanagedBitmapWrapper.cs
- HttpMethodConstraint.cs
- DoubleLinkList.cs
- HandleCollector.cs
- OptimizerPatterns.cs
- LockCookie.cs
- Pair.cs
- HostedBindingBehavior.cs
- TemplateInstanceAttribute.cs
- ClaimTypes.cs
- Constraint.cs
- RuntimeIdentifierPropertyAttribute.cs
- DummyDataSource.cs
- TransformPattern.cs
- StringComparer.cs
- DbConnectionPoolOptions.cs
- Wildcard.cs
- LinqDataSourceValidationException.cs
- NavigationExpr.cs
- PersonalizationStateQuery.cs
- XmlWriterSettings.cs
- Int32EqualityComparer.cs
- LayoutSettings.cs
- DataServiceStreamProviderWrapper.cs
- BindStream.cs
- ContravarianceAdapter.cs
- ProcessStartInfo.cs
- URLMembershipCondition.cs
- pingexception.cs
- FigureParagraph.cs
- MsmqInputChannel.cs
- XPathSelfQuery.cs
- ScrollPattern.cs
- ResourceSet.cs
- ProgressBarHighlightConverter.cs
- SID.cs
- FileVersion.cs
- PopupRootAutomationPeer.cs
- PositiveTimeSpanValidator.cs
- ComNativeDescriptor.cs
- XmlSerializationWriter.cs
- Base64Encoder.cs
- HwndSourceKeyboardInputSite.cs
- ArraySortHelper.cs
- FontUnit.cs
- SecurityKeyIdentifierClause.cs
- precedingsibling.cs
- Pen.cs
- DeflateStream.cs
- DoubleLink.cs
- TableFieldsEditor.cs
- SemanticResolver.cs
- DataContractSerializerSection.cs
- BeginEvent.cs
- NodeInfo.cs
- OleDbConnectionFactory.cs
- LogicalExpr.cs
- HttpCookiesSection.cs
- __FastResourceComparer.cs
- DataContext.cs
- Compilation.cs
- ReferenceEqualityComparer.cs
- OSFeature.cs
- ProcessStartInfo.cs
- HttpInputStream.cs
- Duration.cs
- EntityDataSourceSelectedEventArgs.cs
- ObsoleteAttribute.cs
- InlineUIContainer.cs
- HttpStreamXmlDictionaryReader.cs
- RemoteWebConfigurationHostServer.cs
- UriTemplateDispatchFormatter.cs
- ProtocolsSection.cs
- FixedSOMPageConstructor.cs
- ExpressionBuilderContext.cs
- TableLayout.cs
- HttpListenerContext.cs
- StoreContentChangedEventArgs.cs
- DefaultWorkflowSchedulerService.cs
- RayHitTestParameters.cs
- MethodToken.cs
- ConfigurationLocationCollection.cs
- CapabilitiesSection.cs
- DefaultValueTypeConverter.cs
- ExitEventArgs.cs
- TextEditorCopyPaste.cs
- RuntimeWrappedException.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- HitTestParameters.cs
- DesignerHost.cs
- LinkedResourceCollection.cs
- WebPartTracker.cs
- Vector3D.cs
- StateItem.cs
- BypassElement.cs
- DeviceContext.cs
- RuntimeConfigLKG.cs