public TagGenerator(TagProfileLibrary library, IElementNamingConvention namingConvention, IServiceLocator services) { ElementPrefix = string.Empty; _library = library; _namingConvention = namingConvention; _services = services; _profile = _library.DefaultProfile; }
public void Import(TagProfile peer) { Label.Merge(peer.Label); Display.Merge(peer.Display); Editor.Merge(peer.Editor); BeforePartial.Merge(peer.BeforePartial); AfterPartial.Merge(peer.AfterPartial); BeforeEachOfPartial.Merge(peer.BeforeEachOfPartial); AfterEachOfPartial.Merge(peer.AfterEachOfPartial); }
public TagProfileExpression(TagProfile profile) { _profile = profile; Labels = new TagFactoryExpression(profile.Label); Editors = new TagFactoryExpression(profile.Editor); Displays = new TagFactoryExpression(profile.Display); BeforePartial = new TagFactoryExpression(profile.BeforePartial); AfterPartial = new TagFactoryExpression(profile.AfterPartial); BeforeEachOfPartial = new PartialTagFactoryExpression(profile.BeforeEachOfPartial); AfterEachOfPartial = new PartialTagFactoryExpression(profile.AfterEachOfPartial); }
public void Seal() { TagProfile defaults = DefaultProfile; _profiles.Each(p => { if (p == defaults) { return; } p.Import(defaults); }); }
public void Import(TagProfile peer) { Label.Merge(peer.Label); Display.Merge(peer.Display); Editor.Merge(peer.Editor); BeforePartial.Merge(peer.BeforePartial); AfterPartial.Merge(peer.AfterPartial); BeforeEachOfPartial.Merge(peer.BeforeEachOfPartial); AfterEachOfPartial.Merge(peer.AfterEachOfPartial); if (peer._layoutBuilder != null) { _layoutBuilder = peer._layoutBuilder; } }
public void SetProfile(string profileName) { _profile = _library[profileName]; }
public void ImportProfile(TagProfile profile) { _profiles[profile.Name].Import(profile); }