Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- ClassDataContract.cs
- PolicyValidationException.cs
- AndAlso.cs
- SoapDocumentMethodAttribute.cs
- PropertyBuilder.cs
- SynchronizedDispatch.cs
- ObjectContextServiceProvider.cs
- TimeoutException.cs
- XmlSchemaExporter.cs
- sqlstateclientmanager.cs
- Validator.cs
- SystemIPInterfaceProperties.cs
- PersonalizableAttribute.cs
- GeneralTransform3D.cs
- _Semaphore.cs
- MemoryStream.cs
- HtmlSelect.cs
- SafeProcessHandle.cs
- InfoCardClaimCollection.cs
- TrackingRecord.cs
- Buffer.cs
- AnnotationComponentManager.cs
- BufferModeSettings.cs
- DesigntimeLicenseContext.cs
- sqlnorm.cs
- KoreanLunisolarCalendar.cs
- UnsafeNativeMethodsMilCoreApi.cs
- AssemblyName.cs
- DynamicPropertyHolder.cs
- PageVisual.cs
- SystemNetHelpers.cs
- XmlSchemaValidator.cs
- UpdatePanelControlTrigger.cs
- WebServiceHandlerFactory.cs
- HttpConfigurationContext.cs
- MostlySingletonList.cs
- PrePrepareMethodAttribute.cs
- FileClassifier.cs
- WindowsScrollBarBits.cs
- XmlObjectSerializerReadContextComplexJson.cs
- DecoratedNameAttribute.cs
- XPathDocumentNavigator.cs
- CompiledQuery.cs
- Message.cs
- DataViewSetting.cs
- VerticalAlignConverter.cs
- ActivityCodeDomSerializationManager.cs
- odbcmetadatafactory.cs
- WindowsContainer.cs
- HttpPostServerProtocol.cs
- CompilerGlobalScopeAttribute.cs
- DialogResultConverter.cs
- RequestCacheEntry.cs
- PropertyGeneratedEventArgs.cs
- MatrixAnimationUsingPath.cs
- CompoundFileStreamReference.cs
- ConnectionStringsExpressionBuilder.cs
- ConfigXmlElement.cs
- FastPropertyAccessor.cs
- QuaternionConverter.cs
- XmlSchemaAppInfo.cs
- StrokeFIndices.cs
- ViewGenResults.cs
- OlePropertyStructs.cs
- Math.cs
- OneOfElement.cs
- ClientSettingsSection.cs
- CryptoHelper.cs
- ImmComposition.cs
- KnownTypesHelper.cs
- AstNode.cs
- JoinSymbol.cs
- KeyEventArgs.cs
- GetKeyedHashRequest.cs
- ArrayList.cs
- CanonicalXml.cs
- OdbcErrorCollection.cs
- DropTarget.cs
- GenericAuthenticationEventArgs.cs
- CrossAppDomainChannel.cs
- InputBinder.cs
- ObjectCloneHelper.cs
- XmlAggregates.cs
- SystemIcons.cs
- SessionParameter.cs
- CodeSubDirectory.cs
- NavigatorInvalidBodyAccessException.cs
- InitializerFacet.cs
- AnonymousIdentificationSection.cs
- WebPartZoneCollection.cs
- PointConverter.cs
- CqlQuery.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- Adorner.cs
- WsdlBuildProvider.cs
- XmlC14NWriter.cs
- TableLayout.cs
- AssemblyCache.cs
- RichTextBox.cs
- SqlDependencyUtils.cs