Пример #1
0
        public void SetUp()
        {
            var root = AppDomain.CurrentDomain.BaseDirectory;
            _template = new Template(Path.Combine(root, "Views", "Home", "Home.cshtml"), root, TemplateConstants.HostOrigin);

            _descriptor = new ViewDescriptor<IRazorTemplate>(_template)
            {
                ViewModel = typeof (ProductModel)
            };

            _template.Descriptor = _descriptor;

            _token = new RazorViewToken(_template.Descriptor.As<ViewDescriptor<IRazorTemplate>>());
        }
Пример #2
0
        public void SetUp()
        {
            var root = AppDomain.CurrentDomain.BaseDirectory;

            _template = new Template(Path.Combine(root, "Views", "Home", "Home.cshtml"), root, TemplateConstants.HostOrigin);

            _descriptor = new ViewDescriptor <IRazorTemplate>(_template)
            {
                ViewModel = typeof(ProductModel)
            };

            _template.Descriptor = _descriptor;

            _token = new RazorViewToken(_template.Descriptor.As <ViewDescriptor <IRazorTemplate> >());
        }