Compartilhar via


ProfileUsageAttribute Class

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Describes how a property is backed in an ASP.NET profile.

Inheritance Hierarchy

System.Object
  System.Attribute
    System.ServiceModel.DomainServices.Server.ApplicationServices.ProfileUsageAttribute

Namespace:  System.ServiceModel.DomainServices.Server.ApplicationServices
Assembly:  System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple := False,  _
    Inherited := False)> _
Public NotInheritable Class ProfileUsageAttribute _
    Inherits Attribute
'Usage
Dim instance As ProfileUsageAttribute
[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false, 
    Inherited = false)]
public sealed class ProfileUsageAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Property, AllowMultiple = false, 
    Inherited = false)]
public ref class ProfileUsageAttribute sealed : public Attribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false, 
    Inherited = false)>]
type ProfileUsageAttribute =  
    class
        inherit Attribute
    end
public final class ProfileUsageAttribute extends Attribute

The ProfileUsageAttribute type exposes the following members.

Constructors

  Name Description
Public method ProfileUsageAttribute Initializes a new instance of the ProfileUsageAttribute class.

Top

Properties

  Name Description
Public property Alias Gets or sets the name of the member backing the property in an ASP.NET profile.
Public property IsExcluded Gets or sets a value indicating whether the property is backed by a profile member.
Public property TypeId (Inherited from Attribute.)

Top

Methods

  Name Description
Public method Equals (Inherited from Attribute.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Attribute.)
Public method GetType (Inherited from Object.)
Public method IsDefaultAttribute (Inherited from Attribute.)
Public method Match (Inherited from Attribute.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method _Attribute.GetIDsOfNames (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.GetTypeInfo (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.GetTypeInfoCount (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.Invoke (Inherited from Attribute.)

Top

Remarks

This attribute is used by the AuthenticationBase<T> to determine how it should read from or write to the ASP.NET profile that backs the data. If a property with the same name exists in the profile, you do not need to use this attribute. If a property is not in the profile, you should set the IsExcluded property to true. If a property has a different name than the profile value that backs it, you should set the Alias property to the name of the backing value in the profile. The attribute can be used with user entities extending UserBase.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.ServiceModel.DomainServices.Server.ApplicationServices Namespace