コード例 #1
0
        public GogsAccessTokenGenerator(AppConfiguration appConfiguration)
        {
            var gogsCredentials = new Credentials(appConfiguration.GogsUsername, appConfiguration.GogsPassword);

            this.gogsClient   = new GogsClient(appConfiguration.GogsApiUri, gogsCredentials);
            this.gogsUsername = appConfiguration.GogsUsername;
            this.isDryRun     = appConfiguration.IsDryRun;
        }
コード例 #2
0
        public GroupSynchronizer(AppConfiguration appConfiguration)
        {
            if (appConfiguration == null)
            {
                throw new ArgumentNullException(nameof(appConfiguration));
            }
            this.appConfiguration = appConfiguration;

            this.gogsClient            = CreateGogsClient(appConfiguration);
            this.activeDirectoryClient = new ActiveDirectoryClient();
            this.excludedUsernames     = new SortedSet <string>(appConfiguration.ExcludedUsernames?.Select(x => x.ToLower()) ?? Array.Empty <string>());
        }