Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResourceContainer.cs
- InfoCardKeyedHashAlgorithm.cs
- IgnoreSectionHandler.cs
- DataGridViewTextBoxEditingControl.cs
- GridViewDeleteEventArgs.cs
- DbQueryCommandTree.cs
- XPathAxisIterator.cs
- MetaModel.cs
- OleStrCAMarshaler.cs
- XDRSchema.cs
- TableLayoutPanelCellPosition.cs
- ScrollChangedEventArgs.cs
- ProcessThread.cs
- PageRequestManager.cs
- PrinterSettings.cs
- WindowsAuthenticationEventArgs.cs
- UiaCoreProviderApi.cs
- SendKeys.cs
- IndexingContentUnit.cs
- CaseStatementSlot.cs
- RSAProtectedConfigurationProvider.cs
- SerializerDescriptor.cs
- GridItem.cs
- ConnectionManagementElementCollection.cs
- BinaryMessageEncodingElement.cs
- UrlUtility.cs
- XmlExtensionFunction.cs
- ListViewDataItem.cs
- PrintingPermissionAttribute.cs
- CookieParameter.cs
- ObjectParameter.cs
- xmlsaver.cs
- ContainerCodeDomSerializer.cs
- arabicshape.cs
- NameValueFileSectionHandler.cs
- SafeFreeMibTable.cs
- RepeatButtonAutomationPeer.cs
- WaitHandleCannotBeOpenedException.cs
- XmlEncoding.cs
- TemplateKeyConverter.cs
- Triplet.cs
- FlowDocument.cs
- TileBrush.cs
- MSAAEventDispatcher.cs
- SimpleTypeResolver.cs
- Certificate.cs
- WebPartConnectionsEventArgs.cs
- DesignerListAdapter.cs
- Utils.cs
- FormViewDesigner.cs
- BitmapFrameDecode.cs
- UrlMappingsModule.cs
- ExtenderControl.cs
- RelatedView.cs
- OutOfProcStateClientManager.cs
- MimeBasePart.cs
- NativeMethods.cs
- TagPrefixCollection.cs
- DataMemberConverter.cs
- EventLogPermissionAttribute.cs
- ListParaClient.cs
- TCPClient.cs
- HtmlSelect.cs
- ToolStripRendererSwitcher.cs
- WeakReferenceEnumerator.cs
- CacheChildrenQuery.cs
- MetadataCache.cs
- PreProcessInputEventArgs.cs
- DesignerActionKeyboardBehavior.cs
- StylusPointProperties.cs
- Identifier.cs
- ElementUtil.cs
- ResourceLoader.cs
- FormsAuthentication.cs
- ProcessManager.cs
- SourceExpressionException.cs
- AssemblyBuilder.cs
- filewebrequest.cs
- IntegerFacetDescriptionElement.cs
- SoapAttributes.cs
- PolicyStatement.cs
- ServiceContractAttribute.cs
- BitmapScalingModeValidation.cs
- StrokeCollection2.cs
- OdbcHandle.cs
- AssemblySettingAttributes.cs
- LinearGradientBrush.cs
- EdmValidator.cs
- MinMaxParagraphWidth.cs
- InfoCardBaseException.cs
- ConfigurationStrings.cs
- DesignTimeValidationFeature.cs
- CompiledAction.cs
- DSACryptoServiceProvider.cs
- StatusBarPanelClickEvent.cs
- HtmlInputCheckBox.cs
- SequentialUshortCollection.cs
- DocumentOutline.cs
- CodeTypeMemberCollection.cs
- WindowsMenu.cs