コード例 #1
0
            public ScenarioDefinition()
            {
                _activators.Add(new ServiceLocatorTagRequestActivator(_services));
                Naming = new DefaultElementNamingConvention();

                _services.Add <ITypeResolver>(new TypeResolver());
            }
コード例 #2
0
        public void SetUp()
        {
            var library = new DefaultHtmlConventions().Library;

            var namingConventions = new DefaultElementNamingConvention();

            var activators = new ElementIdActivator(namingConventions);

            theTemplates = new TemplateWriter(new ActiveProfile(), library, new TagRequestBuilder(new []{activators}));
        }
コード例 #3
0
ファイル: TemplateWriterTester.cs プロジェクト: xeno3/fubumvc
        public void SetUp()
        {
            var library = new DefaultHtmlConventions().Library;

            var namingConventions = new DefaultElementNamingConvention();

            var activators = new ElementIdActivator(namingConventions);

            theTemplates = new TemplateWriter(new ActiveProfile(), library, new TagRequestBuilder(new [] { activators }));
        }
コード例 #4
0
        public void use_the_prefix_in_determining_element_names()
        {
            var naming    = new DefaultElementNamingConvention();
            var generator = new TagGenerator <AddressViewModel>(new TagProfileLibrary(), naming, null)
            {
                Model         = new AddressViewModel(),
                ElementPrefix = "Site"
            };

            generator.GetRequest(x => x.Address.Address1).ElementId.ShouldEqual("SiteAddressAddress1");
        }