public Int32 GetMachinesCount(string NWIP, string WWIP, string JQRT, string GLY, string ZG) { if (NWIP != null && SqlInjection.GetString(NWIP)) { return(-1); } if (WWIP != null && SqlInjection.GetString(WWIP)) { return(-1); } if (JQRT != null && SqlInjection.GetString(JQRT)) { return(-1); } if (GLY != null && SqlInjection.GetString(GLY)) { return(-1); } if (ZG != null && SqlInjection.GetString(ZG)) { return(-1); } if (machinesDal == null) { machinesDal = baseDal as IMachines; } return(machinesDal.GetMachinesCount(NWIP, WWIP, JQRT, GLY, ZG)); }
/// <summary> /// Edits a machine based on its key. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Write. /// /// Required permissions: Machines.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MachineDto> PutByIdAsync(this IMachines operations, long key, MachineDto body = default(MachineDto), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PutByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a single machine based on its key. /// </summary> /// <remarks> /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='expand'> /// Expands related entities inline. /// </param> /// <param name='select'> /// Selects which properties to include in the response. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MachineDto> GetByIdAsync(this IMachines operations, long id, string expand = default(string), string select = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetByIdWithHttpMessagesAsync(id, expand, select, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Edits a machine based on its key. /// </summary> /// <remarks> /// Required permissions: Machines.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='machineDto'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MachineDto> PutByIdAsync(this IMachines operations, long id, MachineDto machineDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.PutByIdWithHttpMessagesAsync(id, machineDto, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public List <MachinesInfo> GetMachines(string NWIP, string WWIP, string JQRT, string GLY, string ZG, PagerInfo info) { if (NWIP != null && SqlInjection.GetString(NWIP)) { return(null); } if (WWIP != null && SqlInjection.GetString(WWIP)) { return(null); } if (JQRT != null && SqlInjection.GetString(JQRT)) { return(null); } if (GLY != null && SqlInjection.GetString(GLY)) { return(null); } if (ZG != null && SqlInjection.GetString(ZG)) { return(null); } if (machinesDal == null) { machinesDal = baseDal as IMachines; } return(machinesDal.GetMachines(NWIP, WWIP, JQRT, GLY, ZG, info)); }
/// <summary> /// Gets machines. /// </summary> /// <remarks> /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Expands related entities inline. /// </param> /// <param name='filter'> /// Filters the results, based on a Boolean condition. /// </param> /// <param name='select'> /// Selects which properties to include in the response. /// </param> /// <param name='orderby'> /// Sorts the results. /// </param> /// <param name='top'> /// Returns only the first n results. /// </param> /// <param name='skip'> /// Skips the first n results. /// </param> /// <param name='count'> /// Includes a count of the matching results in the response. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataResponseListMachineDto> GetMachinesAsync(this IMachines operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetMachinesWithHttpMessagesAsync(expand, filter, select, orderby, top, skip, count, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public Int32 ModMachine(MachinesInfo machine) { if (machinesDal == null) { machinesDal = baseDal as IMachines; } return(machinesDal.ModMachine(machine)); }
public DomainContext( IMachines machines, IMeters meters, IMonitors monitors) { Machines = machines.Guard(nameof(machines)); Meters = meters.Guard(nameof(meters)); Monitors = monitors.Guard(nameof(monitors)); }
public DataTable GetZG(string key) { // 检查一下key是否含有不合法的字符串 if (SqlInjection.GetString(key)) { return(null); } if (machinesDal == null) { machinesDal = baseDal as IMachines; } return(machinesDal.GetZG(key)); }
/// <summary> /// Deletes a machine based on its key. /// </summary> /// <remarks> /// Required permissions: Machines.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='ifMatch'> /// If-Match header /// </param> public static void DeleteById(this IMachines operations, long id, string ifMatch = default(string)) { operations.DeleteByIdAsync(id, ifMatch).GetAwaiter().GetResult(); }
/// <summary> /// Deletes a machine based on its key. /// </summary> /// <remarks> /// Required permissions: Machines.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='ifMatch'> /// If-Match header /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteByIdAsync(this IMachines operations, long id, string ifMatch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.DeleteByIdWithHttpMessagesAsync(id, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Edits a machine based on its key. /// </summary> /// <remarks> /// Required permissions: Machines.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='machineDto'> /// </param> public static MachineDto PutById(this IMachines operations, long id, MachineDto machineDto) { return(operations.PutByIdAsync(id, machineDto).GetAwaiter().GetResult()); }
/// <summary> /// Partially updates a machine. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Write. /// /// Required permissions: Machines.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> /// <param name='body'> /// </param> public static void PatchById(this IMachines operations, long key, MachineDto body = default(MachineDto)) { operations.PatchByIdAsync(key, body).GetAwaiter().GetResult(); }
/// <summary> /// Gets runtimes for the specified folder /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Read. /// /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='folderId'> /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='filter'> /// Restricts the set of items returned. The maximum number of expressions is /// 100. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='orderby'> /// Specifies the order in which items are returned. The maximum number of /// expressions is 5. /// </param> /// <param name='count'> /// Indicates whether the total count of items within a collection are returned /// in the result. /// </param> public static ODataValueOfIEnumerableOfMachineRuntimeDto GetRuntimesForFolderByFolderid(this IMachines operations, long folderId, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), bool?count = default(bool?)) { return(operations.GetRuntimesForFolderByFolderidAsync(folderId, expand, filter, select, orderby, count).GetAwaiter().GetResult()); }
/// <summary> /// Partially updates a machine. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Write. /// /// Required permissions: Machines.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PatchByIdAsync(this IMachines operations, long key, MachineDto body = default(MachineDto), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.PatchByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes multiple machines based on their keys. /// </summary> /// <remarks> /// Required permissions: Machines.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='machinesDeleteBulk'> /// </param> public static void DeleteBulk(this IMachines operations, MachinesDeleteBulk machinesDeleteBulk) { operations.DeleteBulkAsync(machinesDeleteBulk).GetAwaiter().GetResult(); }
/// <summary> /// Gets machines. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Read. /// /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='filter'> /// Restricts the set of items returned. The maximum number of expressions is /// 100. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='orderby'> /// Specifies the order in which items are returned. The maximum number of /// expressions is 5. /// </param> /// <param name='top'> /// Limits the number of items returned from a collection. The maximum value is /// 1000. /// </param> /// <param name='skip'> /// Excludes the specified number of items of the queried collection from the /// result. /// </param> /// <param name='count'> /// Indicates whether the total count of items within a collection are returned /// in the result. /// </param> public static ODataValueOfIEnumerableOfExtendedMachineDto Get(this IMachines operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?)) { return(operations.GetAsync(expand, filter, select, orderby, top, skip, count).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a machine based on its key. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Write. /// /// Required permissions: Machines.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteByIdAsync(this IMachines operations, long key, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteByIdWithHttpMessagesAsync(key, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a machine based on its key. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Write. /// /// Required permissions: Machines.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> public static void DeleteById(this IMachines operations, long key) { operations.DeleteByIdAsync(key).GetAwaiter().GetResult(); }
/// <summary> /// Deletes multiple machines based on their keys. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Write. /// /// Required permissions: Machines.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static void DeleteBulk(this IMachines operations, MachineDeleteBulkRequest body = default(MachineDeleteBulkRequest)) { operations.DeleteBulkAsync(body).GetAwaiter().GetResult(); }
/// <summary> /// Gets runtimes for the specified folder /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Read. /// /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='folderId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataValueIEnumerableMachineRuntimeDto> GetRuntimesForFolderByFolderidAsync(this IMachines operations, long folderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetRuntimesForFolderByFolderidWithHttpMessagesAsync(folderId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets runtimes for the specified folder /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Read. /// /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='folderId'> /// </param> public static ODataValueIEnumerableMachineRuntimeDto GetRuntimesForFolderByFolderid(this IMachines operations, long folderId) { return(operations.GetRuntimesForFolderByFolderidAsync(folderId).GetAwaiter().GetResult()); }
/// <summary> /// Partially updates a machine. /// </summary> /// <remarks> /// Required permissions: Machines.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='machineDto'> /// </param> public static void PatchById(this IMachines operations, long id, MachineDto machineDto) { operations.PatchByIdAsync(id, machineDto).GetAwaiter().GetResult(); }
/// <summary> /// Gets machines. /// </summary> /// <remarks> /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Expands related entities inline. /// </param> /// <param name='filter'> /// Filters the results, based on a Boolean condition. /// </param> /// <param name='select'> /// Selects which properties to include in the response. /// </param> /// <param name='orderby'> /// Sorts the results. /// </param> /// <param name='top'> /// Returns only the first n results. /// </param> /// <param name='skip'> /// Skips the first n results. /// </param> /// <param name='count'> /// Includes a count of the matching results in the response. /// </param> public static ODataResponseListMachineDto GetMachines(this IMachines operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?)) { return(operations.GetMachinesAsync(expand, filter, select, orderby, top, skip, count).GetAwaiter().GetResult()); }
/// <summary> /// Partially updates a machine. /// </summary> /// <remarks> /// Required permissions: Machines.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='machineDto'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PatchByIdAsync(this IMachines operations, long id, MachineDto machineDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.PatchByIdWithHttpMessagesAsync(id, machineDto, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets runtimes for the specified folder /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Read. /// /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='folderId'> /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='filter'> /// Restricts the set of items returned. The maximum number of expressions is /// 100. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='orderby'> /// Specifies the order in which items are returned. The maximum number of /// expressions is 5. /// </param> /// <param name='count'> /// Indicates whether the total count of items within a collection are returned /// in the result. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataValueOfIEnumerableOfMachineRuntimeDto> GetRuntimesForFolderByFolderidAsync(this IMachines operations, long folderId, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), bool?count = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetRuntimesForFolderByFolderidWithHttpMessagesAsync(folderId, expand, filter, select, orderby, count, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes multiple machines based on their keys. /// </summary> /// <remarks> /// Required permissions: Machines.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='machinesDeleteBulk'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteBulkAsync(this IMachines operations, MachinesDeleteBulk machinesDeleteBulk, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.DeleteBulkWithHttpMessagesAsync(machinesDeleteBulk, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Creates a new machine. /// </summary> /// <remarks> /// Required permissions: Machines.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='machineDto'> /// </param> public static MachineDto Post(this IMachines operations, MachineDto machineDto) { return(operations.PostAsync(machineDto).GetAwaiter().GetResult()); }
/// <summary> /// Gets a single machine based on its key. /// </summary> /// <remarks> /// Required permissions: Machines.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='expand'> /// Expands related entities inline. /// </param> /// <param name='select'> /// Selects which properties to include in the response. /// </param> public static MachineDto GetById(this IMachines operations, long id, string expand = default(string), string select = default(string)) { return(operations.GetByIdAsync(id, expand, select).GetAwaiter().GetResult()); }
/// <summary> /// Deletes multiple machines based on their keys. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Write. /// /// Required permissions: Machines.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteBulkAsync(this IMachines operations, MachineDeleteBulkRequest body = default(MachineDeleteBulkRequest), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteBulkWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }