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
- UserPersonalizationStateInfo.cs
- DefinitionUpdate.cs
- FormParameter.cs
- MaskInputRejectedEventArgs.cs
- SEHException.cs
- ACE.cs
- ParameterBinding.cs
- NullNotAllowedCollection.cs
- Msec.cs
- Duration.cs
- ReaderWriterLock.cs
- HtmlLink.cs
- Pool.cs
- TransformerInfo.cs
- AspNetRouteServiceHttpHandler.cs
- DefaultTypeArgumentAttribute.cs
- FlowNode.cs
- UIElement3D.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- TextParagraphCache.cs
- BigInt.cs
- SqlDataSourceCommandParser.cs
- SQLInt32.cs
- WmpBitmapEncoder.cs
- ThicknessAnimationUsingKeyFrames.cs
- BamlLocalizer.cs
- TextEditor.cs
- DataAdapter.cs
- ACL.cs
- AppDomainFactory.cs
- PermissionAttributes.cs
- SystemIPInterfaceStatistics.cs
- SafeNativeMethods.cs
- FileDialog_Vista_Interop.cs
- UnknownBitmapDecoder.cs
- Baml2006ReaderSettings.cs
- ResourceSet.cs
- EmissiveMaterial.cs
- OleDbPermission.cs
- SslStream.cs
- SafeCoTaskMem.cs
- EventLogPermissionEntryCollection.cs
- TraceProvider.cs
- Process.cs
- PolyQuadraticBezierSegment.cs
- ToolBarPanel.cs
- DiscoveryClientDocuments.cs
- BitmapEffectvisualstate.cs
- TcpSocketManager.cs
- UnhandledExceptionEventArgs.cs
- SetState.cs
- MiniModule.cs
- SystemInformation.cs
- JpegBitmapEncoder.cs
- DesignDataSource.cs
- RegexTree.cs
- InputLanguageSource.cs
- EntityDataSourceConfigureObjectContext.cs
- ParameterInfo.cs
- FixedHighlight.cs
- MessageSmuggler.cs
- FontResourceCache.cs
- HMACSHA512.cs
- AuditLevel.cs
- RequestResizeEvent.cs
- IsolationInterop.cs
- ExpressionQuoter.cs
- CacheChildrenQuery.cs
- VScrollProperties.cs
- DiagnosticStrings.cs
- ShapingEngine.cs
- configsystem.cs
- IDispatchConstantAttribute.cs
- Helper.cs
- XamlReader.cs
- ExpressionNode.cs
- SchemaImporterExtension.cs
- MailAddressParser.cs
- PngBitmapEncoder.cs
- InfoCardRequestException.cs
- arclist.cs
- ProtectedConfiguration.cs
- ValuePatternIdentifiers.cs
- FlowDocumentPaginator.cs
- StorageTypeMapping.cs
- AttributeSetAction.cs
- TableLayoutPanel.cs
- QuaternionRotation3D.cs
- VerificationException.cs
- StateElementCollection.cs
- ReadOnlyDictionary.cs
- DataTableMappingCollection.cs
- MenuStrip.cs
- ListBoxItemWrapperAutomationPeer.cs
- ToolStripCustomTypeDescriptor.cs
- XPathBinder.cs
- XPathNavigator.cs
- GridViewColumnHeaderAutomationPeer.cs
- RoutedEventConverter.cs
- InputReportEventArgs.cs