/// <summary>构造函数</summary> public ServerAppDataService(IMongoConfig config, IMongoCollection <TDocument> accessor, IMongoCollection <MongoUploadFile> uploadFilesCollection) { Accessor = accessor; FileFormatExtension.Init(); this.ExtConverterMappers = new Dictionary <string, FileFormatConverters>(); UploadFileHandler = new UploadFileHandler(config, uploadFilesCollection); }
/// <summary>从API服务加载</summary> public void LoadFromApiService(bool force, bool loadFromConfig) { if (!force && this.PageMapper != null) { return; } if (!Login()) { return; } FileFormatExtension.Init(); LoadMetadataTags(loadFromConfig); LoadIndexPageDatas(); }
/// <summary>构造函数</summary> public ServerPageDataService(IMongoConfig config, IMongoCollection <TDocument> accessor, IMongoCollection <MongoUploadFile> uploadFilesCollection) { Accessor = accessor; FileFormatExtension.Init(); this.UploadFileHandler = new UploadFileHandler(config, uploadFilesCollection); }
public IHttpActionResult ReloadFileFormats() { FileFormatExtension.Reload(); return(Ok()); }