This file contains hidden or 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
| // create http cache | |
| if (_cachedClient is null) | |
| { | |
| // create credntial for http client | |
| var credentials = new Windows.Security.Credentials.PasswordCredential | |
| { | |
| UserName = _settingsService.AbbyyApplicationId, | |
| Password = _settingsService.AbbyyPassword, | |
| }; | |
| var handler = new HttpBaseProtocolFilter { ServerCredential = credentials, }; |
This file contains hidden or 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
| CREATE TABLE users | |
| ( | |
| Name varchar(10), | |
| Year varchar(4), | |
| ) | |
| GO | |
| INSERT INTO users VALUES | |
| ('Jerry', '2020') | |
| ,('Joe', '2021') |
This file contains hidden or 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 Client.Excel.Models; | |
| using DocumentFormat.OpenXml; | |
| using DocumentFormat.OpenXml.Packaging; | |
| using DocumentFormat.OpenXml.Spreadsheet; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| using System.Threading.Tasks; | |
| using Windows.Storage; |
This file contains hidden or 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 Newtonsoft.Json; | |
| using System; | |
| using Windows.Foundation.Collections; | |
| namespace Client.Helpers | |
| { | |
| public class SettingsHelper | |
| { | |
| private readonly IPropertySet _settings; |
This file contains hidden or 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 static class HttpRequestExtensions | |
| { | |
| public static bool TryGetBody<T>(this HttpRequest req, out T value, out Exception exception) | |
| { | |
| if (!req.TryGetBody(out var bytes, out exception)) | |
| { | |
| value = default; | |
| return false; | |
| } |
This file contains hidden or 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 System; | |
| namespace Adventure | |
| { | |
| public static class Art | |
| { | |
| public static void DrawDoor(int count = 1, ConsoleColor foreground = ConsoleColor.Cyan, ConsoleColor background = ConsoleColor.Black) | |
| { | |
| WriteLine(" __________ ", count, foreground, background); | |
| WriteLine(" | __ __ | ", count, foreground, background); |
This file contains hidden or 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 System; | |
| using System.Linq; | |
| namespace Adventure | |
| { | |
| internal class Program | |
| { | |
| private static Game _game; | |
| private static void Main(string[] args) |
This file contains hidden or 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 System; | |
| using System.Linq; | |
| namespace Adventure | |
| { | |
| internal class Program | |
| { | |
| private static Game _game; | |
| private static void Main(string[] args) |
This file contains hidden or 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 System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Drawing; | |
| using System.Linq; | |
| namespace SnakePrep | |
| { | |
| internal class Program | |
| { |
This file contains hidden or 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 System; | |
| using System.Drawing; | |
| namespace SnakePrep | |
| { | |
| internal class Program | |
| { | |
| private static ConsoleKey _direction = ConsoleKey.Escape; | |
| private static bool _gameOver = false; | |
| private static Point _current; |