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
- StartUpEventArgs.cs
- XamlTemplateSerializer.cs
- QilChoice.cs
- DynamicRendererThreadManager.cs
- DrawingImage.cs
- HuffCodec.cs
- TabPage.cs
- ApplicationProxyInternal.cs
- AggregateException.cs
- FontStretch.cs
- ToolboxService.cs
- RichListBox.cs
- StylusShape.cs
- Inflater.cs
- ComboBox.cs
- ArrayListCollectionBase.cs
- TagNameToTypeMapper.cs
- OleDbInfoMessageEvent.cs
- PropertyChangeTracker.cs
- SevenBitStream.cs
- DependencyProperty.cs
- WebBrowserUriTypeConverter.cs
- Compiler.cs
- Vector3DCollectionValueSerializer.cs
- XmlObjectSerializerContext.cs
- TranslateTransform3D.cs
- DbDataReader.cs
- Fx.cs
- WebPartZoneBase.cs
- Single.cs
- IDReferencePropertyAttribute.cs
- Dynamic.cs
- StreamUpgradeInitiator.cs
- Part.cs
- HeaderUtility.cs
- AssignDesigner.xaml.cs
- HttpPostedFileBase.cs
- ICspAsymmetricAlgorithm.cs
- SafePEFileHandle.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DocumentViewerHelper.cs
- EventLogSession.cs
- WebPartRestoreVerb.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- CultureSpecificStringDictionary.cs
- KernelTypeValidation.cs
- HttpModuleCollection.cs
- XPathBuilder.cs
- StructureChangedEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- QuinticEase.cs
- SafeViewOfFileHandle.cs
- ScaleTransform.cs
- SignatureHelper.cs
- EntityModelSchemaGenerator.cs
- COM2ColorConverter.cs
- AvTraceFormat.cs
- CodeRemoveEventStatement.cs
- AssemblyUtil.cs
- DetailsViewUpdateEventArgs.cs
- TextRangeEdit.cs
- BuiltInExpr.cs
- DropDownButton.cs
- WindowsContainer.cs
- SmtpFailedRecipientsException.cs
- QueueTransferProtocol.cs
- ItemsPanelTemplate.cs
- ReflectPropertyDescriptor.cs
- TemplateDefinition.cs
- StateChangeEvent.cs
- AuthenticatedStream.cs
- _LazyAsyncResult.cs
- AccessControlEntry.cs
- ZipFileInfoCollection.cs
- CompositionAdorner.cs
- MaskedTextBoxTextEditor.cs
- ToolBarDesigner.cs
- HierarchicalDataSourceConverter.cs
- ReadContentAsBinaryHelper.cs
- ContainsSearchOperator.cs
- FileDataSourceCache.cs
- ComboBoxAutomationPeer.cs
- ValidatedMobileControlConverter.cs
- QilTargetType.cs
- StyleBamlRecordReader.cs
- HasCopySemanticsAttribute.cs
- PopupEventArgs.cs
- OleDbConnectionFactory.cs
- XmlWriterSettings.cs
- MemoryFailPoint.cs
- SrgsText.cs
- DataObjectAttribute.cs
- LogicalExpressionTypeConverter.cs
- EventItfInfo.cs
- LifetimeServices.cs
- WebPartVerb.cs
- InfiniteIntConverter.cs
- DynamicEntity.cs
- MultiByteCodec.cs
- HttpProfileGroupBase.cs