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
- DecoderNLS.cs
- StylusPlugInCollection.cs
- FilteredXmlReader.cs
- DiscardableAttribute.cs
- ModelTreeEnumerator.cs
- BuildProvider.cs
- UndoEngine.cs
- PageCache.cs
- XmlIlVisitor.cs
- DataServiceQueryException.cs
- ScriptReferenceEventArgs.cs
- XmlDictionaryReader.cs
- NGCSerializationManagerAsync.cs
- AnnotationResourceChangedEventArgs.cs
- DbBuffer.cs
- webproxy.cs
- QueryCursorEventArgs.cs
- RegexReplacement.cs
- itemelement.cs
- RetrieveVirtualItemEventArgs.cs
- ListContractAdapter.cs
- FilterQueryOptionExpression.cs
- View.cs
- SqlErrorCollection.cs
- BrowsableAttribute.cs
- TaskForm.cs
- WorkflowMarkupSerializationManager.cs
- PersistenceProviderBehavior.cs
- Html32TextWriter.cs
- BindingListCollectionView.cs
- ToolStripDropTargetManager.cs
- OleDbRowUpdatedEvent.cs
- ValidatorCompatibilityHelper.cs
- TransactionChannelFactory.cs
- ItemCollection.cs
- HttpListenerException.cs
- ExpressionEvaluator.cs
- TemplateContentLoader.cs
- AuthorizationRule.cs
- RegexFCD.cs
- ContentPathSegment.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- Matrix.cs
- Attributes.cs
- UnsafeNativeMethodsCLR.cs
- Calendar.cs
- ObsoleteAttribute.cs
- ProfileGroupSettings.cs
- CssTextWriter.cs
- UserControlBuildProvider.cs
- PriorityChain.cs
- ReadWriteSpinLock.cs
- PkcsUtils.cs
- StrongNameMembershipCondition.cs
- ConditionChanges.cs
- ActivationArguments.cs
- Bits.cs
- PaintEvent.cs
- BitmapFrameDecode.cs
- XPathDocumentNavigator.cs
- SatelliteContractVersionAttribute.cs
- NamedPipeTransportManager.cs
- FileAuthorizationModule.cs
- Partitioner.cs
- ClassImporter.cs
- FormsAuthentication.cs
- ToolStripItemDataObject.cs
- RequestStatusBarUpdateEventArgs.cs
- DataStreamFromComStream.cs
- MouseOverProperty.cs
- ItemList.cs
- WebPartZone.cs
- DataRecord.cs
- WebPartTracker.cs
- InputBuffer.cs
- MetafileHeader.cs
- FormatterConverter.cs
- BitmapEffectInput.cs
- SerializationInfo.cs
- ResolveMatchesMessageCD1.cs
- ScrollBar.cs
- UnmanagedMemoryStreamWrapper.cs
- TrackingLocation.cs
- CurrencyManager.cs
- VisualBrush.cs
- DataColumnCollection.cs
- EventTask.cs
- ColorInterpolationModeValidation.cs
- COM2ExtendedTypeConverter.cs
- EventSetter.cs
- ResourceReader.cs
- EntityContainerEmitter.cs
- WebPartCatalogAddVerb.cs
- OpenFileDialog.cs
- MediaContext.cs
- XPathNavigatorKeyComparer.cs
- DataControlField.cs
- oledbconnectionstring.cs
- GeneralTransform.cs
- SeparatorAutomationPeer.cs