Code:
/ DotNET / DotNET / 8.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
- SafeFileMapViewHandle.cs
- GridViewItemAutomationPeer.cs
- PropertyInfo.cs
- WorkflowRuntime.cs
- GradientSpreadMethodValidation.cs
- ScriptServiceAttribute.cs
- DecoderFallback.cs
- EditorZone.cs
- CodeIterationStatement.cs
- CardSpaceException.cs
- AuthenticationManager.cs
- HttpValueCollection.cs
- StreamGeometry.cs
- ProgressBarHighlightConverter.cs
- BuildResultCache.cs
- DefaultEventAttribute.cs
- RangeValidator.cs
- AssociationProvider.cs
- OdbcCommandBuilder.cs
- HttpCacheVaryByContentEncodings.cs
- ServerValidateEventArgs.cs
- FrugalList.cs
- QualifiedCellIdBoolean.cs
- MetadataSource.cs
- SoapExtension.cs
- ButtonColumn.cs
- UnionExpr.cs
- TextEmbeddedObject.cs
- SinglePageViewer.cs
- BlurBitmapEffect.cs
- shaper.cs
- WindowsIdentity.cs
- SchemaReference.cs
- PropertyKey.cs
- TraceUtils.cs
- _NativeSSPI.cs
- safex509handles.cs
- SerializableTypeCodeDomSerializer.cs
- TraceListeners.cs
- XmlSerializationReader.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- DataBoundControlHelper.cs
- DataGridViewCheckBoxColumn.cs
- UnknownExceptionActionHelper.cs
- VariableValue.cs
- EmissiveMaterial.cs
- CursorConverter.cs
- RemotingSurrogateSelector.cs
- ReadOnlyDataSourceView.cs
- DefaultProxySection.cs
- VerificationException.cs
- DataGridCell.cs
- DataServiceRequestOfT.cs
- DataServiceHostFactory.cs
- CodeSnippetTypeMember.cs
- Properties.cs
- ApplicationProxyInternal.cs
- ProjectionCamera.cs
- MessageQueuePermissionEntryCollection.cs
- RuleInfoComparer.cs
- HtmlTableRow.cs
- SatelliteContractVersionAttribute.cs
- AxHostDesigner.cs
- InfoCardProofToken.cs
- ToolboxItemFilterAttribute.cs
- DataRelationPropertyDescriptor.cs
- AutoGeneratedField.cs
- EditorPartCollection.cs
- EntitySetDataBindingList.cs
- Reference.cs
- RequestUriProcessor.cs
- XmlCustomFormatter.cs
- CellParaClient.cs
- InvalidDataContractException.cs
- DebugHandleTracker.cs
- ToolStripStatusLabel.cs
- InstanceCreationEditor.cs
- documentsequencetextview.cs
- ColorConvertedBitmap.cs
- TableRowCollection.cs
- Span.cs
- TableRowCollection.cs
- NumericUpDownAcceleration.cs
- DesigntimeLicenseContext.cs
- ControlDesignerState.cs
- WebPartZoneAutoFormat.cs
- UnmanagedMemoryStream.cs
- ComPlusDiagnosticTraceRecords.cs
- ConfigurationManagerInternalFactory.cs
- DCSafeHandle.cs
- ProfileModule.cs
- ThreadStartException.cs
- SoapExtensionTypeElement.cs
- _ListenerAsyncResult.cs
- latinshape.cs
- ColumnMapCopier.cs
- HtmlInputCheckBox.cs
- IsolatedStorageFile.cs
- TempFiles.cs
- IsolatedStoragePermission.cs