public KmlEntityProducer(string fileSetName, string entitySet, string entityKind, EntityProducerParams parameters, bool sourceOrder) { _kml = GetKml(fileSetName); _params = parameters; _schemaEntity = GetSchemaEntity(entitySet, entityKind, parameters.PropertyToTypeMap); _sourceOrder = sourceOrder; }
public KmlEntityProducer(string fileSetName, string entitySet, string entityKind, EntityProducerParams parameters, bool sourceOrder) { _kml = GetKml(fileSetName); _params = parameters; _schemaEntity = GetSchemaEntity(entitySet, entityKind, parameters.PropertyToTypeMap); _sourceOrder = sourceOrder; }
public CsvEntityProducer(string fileSetName, string entitySet, string entityKind, EntityProducerParams parameters, bool sourceOrder) { // Calculate entities count // TODO: Need to rewrite in better way. using (var countReader = new CsvReader(new StreamReader(fileSetName + DataLoaderConstants.FileExtCsv), true, System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ListSeparator[0])) { while (countReader.ReadNextRecord()) { EntityCount++; } } var reader = new StreamReader(string.Concat(fileSetName, DataLoaderConstants.FileExtCsv)); _csvReader = new CsvReader(reader, true, System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ListSeparator[0]); _params = parameters; _schemaEntity = GetSchemaEntity(entitySet, entityKind, parameters.PropertyToTypeMap); _sourceOrder = sourceOrder; }
public CsvEntityProducer(string fileSetName, string entitySet, string entityKind, EntityProducerParams parameters, bool sourceOrder) { //Init CSV Separators and encoding file InitSeparators(fileSetName); GetEncoding(fileSetName); // Calculate entities count // TODO: Need to rewrite in better way. using (var countReader = new CsvReader(new StreamReader(fileSetName + DataLoaderConstants.FileExtCsv,enc), true, separator)) { while (countReader.ReadNextRecord()) { EntityCount++; } } var reader = new StreamReader(string.Concat(fileSetName, DataLoaderConstants.FileExtCsv),enc); _csvReader = new CsvReader(reader, true, separator); _params = parameters; _schemaEntity = GetSchemaEntity(entitySet, entityKind, parameters.PropertyToTypeMap); _sourceOrder = sourceOrder; }
public CsvProducerControlViewModel(DataLoaderParams parameters) { _datasetColumns = parameters.ProducerParams; _entityProperties = new PropertyToTypeMap(); if (_datasetColumns.PlacemarkParams == null || _datasetColumns.PlacemarkParams.NameProperties == null) { return; } foreach (var property in _datasetColumns.PropertyToTypeMap.Mappings) { for (int i = 0; i < _datasetColumns.PlacemarkParams.NameProperties.Length; i++) { string nameProperty = _datasetColumns.PlacemarkParams.NameProperties[i]; if (nameProperty != null && nameProperty.ToLower() == property.Name.ToLower()) { property.IndexInName = "{" + i + "}"; } } } }
public CsvEntityProducer(string fileSetName, string entitySet, string entityKind, EntityProducerParams parameters, bool sourceOrder) { //Init CSV Separators and encoding file InitSeparators(fileSetName); GetEncoding(fileSetName); // Calculate entities count // TODO: Need to rewrite in better way. using (var countReader = new CsvReader(new StreamReader(fileSetName + DataLoaderConstants.FileExtCsv, enc), true, separator)) { while (countReader.ReadNextRecord()) { EntityCount++; } } var reader = new StreamReader(string.Concat(fileSetName, DataLoaderConstants.FileExtCsv), enc); _csvReader = new CsvReader(reader, true, separator); _params = parameters; _schemaEntity = GetSchemaEntity(entitySet, entityKind, parameters.PropertyToTypeMap); _sourceOrder = sourceOrder; }