Click here to Skip to main content
15,896,726 members
Articles / Web Development / HTML

Transformalizing NorthWind

Rate me:
Please Sign up or sign in to vote.
4.95/5 (29 votes)
24 Jul 2014GPL37 min read 57.8K   341   53  
Combining de-normalization, transformation, replication, and awesome-ness.
namespace Transformalize.Configuration.Builders {
    public class ActionBuilder {
        private readonly TemplateBuilder _templateBuilder;
        private readonly ActionConfigurationElement _action;

        public ActionBuilder(TemplateBuilder templateBuilder, ActionConfigurationElement action) {
            _templateBuilder = templateBuilder;
            _action = action;
        }

        public ActionBuilder File(string file) {
            _action.File = file;
            return this;
        }

        public ActionBuilder Connection(string name) {
            _action.Connection = name;
            return this;
        }

        public ActionBuilder Url(string url) {
            _action.Url = url;
            return this;
        }

        public TemplateBuilder Template(string name) {
            return _templateBuilder.Template(name);
        }

        public ActionBuilder Action(string action) {
            return _templateBuilder.Action(action);
        }

        public ActionBuilder Mode(string mode) {
            _action.Mode = mode;
            return this;
        }

        public EntityBuilder Entity(string name) {
            return _templateBuilder.Entity(name);
        }

        public SearchTypeBuilder SearchType(string name) {
            return _templateBuilder.SearchType(name);
        }

        public MapBuilder Map(string name) {
            return _templateBuilder.Map(name);
        }

        public ProcessBuilder TemplatePath(string path) {
            return _templateBuilder.TemplatePath(path);
        }

        public ProcessBuilder ScriptPath(string path) {
            return _templateBuilder.ScriptPath(path);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions