コード例 #1
0
 public Migration(IConfiguration configuration, BucketPrefixProvider bucketPrefix, IForgeOSS forgeOSS, ILogger <Migration> logger, IResourceProvider resourceProvider, OssBucketFactory bucketFactory, IServiceProvider serviceProvider)
 {
     _forgeOSS            = forgeOSS;
     _configuration       = configuration;
     _bucketPrefix        = bucketPrefix;
     _logger              = logger;
     _resourceProvider    = resourceProvider;
     _bucketFactory       = bucketFactory;
     _serviceScopeFactory = serviceProvider.GetRequiredService <IServiceScopeFactory>();
 }
コード例 #2
0
 public DataMigrationController(ILogger <DataMigrationController> logger, IOptions <DefaultProjectsConfiguration> optionsAccessor,
                                ProjectWork projectWork, UserResolver userResolver, IForgeOSS forgeOSS, LocalCache localCache)
 {
     _logger       = logger;
     _userResolver = userResolver;
     _bucket       = _userResolver.AnonymousBucket;
     _projectWork  = projectWork;
     _defaultProjectsConfiguration = optionsAccessor.Value;
     _forgeOSS   = forgeOSS;
     _localCache = localCache;
 }
コード例 #3
0
        public UserResolver(ResourceProvider resourceProvider, IForgeOSS forgeOSS, IBucketKeyProvider bucketKeyProvider,
                            LocalCache localCache, ILogger <UserResolver> logger, ProfileProvider profileProvider)
        {
            _forgeOSS          = forgeOSS;
            _localCache        = localCache;
            _logger            = logger;
            _bucketKeyProvider = bucketKeyProvider;
            _profileProvider   = profileProvider;

            AnonymousBucket = new OssBucket(_forgeOSS, _bucketKeyProvider.AnonymousBucketKey, logger);
        }
コード例 #4
0
 public Migration(IConfiguration configuration, BucketPrefixProvider bucketPrefix, IForgeOSS forgeOSS, MigrationBucketKeyProvider bucketProvider, UserResolver userResolver, ProjectWork projectWork, ILogger <Migration> logger, ResourceProvider resourceProvider, OssBucketFactory bucketFactory, ProjectService projectService)
 {
     _forgeOSS         = forgeOSS;
     _configuration    = configuration;
     _bucketPrefix     = bucketPrefix;
     _bucketProvider   = bucketProvider;
     _userResolver     = userResolver;
     _projectWork      = projectWork;
     _logger           = logger;
     _resourceProvider = resourceProvider;
     _bucketFactory    = bucketFactory;
     _projectService   = projectService;
 }
コード例 #5
0
        public UserResolver(ResourceProvider resourceProvider, IForgeOSS forgeOSS,
                            IOptions <ForgeConfiguration> forgeConfiguration, LocalCache localCache, ILogger <UserResolver> logger, IConfiguration configuration)
        {
            _forgeOSS      = forgeOSS;
            _localCache    = localCache;
            _logger        = logger;
            _configuration = configuration;
            _forgeConfig   = forgeConfiguration.Value;

            AnonymousBucket = new OssBucket(_forgeOSS, resourceProvider.BucketKey, logger);

            _lazyProfile = new Lazy <Task <dynamic> >(async() => await _forgeOSS.GetProfileAsync(Token));
        }
コード例 #6
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="forgeOSS">Forge OSS service.</param>
 /// <param name="bucketKey">The bucket key.</param>
 /// <param name="logger">Logger to use.</param>
 public OssBucket(IForgeOSS forgeOSS, string bucketKey, ILogger logger)
 {
     BucketKey = bucketKey;
     _forgeOSS = forgeOSS;
     _logger   = logger;
 }
コード例 #7
0
 public ProfileProvider(IForgeOSS forgeOss)
 {
     _lazyProfile = new Lazy <Task <dynamic> >(async() => await forgeOss.GetProfileAsync(Token));
 }
コード例 #8
0
 public OssBucketFactory(IForgeOSS forgeOSS, ILogger <OssBucketFactory> logger)
 {
     _forgeOSS = forgeOSS;
     _logger   = logger;
 }