Beispiel #1
0
 public NoteAPIController(AttachService attachService
                          , TokenSerivce tokenSerivce
                          , NoteFileService noteFileService
                          , UserService userService
                          , ConfigFileService configFileService
                          , IHttpContextAccessor accessor,
                          NoteService noteService,
                          NoteContentService noteContentService,
                          NotebookService notebookService,
                          NoteRepositoryService noteRepositoryService,
                          TrashService trashService,
                          EPassService ePass,
                          GMService gMService,
                          DataSignService dataSignService
                          ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.attachService         = attachService;
     this.noteService           = noteService;
     this.tokenSerivce          = tokenSerivce;
     this.noteContentService    = noteContentService;
     this.trashService          = trashService;
     this.accessor              = accessor;
     this.notebookService       = notebookService;
     this.noteRepositoryService = noteRepositoryService;
     this.ePassService          = ePass;
     this.dataSignService       = dataSignService;
     this.gMService             = gMService;
 }
Beispiel #2
0
        public RemoteFileController(AttachService attachService
                                    , TokenSerivce tokenSerivce
                                    , NoteFileService noteFileService
                                    , UserService userService
                                    , ConfigFileService configFileService
                                    , IHttpContextAccessor accessor
                                    , AccessService accessService
                                    , ConfigService configService
                                    , TagService tagService
                                    , NoteService noteService
                                    , NotebookService notebookService
                                    , IWebHostEnvironment webHostEnvironment
                                    , ISevenZipCompressor sevenZipCompressor
                                    , BlogService blogService
                                    ) :
            base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
        {
            this.accessService      = accessService;
            this.blogService        = blogService;
            this.configService      = configService;
            this.tagService         = tagService;
            this.notebookService    = notebookService;
            this.noteService        = noteService;
            this.HostEnvironment    = webHostEnvironment;
            this.SevenZipCompressor = sevenZipCompressor;

            if (RuntimeEnvironment.IsWindows)
            {
                PathRoot = @"C:\";
            }
        }
Beispiel #3
0
        public Startup(IConfiguration configuration, IWebHostEnvironment env)
        {
            Configuration = configuration;
            this._env     = env;
            ConfigFileService configFileService = new ConfigFileService();

            config = configFileService.WebConfig;
        }
Beispiel #4
0
        // 定义私有构造函数,使外界不能创建该类实例
        public SnowFlakeNetService(ConfigFileService configFileService)
        {
            var config = configFileService.WebConfig.IdGeneratorConfig;

            if (worker == null)
            {
                worker = new IdWorker(config.WorkerId, config.DatacenterId);
            }
        }
Beispiel #5
0
 public SDFProvider(ConfigFileService configFileService)
 {
     sdfConfig = configFileService.WebConfig.SDFConfig;
     CheckInitSDF();
     sdfHelper = new SDFHelper(sdfConfig.SDFDLLFilePath);
     sdfHelper.SDF_OpenDevice();
     sdfHelper.SDF_OpenSession();
     sdfHelper.SDF_ImportKey(HexUtil.StringToByteArray(sdfConfig.PucKey), 1);
 }
Beispiel #6
0
        public APPController(AttachService attachService
                             , TokenSerivce tokenSerivce
                             , NoteFileService noteFileService
                             , UserService userService
                             , ConfigFileService configFileService

                             , IHttpContextAccessor accessor) :
            base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
        {
        }
Beispiel #7
0
        public void GenerateFromTemplate_CreatesFiles()
        {
            //var reader = new DbContextReader(@"pathToDll", "dll");
            //var entities = reader.ReadEntities();
            var generator = new FileGeneratorService();
            var config    = new ConfigFileService().ReadConfigurationJson(configuration);


            generator.GenerateFiles("Templates/ApiController.mhbs", config);
        }
Beispiel #8
0
 public MemberIndexController(AttachService attachService
                              , TokenSerivce tokenSerivce
                              , NoteFileService noteFileService
                              , UserService userService
                              , ConfigFileService configFileService
                              , IHttpContextAccessor accessor, NoteService noteService
                              ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.noteService = noteService;
 }
Beispiel #9
0
        public void PresignedGetObjectAsyncTest()
        {
            ConfigFileService configFileService = new ConfigFileService();
            WebSiteConfig     webSiteConfig     = configFileService.WebConfig;

            Console.WriteLine(webSiteConfig.MinIOConfig.Endpoint);

            var fileStore = new MinIOFileStoreService(webSiteConfig.MinIOConfig);
            var result    = fileStore.PresignedGetObjectAsync(webSiteConfig.MinIOConfig.NoteFileBucketName, "13a03c863d021000.png").Result;

            Console.WriteLine(result);
        }
Beispiel #10
0
 public NoteRepositoryService(DataContext dataContext,
                              OrganizationTeamService organizationTeamService,
                              ConfigFileService configFileService,
                              RepositoryMemberRoleService repositoryMemberRoleService,
                              IDistributedIdGenerator idGenerator)
 {
     this.idGenerator             = idGenerator;
     this.dataContext             = dataContext;
     this.organizationTeamService = organizationTeamService;
     this.memberRoleService       = repositoryMemberRoleService;
     this.ConfigFileService       = configFileService;
 }
 public JoplinTestingController(AttachService attachService
                                , TokenSerivce tokenSerivce
                                , NoteFileService noteFileService
                                , UserService userService
                                , ConfigFileService configFileService
                                , IHttpContextAccessor accessor
                                , AuthService authService
                                ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.AuthService = authService;
 }
Beispiel #12
0
 public SpamController(AttachService attachService
                       , TokenSerivce tokenSerivce
                       , NoteFileService noteFileService
                       , UserService userService
                       , ConfigFileService configFileService
                       , IHttpContextAccessor accessor,
                       SpamService spamService
                       ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.spamService = spamService;
 }
Beispiel #13
0
 public FileAPIController(AttachService attachService
                          , TokenSerivce tokenSerivce
                          , NoteFileService noteFileService
                          , UserService userService
                          , ConfigFileService configFileService
                          , IHttpContextAccessor accessor,
                          NoteService noteService
                          ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.noteService   = noteService;
     this.webSiteConfig = configFileService.WebConfig;
 }
Beispiel #14
0
 public TagAPIController(AttachService attachService
                         , TokenSerivce tokenSerivce
                         , NoteFileService noteFileService
                         , UserService userService
                         , ConfigFileService configFileService
                         , IHttpContextAccessor accessor,
                         TagService tagService
                         ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.tokenSerivce = tokenSerivce;
     this.tagService   = tagService;
 }
Beispiel #15
0
        public void PutObjectAsyncTest()
        {
            ConfigFileService configFileService = new ConfigFileService();
            WebSiteConfig     webSiteConfig     = configFileService.WebConfig;

            Console.WriteLine(webSiteConfig.MinIOConfig.Endpoint);

            var fileStore  = new MinIOFileStoreService(webSiteConfig.MinIOConfig);
            var fileStream = File.OpenRead(@"C:\Users\huany\Pictures\130x130.jpg");
            var len        = fileStream.Length;

            // fileStore.PutObjectAsync("test", "/my/13a03c863d021000.png", fileStream, len).Wait();
        }
Beispiel #16
0
 public VditorController(AttachService attachService
                         , TokenSerivce tokenSerivce
                         , NoteFileService noteFileService
                         , UserService userService
                         , ConfigFileService configFileService
                         , IHttpContextAccessor accessor, AuthService authService
                         ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.authService  = authService;
     this.userService  = userService;
     this.tokenSerivce = tokenSerivce;
 }
Beispiel #17
0
 public FIDO2Controller(AttachService attachService
                        , TokenSerivce tokenSerivce
                        , NoteFileService noteFileService
                        , UserService userService
                        , ConfigFileService configFileService
                        , IHttpContextAccessor accessor
                        , AuthService authService
                        , FIDO2Service fIDO2Service
                        ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.authService  = authService;
     this.fido2Service = fIDO2Service;
 }
 public OrganizationController(AttachService attachService
                               , TokenSerivce tokenSerivce
                               , NoteFileService noteFileService
                               , UserService userService
                               , ConfigFileService configFileService
                               , IHttpContextAccessor accessor,
                               NotebookService notebookService,
                               OrganizationService organizationService,
                               NoteRepositoryService noteRepositoryService
                               ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.organizationService = organizationService;
 }
Beispiel #19
0
 public USBKeyController(AttachService attachService
                         , TokenSerivce tokenSerivce
                         , NoteFileService noteFileService
                         , UserService userService
                         , ConfigFileService configFileService
                         , IHttpContextAccessor accessor
                         , AuthService authService
                         , EPassService ePassService
                         ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.authService = authService;
     this.ePass       = ePassService;
 }
Beispiel #20
0
 public PayJSController(AttachService attachService
                        , TokenSerivce tokenSerivce
                        , NoteFileService noteFileService
                        , UserService userService
                        , ConfigFileService configFileService
                        , IHttpContextAccessor accessor
                        , DataContext dataContext
                        ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.dataContext       = dataContext;
     this.configFileService = configFileService;
     webSiteConfig          = configFileService.WebConfig;
     pay = new Payjs(webSiteConfig.Payjs.PayJS_MCHID, webSiteConfig.Payjs.PayJS_Key);
 }
Beispiel #21
0
        public AuthController(AttachService attachService
                              , TokenSerivce tokenSerivce
                              , NoteFileService noteFileService
                              , UserService userService
                              , ConfigFileService configFileService
                              , IDistributedCache distributedCache

                              , IHttpContextAccessor accessor,
                              AuthService authService,
                              ConfigService configService
                              ) :
            base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
        {
            this.distributedCache = distributedCache;
            this.authService      = authService;
            this.configService    = configService;
            this.config           = configService.config;
        }
Beispiel #22
0
        public BaseController(AttachService attachService
                              , TokenSerivce tokenSerivce
                              , NoteFileService noteFileService
                              , UserService userService
                              , ConfigFileService configFileService
                              , IHttpContextAccessor accessor

                              )
        {
            this.attachService     = attachService;
            this.tokenSerivce      = tokenSerivce;
            this.noteFileService   = noteFileService;
            this.configFileService = configFileService;
            this.userService       = userService;
            this._accessor         = accessor;

            config = configFileService.WebConfig;
        }
Beispiel #23
0
 public NotesRepositoryController(AttachService attachService
                                  , TokenSerivce tokenSerivce
                                  , NoteFileService noteFileService
                                  , UserService userService
                                  , ConfigFileService configFileService
                                  , IHttpContextAccessor accessor,
                                  NotebookService notebookService,
                                  NoteRepositoryService noteRepositoryService,
                                  OrganizationService organizationService,
                                  EPassService ePassService,
                                  DataSignService dataSignService
                                  ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.notebookService       = notebookService;
     this.noteRepositoryService = noteRepositoryService;
     this.ePassService          = ePassService;
     this.dataSignService       = dataSignService;
 }
Beispiel #24
0
        public APIController(AttachService attachService
                             , TokenSerivce tokenSerivce
                             , NoteFileService noteFileService
                             , UserService userService
                             , ConfigFileService configFileService
                             , IHttpContextAccessor accessor,
                             AccessService accessService,
                             DataContext dataContext


                             ) : base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
        {
            this.AccessService = accessService;
            this.dataContext   = dataContext;

            this.configFileService = configFileService;
            webcConfig             = configFileService.WebConfig;

            _randomImageFuseSize = webcConfig.PublicAPI.RandomImageFuseSize;
        }
Beispiel #25
0
 public UserAPIController(AttachService attachService
                          , TokenSerivce tokenSerivce
                          , NoteFileService noteFileService
                          , UserService userService
                          , ConfigFileService configFileService
                          , GMService gMService
                          , RealNameService realNameService
                          , IHttpContextAccessor accessor, AuthService authService
                          , EPassService ePass
                          , DataSignService dataSignService
                          ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.authService     = authService;
     this.userService     = userService;
     this.tokenSerivce    = tokenSerivce;
     this.realNameService = realNameService;
     this.ePassService    = ePass;
     this.gMService       = gMService;
     this.dataSignService = dataSignService;
 }
Beispiel #26
0
 public CommonController(AttachService attachService
                         , TokenSerivce tokenSerivce
                         , NoteFileService noteFileService
                         , UserService userService
                         , ConfigFileService configFileService
                         , IHttpContextAccessor accessor,
                         NoteService noteService,
                         NoteContentService noteContentService,
                         NotebookService notebookService,
                         NoteRepositoryService noteRepositoryService,
                         TrashService trashService
                         ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.attachService         = attachService;
     this.noteService           = noteService;
     this.tokenSerivce          = tokenSerivce;
     this.noteContentService    = noteContentService;
     this.trashService          = trashService;
     this.accessor              = accessor;
     this.notebookService       = notebookService;
     this.noteRepositoryService = noteRepositoryService;
 }
Beispiel #27
0
 public NoteController(AttachService attachService
                       , TokenSerivce tokenSerivce
                       , NoteFileService noteFileService
                       , UserService userService
                       , ShareService shareService
                       , ConfigFileService configFileService
                       , IWebHostEnvironment env
                       , TagService tagService
                       , TrashService trashService
                       , IHttpContextAccessor accessor
                       , NotebookService notebookService
                       , NoteService noteService
                       , NoteContentService noteContentService
                       ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.notebookService    = notebookService;
     this.noteService        = noteService;
     this.noteContentService = noteContentService;
     this.env          = env;
     this.tagService   = tagService;
     this.trashService = trashService;
 }
Beispiel #28
0
 public BlogController(AttachService attachService
                       , TokenSerivce tokenSerivce
                       , NoteFileService noteFileService
                       , UserService userService
                       , ConfigFileService configFileService
                       , IHttpContextAccessor accessor
                       , AccessService accessService
                       , ConfigService configService
                       , TagService tagService
                       , NoteService noteService
                       , NotebookService notebookService
                       , BlogService blogService
                       , NoteRepositoryService noteRepository
                       ) :
     base(attachService, tokenSerivce, noteFileService, userService, configFileService, accessor)
 {
     this.accessService   = accessService;
     this.blogService     = blogService;
     this.configService   = configService;
     this.tagService      = tagService;
     this.notebookService = notebookService;
     this.noteService     = noteService;
     this.noteRepository  = noteRepository;
 }
Beispiel #29
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="dataContext"></param>
 /// <param name="configFileService"></param>
 public FIDO2Service(DataContext dataContext, IDistributedCache distributedCache, ConfigFileService configFileService, IFido2 fido2, IDistributedIdGenerator IdGenerator)
 {
     this.IdGenerator      = IdGenerator;
     this.dataContext      = dataContext;
     this.distributedCache = distributedCache;
     this.config           = configFileService.WebConfig;
     this.fido2Config      = config.SecurityConfig.FIDO2Config;
     this._fido2           = fido2;
 }
Beispiel #30
0
 public LoggingService(ConfigFileService configFileService, ICryptographyProvider cryptographyProvider, DataContext dataContext)
 {
     this.webSiteConfig        = configFileService.WebConfig;
     this.cryptographyProvider = cryptographyProvider;
     this.dataContext          = dataContext;
 }