Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Margins.cs
- BitmapSource.cs
- BrowserCapabilitiesFactory35.cs
- Reference.cs
- RectAnimationUsingKeyFrames.cs
- TextBlock.cs
- InkCanvas.cs
- EventMappingSettings.cs
- ObjectItemCollection.cs
- SecureConversationVersion.cs
- RegisteredDisposeScript.cs
- LinkDescriptor.cs
- DataBoundControlDesigner.cs
- WebRequestModuleElementCollection.cs
- ZoneMembershipCondition.cs
- ResourceExpressionEditor.cs
- ApplicationSettingsBase.cs
- CompilationUnit.cs
- CommandID.cs
- IntSecurity.cs
- dsa.cs
- FixedHighlight.cs
- WorkflowItemsPresenter.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- BinaryUtilClasses.cs
- ErrorWebPart.cs
- SrgsRulesCollection.cs
- EntityCommandExecutionException.cs
- XmlSchemaSimpleTypeRestriction.cs
- ChannelFactoryRefCache.cs
- TreeIterator.cs
- MenuAdapter.cs
- HttpPostServerProtocol.cs
- QilList.cs
- TextModifier.cs
- SystemNetworkInterface.cs
- HeaderedContentControl.cs
- InlineUIContainer.cs
- WorkflowElementDialog.cs
- OleDbRowUpdatedEvent.cs
- KeyConstraint.cs
- ExpressionDumper.cs
- Predicate.cs
- SqlConnectionStringBuilder.cs
- HtmlTitle.cs
- Configuration.cs
- SynchronizingStream.cs
- SynchronizedReadOnlyCollection.cs
- SelectorItemAutomationPeer.cs
- PowerModeChangedEventArgs.cs
- SynchronizationLockException.cs
- Baml2006Reader.cs
- TextEffect.cs
- SqlNamer.cs
- UnsafeNativeMethods.cs
- RijndaelManaged.cs
- KeyValueInternalCollection.cs
- NominalTypeEliminator.cs
- NavigationPropertyEmitter.cs
- TableLayoutPanelCellPosition.cs
- HtmlInputSubmit.cs
- FieldCollectionEditor.cs
- CollectionType.cs
- SchemaTableOptionalColumn.cs
- SoapCodeExporter.cs
- Helpers.cs
- TraversalRequest.cs
- SchemaImporterExtension.cs
- NegatedCellConstant.cs
- CounterSetInstanceCounterDataSet.cs
- XmlMtomWriter.cs
- PropagatorResult.cs
- RequestResizeEvent.cs
- Rect3DConverter.cs
- smtppermission.cs
- PtsPage.cs
- AbstractExpressions.cs
- DesignerAttribute.cs
- SecurityCookieModeValidator.cs
- Image.cs
- TextBlock.cs
- KeyPressEvent.cs
- TdsRecordBufferSetter.cs
- ValueUtilsSmi.cs
- ApplicationHost.cs
- SvcMapFile.cs
- ComboBoxRenderer.cs
- CompositeActivityCodeGenerator.cs
- WebBrowserSiteBase.cs
- Aggregates.cs
- ControlCachePolicy.cs
- BamlRecordWriter.cs
- AssemblyFilter.cs
- XPathNode.cs
- QuaternionConverter.cs
- CapabilitiesState.cs
- EntityStoreSchemaFilterEntry.cs
- NamedPipeChannelFactory.cs
- SmiEventStream.cs
- DSASignatureDeformatter.cs