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
using (var stream = await content.ReadAsStreamAsync().ConfigureAwait(false)) | |
{ | |
var totalBytesRead = 0; | |
var buffer = new byte[BufferSize]; | |
var bytesRead = 0; | |
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0) | |
{ | |
totalBytesRead += bytesRead; | |
Debug.Log("totalBytesRead: {0}", totalBytesRead); | |
} |
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
ZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFJQUFBQUNBQ0FZQUFBRERQbUhMQUFBQUJHZEJUVUVBQUxHUEMveGhCUUFBQUFGelVrZENBSzdPSE9rQUFBQWdZMGhTVFFBQWVpWUFBSUNFQUFENkFBQUFnT2dBQUhVd0FBRHFZQUFBT3BnQUFCZHduTHBSUEFBQUFBWmlTMGRFQUFBQUFBQUErVU83ZndBQUFBbHdTRmx6QUFBT3d3QUFEc01CeDIrb1pBQUFnQUJKUkVGVWVOcE0vY2V6NVdsNjM0bDlYdnR6eDE2YnZteFhkNFBkTU4yd0JFQU1oME55aGlLMVVJU0dJVVpveHdodDlFOW9vYjEyMm1reFExRkRhYWdaVWtNUUJFbUFjSTF1b24yWDZmSlpXZW11UC9iblhxZkZlNnN3bVhFakkyN0dQWEhQK2IzbWVaNnYwNklpSVVBbzBGSlFTWW03a3pDMXh0WVdWU3FFZ2FRVFFYbUVGZ2dyNklvQk1SWFkybUlhZzZvTlFTV1V0VVJBU0kxdEpqeDg4RHJmZk8yYjNLL3YwM1FORTlkd3FKY2NWd2RNeXduUndDYnN1TnhkY3ROZGsxU2dLbXNxVVZPbkNRY1lCSW9lalJRQ0pTVlNTRWlncGFLcGFxeTI0Q0ltS0VwbHNVSmpsVUVtaVU4ZWxHQUlqbzZlbmQ1eEV6ZWNEVmQ4dm4vQjAvWWxWMjdGYUVZRzRmREZ3SXB6em03T0dNSklFcUNOb2l3S1ZCSU1iWWZvZXc3djNrV09DamFPbWJqRHdoNVJpSWJwWk1sa05pY1lPUE5YYk1jOTNUQXdlRWRJRVdNTnphU202MXBjR0psTmF6NTQrUzdubDJmNDRIRGVjYkJjNG4xQUprZVVscnYyQVVlVEU2YmxGSk1zR2tNRXhqVFNwNEZWdCtiTVAyTVZyM0ZoUkdwUVJnSUNva0JFaVl3YU5XalNPdEhIbnFPRFk1 |
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 Task<string> FindCity(string postalCode) | |
{ | |
var jsonStream = EmbeddedResourceHelper.FromResources("postal_codes.json"); | |
var dictionary = DeserializeStream<Dictionary<string, string>>(jsonStream); | |
if (dictionary.ContainsKey(postalCode)) | |
return Task.FromResult(dictionary[postalCode]); | |
var collectionRange = dictionary.Where(e => e.Key.Contains("-")); | |
var result = FindCityFromRangeRecords(postalCode, collectionRange); |
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
var a = 0؛ | |
var b = 1; | |
var c = 2؛ |
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
/usr/local/share/dotnet/sdk/2.2.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(5,5): Error MSB4018: The "ResolvePackageAssets" task failed unexpectedly. | |
System.ArgumentOutOfRangeException: Offset must be within plus or minus 14 hours. | |
Parameter name: offset | |
at System.DateTimeOffset.ValidateOffset (System.TimeSpan offset) [0x0004a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/DateTimeOffset.cs:908 | |
at System.DateTimeOffset..ctor (System.DateTime dateTime) [0x0001d] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/DateTimeOffset.cs:82 | |
at System.DateTimeOffset.FromFileTime (System.Int64 fileTime) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/DateTimeOffset.cs:522 |
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
// Crendential.cs | |
public class Credential | |
{ | |
public enum LoginType | |
{ | |
Facebook, | |
Google, | |
Apple | |
} |
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 AuthResponse | |
{ | |
[JsonProperty("access_token")] | |
public string AccessToken { get; set; } | |
[JsonProperty("expires_in")] | |
public long ExpiresIn { get; set; } | |
[JsonProperty("token_type")] | |
public string TokenType { get; set; } |
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
class AccountService : IAccountService | |
{ | |
public List<User> Profiles { get; set; } | |
public void Something() { } | |
} | |
register.AsSingleton<IAccountService, AccountService>(); | |
// | |
// V E R S U S |
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 Sword | |
{ | |
public Sword() | |
{ | |
isBroken = false; | |
magicDamage = null; | |
} | |
private bool isBroken = false; | |
private MagicDamage magicDamage = null; |
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
using XE = Xamarin.Essentials; // this also contains a class with name DeviceInfo | |
public class DeviceInfo | |
{ | |
public DeviceInfo() | |
{ | |
} | |
public string Name { get; set; } |