Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- RewritingPass.cs
- FamilyTypeface.cs
- SaveWorkflowAsyncResult.cs
- CodeNamespace.cs
- HideDisabledControlAdapter.cs
- securitycriticaldataClass.cs
- WindowsScrollBarBits.cs
- SmtpNtlmAuthenticationModule.cs
- FontNamesConverter.cs
- DetailsViewRowCollection.cs
- X509Chain.cs
- BigInt.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- hresults.cs
- ImageAnimator.cs
- HashCoreRequest.cs
- Random.cs
- MDIWindowDialog.cs
- HeaderUtility.cs
- HtmlDocument.cs
- WeakReference.cs
- DataGridCellEditEndingEventArgs.cs
- ItemCollection.cs
- ComponentGlyph.cs
- TemplateFactory.cs
- DataObject.cs
- SectionUpdates.cs
- ReadWriteSpinLock.cs
- ResourceReferenceKeyNotFoundException.cs
- Axis.cs
- PartitionerQueryOperator.cs
- SiteMapNodeItemEventArgs.cs
- DockProviderWrapper.cs
- HwndHostAutomationPeer.cs
- PropertyPath.cs
- ListChangedEventArgs.cs
- returneventsaver.cs
- StylusDownEventArgs.cs
- NativeRightsManagementAPIsStructures.cs
- MeasurementDCInfo.cs
- SortedSet.cs
- EntitySetRetriever.cs
- PrePostDescendentsWalker.cs
- ComplexTypeEmitter.cs
- Panel.cs
- EventWaitHandleSecurity.cs
- FlowDocumentScrollViewer.cs
- XmlObjectSerializerReadContext.cs
- DeferredReference.cs
- FileLoadException.cs
- WebPartDeleteVerb.cs
- ListenerAdapter.cs
- PkcsUtils.cs
- DetailsViewRowCollection.cs
- XamlDesignerSerializationManager.cs
- OleDbException.cs
- LowerCaseStringConverter.cs
- pingexception.cs
- ResourceLoader.cs
- AuthorizationRule.cs
- PerformanceCounterLib.cs
- BoolExpr.cs
- PropertyCollection.cs
- AuthenticationConfig.cs
- DoWorkEventArgs.cs
- DataGridTable.cs
- ViewPort3D.cs
- HtmlInputReset.cs
- FixedPosition.cs
- WebServiceAttribute.cs
- SiteOfOriginPart.cs
- FileDetails.cs
- BuildResult.cs
- TextModifierScope.cs
- UshortList2.cs
- DictionaryEntry.cs
- LinqDataSourceSelectEventArgs.cs
- TableDetailsRow.cs
- Screen.cs
- NativeMethods.cs
- XpsS0ValidatingLoader.cs
- Library.cs
- AttributeAction.cs
- DoubleCollectionConverter.cs
- Metadata.cs
- ZoomingMessageFilter.cs
- PopOutPanel.cs
- TextServicesContext.cs
- StaticFileHandler.cs
- HybridWebProxyFinder.cs
- _HelperAsyncResults.cs
- EventBuilder.cs
- DoubleKeyFrameCollection.cs
- PathSegmentCollection.cs
- GridViewActionList.cs
- XPathNodeIterator.cs
- CompositeCollection.cs
- XmlSerializerVersionAttribute.cs
- SecurityProtocolFactory.cs
- DataSvcMapFile.cs