Class ClientFactory
Creates instances of the client according to the configuration
Inheritance
Implements
Inherited Members
Namespace: ImageVault.Client
Assembly: ImageVault.Client.dll
Syntax
public class ClientFactory : IServiceFactory
Constructors
ClientFactory()
Declaration
public ClientFactory()
Properties
Instance
Gets the current configured ClientFactory
Declaration
public static IClientFactory Instance { get; set; }
Property Value
Type | Description |
---|---|
IClientFactory |
SdkPublishIdentifier
Get/Sets the SdkPublishIdentifier that should be used with all SdkClients Works with multiple sites (EPi 7.5) using a dictionary and the SdkPublishIdentifierGenerator
Declaration
public static string SdkPublishIdentifier { get; set; }
Property Value
Type | Description |
---|---|
System.String | If value is null, then the configured value in the PublishingIdentifier is used. |
SdkPublishIdentifierGenerator
Get/Sets the SdkPublishIdentifierGenerator of the ClientFactory Required to distinguish between different site instances in a EPi 7.5 multi site scenario
Declaration
public static Func<string> SdkPublishIdentifierGenerator { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.String> | Sets a function that calculates the SdkPublishIdentifier |
Remarks
Will take precedence over the SdkPublishIdentifier. This must be set to null if the value in the SdkPublishIdentifier should work.
Methods
GetCurrentUserClient()
Gets a client that act as the current user
Declaration
public static Client GetCurrentUserClient()
Returns
Type | Description |
---|---|
Client |
GetSdkClient()
Gets the direct sdk client
Declaration
public static Client GetSdkClient()
Returns
Type | Description |
---|---|
Client |
Remarks
If SdkPublishIdentifier is changed, this must be called again to reflect the update.
GetService(Type)
Gets the ImageVault service of the specified type
Declaration
public object GetService(Type serviceType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | serviceType | The interface defining the service to get. See ImageVault.Common.Services for supported interfaces |
Returns
Type | Description |
---|---|
System.Object | The proxy class for communicating with the service |
GetService<T>()
Gets the ImageVault service of the specified type
Declaration
public T GetService<T>()
where T : IService
Returns
Type | Description |
---|---|
T | The proxy class for communicating with the service |
Type Parameters
Name | Description |
---|---|
T | The interface defining the service to get. See ImageVault.Common.Services for supported interfaces |