/// <summary> /// Initializes a new instance of the <see cref="SourcesModule" /> class. /// </summary> public SourcesModule( ISourcesRepository repository, IUriTemplateExpander expander, IIriTemplateFactory templateFactory, IModelTemplateProvider modelTemplateProvider, ISupportedClassMetaProvider supportedClass) : base(modelTemplateProvider) { this.expander = expander; this.expander = expander; this.templateFactory = templateFactory; this.supportedClass = supportedClass; this.Get <Brochure>(async r => await this.GetSingle(repository.GetBrochure)); this.Get <Book>(async r => await this.GetSingle(repository.GetBook)); this.Get <Magazine>(async r => await this.GetSingle(repository.GetMagazine)); this.Get <Collection <Issue> >(async r => await this.GetSingle(repository.GetMagazineIssues, new Collection <Issue>())); this.Get <Issue>(async r => await this.GetSingle(repository.GetIssue)); using (this.Templates) { this.Get <Collection <Brochure> >(async r => await this.GetPage <Brochure, BrochureFilters>((int?)r.page, repository.GetBrochures)); this.Get <Collection <Magazine> >(async r => await this.GetPage <Magazine, MagazineFilters>((int?)r.page, repository.GetMagazines)); this.Get <Collection <Book> >(async r => await this.GetPage <Book, BookFilters>((int?)r.page, repository.GetBooks)); } }
/// <summary> /// Initializes a new instance of the <see cref="DefaultSupportedClassFactory"/> class. /// </summary> public DefaultSupportedClassFactory( ISupportedPropertySelectionPolicy propSelector, ISupportedPropertyFactory propFactory, ISupportedClassMetaProvider classMetaProvider) { _propSelector = propSelector; _propFactory = propFactory; _classMetaProvider = classMetaProvider; }
/// <summary> /// Initializes a new instance of the <see cref="DefaultSupportedClassFactory"/> class. /// </summary> public DefaultSupportedClassFactory( ISupportedPropertySelectionPolicy propSelector, ISupportedPropertyFactory propFactory, ISupportedClassMetaProvider classMetaProvider, ISupportedOperationFactory operationFactory) { this.propSelector = propSelector; this.propFactory = propFactory; this.classMetaProvider = classMetaProvider; this.operationFactory = operationFactory; }