コード例 #1
0
 /// <summary>
 /// Retrieves the schema of custom fields of the entity from the system.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetAdHocSchemaAsync(this IARQueryOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAdHocSchemaWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Creates a record or updates an existing record.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='entity'>
 /// The record to be passed to the system.
 /// </param>
 /// <param name='select'>
 /// The fields of the entity to be returned from the system.
 /// </param>
 /// <param name='filter'>
 /// The conditions that determine which records should be selected from the
 /// system.
 /// </param>
 /// <param name='expand'>
 /// The linked and detail entities that should be expanded.
 /// </param>
 /// <param name='custom'>
 /// The fields that are not defined in the contract of the endpoint to be
 /// returned from the system.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> PutEntityAsync(this IARQueryOperations operations, ARQuery entity, string select = default(string), string filter = default(string), string expand = default(string), string custom = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PutEntityWithHttpMessagesAsync(entity, select, filter, expand, custom, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// Attaches a file to a record.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ids'>
 /// The values of the key fields of the record.
 /// </param>
 /// <param name='filename'>
 /// The name of the file that you are going to attach with the extension.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> PutFileAsync(this IARQueryOperations operations, IList <string> ids, string filename, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PutFileWithHttpMessagesAsync(ids, filename, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 /// <summary>
 /// Retrieves records that satisfy the specified conditions from the system.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='select'>
 /// The fields of the entity to be returned from the system.
 /// </param>
 /// <param name='filter'>
 /// The conditions that determine which records should be selected from the
 /// system.
 /// </param>
 /// <param name='expand'>
 /// The linked and detail entities that should be expanded.
 /// </param>
 /// <param name='custom'>
 /// The fields that are not defined in the contract of the endpoint to be
 /// returned from the system.
 /// </param>
 /// <param name='skip'>
 /// The number of records to be skipped from the list of returned records.
 /// </param>
 /// <param name='top'>
 /// The number of records to be returned from the system.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetListAsync(this IARQueryOperations operations, string select = default(string), string filter = default(string), string expand = default(string), string custom = default(string), int?skip = default(int?), int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetListWithHttpMessagesAsync(select, filter, expand, custom, skip, top, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #5
0
 /// <summary>
 /// Deletes the record by its session identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The session ID of the record.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> DeleteByIdAsync(this IARQueryOperations operations, Guid id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #6
0
 /// <summary>
 /// Retrieves a record by the values of its key fields from the system.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ids'>
 /// The values of the key fields of the record.
 /// </param>
 /// <param name='select'>
 /// The fields of the entity to be returned from the system.
 /// </param>
 /// <param name='filter'>
 /// The conditions that determine which records should be selected from the
 /// system.
 /// </param>
 /// <param name='expand'>
 /// The linked and detail entities that should be expanded.
 /// </param>
 /// <param name='custom'>
 /// The fields that are not defined in the contract of the endpoint to be
 /// returned from the system.
 /// </param>
 public static object GetByKeys(this IARQueryOperations operations, IList <string> ids, string select = default(string), string filter = default(string), string expand = default(string), string custom = default(string))
 {
     return(Task.Factory.StartNew(s => ((IARQueryOperations)s).GetByKeysAsync(ids, select, filter, expand, custom), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #7
0
 /// <summary>
 /// Retrieves records that satisfy the specified conditions from the system.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='select'>
 /// The fields of the entity to be returned from the system.
 /// </param>
 /// <param name='filter'>
 /// The conditions that determine which records should be selected from the
 /// system.
 /// </param>
 /// <param name='expand'>
 /// The linked and detail entities that should be expanded.
 /// </param>
 /// <param name='custom'>
 /// The fields that are not defined in the contract of the endpoint to be
 /// returned from the system.
 /// </param>
 /// <param name='skip'>
 /// The number of records to be skipped from the list of returned records.
 /// </param>
 /// <param name='top'>
 /// The number of records to be returned from the system.
 /// </param>
 public static object GetList(this IARQueryOperations operations, string select = default(string), string filter = default(string), string expand = default(string), string custom = default(string), int?skip = default(int?), int?top = default(int?))
 {
     return(Task.Factory.StartNew(s => ((IARQueryOperations)s).GetListAsync(select, filter, expand, custom, skip, top), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #8
0
 /// <summary>
 /// Attaches a file to a record.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ids'>
 /// The values of the key fields of the record.
 /// </param>
 /// <param name='filename'>
 /// The name of the file that you are going to attach with the extension.
 /// </param>
 public static object PutFile(this IARQueryOperations operations, IList <string> ids, string filename)
 {
     return(Task.Factory.StartNew(s => ((IARQueryOperations)s).PutFileAsync(ids, filename), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #9
0
 /// <summary>
 /// Retrieves the schema of custom fields of the entity from the system.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static object GetAdHocSchema(this IARQueryOperations operations)
 {
     return(Task.Factory.StartNew(s => ((IARQueryOperations)s).GetAdHocSchemaAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #10
0
 /// <summary>
 /// Deletes the record by its session identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The session ID of the record.
 /// </param>
 public static object DeleteById(this IARQueryOperations operations, Guid id)
 {
     return(Task.Factory.StartNew(s => ((IARQueryOperations)s).DeleteByIdAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }