Exemplo n.º 1
0
        protected AbstractConnection(TflConnection element, AbstractConnectionDependencies dependencies)
        {
            Source        = element;
            BatchSize     = element.BatchSize;
            Name          = element.Name;
            Start         = element.Start;
            End           = element.End;
            File          = element.File;
            Folder        = element.Folder;
            Delimiter     = element.Delimiter == string.Empty ? default(char) : element.Delimiter[0];
            DateFormat    = element.DateFormat;
            Header        = element.Header;
            Footer        = element.Footer;
            EnableSsl     = element.EnableSsl;
            Direct        = element.Direct;
            Encoding      = element.Encoding;
            Version       = element.Version;
            CheckMe       = element.Check;
            Path          = element.Path;
            ErrorMode     = (ErrorMode)Enum.Parse(typeof(ErrorMode), element.ErrorMode, true);
            SearchOption  = (SearchOption)Enum.Parse(typeof(SearchOption), element.SearchOption, true);
            SearchPattern = element.SearchPattern;

            ProcessConnectionString(element);

            TableQueryWriter   = dependencies.TableQueryWriter;
            ConnectionChecker  = dependencies.ConnectionChecker;
            EntityRecordsExist = dependencies.EntityRecordsExist;
            EntityDropper      = dependencies.EntityDropper;
            EntityCreator      = dependencies.EntityCreator;
            ViewWriters        = dependencies.ViewWriters;
            TflWriter          = dependencies.TflWriter;
            ScriptRunner       = dependencies.ScriptRunner;
            DataTypeService    = dependencies.DataTypeService;
            Logger             = dependencies.Logger;

            Is = new ConnectionIs(this);
        }
        protected AbstractConnection(TflConnection element, AbstractConnectionDependencies dependencies) {

            Source = element;
            BatchSize = element.BatchSize;
            Name = element.Name;
            Start = element.Start;
            End = element.End;
            File = element.File;
            Folder = element.Folder;
            Delimiter = element.Delimiter == string.Empty ? default(char) : element.Delimiter[0];
            DateFormat = element.DateFormat;
            Header = element.Header;
            Footer = element.Footer;
            EnableSsl = element.EnableSsl;
            Direct = element.Direct;
            Encoding = element.Encoding;
            Version = element.Version;
            CheckMe = element.Check;
            Path = element.Path;
            ErrorMode = (ErrorMode)Enum.Parse(typeof(ErrorMode), element.ErrorMode, true);
            SearchOption = (SearchOption)Enum.Parse(typeof(SearchOption), element.SearchOption, true);
            SearchPattern = element.SearchPattern;

            ProcessConnectionString(element);

            TableQueryWriter = dependencies.TableQueryWriter;
            ConnectionChecker = dependencies.ConnectionChecker;
            EntityRecordsExist = dependencies.EntityRecordsExist;
            EntityDropper = dependencies.EntityDropper;
            EntityCreator = dependencies.EntityCreator;
            ViewWriters = dependencies.ViewWriters;
            TflWriter = dependencies.TflWriter;
            ScriptRunner = dependencies.ScriptRunner;
            DataTypeService = dependencies.DataTypeService;
            Logger = dependencies.Logger;

            Is = new ConnectionIs(this);
        }