Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); } } } // 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
- WindowsListBox.cs
- VectorConverter.cs
- DateRangeEvent.cs
- RegexMatch.cs
- followingquery.cs
- CookieParameter.cs
- ManagementDateTime.cs
- MemoryStream.cs
- ImageSourceConverter.cs
- CollectionConverter.cs
- CharacterBufferReference.cs
- ColumnCollection.cs
- OdbcError.cs
- SvcMapFileLoader.cs
- TcpAppDomainProtocolHandler.cs
- DeviceContext2.cs
- WindowsSysHeader.cs
- MethodCallTranslator.cs
- ModifierKeysValueSerializer.cs
- OptimizedTemplateContent.cs
- TableItemPatternIdentifiers.cs
- StylusLogic.cs
- GradientSpreadMethodValidation.cs
- Timer.cs
- DocumentViewerAutomationPeer.cs
- SoapExtension.cs
- StorageTypeMapping.cs
- Button.cs
- CharacterHit.cs
- SafeArrayTypeMismatchException.cs
- ArgumentNullException.cs
- XNodeValidator.cs
- AssemblyInfo.cs
- XamlTreeBuilder.cs
- SqlInternalConnectionTds.cs
- XmlNodeChangedEventManager.cs
- SqlUserDefinedTypeAttribute.cs
- DrawingContextWalker.cs
- TemplateLookupAction.cs
- RC2.cs
- HtmlButton.cs
- EntitySetBase.cs
- WinInet.cs
- RIPEMD160Managed.cs
- TreeNodeConverter.cs
- HttpAsyncResult.cs
- SerTrace.cs
- InstanceData.cs
- ExponentialEase.cs
- HandlerFactoryWrapper.cs
- WebPartTransformer.cs
- CultureInfo.cs
- ConfigurationErrorsException.cs
- SiteIdentityPermission.cs
- DataStreams.cs
- FormViewDeleteEventArgs.cs
- EncoderFallback.cs
- UsernameTokenFactoryCredential.cs
- HtmlWindowCollection.cs
- ButtonFieldBase.cs
- MD5CryptoServiceProvider.cs
- HierarchicalDataSourceControl.cs
- SQLSingle.cs
- ParameterCollectionEditor.cs
- TextEditorTyping.cs
- TerminatorSinks.cs
- ClipboardProcessor.cs
- EntityWithChangeTrackerStrategy.cs
- X509Utils.cs
- DiagnosticTrace.cs
- RootProfilePropertySettingsCollection.cs
- SqlUtils.cs
- TransformDescriptor.cs
- SqlSelectStatement.cs
- StreamHelper.cs
- TextEffect.cs
- WsatTransactionInfo.cs
- ScrollItemPatternIdentifiers.cs
- LockCookie.cs
- AssertHelper.cs
- XPathSelfQuery.cs
- FileIOPermission.cs
- AudioFormatConverter.cs
- SpellerHighlightLayer.cs
- DataGridItemAutomationPeer.cs
- CodeAttributeArgument.cs
- FilterQuery.cs
- ContextMenuAutomationPeer.cs
- ChannelBuilder.cs
- _TimerThread.cs
- XmlDocumentViewSchema.cs
- MarshalByValueComponent.cs
- NegationPusher.cs
- HttpRuntime.cs
- BindToObject.cs
- DrawingImage.cs
- XmlElementList.cs
- ReaderWriterLockSlim.cs
- Highlights.cs
- AutoGeneratedField.cs