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
- DbConnectionPool.cs
- Main.cs
- RtfToXamlReader.cs
- DragCompletedEventArgs.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- DataPointer.cs
- SQLBytes.cs
- _TransmitFileOverlappedAsyncResult.cs
- FileLevelControlBuilderAttribute.cs
- RelationshipWrapper.cs
- ListControlConvertEventArgs.cs
- Enum.cs
- WindowHelperService.cs
- RankException.cs
- SettingsPropertyCollection.cs
- DataServiceProcessingPipeline.cs
- Quaternion.cs
- X509Certificate.cs
- HitTestParameters.cs
- DbConnectionPoolOptions.cs
- HttpValueCollection.cs
- SecurityTokenAttachmentMode.cs
- RepeaterCommandEventArgs.cs
- DesignTimeHTMLTextWriter.cs
- ScrollProviderWrapper.cs
- invalidudtexception.cs
- SendMessageChannelCache.cs
- CodeDirectoryCompiler.cs
- VisualTarget.cs
- Vector3DValueSerializer.cs
- DatatypeImplementation.cs
- ScriptingJsonSerializationSection.cs
- QilBinary.cs
- InitializationEventAttribute.cs
- XmlSchemaIdentityConstraint.cs
- XmlSerializerFactory.cs
- DataSetFieldSchema.cs
- WindowsBrush.cs
- SynchronizationContext.cs
- EnterpriseServicesHelper.cs
- SqlFacetAttribute.cs
- DnsEndPoint.cs
- TdsValueSetter.cs
- ViewPort3D.cs
- ShaderEffect.cs
- DbConnectionOptions.cs
- WriteStateInfoBase.cs
- CompilerState.cs
- MenuItemStyle.cs
- MemberPath.cs
- UIAgentAsyncParams.cs
- BitmapImage.cs
- TypeResolver.cs
- TargetParameterCountException.cs
- RuleSet.cs
- TemplateColumn.cs
- AssemblyNameProxy.cs
- OracleConnection.cs
- PairComparer.cs
- EntityTemplateUserControl.cs
- MD5CryptoServiceProvider.cs
- _NestedSingleAsyncResult.cs
- AnonymousIdentificationModule.cs
- FtpWebResponse.cs
- ObjectListItem.cs
- StyleCollectionEditor.cs
- TextElementEditingBehaviorAttribute.cs
- ExpandCollapsePattern.cs
- MobileRedirect.cs
- AppDomainProtocolHandler.cs
- ConvertTextFrag.cs
- List.cs
- HyperLinkField.cs
- DataGridTextBoxColumn.cs
- Point4D.cs
- ServiceProviders.cs
- NativeObjectSecurity.cs
- Queue.cs
- RuntimeResourceSet.cs
- Schema.cs
- Geometry3D.cs
- StringInfo.cs
- Grant.cs
- RoleServiceManager.cs
- CharAnimationUsingKeyFrames.cs
- baseshape.cs
- MetadataArtifactLoaderCompositeFile.cs
- ImageCodecInfoPrivate.cs
- LineUtil.cs
- ClientData.cs
- VirtualizingPanel.cs
- RangeValidator.cs
- PerSessionInstanceContextProvider.cs
- ProviderSettingsCollection.cs
- TextBoxBase.cs
- Win32KeyboardDevice.cs
- BitmapCodecInfoInternal.cs
- MessageQueueInstaller.cs
- EntityException.cs
- MessageSmuggler.cs