After code cleanup
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
using System;
|
||||
using Interop.QBFC15;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Interop.QBFC15;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Collections;
|
||||
|
||||
namespace AyaNovaQBI
|
||||
{
|
||||
@@ -91,7 +90,7 @@ namespace AyaNovaQBI
|
||||
}
|
||||
|
||||
|
||||
public async static Task<bool> AuthenticateAsync(string login, string password = null)
|
||||
public static async Task<bool> AuthenticateAsync(string login, string password = null)
|
||||
{
|
||||
InitClient();
|
||||
|
||||
@@ -202,7 +201,7 @@ namespace AyaNovaQBI
|
||||
|
||||
|
||||
|
||||
public async static Task<ApiResponse> GetAsync(string route)
|
||||
public static async Task<ApiResponse> GetAsync(string route)
|
||||
{
|
||||
Exception FirstException = null;
|
||||
|
||||
@@ -224,7 +223,7 @@ namespace AyaNovaQBI
|
||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||
}
|
||||
|
||||
private async static Task<ApiResponse> TryGetAsync(string route)
|
||||
private static async Task<ApiResponse> TryGetAsync(string route)
|
||||
{
|
||||
var requestMessage = new HttpRequestMessage(HttpMethod.Get, ApiBaseUrl + route);
|
||||
|
||||
@@ -258,7 +257,7 @@ namespace AyaNovaQBI
|
||||
|
||||
|
||||
|
||||
public async static Task<ApiResponse> PostAsync(string route, dynamic d)
|
||||
public static async Task<ApiResponse> PostAsync(string route, dynamic d)
|
||||
{
|
||||
Exception FirstException = null;
|
||||
|
||||
@@ -280,7 +279,7 @@ namespace AyaNovaQBI
|
||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||
}
|
||||
|
||||
public async static Task<ApiResponse> PostAsync(string route, string s = null)
|
||||
public static async Task<ApiResponse> PostAsync(string route, string s = null)
|
||||
{
|
||||
Exception FirstException = null;
|
||||
|
||||
@@ -303,7 +302,7 @@ namespace AyaNovaQBI
|
||||
}
|
||||
|
||||
|
||||
internal async static Task<ApiResponse> TryPostAsync(string route, string postJson = null)
|
||||
internal static async Task<ApiResponse> TryPostAsync(string route, string postJson = null)
|
||||
{
|
||||
|
||||
var requestMessage = new HttpRequestMessage(HttpMethod.Post, ApiBaseUrl + route);
|
||||
@@ -367,7 +366,7 @@ namespace AyaNovaQBI
|
||||
|
||||
|
||||
|
||||
public async static Task<ApiResponse> PutAsync(string route, dynamic d)
|
||||
public static async Task<ApiResponse> PutAsync(string route, dynamic d)
|
||||
{
|
||||
Exception FirstException = null;
|
||||
|
||||
@@ -389,7 +388,7 @@ namespace AyaNovaQBI
|
||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||
}
|
||||
|
||||
public async static Task<ApiResponse> PutAsync(string route, string s = null)
|
||||
public static async Task<ApiResponse> PutAsync(string route, string s = null)
|
||||
{
|
||||
Exception FirstException = null;
|
||||
|
||||
@@ -411,7 +410,7 @@ namespace AyaNovaQBI
|
||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||
}
|
||||
|
||||
public async static Task<ApiResponse> PutAsync(string route)
|
||||
public static async Task<ApiResponse> PutAsync(string route)
|
||||
{
|
||||
Exception FirstException = null;
|
||||
|
||||
@@ -433,7 +432,7 @@ namespace AyaNovaQBI
|
||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||
}
|
||||
|
||||
public async static Task<ApiResponse> TryPutAsync(string route, string putJson = null)
|
||||
public static async Task<ApiResponse> TryPutAsync(string route, string putJson = null)
|
||||
{
|
||||
var requestMessage = new HttpRequestMessage(HttpMethod.Put, ApiBaseUrl + route);
|
||||
|
||||
@@ -1384,7 +1383,7 @@ namespace AyaNovaQBI
|
||||
/// gather info required for future
|
||||
/// transactions
|
||||
/// </summary>
|
||||
public async static Task<pfstat> QBValidate()
|
||||
public static async Task<pfstat> QBValidate()
|
||||
{
|
||||
// We want to know if we begun a session so we can end it if an
|
||||
// error happens
|
||||
@@ -1750,7 +1749,7 @@ namespace AyaNovaQBI
|
||||
/// Populate the cached qb data
|
||||
/// billable
|
||||
/// </summary>
|
||||
internal async static Task PopulateQBItemCacheAsync()
|
||||
internal static async Task PopulateQBItemCacheAsync()
|
||||
{
|
||||
if (_dtQBItems == null)
|
||||
{
|
||||
@@ -3144,7 +3143,7 @@ namespace AyaNovaQBI
|
||||
/// <summary>
|
||||
/// Populate the cached qb terms list data
|
||||
/// </summary>
|
||||
private async static Task PopulateQBTermsCache()
|
||||
private static async Task PopulateQBTermsCache()
|
||||
{
|
||||
if (_dtQBTerms == null)
|
||||
{
|
||||
@@ -3411,7 +3410,7 @@ namespace AyaNovaQBI
|
||||
#endregion QB api helper methods end
|
||||
|
||||
#region AyaNova cached lists
|
||||
public async static Task PopulateAyaListCache()
|
||||
public static async Task PopulateAyaListCache()
|
||||
{
|
||||
//Get the cached QB data
|
||||
Waiting w = new Waiting();
|
||||
@@ -5965,7 +5964,7 @@ namespace AyaNovaQBI
|
||||
#endregion qbi stuff (anything not api)
|
||||
|
||||
#region general utils
|
||||
static public void OpenWebURL(object oUrl)
|
||||
public static void OpenWebURL(object oUrl)
|
||||
{
|
||||
|
||||
if (oUrl == null) return;
|
||||
|
||||
Reference in New Issue
Block a user