Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / PasswordPropertyTextAttribute.cs / 1305376 / 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); } } } // 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
- FillRuleValidation.cs
- ControlIdConverter.cs
- FilterEventArgs.cs
- SerTrace.cs
- CodeNamespaceImport.cs
- TemplateBaseAction.cs
- DecoratedNameAttribute.cs
- HTMLTagNameToTypeMapper.cs
- EntityDataSource.cs
- ZipIOLocalFileBlock.cs
- ConnectionsZoneAutoFormat.cs
- DefinitionBase.cs
- DataErrorValidationRule.cs
- X509PeerCertificateAuthenticationElement.cs
- InlineObject.cs
- InstanceDataCollectionCollection.cs
- AssociativeAggregationOperator.cs
- SectionUpdates.cs
- ScaleTransform.cs
- DependsOnAttribute.cs
- SqlRewriteScalarSubqueries.cs
- OdbcUtils.cs
- CompositeTypefaceMetrics.cs
- M3DUtil.cs
- ViewValidator.cs
- QueueException.cs
- ReadOnlyCollection.cs
- SynchronizationContext.cs
- XmlSchemaAttributeGroup.cs
- System.Data_BID.cs
- ItemsChangedEventArgs.cs
- ExpressionEditorAttribute.cs
- InfoCardSymmetricCrypto.cs
- EditorOptionAttribute.cs
- MemberAssignment.cs
- WinHttpWebProxyFinder.cs
- ToolStripOverflow.cs
- streamingZipPartStream.cs
- XmlSequenceWriter.cs
- UserControl.cs
- XmlText.cs
- _LoggingObject.cs
- ObjectDataSourceEventArgs.cs
- HandlerBase.cs
- DataSourceGroupCollection.cs
- IconBitmapDecoder.cs
- RC2.cs
- TemplatedWizardStep.cs
- SecurityKeyType.cs
- SiteOfOriginPart.cs
- ContentControl.cs
- ASCIIEncoding.cs
- PassportPrincipal.cs
- XmlILConstructAnalyzer.cs
- PassportAuthenticationModule.cs
- PerformanceCountersElement.cs
- TextFormatterHost.cs
- ApplicationDirectoryMembershipCondition.cs
- Token.cs
- ComponentDispatcher.cs
- HostUtils.cs
- SaveFileDialog.cs
- SortedDictionary.cs
- MethodToken.cs
- StyleSelector.cs
- TdsParserStaticMethods.cs
- DocumentViewerConstants.cs
- RootBuilder.cs
- VerificationException.cs
- AsyncOperation.cs
- DynamicMethod.cs
- ExceptionValidationRule.cs
- FontWeights.cs
- DtdParser.cs
- DataViewManager.cs
- FrameworkElementFactory.cs
- AmbientLight.cs
- ScrollContentPresenter.cs
- X509Utils.cs
- DesignTimeVisibleAttribute.cs
- SessionStateItemCollection.cs
- IDispatchConstantAttribute.cs
- Win32MouseDevice.cs
- ContainerSelectorBehavior.cs
- VisualCollection.cs
- DropTarget.cs
- ContentDisposition.cs
- ParameterRetriever.cs
- LayoutManager.cs
- HtmlPanelAdapter.cs
- DbQueryCommandTree.cs
- SessionStateItemCollection.cs
- PackUriHelper.cs
- TracedNativeMethods.cs
- ProcessModuleCollection.cs
- ConfigurationProperty.cs
- ProxyGenerator.cs
- FormsAuthenticationUser.cs
- SrgsGrammar.cs
- DataGridCommandEventArgs.cs