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
- WorkItem.cs
- SendingRequestEventArgs.cs
- DataGridTable.cs
- MenuItemBinding.cs
- ClockController.cs
- MarkupCompilePass2.cs
- CompilerState.cs
- Membership.cs
- Column.cs
- Menu.cs
- LoginName.cs
- CacheSection.cs
- ErrorWebPart.cs
- CaseCqlBlock.cs
- ContractMethodParameterInfo.cs
- Select.cs
- XmlNodeChangedEventArgs.cs
- MachineKey.cs
- EncodingInfo.cs
- LinqDataSourceInsertEventArgs.cs
- RoleServiceManager.cs
- XdrBuilder.cs
- ClientEndpointLoader.cs
- DirectoryNotFoundException.cs
- SqlProcedureAttribute.cs
- CroppedBitmap.cs
- PanelStyle.cs
- DataGridViewLayoutData.cs
- InputProcessorProfiles.cs
- JsonObjectDataContract.cs
- DataTransferEventArgs.cs
- WindowsFormsHostPropertyMap.cs
- DiagnosticsElement.cs
- OpCellTreeNode.cs
- XmlSchemaException.cs
- XmlSchemaSimpleContent.cs
- clipboard.cs
- ToolboxService.cs
- TiffBitmapEncoder.cs
- SafeFileMappingHandle.cs
- Knowncolors.cs
- WebSysDisplayNameAttribute.cs
- AutomationFocusChangedEventArgs.cs
- ProgressBar.cs
- TextEditorCharacters.cs
- XXXOnTypeBuilderInstantiation.cs
- Menu.cs
- DBPropSet.cs
- altserialization.cs
- _ScatterGatherBuffers.cs
- versioninfo.cs
- DefaultValueAttribute.cs
- Propagator.JoinPropagator.cs
- SuppressMergeCheckAttribute.cs
- CodeAttributeArgumentCollection.cs
- Message.cs
- AnnotationResource.cs
- CheckBox.cs
- FreezableDefaultValueFactory.cs
- NamespaceInfo.cs
- DesignerDataView.cs
- ItemsPanelTemplate.cs
- ColumnMapCopier.cs
- BoundColumn.cs
- SafeNativeMethods.cs
- ToolTip.cs
- MailDefinition.cs
- WebReference.cs
- Events.cs
- PackageStore.cs
- ItemsPresenter.cs
- SettingsContext.cs
- ProgressBar.cs
- StylusButtonEventArgs.cs
- XmlCharType.cs
- XmlDownloadManager.cs
- RuleEngine.cs
- FormattedText.cs
- GenerateScriptTypeAttribute.cs
- InteropAutomationProvider.cs
- ClassicBorderDecorator.cs
- XmlName.cs
- Automation.cs
- ListItemDetailViewAttribute.cs
- BitmapEffectOutputConnector.cs
- SoapExtensionStream.cs
- SqlColumnizer.cs
- Int32CollectionConverter.cs
- SafeNativeMethods.cs
- _ConnectStream.cs
- TraceHwndHost.cs
- XmlReflectionMember.cs
- ConsoleTraceListener.cs
- XDeferredAxisSource.cs
- FormParameter.cs
- RenamedEventArgs.cs
- TabPanel.cs
- TypeBuilder.cs
- ReverseComparer.cs
- ExtendedProtectionPolicyElement.cs