Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / PasswordPropertyTextAttribute.cs / 1 / PasswordPropertyTextAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// If this attribute is placed on a property or a type, its text representation in a property window /// will appear as dots or astrisks to indicate a password field. This indidation in no way /// represents any type of encryption or security. /// [AttributeUsage(AttributeTargets.All)] public sealed class PasswordPropertyTextAttribute : Attribute { ////// Sets the System.ComponentModel.Design.PasswordPropertyText /// attribute by default to true. /// public static readonly PasswordPropertyTextAttribute Yes = new PasswordPropertyTextAttribute(true); ////// Sets the System.ComponentModel.Design.PasswordPropertyText /// attribute by default to false. /// public static readonly PasswordPropertyTextAttribute No = new PasswordPropertyTextAttribute(false); ////// Sets the System.ComponentModel.Design.PasswordPropertyText /// attribute by default to false. /// public static readonly PasswordPropertyTextAttribute Default = No; private bool _password; ////// Creates a default PasswordPropertyTextAttribute. /// public PasswordPropertyTextAttribute() : this(false) { } ////// Creates a PasswordPropertyTextAttribute with the given password value. /// public PasswordPropertyTextAttribute(bool password) { _password = password; } ////// Gets a value indicating if the property this attribute is defined for should be shown as password text. /// public bool Password { get { return _password; } } ////// Overload for object equality /// public override bool Equals(object o) { if (o is PasswordPropertyTextAttribute) { return ((PasswordPropertyTextAttribute)o).Password == _password; } return false; } ////// Returns the hashcode for this object. /// public override int GetHashCode() { return base.GetHashCode(); } ////// Gets a value indicating whether this attribute is set to true by default. /// public override bool IsDefaultAttribute() { return this.Equals(Default); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpException.cs
- DataServiceProcessingPipeline.cs
- StreamBodyWriter.cs
- DocumentXmlWriter.cs
- LoadedOrUnloadedOperation.cs
- RemotingServices.cs
- ToolStripOverflowButton.cs
- TypeConverter.cs
- AssemblyNameProxy.cs
- DSACryptoServiceProvider.cs
- ModuleBuilderData.cs
- PackageDigitalSignature.cs
- TextPointer.cs
- MetadataArtifactLoaderCompositeResource.cs
- AttributeConverter.cs
- PathData.cs
- SEHException.cs
- StateInitializationDesigner.cs
- StatusBarPanel.cs
- HtmlToClrEventProxy.cs
- DynamicVirtualDiscoSearcher.cs
- XmlDataSource.cs
- SqlBulkCopyColumnMapping.cs
- TableLayoutPanelResizeGlyph.cs
- TreeNodeStyleCollection.cs
- WebPartTransformerCollection.cs
- Dictionary.cs
- XmlSchemaCollection.cs
- FloatUtil.cs
- ByteConverter.cs
- WmpBitmapEncoder.cs
- CodeTypeParameterCollection.cs
- basevalidator.cs
- QilInvokeEarlyBound.cs
- ConsoleEntryPoint.cs
- JoinCqlBlock.cs
- X509Chain.cs
- PositiveTimeSpanValidator.cs
- DoubleAnimationUsingPath.cs
- WindowsSlider.cs
- DocumentAutomationPeer.cs
- XamlTemplateSerializer.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- safelink.cs
- TreeNodeSelectionProcessor.cs
- GradientBrush.cs
- ResourceCategoryAttribute.cs
- SchemaComplexType.cs
- SignedInfo.cs
- PeerReferralPolicy.cs
- DefinitionBase.cs
- XsltArgumentList.cs
- TreeViewItemAutomationPeer.cs
- DbException.cs
- ColumnWidthChangedEvent.cs
- HtmlLink.cs
- DesignTimeTemplateParser.cs
- CreateDataSourceDialog.cs
- XmlSerializerAssemblyAttribute.cs
- ToolboxComponentsCreatingEventArgs.cs
- TraceEventCache.cs
- TemplateColumn.cs
- LinqDataSourceInsertEventArgs.cs
- ToolStripControlHost.cs
- SupportsEventValidationAttribute.cs
- HttpProfileBase.cs
- DropShadowEffect.cs
- PixelShader.cs
- Rect.cs
- ParallelTimeline.cs
- CompiledQueryCacheKey.cs
- MDIControlStrip.cs
- Logging.cs
- ACE.cs
- ArgumentNullException.cs
- BatchWriter.cs
- DateTimeParse.cs
- SuppressIldasmAttribute.cs
- XmlCustomFormatter.cs
- ViewSimplifier.cs
- SynchronizedDispatch.cs
- QueryGenerator.cs
- WindowsRichEdit.cs
- SizeKeyFrameCollection.cs
- DataBoundControlAdapter.cs
- M3DUtil.cs
- ByeOperation11AsyncResult.cs
- XmlSchemaInfo.cs
- FontWeightConverter.cs
- Comparer.cs
- ScrollContentPresenter.cs
- VirtualPathExtension.cs
- PocoPropertyAccessorStrategy.cs
- streamingZipPartStream.cs
- ResourceDefaultValueAttribute.cs
- tooltip.cs
- TitleStyle.cs
- CellConstant.cs
- OuterGlowBitmapEffect.cs
- DPTypeDescriptorContext.cs