Added logging + array based processing.

This commit is contained in:
Patrick Fic
2020-06-01 13:39:33 -07:00
parent db86d0bc55
commit 5c3160321b
8 changed files with 215 additions and 181 deletions

View File

@@ -76,7 +76,7 @@ namespace BodyshopPartner.ViewModels
_callingThread.ReportProgress(80);
Utils.HTTPServer.InitHttpServer();
Utils.HTTPServer.InitHttpServer(AddHttpStatus);
logger.Debug("VM Init Complete");
_callingThread.ReportProgress(100);
@@ -215,22 +215,29 @@ namespace BodyshopPartner.ViewModels
IndeterminateLoading = false;
}
public void AddHttpStatus(string s)
{
string newLine = $"\n{DateTime.Now.ToString("MM/dd/yy hh:mm:ss tt")}: {s}";
HttpServerLog += newLine;
logger.Trace(newLine);
}
private FirebaseAuthLink al = BodyshopPartner.Utils.Auth.authlink;
public async Task TestGql()
{
//Notification _n = new Notification()
//{
// Id = 123,
// Title = "This is a title",
// Subtitle = "Subtitle",
// Message = "Somethin"
//};
//Growler.AddNotification(_n);
Notification _n = new Notification()
{
Id = 123,
Title = "This is a title",
Subtitle = "Subtitle",
Message = "Somethin"
};
Growler.AddNotification(_n);
Console.WriteLine(al.FirebaseToken);
FirebaseAuthLink t = await al.GetFreshAuthAsync();
Console.WriteLine(t.FirebaseToken);
AddHttpStatus(t.FirebaseToken);
//var r = new GraphQLRequest
//{
// Query = @"query MyQuery($key: String!) {

View File

@@ -48,5 +48,12 @@ namespace BodyshopPartner.ViewModels
get { return _activeShop; }
set { SetProperty(ref _activeShop, value); Task.Run(async () => await SetActiveBodyshop()); }
}
private string _httpServerLog = "Status Log\nNewLine\n";
public string HttpServerLog
{
get { return _httpServerLog; }
set { SetProperty(ref _httpServerLog, value); }
}
}
}