Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RedwoodPresenter"/> class.
 /// </summary>
 public RedwoodPresenter(RedwoodConfiguration configuration)
 {
     RedwoodViewBuilder = configuration.ServiceLocator.GetService<IRedwoodViewBuilder>();
     ViewModelLoader = configuration.ServiceLocator.GetService<IViewModelLoader>();
     ViewModelSerializer = configuration.ServiceLocator.GetService<IViewModelSerializer>();
     OutputRenderer = configuration.ServiceLocator.GetService<IOutputRenderer>();
     CsrfProtector = configuration.ServiceLocator.GetService<ICsrfProtector>();
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotvvmPresenter"/> class.
 /// </summary>
 public DotvvmPresenter(DotvvmConfiguration configuration)
 {
     DotvvmViewBuilder = configuration.ServiceLocator.GetService<IDotvvmViewBuilder>();
     ViewModelLoader = configuration.ServiceLocator.GetService<IViewModelLoader>();
     ViewModelSerializer = configuration.ServiceLocator.GetService<IViewModelSerializer>();
     OutputRenderer = configuration.ServiceLocator.GetService<IOutputRenderer>();
     CsrfProtector = configuration.ServiceLocator.GetService<ICsrfProtector>();
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotvvmPresenter"/> class.
 /// </summary>
 public DotvvmPresenter(DotvvmConfiguration configuration)
 {
     DotvvmViewBuilder   = configuration.ServiceLocator.GetService <IDotvvmViewBuilder>();
     ViewModelLoader     = configuration.ServiceLocator.GetService <IViewModelLoader>();
     ViewModelSerializer = configuration.ServiceLocator.GetService <IViewModelSerializer>();
     OutputRenderer      = configuration.ServiceLocator.GetService <IOutputRenderer>();
     CsrfProtector       = configuration.ServiceLocator.GetService <ICsrfProtector>();
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotvvmPresenter" /> class.
 /// </summary>
 public DotvvmPresenter(DotvvmConfiguration configuration, IDotvvmViewBuilder viewBuilder, IViewModelLoader viewModelLoader, IViewModelSerializer viewModelSerializer,
                        IOutputRenderer outputRender, ICsrfProtector csrfProtector)
 {
     DotvvmViewBuilder   = viewBuilder;
     ViewModelLoader     = viewModelLoader;
     ViewModelSerializer = viewModelSerializer;
     OutputRenderer      = outputRender;
     CsrfProtector       = csrfProtector;
     ApplicationPath     = configuration.ApplicationPhysicalPath;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotvvmPresenter"/> class.
 /// </summary>
 public DotvvmPresenter(
     IDotvvmViewBuilder dotvvmViewBuilder,
     IViewModelLoader viewModelLoader,
     IViewModelSerializer viewModelSerializer,
     IOutputRenderer outputRenderer,
     ICsrfProtector csrfProtector
     )
 {
     DotvvmViewBuilder   = dotvvmViewBuilder;
     ViewModelLoader     = viewModelLoader;
     ViewModelSerializer = viewModelSerializer;
     OutputRenderer      = outputRenderer;
     CsrfProtector       = csrfProtector;
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotvvmPresenter"/> class.
 /// </summary>
 public DotvvmPresenter(
     IDotvvmViewBuilder dotvvmViewBuilder,
     IViewModelLoader viewModelLoader,
     IViewModelSerializer viewModelSerializer,
     IOutputRenderer outputRenderer,
     ICsrfProtector csrfProtector
 )
 {
     DotvvmViewBuilder = dotvvmViewBuilder;
     ViewModelLoader = viewModelLoader;
     ViewModelSerializer = viewModelSerializer;
     OutputRenderer = outputRenderer;
     CsrfProtector = csrfProtector;
 }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RedwoodPresenter"/> class.
 /// </summary>
 public RedwoodPresenter(
     IRedwoodViewBuilder redwoodViewBuilder,
     IViewModelLoader viewModelLoader,
     IViewModelSerializer viewModelSerializer,
     IOutputRenderer outputRenderer,
     ICsrfProtector csrfProtector
 )
 {
     RedwoodViewBuilder = redwoodViewBuilder;
     ViewModelLoader = viewModelLoader;
     ViewModelSerializer = viewModelSerializer;
     OutputRenderer = outputRenderer;
     CsrfProtector = csrfProtector;
 }
Esempio n. 8
0
        public DotvvmPresenter(DotvvmConfiguration configuration, IDotvvmViewBuilder viewBuilder, IViewModelLoader viewModelLoader, IViewModelSerializer viewModelSerializer,
                               IOutputRenderer outputRender, ICsrfProtector csrfProtector, IViewModelParameterBinder viewModelParameterBinder,
#pragma warning disable CS0618
                               IStaticCommandServiceLoader staticCommandServiceLoader
#pragma warning restore CS0618
                               )
        {
            DotvvmViewBuilder        = viewBuilder;
            ViewModelLoader          = viewModelLoader;
            ViewModelSerializer      = viewModelSerializer;
            OutputRenderer           = outputRender;
            CsrfProtector            = csrfProtector;
            ViewModelParameterBinder = viewModelParameterBinder;
#pragma warning disable CS0618
            StaticCommandServiceLoader = staticCommandServiceLoader;
#pragma warning restore CS0618
            ApplicationPath = configuration.ApplicationPhysicalPath;
        }
Esempio n. 9
0
 public DotvvmCsrfTokenMiddleware(ICsrfProtector csrfProtector)
 {
     this.csrfProtector = csrfProtector;
 }
Esempio n. 10
0
 public DotvvmAmpPresenter(DotvvmConfiguration configuration, Func <IAmpStylesheetResourceCollection> ampStylesheetResourceCollectionFactory, IAmpDotvvmViewBuilder viewBuilder, IViewModelLoader viewModelLoader, IViewModelSerializer viewModelSerializer, IAmpOutputRenderer outputRender, ICsrfProtector csrfProtector, IViewModelParameterBinder viewModelParameterBinder, IStaticCommandServiceLoader staticCommandServiceLoader) : base(configuration, viewBuilder, viewModelLoader, viewModelSerializer, outputRender, csrfProtector, viewModelParameterBinder, staticCommandServiceLoader)
 {
     this.ampStylesheetResourceCollectionFactory = ampStylesheetResourceCollectionFactory;
 }
 public StatusPagePresenter(DotvvmConfiguration configuration, IDotvvmViewBuilder viewBuilder, IViewModelLoader viewModelLoader,
                            IViewModelSerializer viewModelSerializer, IOutputRenderer outputRender, ICsrfProtector csrfProtector,
                            IViewModelParameterBinder viewModelParameterBinder, IStaticCommandServiceLoader staticCommandServiceLoader) :
     base(configuration, viewBuilder, new DefaultViewModelLoader(), viewModelSerializer, outputRender, csrfProtector, viewModelParameterBinder, staticCommandServiceLoader)
 {
 }