-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed error when calling bad Azure url.
- Loading branch information
Showing
8 changed files
with
93 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using SevenDays.Core.Interfaces; | ||
|
||
namespace SevenDays.Core.Helpers | ||
{ | ||
public class Logger : ILogger | ||
{ | ||
public void LogException(Exception exception) | ||
{ | ||
Xamarin.Insights.Report(exception); | ||
} | ||
|
||
public void Track(string trackIdentifier) | ||
{ | ||
Xamarin.Insights.Track(trackIdentifier); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SevenDays.Core.Interfaces | ||
{ | ||
public interface ILogger | ||
{ | ||
void LogException(Exception exception); | ||
void Track(string trackIdentifier); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using SevenDays.Core.Interfaces; | ||
|
||
namespace SevenDays.Tests.Shared | ||
{ | ||
public class LoggerMock : ILogger | ||
{ | ||
public void LogException(Exception exception) | ||
{ | ||
if (exception != null) | ||
{ | ||
System.Diagnostics.Debug.WriteLine(exception.Message); | ||
while (exception.InnerException != null) | ||
{ | ||
exception = exception.InnerException; | ||
System.Diagnostics.Debug.WriteLine(exception.Message); | ||
} | ||
} | ||
} | ||
|
||
public void Track(string trackIdentifier) | ||
{ | ||
System.Diagnostics.Debug.WriteLine($"Tracked: {trackIdentifier}"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters