Class Client
Defines the client connection proxy to use when communicating with Core
Inheritance
Implements
Inherited Members
Namespace: ImageVault.Client
Assembly: ImageVault.Client.dll
Syntax
public class Client : IClient
Constructors
Client(ClientConfigurationSection)
Initializes a new instance of the Client class.
Declaration
public Client(ClientConfigurationSection config)
Parameters
Type | Name | Description |
---|---|---|
ClientConfigurationSection | config |
Client(IClientChannelFactory)
Initializes a new instance of the Client class.
Declaration
public Client(IClientChannelFactory clientChannelFactory = null)
Parameters
Type | Name | Description |
---|---|---|
IClientChannelFactory | clientChannelFactory | [Optional] the IClientChannelFactory to use. |
Properties
ClientChannelFactory
Gets the ClientChannelFactory of the Client
Declaration
public IClientChannelFactory ClientChannelFactory { get; }
Property Value
Type | Description |
---|---|
IClientChannelFactory |
Cookies
Cookies to append to each call to the server
Declaration
public IDictionary<string, string> Cookies { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
Remarks
Can be used to direct calls to a specific azure service instance by using the ARRAffinity cookie and supplying the instance Name as cookie value
PublishIdentifier
Get/Sets the PublishIdentifier of the Client
Declaration
public string PublishIdentifier { get; set; }
Property Value
Type | Description |
---|---|
System.String | Defines the publish identifier to use |
SendTimeout
Gets or sets the interval of time provided for a write operation to complete before the transport raises an exception.
Declaration
[Obsolete("Use Timeout instead")]
public TimeSpan? SendTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.TimeSpan> | If null, the default value of the binding will be used |
Timeout
Get/Sets the Timeout of the IClient
Declaration
public int? Timeout { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The number of milliseconds to wait before the request times out. The default value is 100,000 milliseconds (100 seconds). If set to null, the default value will be used. |
Methods
CreateChannel<T>()
Creates a channel to a service
Declaration
public virtual T CreateChannel<T>()
Returns
Type | Description |
---|---|
T | The proxy channel to use for calling the service |
Type Parameters
Name | Description |
---|---|
T | The type of the contract interface to call |
Get(String)
Performs a GET REST request
Declaration
public dynamic Get(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Returns
Type | Description |
---|---|
System.Object |
Get<T>(String)
Performs a GET REST request
Declaration
public T Get<T>(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Get<T>(String, NameValueCollection)
Performs a GET REST request
Declaration
public T Get<T>(string path, NameValueCollection parameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.Collections.Specialized.NameValueCollection | parameters |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Load<T>(IEnumerable<Int32>)
Loads a set of specific items from ImageVault
Declaration
public IIVQueryable<T> Load<T>(IEnumerable<int> ids)
where T : IItem<int>
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Int32> | ids | The System.Collections.Generic.IEnumerable<T> of id of the items to load |
Returns
Type | Description |
---|---|
IIVQueryable<T> | The matching objects from IV core |
Type Parameters
Name | Description |
---|---|
T | The type of item to load (must be an IItem<T> of int. |
Load<T>(Int32)
Loads a specific item from ImageVault
Declaration
public IIVQueryable<T> Load<T>(int id)
where T : IItem<int>
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The id of the item |
Returns
Type | Description |
---|---|
IIVQueryable<T> | The matching objects from IV core |
Type Parameters
Name | Description |
---|---|
T | The type of item to load (must be an IItem<T> of int. |
Post(String, Object)
Performs a POST REST request
Declaration
public dynamic Post(string path, object arg)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.Object | arg |
Returns
Type | Description |
---|---|
System.Object |
Post<T>(String, Object)
Performs a POST REST request
Declaration
public T Post<T>(string path, object arg)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.Object | arg |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Query<T>()
Queries the client for items using linq syntax.
Declaration
public IIVQueryable<T> Query<T>()
Returns
Type | Description |
---|---|
IIVQueryable<T> | The matching objects from IV core |
Type Parameters
Name | Description |
---|---|
T | The type of object to get. |
Remarks
Now supports MediaItem (and subclasses) MetadataDefinition
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | If requesting types that is not yet implemented in the linq query provider. |
Store<T>(T)
Stores the supplied item in ImageVault
Declaration
public void Store<T>(T item)
where T : class
Parameters
Type | Name | Description |
---|---|---|
T | item |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | If store of |