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
- WebEventTraceProvider.cs
- PanelDesigner.cs
- xmlfixedPageInfo.cs
- NamespaceQuery.cs
- StringAnimationUsingKeyFrames.cs
- ScriptIgnoreAttribute.cs
- BStrWrapper.cs
- GPPOINTF.cs
- SystemDiagnosticsSection.cs
- DebugView.cs
- FlowDocumentReader.cs
- TickBar.cs
- RegexGroupCollection.cs
- TTSEngineTypes.cs
- MenuCommands.cs
- RegexTree.cs
- DefaultClaimSet.cs
- CommandEventArgs.cs
- PathSegmentCollection.cs
- RuntimeVariablesExpression.cs
- CompilationLock.cs
- GridSplitterAutomationPeer.cs
- MimeObjectFactory.cs
- sqlser.cs
- DocumentEventArgs.cs
- MSAANativeProvider.cs
- CodeCatchClause.cs
- ResolveCriteria.cs
- PriorityQueue.cs
- HasRunnableWorkflowEvent.cs
- ValueConversionAttribute.cs
- MailDefinitionBodyFileNameEditor.cs
- XmlSchemaValidator.cs
- SafeHandles.cs
- StoreItemCollection.cs
- ProgressChangedEventArgs.cs
- MdiWindowListItemConverter.cs
- EventsTab.cs
- PackagePartCollection.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- KeyboardNavigation.cs
- ToolboxItemFilterAttribute.cs
- HtmlElement.cs
- SoapExtensionTypeElementCollection.cs
- GeometryValueSerializer.cs
- DataGridHeaderBorder.cs
- UInt16.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- Rights.cs
- GlobalizationSection.cs
- ProfileProvider.cs
- SafeCryptContextHandle.cs
- NamespaceDecl.cs
- XpsS0ValidatingLoader.cs
- BaseCodeDomTreeGenerator.cs
- XmlSchemaImport.cs
- AppDomainEvidenceFactory.cs
- DynamicContractTypeBuilder.cs
- StatusBarAutomationPeer.cs
- WebDisplayNameAttribute.cs
- Storyboard.cs
- TextEmbeddedObject.cs
- CollectionMarkupSerializer.cs
- FloatUtil.cs
- WebServiceData.cs
- SqlVisitor.cs
- SqlNodeTypeOperators.cs
- CompilerGeneratedAttribute.cs
- TemplatePropertyEntry.cs
- Stroke.cs
- EraserBehavior.cs
- CachedPathData.cs
- Int16AnimationUsingKeyFrames.cs
- ButtonDesigner.cs
- DbException.cs
- LayoutTableCell.cs
- _HelperAsyncResults.cs
- NetworkInformationException.cs
- BinaryWriter.cs
- RecipientInfo.cs
- DataAdapter.cs
- MenuBase.cs
- OptionalMessageQuery.cs
- MessageAction.cs
- PathTooLongException.cs
- RegionInfo.cs
- ItemCheckEvent.cs
- DataGridTextBox.cs
- Int32AnimationBase.cs
- TimelineClockCollection.cs
- GridPatternIdentifiers.cs
- DescendentsWalkerBase.cs
- XmlDocumentSurrogate.cs
- ProtocolProfile.cs
- DecoderExceptionFallback.cs
- FrameworkTextComposition.cs
- UIElementAutomationPeer.cs
- TrackingDataItemValue.cs
- XmlSchemaExporter.cs
- TdsParserStateObject.cs