Class ProfileService

Provides the client proxy class for the profile service.

see

{@link http://msdn.microsoft.com/en-us/library/bb383800(v=vs.100).aspx}

Index

Properties

Methods

Properties

public static DefaultWebServicePath: string

Specifies the path of the default profile service.

public static properties: any

Contains the loaded profile data. You can access the loaded profile data directly from the properties field. An element in the properties field can be a property group of type ProfileGroup. If it is, the related properties appear as sub-properties. For more information, see Sys.Services.ProfileGroup Class.

Methods

public static defaultSucceededCallback(): Function

Gets or sets the default succeeded callback function for the service.

Returns

Function

 A reference to the succeeded callback function for the service.

public static defaultSucceededCallback(value: Function)

Parameters

  • value: Function

public static defaultUserContext(): Object

Gets or sets the default user context for the service.

Returns

Object

 A reference to the user context for the service.

public static defaultUserContext(value: Object)

Gets or sets the default user context for the service.

Parameters

  • value: Object

public static get_defaultFailedCallback(): Function

Returns

Function

public static get_defaultLoadCompletedCallback(): Function

Returns

Function

public static get_defaultSaveCompletedCallback(): Function

Returns

Function

public static get_path(): string

Gets or sets the profile service path.

Returns

string

 The profile path

public static get_timeout(): number

Gets or sets the profile service time-out value.

Returns

number

public static load(propertyNames: Array<string>, loadCompletedCallback: Function, failedCallback: Function, userContext: any)

Loads the specified profile properties.

If propertyNames is not supplied, all profile properties enabled for read access are loaded from the server. The loaded profile can then be accessed directly from the properties field. This enables your application to access the profile properties by using simple field syntax, as shown in the following example:

example
 Sys.Services.ProfileService.load(null, LoadCompletedCallback, ProfileFailedCallback, null);

Parameters

  • propertyNames: Array<string>
  • loadCompletedCallback: Function
     The function that is called when loading has completed. The default is null.
    
  • failedCallback: Function
     The function that is called when loading has failed. The default is null.
    
  • userContext: any
     User context information passed to the callback functions.
    

public new(): ProfileService

Returns

ProfileService

public static save(propertyNames: Array<string>, saveCompletedCallback: Function, failedCallback: Function, userContext: any)

Parameters

  • propertyNames: Array<string>
         A string array that contains the profile properties to save.
    
  • saveCompletedCallback: Function
         The function that is called when the save method has finished. The default is null.
    
  • failedCallback: Function
         The function that is called if the save method has failed. The default is null.
    
  • userContext: any
     User context information passed to the callback functions.
    

public static set_defaultFailedCallback(value: string)

Gets or sets the name of the default failure callback function.

Parameters

  • value: string
     A string that contains the name of the default failure callback function.
    

public static set_defaultLoadCompletedCallback(value: string)

Gets or sets the name of the default load-completed callback function.

Parameters

  • value: string
     A string that contains the name of the default load-completed callback function.
    

public static set_defaultSaveCompletedCallback(value: string)

Gets or sets the name of the default save-completed callback function.

Parameters

  • value: string
     A string that contains the name of the default save-completed callback function.
    

public static set_path(value: string)

Gets or sets the profile service path.

Parameters

  • value: string
         A string that contains the profile service path.
    

public static set_timeout(value: number)

Gets or sets the profile service time-out value. The timeout property represents the time in milliseconds that the current instance of the Sys.Net.WebRequestExecutor class should wait before timing out the request. By setting a time-out interval, you can make sure that a pending request returns based on a time interval that you specify, instead of waiting for the asynchronous communication layer to time out.

Parameters

  • value: number
         The time-out value in milliseconds.