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
- IteratorFilter.cs
- ServiceModelTimeSpanValidator.cs
- Attachment.cs
- ScriptControlManager.cs
- TcpConnectionPool.cs
- DataGridTableCollection.cs
- FunctionImportElement.cs
- TreeViewItemAutomationPeer.cs
- SpeechRecognitionEngine.cs
- ObfuscationAttribute.cs
- KeyEventArgs.cs
- SerializationObjectManager.cs
- WindowsEditBox.cs
- EntityContainerRelationshipSet.cs
- PolyBezierSegment.cs
- DbInsertCommandTree.cs
- DispatchChannelSink.cs
- ThemeableAttribute.cs
- SqlTransaction.cs
- UniformGrid.cs
- ContainerControlDesigner.cs
- DataListCommandEventArgs.cs
- ControlBuilderAttribute.cs
- MetabaseSettings.cs
- CalendarDateRange.cs
- NullableDecimalSumAggregationOperator.cs
- PatternMatcher.cs
- DuplicateWaitObjectException.cs
- TripleDES.cs
- SafeWaitHandle.cs
- _AcceptOverlappedAsyncResult.cs
- CharStorage.cs
- ClientSettingsProvider.cs
- TextSelectionHighlightLayer.cs
- TypeSystem.cs
- configsystem.cs
- TreeChangeInfo.cs
- InvalidProgramException.cs
- DataSourceProvider.cs
- Converter.cs
- HTTPNotFoundHandler.cs
- SmiEventSink_DeferedProcessing.cs
- AnyAllSearchOperator.cs
- MessageHeaderAttribute.cs
- DataPointer.cs
- NextPreviousPagerField.cs
- XmlChildNodes.cs
- RolePrincipal.cs
- PermissionAttributes.cs
- ParameterElement.cs
- Triplet.cs
- EndpointConfigContainer.cs
- FlowchartDesigner.Helpers.cs
- CompilerError.cs
- PolygonHotSpot.cs
- InvalidDocumentContentsException.cs
- PkcsMisc.cs
- XmlWriterTraceListener.cs
- BooleanStorage.cs
- GlobalizationAssembly.cs
- BitStack.cs
- DataProtection.cs
- XmlEnumAttribute.cs
- CodeGenerator.cs
- PrivateFontCollection.cs
- WindowsFormsHostAutomationPeer.cs
- MatrixTransform.cs
- FixedSOMLineCollection.cs
- OletxTransactionManager.cs
- baseshape.cs
- TextPointer.cs
- BitmapCodecInfo.cs
- CodeMemberMethod.cs
- HwndKeyboardInputProvider.cs
- DoubleLinkList.cs
- HttpProfileBase.cs
- VisemeEventArgs.cs
- SmtpNtlmAuthenticationModule.cs
- MimeFormImporter.cs
- AspNetRouteServiceHttpHandler.cs
- InstanceDescriptor.cs
- WebEvents.cs
- StrokeSerializer.cs
- BindingManagerDataErrorEventArgs.cs
- DiagnosticsConfigurationHandler.cs
- EntityDataSourceReferenceGroup.cs
- SelectedDatesCollection.cs
- TagMapCollection.cs
- VirtualDirectoryMapping.cs
- ObjectSerializerFactory.cs
- DBNull.cs
- XmlEncodedRawTextWriter.cs
- TabControlCancelEvent.cs
- SqlParameterCollection.cs
- HierarchicalDataBoundControlAdapter.cs
- ImageAutomationPeer.cs
- BitmapEffectInputData.cs
- SecurityHelper.cs
- ProviderMetadata.cs
- BookmarkUndoUnit.cs