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
- ParseNumbers.cs
- MouseButtonEventArgs.cs
- TemplatePagerField.cs
- HasCopySemanticsAttribute.cs
- AppSettingsSection.cs
- TransformedBitmap.cs
- errorpatternmatcher.cs
- Visual3D.cs
- UpdatePanelTriggerCollection.cs
- ProxySimple.cs
- Viewport3DAutomationPeer.cs
- WebPartMenuStyle.cs
- Timer.cs
- FunctionQuery.cs
- ThreadExceptionDialog.cs
- RegexMatch.cs
- CodeAccessPermission.cs
- BoundColumn.cs
- IdleTimeoutMonitor.cs
- OdbcEnvironmentHandle.cs
- ErrorReporting.cs
- sqlpipe.cs
- BamlLocalizableResourceKey.cs
- FileSystemWatcher.cs
- IIS7UserPrincipal.cs
- TableRowCollection.cs
- DataGridItemEventArgs.cs
- CacheDependency.cs
- CLRBindingWorker.cs
- _LocalDataStore.cs
- CapabilitiesRule.cs
- ByteAnimationUsingKeyFrames.cs
- WebRequest.cs
- DragDeltaEventArgs.cs
- Crc32.cs
- CalendarDateChangedEventArgs.cs
- StatusBarPanelClickEvent.cs
- ImageBrush.cs
- InputReportEventArgs.cs
- DataServiceContext.cs
- SelectedDatesCollection.cs
- GlobalEventManager.cs
- MultiSelectRootGridEntry.cs
- SecurityHeader.cs
- log.cs
- ExpressionPrefixAttribute.cs
- CompilationRelaxations.cs
- IOException.cs
- InitializationEventAttribute.cs
- CodeNamespaceImportCollection.cs
- FixedPageStructure.cs
- WindowsFormsDesignerOptionService.cs
- MetabaseReader.cs
- NGCPageContentSerializerAsync.cs
- PropertyGridView.cs
- ArrayConverter.cs
- DeflateEmulationStream.cs
- PropertyCollection.cs
- IisHelper.cs
- SqlUDTStorage.cs
- SQLGuid.cs
- DispatcherEventArgs.cs
- ProtocolsConfigurationHandler.cs
- CommonDialog.cs
- BitmapEffectDrawingContextWalker.cs
- XmlNamespaceDeclarationsAttribute.cs
- BasicBrowserDialog.cs
- Header.cs
- TextBox.cs
- XmlElementAttribute.cs
- DetailsViewPagerRow.cs
- PartDesigner.cs
- controlskin.cs
- XmlSchemaCollection.cs
- TraceProvider.cs
- TraceContext.cs
- EventPropertyMap.cs
- Compress.cs
- OutputWindow.cs
- TrustLevelCollection.cs
- ImageSourceValueSerializer.cs
- WriteFileContext.cs
- StyleReferenceConverter.cs
- CqlWriter.cs
- COM2PropertyBuilderUITypeEditor.cs
- TemplateKeyConverter.cs
- MenuStrip.cs
- RegexParser.cs
- X509Certificate.cs
- ControlCollection.cs
- RegistrationContext.cs
- ResourceDictionaryCollection.cs
- FieldNameLookup.cs
- JsonWriter.cs
- SettingsBase.cs
- counter.cs
- CharacterMetricsDictionary.cs
- ProxyHelper.cs
- LinearKeyFrames.cs
- FrameworkElementFactoryMarkupObject.cs