コード例 #1
0
ファイル: GisterPackage.cs プロジェクト: AppliedIS/Gister
        private static GitHubCredentials GetGitHubCredentials()
        {
            var retrievers = new RetrievesCredentials[]
            {
                new CachesGitHubCredentials(),
                new RetrievesUserEnteredCredentials()
            };

            var firstAppropriate = (from applier in retrievers
                                    where applier.IsAvailable()
                                    select applier).First();

            return(firstAppropriate.Retrieve());
        }
コード例 #2
0
ファイル: GisterPackage.cs プロジェクト: AppliedIS/Gister
        private static GitHubCredentials GetGitHubCredentials()
        {
            var retrievers = new RetrievesCredentials[]
                                 {
                                     new CachesGitHubCredentials(),
                                     new RetrievesUserEnteredCredentials()
                                 };

            var firstAppropriate = (from applier in retrievers
                                    where applier.IsAvailable()
                                    select applier).First();

            return firstAppropriate.Retrieve();
        }