예제 #1
0
파일: TagPlan.cs 프로젝트: nirav72/htmltags
        public TagPlan(ITagBuilder builder, IEnumerable <ITagModifier> modifiers, IElementNamingConvention elementNamingConvention)
        {
            Builder = builder;
            ElementNamingConvention = elementNamingConvention;

            _modifiers.AddRange(modifiers); // Important to force the enumerable to be executed no later than this point
        }
예제 #2
0
        public TagPlan(ITagBuilder builder, IEnumerable<ITagModifier> modifiers, IElementNamingConvention elementNamingConvention)
        {
            Builder = builder;
            ElementNamingConvention = elementNamingConvention;

            _modifiers.AddRange(modifiers); // Important to force the enumerable to be executed no later than this point
        }
예제 #3
0
 public void SetUp()
 {
     _page = MockRepository.GenerateStub<IFubuPage<ViewModel>>();
     _convention = MockRepository.GenerateStub<IElementNamingConvention>();
     _expression = (x=>x.Property);
     _accessor = _expression.ToAccessor();
     _convention.Stub(c => c.GetName(Arg<Type>.Is.Equal(typeof (ViewModel)), Arg<Accessor>.Is.Equal(_accessor))).Return("name");
     _page.Stub(p => p.Get<IElementNamingConvention>()).Return(_convention);
 }
예제 #4
0
 public void SetUp()
 {
     _page       = MockRepository.GenerateStub <IFubuPage <ViewModel> >();
     _convention = MockRepository.GenerateStub <IElementNamingConvention>();
     _expression = (x => x.Property);
     _accessor   = _expression.ToAccessor();
     _convention.Stub(c => c.GetName(Arg <Type> .Is.Equal(typeof(ViewModel)), Arg <Accessor> .Is.Equal(_accessor))).Return("name");
     _page.Stub(p => p.Get <IElementNamingConvention>()).Return(_convention);
 }
예제 #5
0
        public TagGenerator(TagProfileLibrary library, IElementNamingConvention namingConvention, IServiceLocator services)
        {
            ElementPrefix = string.Empty;

            _library          = library;
            _namingConvention = namingConvention;
            _services         = services;

            _profile = _library.DefaultProfile;
        }
예제 #6
0
파일: BuilderSet.cs 프로젝트: jv9/htmltags
 public BuilderSet()
 {
     _elementNamingConvention = new DefaultElementNamingConvention();
 }
예제 #7
0
 public void Import(BuilderSet other)
 {
     _policies.AddRange(other._policies);
     _modifiers.AddRange(other._modifiers);
     _elementNamingConvention = other._elementNamingConvention;
 }
예제 #8
0
 public void NamingConvention(IElementNamingConvention elementNamingConvention)
 => _elementNamingConvention = elementNamingConvention;
예제 #9
0
 public BuilderSet()
 {
     _elementNamingConvention = new DefaultElementNamingConvention();
 }
예제 #10
0
 public void Import(BuilderSet other)
 {
     _policies.AddRange(other._policies);
     _modifiers.AddRange(other._modifiers);
     _elementNamingConvention = other._elementNamingConvention;
 }
예제 #11
0
 public TagGenerator(IElementNamingConvention namingConvention, TagProfileExpression tagProfile)
 {
     ElementPrefix     = string.Empty;
     _namingConvention = namingConvention;
     _profile          = tagProfile.Profile;
 }
예제 #12
0
 public ElementRequestActivator(IFubuRequest request, IElementNamingConvention naming)
     : base(naming)
 {
     _request = request;
 }
 public static string GetName <TModel, TProperty>(
     this IElementNamingConvention elementNaming,
     Expression <Func <TModel, TProperty> > property)
 {
     return(elementNaming.GetName(typeof(TModel), property.ToAccessor()));
 }
예제 #14
0
파일: BuilderSet.cs 프로젝트: jv9/htmltags
 public void NamingConvention(IElementNamingConvention elementNamingConvention)
 {
     _elementNamingConvention = elementNamingConvention;
 }
예제 #15
0
 public void NamingConvention(IElementNamingConvention elementNamingConvention)
 => _set.NamingConvention(elementNamingConvention);
예제 #16
0
 public ElementIdActivator(IElementNamingConvention naming)
 {
     _naming = naming;
 }
예제 #17
0
 public ElementRequestActivator(IFubuRequest request, IElementNamingConvention naming)
     : base(naming)
 {
     _request = request;
 }