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
[{"MachineId":"iPhone1,1","Name":"iPhone 1G"},{"MachineId":"iPhone1,2","Name":"iPhone 3G"},{"MachineId":"iPhone2,1","Name":"iPhone 3GS"},{"MachineId":"iPhone3,1","Name":"iPhone 4"},{"MachineId":"iPhone3,2","Name":"Verizon iPhone 4"},{"MachineId":"iPhone4,1","Name":"iPhone 4S"},{"MachineId":"iPhone5,1","Name":"iPhone 5"},{"MachineId":"iPhone5,2","Name":"iPhone 5"},{"MachineId":"iPhone5,3","Name":"iPhone 5C"},{"MachineId":"iPhone5,4","Name":"iPhone 5C"},{"MachineId":"iPhone6,1","Name":"iPhone 5S"},{"MachineId":"iPhone6,2","Name":"iPhone 5S"},{"MachineId":"iPhone7,1","Name":"iPhone 6 Plus"},{"MachineId":"iPhone7,2","Name":"iPhone 6"},{"MachineId":"iPhone8,1","Name":"iPhone 6s"},{"MachineId":"iPhone8,2","Name":"iPhone 6s Plus"},{"MachineId":"iPhone8,4","Name":"iPhone SE"},{"MachineId":"iPhone9,1","Name":"iPhone 7"},{"MachineId":"iPhone9,3","Name":"iPhone 7"},{"MachineId":"iPhone9,2","Name":"iPhone 7 Plus"},{"MachineId":"iPhone9,4","Name":"iPhone 7 Plus"},{"MachineId":"iPhone10,1","Name":"iPhone 8"},{"MachineId":" |
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
{"iPhone1,1":"iPhone 1G","iPhone1,2":"iPhone 3G","iPhone2,1":"iPhone 3GS","iPhone3,1":"iPhone 4","iPhone3,2":"Verizon iPhone 4","iPhone4,1":"iPhone 4S","iPhone5,1":"iPhone 5","iPhone5,2":"iPhone 5","iPhone5,3":"iPhone 5C","iPhone5,4":"iPhone 5C","iPhone6,1":"iPhone 5S","iPhone6,2":"iPhone 5S","iPhone7,1":"iPhone 6 Plus","iPhone7,2":"iPhone 6","iPhone8,1":"iPhone 6s","iPhone8,2":"iPhone 6s Plus","iPhone8,4":"iPhone SE","iPhone9,1":"iPhone 7","iPhone9,3":"iPhone 7","iPhone9,2":"iPhone 7 Plus","iPhone9,4":"iPhone 7 Plus","iPhone10,1":"iPhone 8","iPhone10,4":"iPhone 8","iPhone10,2":"iPhone 8 Plus","iPhone10,5":"iPhone 8 Plus","iPhone10,3":"iPhone X","iPhone10,6":"iPhone X","iPod1,1":"iPod Touch 1G","iPod2,1":"iPod Touch 2G","iPod3,1":"iPod Touch 3G","iPod4,1":"iPod Touch 4G","iPod5,1":"iPod Touch 5G","iPod7,1":"iPod Touch 6G","iPad1,1":"iPad","iPad2,1":"iPad 2 (WiFi)","iPad2,2":"iPad 2 (GSM)","iPad2,3":"iPad 2 (CDMA)","iPad2,4":"iPad 2 (32nm)","iPad2,5":"iPad mini (WiFi)","iPad2,6":"iPad mini (GSM)","iPad2,7":"iP |
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
public interface INetworkService | |
{ | |
Task<T> Retry<T>(Func<Task<T>> func, int retryCount, Func<Exception, int, Task> onRetry); | |
Task<T> WaitAndRetry<T>(Func<Task<T>> func, Func<int, TimeSpan> sleepDurationProvider, int retryCount, | |
Func<Exception, TimeSpan, Task> onRetryAsync); | |
} |
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
internal async Task<T> RetryInner<T>(Func<Task<T>> func, | |
int retryCount = 1, | |
Func<Exception, int, Task> onRetry = null) | |
{ | |
var onRetryInner = new Func<Exception, int, Task>((e, i) => | |
{ | |
return Task.Factory.StartNew(() => { | |
#if DEBUG | |
System.Diagnostics.Debug.WriteLine($"Retry #{i} due to exception '{(e.InnerException ?? e).Message}'"); | |
#endif |
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
internal async Task<T> RetryInner<T>(Func<Task<T>> func, | |
int retryCount, | |
Func<Exception, int, Task> onRetry) | |
{ | |
return await Policy | |
.Handle<Exception>() | |
.RetryAsync(retryCount, onRetry) | |
.ExecuteAsync<T>(func); | |
} |
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
internal async Task<T> WaitAndRetryInner<T>(Func<Task<T>> func, Func<int, TimeSpan> sleepDurationProvider, | |
int retryCount, | |
Func<Exception, TimeSpan, Task> onRetryAsync) | |
{ | |
return await Policy | |
.Handle<Exception>() | |
.WaitAndRetryAsync(retryCount, sleepDurationProvider, onRetryAsync) | |
.ExecuteAsync<T>(func); | |
} |
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
public class ApiService : IApiService | |
{ | |
readonly IClient _client; | |
readonly INetworkService _networkService; | |
public ApiService(IClient client, INetworkService networkService) | |
{ | |
_client = client; | |
_networkService = networkService; | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- File name extension must be .runsettings --> | |
<RunSettings> | |
<DataCollectionRunSettings> | |
<DataCollectors> | |
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |
<Configuration> | |
<CodeCoverage> | |
<!-- Match assembly file paths: --> |
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 script helps with ChaiOne timesheets in Mavenlink | |
# using Google sign in | |
# | |
# Params: | |
# email address | |
# password (base64 encoded) | |
# | |
# Usage: | |
# #\>python3 timesheethelper.py email@address.com base64Password | |
# |
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
// | |
// GO Snippets | |
// | |
// Written by Hussain Abbasi for learning purpose. | |
// | |
// Feedback or question? Reach out Twitter @HussainNAbbasi or GitHub @hnabbasi | |
// | |
// Use this code in any shape or form as you please 😊 | |
// |
OlderNewer