Code:
/ FX-1434 / FX-1434 / 1.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
- TextLine.cs
- SqlDataSourceCache.cs
- ReadOnlyTernaryTree.cs
- DefaultPropertyAttribute.cs
- BaseAddressPrefixFilterElement.cs
- DataGridRow.cs
- ParameterBuilder.cs
- mda.cs
- RangeValuePatternIdentifiers.cs
- RawStylusInput.cs
- TypeLoadException.cs
- clipboard.cs
- BamlLocalizationDictionary.cs
- ArrayHelper.cs
- WebPartEditorOkVerb.cs
- XdrBuilder.cs
- SessionStateItemCollection.cs
- Attributes.cs
- glyphs.cs
- HostingEnvironmentWrapper.cs
- MenuRendererClassic.cs
- SByteStorage.cs
- AddInEnvironment.cs
- Double.cs
- DataErrorValidationRule.cs
- TickBar.cs
- OdbcConnectionFactory.cs
- PrintDialog.cs
- ColumnReorderedEventArgs.cs
- AutoSizeComboBox.cs
- HostTimeoutsElement.cs
- List.cs
- UnauthorizedWebPart.cs
- Visitor.cs
- AttributeCollection.cs
- LambdaCompiler.Binary.cs
- CallContext.cs
- COM2PictureConverter.cs
- ResourceCodeDomSerializer.cs
- DiscriminatorMap.cs
- XmlRawWriter.cs
- CryptoApi.cs
- SqlDataSourceCache.cs
- ChooseAction.cs
- RawStylusInputCustomDataList.cs
- SystemTcpStatistics.cs
- XPathExpr.cs
- SqlBulkCopyColumnMapping.cs
- ZipIOCentralDirectoryBlock.cs
- BuildManager.cs
- shaperfactoryquerycacheentry.cs
- IdentityElement.cs
- SqlProviderUtilities.cs
- DbQueryCommandTree.cs
- XmlFormatReaderGenerator.cs
- Simplifier.cs
- OdbcConnection.cs
- DataGridViewBand.cs
- CalendarDay.cs
- ProcessInputEventArgs.cs
- SizeAnimationBase.cs
- CellIdBoolean.cs
- TransformerInfo.cs
- MouseActionConverter.cs
- EDesignUtil.cs
- OperationInfoBase.cs
- EmptyEnumerator.cs
- WebPartCancelEventArgs.cs
- Rules.cs
- ControllableStoryboardAction.cs
- PerformanceCounter.cs
- Int32Rect.cs
- Permission.cs
- Decimal.cs
- UnsafeNativeMethods.cs
- HashCryptoHandle.cs
- AuthenticatedStream.cs
- BulletChrome.cs
- EntityClassGenerator.cs
- MessageDecoder.cs
- ContentAlignmentEditor.cs
- MimeTypeMapper.cs
- DataGridDesigner.cs
- StateBag.cs
- Visitors.cs
- WorkerRequest.cs
- ClrPerspective.cs
- GridViewRowEventArgs.cs
- NavigationFailedEventArgs.cs
- TextEditorLists.cs
- CapabilitiesState.cs
- MemoryMappedViewAccessor.cs
- SafeCryptoHandles.cs
- ToolStripPanelRow.cs
- DataServiceClientException.cs
- BitStack.cs
- WebPartZoneDesigner.cs
- CodeMemberMethod.cs
- RecognizerStateChangedEventArgs.cs
- RegexCaptureCollection.cs