Пример #1
0
			public ImportImpl(StreamReader reader, string file, CsvImportTaskSectionModel taskModel, Action<string> output, IAsyncDatabaseCommands databaseCommands)
			{
				this.taskModel = taskModel;
				this.output = output;
				this.databaseCommands = databaseCommands;
				csvReader = new CsvReader(reader);
				header = csvReader.ReadHeaderRecord();
				entity = Inflector.Pluralize(CSharpClassName.ConvertToValidClassName(Path.GetFileNameWithoutExtension(file)));
				if (entity.Length > 0 &&  char.IsLower(entity[0]))
					entity = char.ToUpper(entity[0]) + entity.Substring(1);

				sw = Stopwatch.StartNew();

				enumerator = csvReader.DataRecords.GetEnumerator();
			}
Пример #2
0
            public ImportImpl(StreamReader reader, string file, CsvImportTaskSectionModel taskModel, Action <string> output, IAsyncDatabaseCommands databaseCommands)
            {
                this.taskModel        = taskModel;
                this.output           = output;
                this.databaseCommands = databaseCommands;
                csvReader             = new CsvReader(reader);
                header = csvReader.ReadHeaderRecord();
                entity = Inflector.Pluralize(CSharpClassName.ConvertToValidClassName(Path.GetFileNameWithoutExtension(file)));
                if (entity.Length > 0 && char.IsLower(entity[0]))
                {
                    entity = char.ToUpper(entity[0]) + entity.Substring(1);
                }

                sw = Stopwatch.StartNew();

                enumerator = csvReader.DataRecords.GetEnumerator();
            }
Пример #3
0
 public CsvImportCommand(CsvImportTaskSectionModel taskModel, Action <string> output)
 {
     this.output    = output;
     this.taskModel = taskModel;
 }
Пример #4
0
		public CsvImportCommand(CsvImportTaskSectionModel taskModel, Action<string> output)
		{
			this.output = output;
			this.taskModel = taskModel;
		}