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
- EntityViewGenerator.cs
- ListBoxItem.cs
- Thumb.cs
- SqlConnectionHelper.cs
- TraceLevelHelper.cs
- VBCodeProvider.cs
- AnimationStorage.cs
- CompilerWrapper.cs
- PriorityQueue.cs
- DetailsViewDeleteEventArgs.cs
- Selector.cs
- XmlNotation.cs
- ListViewItem.cs
- UrlAuthFailedErrorFormatter.cs
- LogManagementAsyncResult.cs
- ValidatingReaderNodeData.cs
- TimerElapsedEvenArgs.cs
- BitConverter.cs
- CodeObjectCreateExpression.cs
- MemoryFailPoint.cs
- MaterializeFromAtom.cs
- ToolStripSplitStackLayout.cs
- ApplicationException.cs
- SystemNetHelpers.cs
- IProvider.cs
- WebPartUtil.cs
- StylusEventArgs.cs
- WorkflowMarkupSerializationProvider.cs
- BindValidationContext.cs
- WindowsListView.cs
- WebPartCollection.cs
- PageHandlerFactory.cs
- HttpModuleCollection.cs
- CallbackHandler.cs
- RegexCharClass.cs
- MessageFilterException.cs
- Select.cs
- SoapReflectionImporter.cs
- SchemaImporterExtensionsSection.cs
- Fault.cs
- SessionStateModule.cs
- SqlUserDefinedAggregateAttribute.cs
- TraceLog.cs
- _OSSOCK.cs
- MessageBox.cs
- SoapParser.cs
- RestClientProxyHandler.cs
- DBParameter.cs
- Internal.cs
- UiaCoreProviderApi.cs
- CodeVariableDeclarationStatement.cs
- ItemChangedEventArgs.cs
- ObjectStateEntry.cs
- StylusPointPropertyId.cs
- JsonQNameDataContract.cs
- NCryptSafeHandles.cs
- PreviewKeyDownEventArgs.cs
- IxmlLineInfo.cs
- FileChangesMonitor.cs
- DiscoveryInnerClientAdhoc11.cs
- ContentElement.cs
- WindowsImpersonationContext.cs
- UnsafeNativeMethods.cs
- ConditionValidator.cs
- PlaceHolder.cs
- WindowsFormsHost.cs
- OdbcReferenceCollection.cs
- TranslateTransform.cs
- BinaryConverter.cs
- PageCodeDomTreeGenerator.cs
- Base64Encoding.cs
- RadioButtonFlatAdapter.cs
- NullRuntimeConfig.cs
- TextFormatterContext.cs
- DefaultBindingPropertyAttribute.cs
- FrameworkPropertyMetadata.cs
- TemplateInstanceAttribute.cs
- Converter.cs
- ItemAutomationPeer.cs
- _Rfc2616CacheValidators.cs
- XmlSerializationReader.cs
- MappingModelBuildProvider.cs
- XappLauncher.cs
- SoapMessage.cs
- RightNameExpirationInfoPair.cs
- GridView.cs
- CollectionViewProxy.cs
- TextUtf8RawTextWriter.cs
- ZipIOLocalFileDataDescriptor.cs
- DesignObjectWrapper.cs
- X509CertificateStore.cs
- UnsafeNativeMethods.cs
- FormView.cs
- ScriptingProfileServiceSection.cs
- ConstraintManager.cs
- DecoderNLS.cs
- ImageList.cs
- SQLCharsStorage.cs
- DataGridAddNewRow.cs
- RequestQueryProcessor.cs