Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebParts / WebDisplayNameAttribute.cs / 1 / WebDisplayNameAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Security.Permissions; [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class WebDisplayNameAttribute : Attribute { public static readonly WebDisplayNameAttribute Default = new WebDisplayNameAttribute(); private string _displayName; public WebDisplayNameAttribute() : this(String.Empty) { } public WebDisplayNameAttribute(string displayName) { _displayName = displayName; } public virtual string DisplayName { get { return DisplayNameValue; } } protected string DisplayNameValue { get { return _displayName; } set { _displayName = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } WebDisplayNameAttribute other = obj as WebDisplayNameAttribute; return (other != null) && other.DisplayName == DisplayName; } public override int GetHashCode() { return DisplayName.GetHashCode(); } ///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. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Security.Permissions; [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class WebDisplayNameAttribute : Attribute { public static readonly WebDisplayNameAttribute Default = new WebDisplayNameAttribute(); private string _displayName; public WebDisplayNameAttribute() : this(String.Empty) { } public WebDisplayNameAttribute(string displayName) { _displayName = displayName; } public virtual string DisplayName { get { return DisplayNameValue; } } protected string DisplayNameValue { get { return _displayName; } set { _displayName = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } WebDisplayNameAttribute other = obj as WebDisplayNameAttribute; return (other != null) && other.DisplayName == DisplayName; } public override int GetHashCode() { return DisplayName.GetHashCode(); } ///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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ExceptionHandler.cs
- Matrix3D.cs
- AssemblyHash.cs
- IgnoreSectionHandler.cs
- ColorConvertedBitmapExtension.cs
- LogArchiveSnapshot.cs
- StdValidatorsAndConverters.cs
- ActiveXSite.cs
- BamlRecordHelper.cs
- DataObjectMethodAttribute.cs
- AnyReturnReader.cs
- BaseUriHelper.cs
- QilSortKey.cs
- HeaderCollection.cs
- CqlBlock.cs
- TextTreeTextNode.cs
- SimpleApplicationHost.cs
- MSAAWinEventWrap.cs
- XmlQueryContext.cs
- Vector3D.cs
- ClientFormsAuthenticationCredentials.cs
- ListBindingHelper.cs
- FormatterConverter.cs
- ServicePointManager.cs
- PublishLicense.cs
- JsonDataContract.cs
- ClientFormsIdentity.cs
- ConnectionStringsSection.cs
- BigIntegerStorage.cs
- DetailsViewInsertEventArgs.cs
- XmlParserContext.cs
- CacheMemory.cs
- ServiceDeploymentInfo.cs
- SnapLine.cs
- DataBoundControlAdapter.cs
- jithelpers.cs
- TypePresenter.xaml.cs
- SmtpSection.cs
- LabelLiteral.cs
- ClockController.cs
- ToolStripItemBehavior.cs
- mediaclock.cs
- ConfigXmlWhitespace.cs
- TcpActivation.cs
- ReturnValue.cs
- OdbcError.cs
- Pointer.cs
- UniqueID.cs
- CodeTypeReference.cs
- AlphabetConverter.cs
- PolicyValidationException.cs
- URLMembershipCondition.cs
- DomNameTable.cs
- ApplySecurityAndSendAsyncResult.cs
- XmlValidatingReaderImpl.cs
- SystemIPAddressInformation.cs
- ScopelessEnumAttribute.cs
- MembershipPasswordException.cs
- ConfigurationConverterBase.cs
- ToolTipAutomationPeer.cs
- StringAttributeCollection.cs
- GeometryModel3D.cs
- MatrixValueSerializer.cs
- CodeSubDirectory.cs
- FileLogRecordStream.cs
- SchemaObjectWriter.cs
- FontNamesConverter.cs
- GridViewEditEventArgs.cs
- DisplayNameAttribute.cs
- Timer.cs
- ScrollPatternIdentifiers.cs
- BinarySecretKeyIdentifierClause.cs
- BinaryFormatterWriter.cs
- DataIdProcessor.cs
- RSAPKCS1SignatureFormatter.cs
- CompiledXpathExpr.cs
- XmlSchemaAnnotation.cs
- LoadRetryHandler.cs
- QilBinary.cs
- ConvertTextFrag.cs
- AsyncResult.cs
- CellRelation.cs
- WebControl.cs
- FilterQueryOptionExpression.cs
- VersionedStreamOwner.cs
- BorderSidesEditor.cs
- _LocalDataStore.cs
- MsmqIntegrationElement.cs
- StaticExtension.cs
- PageStatePersister.cs
- TransactionInformation.cs
- CompModSwitches.cs
- WebSysDefaultValueAttribute.cs
- CodeTypeReference.cs
- DesignerCategoryAttribute.cs
- TextElementEnumerator.cs
- Closure.cs
- PingReply.cs
- SqlProfileProvider.cs
- StyleSelector.cs