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
- SerializationAttributes.cs
- NavigationPropertyEmitter.cs
- datacache.cs
- AppDomainUnloadedException.cs
- DefaultValidator.cs
- SchemaSetCompiler.cs
- RemotingException.cs
- XPathMultyIterator.cs
- ResolveMatchesMessageCD1.cs
- DocumentViewerBase.cs
- TopClause.cs
- ImageKeyConverter.cs
- IgnoreDeviceFilterElementCollection.cs
- BitmapPalettes.cs
- OdbcParameterCollection.cs
- SerializerWriterEventHandlers.cs
- ListViewAutomationPeer.cs
- SpnEndpointIdentity.cs
- DataGridViewHeaderCell.cs
- CacheRequest.cs
- DbgUtil.cs
- RuleSettingsCollection.cs
- Request.cs
- CharacterMetricsDictionary.cs
- InternalTypeHelper.cs
- AuthenticationService.cs
- ParserContext.cs
- DecoderNLS.cs
- PaperSource.cs
- RoleManagerModule.cs
- ThrowHelper.cs
- DropTarget.cs
- SamlSerializer.cs
- ImageSource.cs
- HashAlgorithm.cs
- QilReference.cs
- PrincipalPermission.cs
- ColorTranslator.cs
- InputReportEventArgs.cs
- MatrixTransform.cs
- OraclePermission.cs
- SpellerStatusTable.cs
- XmlSchemaImporter.cs
- HttpPostedFile.cs
- ActivityMarkupSerializationProvider.cs
- DecimalStorage.cs
- XmlSchemaIdentityConstraint.cs
- ObjectRef.cs
- InternalCache.cs
- SendKeys.cs
- BuildProvider.cs
- BitmapEffect.cs
- SmtpAuthenticationManager.cs
- EventMappingSettingsCollection.cs
- ListenerConnectionDemuxer.cs
- ResXResourceWriter.cs
- ByteFacetDescriptionElement.cs
- CultureSpecificCharacterBufferRange.cs
- EditorPartCollection.cs
- TextBoxAutomationPeer.cs
- MetafileHeader.cs
- Parameter.cs
- QilIterator.cs
- BitVec.cs
- StoragePropertyMapping.cs
- OleCmdHelper.cs
- CheckBoxStandardAdapter.cs
- DeviceContexts.cs
- RequestCachePolicy.cs
- DocumentCollection.cs
- SoapAttributeAttribute.cs
- AxImporter.cs
- TextSelectionHighlightLayer.cs
- TransactionTable.cs
- DataGridViewColumnCollection.cs
- WebConfigurationManager.cs
- FontCacheUtil.cs
- HttpRequestBase.cs
- CurrencyManager.cs
- VolatileEnlistmentState.cs
- StickyNoteAnnotations.cs
- WebBrowserNavigatedEventHandler.cs
- ReflectionTypeLoadException.cs
- ImmutableAssemblyCacheEntry.cs
- EntityClientCacheKey.cs
- LogArchiveSnapshot.cs
- DataGridViewCellLinkedList.cs
- ValueUnavailableException.cs
- BuildProviderAppliesToAttribute.cs
- X509Extension.cs
- BasicViewGenerator.cs
- ListControlActionList.cs
- TileBrush.cs
- FormattedTextSymbols.cs
- HwndKeyboardInputProvider.cs
- columnmapkeybuilder.cs
- StructuredTypeEmitter.cs
- ObjectParameterCollection.cs
- GenericUriParser.cs
- CompilerScopeManager.cs