Search Results for

    Show / Hide Table of Contents

    Class TasksClient

    Inheritance
    System.Object
    TasksClient
    Implements
    ITasksClient
    Namespace: FastReport.Cloud.Client
    Assembly: FastReport.Cloud.SDK.dll
    Syntax
    public class TasksClient : object, ITasksClient

    Constructors

    TasksClient(System.Net.Http.HttpClient)

    Declaration
    public TasksClient(System.Net.Http.HttpClient httpClient)
    Parameters
    Type Name Description
    System.Net.Http.HttpClient httpClient

    Properties

    JsonSerializerSettings

    Declaration
    protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
    Property Value
    Type Description
    Newtonsoft.Json.JsonSerializerSettings

    PrepareRequestCallback

    Declaration
    public Action<System.Net.Http.HttpClient, System.Net.Http.HttpRequestMessage, string> PrepareRequestCallback { get; set; }
    Property Value
    Type Description
    Action<System.Net.Http.HttpClient, System.Net.Http.HttpRequestMessage, System.String>

    ReadResponseAsString

    Declaration
    public bool ReadResponseAsString { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    CreateTask(CreateTaskBaseVM)

    Create a new task

    Declaration
    public virtual TaskBaseVM CreateTask(CreateTaskBaseVM body = null)
    Parameters
    Type Name Description
    CreateTaskBaseVM body

    task's view model. You have to specify task type by placing parameter "$t": "Vm name",
    this parameters always must be on the first place

    Returns
    Type Description
    TaskBaseVM

    Task was created

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    CreateTaskAsync(CreateTaskBaseVM, System.Threading.CancellationToken)

    Create a new task

    Declaration
    public virtual async System.Threading.Tasks.Task<TaskBaseVM> CreateTaskAsync(CreateTaskBaseVM body = null, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    CreateTaskBaseVM body

    task's view model. You have to specify task type by placing parameter "$t": "Vm name",
    this parameters always must be on the first place

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaskBaseVM>

    Task was created

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    DeleteTask(String)

    Delete a task from a storage

    Declaration
    public virtual void DeleteTask(string taskId)
    Parameters
    Type Name Description
    System.String taskId

    deleting task id

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    DeleteTaskAsync(String, System.Threading.CancellationToken)

    Delete a task from a storage

    Declaration
    public virtual async System.Threading.Tasks.Task DeleteTaskAsync(string taskId, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String taskId

    deleting task id

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task was deleted

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    Get(String)

    Get a task by a specified id

    Declaration
    public virtual TaskBaseVM Get(string taskId)
    Parameters
    Type Name Description
    System.String taskId

    a task id

    Returns
    Type Description
    TaskBaseVM

    Task was found

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    GetAsync(String, System.Threading.CancellationToken)

    Get a task by a specified id

    Declaration
    public virtual async System.Threading.Tasks.Task<TaskBaseVM> GetAsync(string taskId, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String taskId

    a task id

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaskBaseVM>

    Task was found

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    GetList(Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, String, Nullable<TaskType>)

    Get tasks list

    Declaration
    public virtual TasksVM GetList(int? skip = null, int? take = null, bool? useProjection = null, string subscriptionId = null, string searchPattern = null, TaskType? taskType = null)
    Parameters
    Type Name Description
    System.Nullable<System.Int32> skip

    number of tasks, that have to be skipped

    System.Nullable<System.Int32> take

    number of tasks, that have to be returned

    System.Nullable<System.Boolean> useProjection

    use projection with only id and name

    System.String subscriptionId

    subscription id

    System.String searchPattern
    System.Nullable<TaskType> taskType

    bit flag for types

    Returns
    Type Description
    TasksVM

    Tasks were found

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    GetListAsync(Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, String, Nullable<TaskType>, System.Threading.CancellationToken)

    Get tasks list

    Declaration
    public virtual async System.Threading.Tasks.Task<TasksVM> GetListAsync(int? skip = null, int? take = null, bool? useProjection = null, string subscriptionId = null, string searchPattern = null, TaskType? taskType = null, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.Nullable<System.Int32> skip

    number of tasks, that have to be skipped

    System.Nullable<System.Int32> take

    number of tasks, that have to be returned

    System.Nullable<System.Boolean> useProjection

    use projection with only id and name

    System.String subscriptionId

    subscription id

    System.String searchPattern
    System.Nullable<TaskType> taskType

    bit flag for types

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TasksVM>

    Tasks were found

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    GetMyPermissions(String)

    Get current user's permissions to Task

    Declaration
    public virtual TaskPermissionCRUDVM GetMyPermissions(string id)
    Parameters
    Type Name Description
    System.String id

    task id

    Returns
    Type Description
    TaskPermissionCRUDVM

    got permissions successfully

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    GetMyPermissionsAsync(String, System.Threading.CancellationToken)

    Get current user's permissions to Task

    Declaration
    public virtual async System.Threading.Tasks.Task<TaskPermissionCRUDVM> GetMyPermissionsAsync(string id, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String id

    task id

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaskPermissionCRUDVM>

    got permissions successfully

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    GetPermissions(String)

    Get all Task permissions

    Declaration
    public virtual TaskPermissionsVM GetPermissions(string id)
    Parameters
    Type Name Description
    System.String id

    task id

    Returns
    Type Description
    TaskPermissionsVM

    Task was found

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    GetPermissionsAsync(String, System.Threading.CancellationToken)

    Get all Task permissions

    Declaration
    public virtual async System.Threading.Tasks.Task<TaskPermissionsVM> GetPermissionsAsync(string id, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String id

    task id

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaskPermissionsVM>

    Task was found

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage, System.Collections.Generic.IReadOnlyDictionary<String, System.Collections.Generic.IEnumerable<String>>, System.Threading.CancellationToken)

    Declaration
    protected virtual async System.Threading.Tasks.Task<TasksClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Net.Http.HttpResponseMessage response
    System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>> headers
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<TasksClient.ObjectResponseResult<T>>
    Type Parameters
    Name Description
    T

    RenameTask(String, String)

    Rename a task

    Declaration
    public virtual TaskBaseVM RenameTask(string taskId, string newName = null)
    Parameters
    Type Name Description
    System.String taskId

    renaming task id

    System.String newName

    task's new Name

    Returns
    Type Description
    TaskBaseVM

    Task was found

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    RenameTaskAsync(String, String, System.Threading.CancellationToken)

    Rename a task

    Declaration
    public virtual async System.Threading.Tasks.Task<TaskBaseVM> RenameTaskAsync(string taskId, string newName = null, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String taskId

    renaming task id

    System.String newName

    task's new Name

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaskBaseVM>

    Task was found

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    RunTask(RunTaskBaseVM)

    Run a task from request body

    Declaration
    public virtual TaskMessageIdVM RunTask(RunTaskBaseVM body = null)
    Parameters
    Type Name Description
    RunTaskBaseVM body

    task's view model. You have to specify task type by placing parameter "$t": "Vm name",
    this parameters always must be on the first place

    Returns
    Type Description
    TaskMessageIdVM

    Task was executed

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    RunTaskAsync(RunTaskBaseVM, System.Threading.CancellationToken)

    Run a task from request body

    Declaration
    public virtual async System.Threading.Tasks.Task<TaskMessageIdVM> RunTaskAsync(RunTaskBaseVM body = null, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    RunTaskBaseVM body

    task's view model. You have to specify task type by placing parameter "$t": "Vm name",
    this parameters always must be on the first place

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaskMessageIdVM>

    Task was executed

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    RunTaskById(String)

    Run a task by id

    Declaration
    public virtual TaskMessageIdVM RunTaskById(string taskId)
    Parameters
    Type Name Description
    System.String taskId

    task id

    Returns
    Type Description
    TaskMessageIdVM

    Task was executed

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    RunTaskByIdAsync(String, System.Threading.CancellationToken)

    Run a task by id

    Declaration
    public virtual async System.Threading.Tasks.Task<TaskMessageIdVM> RunTaskByIdAsync(string taskId, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String taskId

    task id

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaskMessageIdVM>

    Task was executed

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    UpdatePermissions(String, UpdateTaskPermissionsVM)

    Update permissions

    Declaration
    public virtual void UpdatePermissions(string id, UpdateTaskPermissionsVM body = null)
    Parameters
    Type Name Description
    System.String id

    task id

    UpdateTaskPermissionsVM body

    new permissions. You have to specify VM type by placing parameter "$t": "Vm name",
    this parameters always must be on first place

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    UpdatePermissionsAsync(String, UpdateTaskPermissionsVM, System.Threading.CancellationToken)

    Update permissions

    Declaration
    public virtual async System.Threading.Tasks.Task UpdatePermissionsAsync(string id, UpdateTaskPermissionsVM body = null, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String id

    task id

    UpdateTaskPermissionsVM body

    new permissions. You have to specify VM type by placing parameter "$t": "Vm name",
    this parameters always must be on first place

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task was updated

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    UpdateTask(String, UpdateTaskBaseVM)

    Update a task

    Declaration
    public virtual TaskBaseVM UpdateTask(string taskId, UpdateTaskBaseVM body = null)
    Parameters
    Type Name Description
    System.String taskId

    updating task id

    UpdateTaskBaseVM body

    task's view model. You have to specify task type by placing parameter "$t": "Vm name",
    this parameters always must be on first place

    Returns
    Type Description
    TaskBaseVM

    Success

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    UpdateTaskAsync(String, UpdateTaskBaseVM, System.Threading.CancellationToken)

    Update a task

    Declaration
    public virtual async System.Threading.Tasks.Task<TaskBaseVM> UpdateTaskAsync(string taskId, UpdateTaskBaseVM body = null, System.Threading.CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String taskId

    updating task id

    UpdateTaskBaseVM body

    task's view model. You have to specify task type by placing parameter "$t": "Vm name",
    this parameters always must be on first place

    System.Threading.CancellationToken cancellationToken

    A cancellation token that can be used by other objects or threads to receive notice of cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaskBaseVM>

    Success

    Exceptions
    Type Condition
    ApiException

    A server side error occurred.

    Implements

    ITasksClient
    Back to top 2025.2.5 © 1998-2025 Copyright Fast Reports Inc.