コード例 #1
0
ファイル: TestExtensions.cs プロジェクト: noark9/IronGitHub
        private static TestAccount Load(string name)
        {
            if (string.IsNullOrEmpty(name))
                throw new ArgumentException("must be populated", "name");

            var fileName = GetFileName(name);
            TestAccount account;
            if (File.Exists(fileName))
            {
                using (var fs = File.Open(fileName, FileMode.Open))
                    account = JsonSerializer.DeserializeFromStream<TestAccount>(fs);
            }
            else
            {
                account = new TestAccount
                    {
                        Name = name
                    };
            }
            return account;
        }
コード例 #2
0
 async public static Task in2bitstest(this GitHubApi api, IEnumerable <Scopes> scopes = null, string note = null)
 {
     await TestAccount.Auth("in2bitstest", api, scopes);
 }