diff --git a/.vs/Route4MeSDK/v16/.suo b/.vs/Route4MeSDK/v16/.suo index 47e6ef48..5b099df6 100644 Binary files a/.vs/Route4MeSDK/v16/.suo and b/.vs/Route4MeSDK/v16/.suo differ diff --git a/.vs/Route4MeSDK/v16/TestStore/0/testlog.manifest b/.vs/Route4MeSDK/v16/TestStore/0/testlog.manifest index 15fd0158..ddca0d5b 100644 Binary files a/.vs/Route4MeSDK/v16/TestStore/0/testlog.manifest and b/.vs/Route4MeSDK/v16/TestStore/0/testlog.manifest differ diff --git a/Route4MeSDKLibrary/Consts.cs b/Route4MeSDKLibrary/Consts.cs index a1c60097..b7375163 100755 --- a/Route4MeSDKLibrary/Consts.cs +++ b/Route4MeSDKLibrary/Consts.cs @@ -54,6 +54,7 @@ public static class R4MEInfrastructureSettings public const string Geocoder = MainHost + "/api/geocoder.php"; public const string FastGeocoder = MainHost + "/actions/upload/json-geocode.php"; + public const string SaveGeocodedAddresses = MainHost + "/api/address_book/save_geocoded.php"; public const string r4meValidator = "https://validator.route4me.com:443/"; public const string RapidStreetData = "https://rapid.route4me.com/street_data"; public const string RapidStreetZipcode = "https://rapid.route4me.com/street_data/zipcode"; @@ -141,7 +142,7 @@ public static class R4MEInfrastructureSettingsV5 #region Telematics Platform - public const string StagingHost = "https://virtserver.swaggerhub.com/Route4Me/telematics-gateway/1.0.0"; + public const string StagingHost = "/api"; // Temporary unavailable public const string TelematicsConnection = StagingHost+"/connections"; public const string TelematicsConnectionVehicles = StagingHost + "/connections/{connection_token}/vehicles"; @@ -185,6 +186,31 @@ public static class R4MEInfrastructureSettingsV5 #endregion + #region Address Book Contacts + public const string ContactHost = MainHost + "/address-book"; + + public const string ContactsGetAll = ContactHost + "/addresses/index/all"; + public const string ContactsGetAllPaginated = ContactHost + "/addresses/index/pagination"; + public const string ContactsGetClusters = ContactHost + "/addresses/index/clustering"; + public const string ContactsFind = ContactHost + "/addresses/show"; + public const string ContactsAddNew = ContactHost + "/addresses"; + public const string ContactsAddMultiple = ContactHost + "/addresses/batch-create"; + public const string ContactsUpdateById = ContactHost + "/addresses/{address_id}"; + public const string ContactsUpdateMultiple = ContactHost + "/addresses/batch-update"; + public const string ContactsUpdateByAreas = ContactHost + "/addresses/update-by-areas"; + public const string ContactsDeleteMultiple = ContactHost + "/addresses/delete"; + public const string ContactsDeleteByAreas = ContactHost + "/addresses/delete-by-areas"; + public const string ContactsGetCustomFields = ContactHost + "/addresses/custom-fields"; + public const string ContactsGetDepots = ContactHost + "/addresses/depots"; + public const string ContactsReindexCallback = ContactHost + "/reindex-callback"; + public const string ContactsExport = ContactHost + "/addresses/export"; + public const string ContactsExportByAreas = ContactHost + "/addresses/export-by-areas"; + public const string ContactsExportByAreaIds = ContactHost + "/addresses/export-by-area-ids"; + public const string ContactsGetAsyncJobStatus = ContactHost + "/addresses/job-tracker/status/{job_id}"; + public const string ContactsGetAsyncJobResult = ContactHost + "/addresses/job-tracker/result/{job_id}"; + + #endregion + #endregion } } diff --git a/Route4MeSDKLibrary/DataTypes/V5/AddressBookContact/AddressBookContact.cs b/Route4MeSDKLibrary/DataTypes/V5/AddressBookContact/AddressBookContact.cs new file mode 100644 index 00000000..c62570a6 --- /dev/null +++ b/Route4MeSDKLibrary/DataTypes/V5/AddressBookContact/AddressBookContact.cs @@ -0,0 +1,376 @@ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json.Linq; + +namespace Route4MeSDK.DataTypes.V5 +{ + /// + /// Address book contact class. + /// See the JSON schema at + /// Time when the contact was created. + /// + [DataMember(Name = "created_timestamp", EmitDefaultValue = false)] + public long created_timestamp { get; set; } + + /// + /// Unique ID of the contact. + /// + [DataMember(Name = "address_id", EmitDefaultValue = false)] + public int? address_id { get; set; } + + /// + /// The geographic address of the contact. + /// + [DataMember(Name = "address_1")] + public string address_1 { get; set; } + + /// + /// Second geographic address of the contact. + /// + [DataMember(Name = "address_2", EmitDefaultValue = false)] + public string address_2 { get; set; } + + /// + /// Unique ID of the member. + /// + [DataMember(Name = "member_id", EmitDefaultValue = false)] + public int? member_id { get; set; } + + /// + /// The contact's alias. + /// + [DataMember(Name = "address_alias", EmitDefaultValue = false)] + public string address_alias { get; set; } + + /// + /// A group the contact belongs. + /// + [DataMember(Name = "address_group", EmitDefaultValue = false)] + public string address_group { get; set; } + + /// + /// The first name of the contact person. + /// + [DataMember(Name = "first_name", EmitDefaultValue = false)] + public string first_name { get; set; } + + /// + /// The last name of the contact person. + /// + [DataMember(Name = "last_name", EmitDefaultValue = false)] + public string last_name { get; set; } + + /// + /// Start of the contact's local time window. + /// + [DataMember(Name = "local_time_window_start", EmitDefaultValue = false)] + public long? local_time_window_start { get; set; } + + /// + /// End of the contact's local time window. + /// + [DataMember(Name = "local_time_window_end", EmitDefaultValue = false)] + public long? local_time_window_end { get; set; } + + /// + /// Start of the contact's second local time window. + /// + [DataMember(Name = "local_time_window_start_2", EmitDefaultValue = false)] + public long? local_time_window_start_2 { get; set; } + + /// + /// End of the contact's second local time window. + /// + [DataMember(Name = "local_time_window_end_2", EmitDefaultValue = false)] + public long? local_time_window_end_2 { get; set; } + + /// + /// The contact's email. + /// + [DataMember(Name = "address_email", EmitDefaultValue = false)] + public string address_email { get; set; } + + /// + /// The contact's phone number. + /// + [DataMember(Name = "address_phone_number", EmitDefaultValue = false)] + public string address_phone_number { get; set; } + + /// + /// A latitude of the contact's cached position. + /// + [DataMember(Name = "cached_lat")] + public double cached_lat { get; set; } + + /// + /// A longitude of the contact's cached position. + /// + [DataMember(Name = "cached_lng")] + public double cached_lng { get; set; } + + /// + /// A latitude of the contact's curbside. + /// + [DataMember(Name = "curbside_lat")] + public double? curbside_lat { get; set; } + + /// + /// A longitude of the contact's curbside. + /// + [DataMember(Name = "curbside_lng")] + public double? curbside_lng { get; set; } + + /// + /// A city the contact belongs. + /// + [DataMember(Name = "address_city", EmitDefaultValue = false)] + public string address_city { get; set; } + + /// + /// The ID of the state the contact belongs. + /// + [DataMember(Name = "address_state_id", EmitDefaultValue = false)] + public string address_state_id { get; set; } + + /// + /// The ID of the country the contact belongs. + /// + [DataMember(Name = "address_country_id", EmitDefaultValue = false)] + public string address_country_id { get; set; } + + /// + /// The contact's ZIP code. + /// + [DataMember(Name = "address_zip", EmitDefaultValue = false)] + public string address_zip { get; set; } + + /// + /// An array of the contact's custom field-value pairs. + /// + [DataMember(Name = "address_custom_data", EmitDefaultValue = false)] + public object address_custom_data + { + get + { + return _address_custom_data; + } + set + { + try + { + if (value == null || ((object)value).GetType() == typeof(Array)) + { + _address_custom_data = null; + } + else + { + if (((object)value).GetType() == typeof(JObject)) + { + _address_custom_data = ((JObject)value).ToObject>(); + } + else if (((object)value).GetType() == typeof(Dictionary)) + { + if (value == null || ((object)value).GetType() != typeof(Array)) + _address_custom_data = value; + } + } + } + catch (System.Exception ex) + { + Console.WriteLine(ex.Message); + } + } + } + + private object _address_custom_data; + + /// + /// An array of the contact's schedules. + /// + [DataMember(Name = "schedule", EmitDefaultValue = false)] + public IList schedule { get; set; } + + /// + /// The list of dates that should be omitted from the schedules. + /// + [DataMember(Name = "schedule_blacklist", EmitDefaultValue = false)] + public string[] schedule_blacklist { get; set; } + + /// + /// Number of the routes containing the contact. + /// + [DataMember(Name = "in_route_count", EmitDefaultValue = false)] + public int? in_route_count { get; set; } + + /// + /// Number of the visits to the contact. + /// + [DataMember(Name = "visited_count", EmitDefaultValue = false)] + public int? visited_count { get; set; } + + /// + /// When the contact was last visited. + /// + [DataMember(Name = "last_visited_timestamp", EmitDefaultValue = false)] + public long? last_visited_timestamp { get; set; } + + /// + /// When the contact was last routed. + /// + [DataMember(Name = "last_routed_timestamp", EmitDefaultValue = false)] + public long? last_routed_timestamp { get; set; } + + /// + /// The service time at the contact's address. + /// + [DataMember(Name = "service_time", EmitDefaultValue = false)] + public long? service_time { get; set; } + + /// + /// The contact's local timezone. + /// + [DataMember(Name = "local_timezone_string", EmitDefaultValue = false)] + public string local_timezone_string { get; set; } + + /// + /// The contact's color on the map. + /// + [DataMember(Name = "color", EmitDefaultValue = false)] + public string color { get; set; } + + /// + /// The contact's icon on the map. + /// + [DataMember(Name = "address_icon", EmitDefaultValue = false)] + public string address_icon { get; set; } + + /// + /// The contact's stop type. + /// + [DataMember(Name = "address_stop_type")] + public string AddressStopType { get; set; } + + /// + /// The cubic volume of the contact's cargo. + /// + [DataMember(Name = "address_cube", EmitDefaultValue = false)] + public double? AddressCube { get; set; } + + /// + /// The number of pieces/palllets that this destination/order/line-item consumes/contains on a vehicle. + /// + [DataMember(Name = "address_pieces", EmitDefaultValue = false)] + public int? AddressPieces { get; set; } + + /// + /// The reference number of the address. + /// + [DataMember(Name = "address_reference_no", EmitDefaultValue = false)] + public string AddressReferenceNo { get; set; } + + /// + /// The revenue from the contact. + /// + [DataMember(Name = "address_revenue", EmitDefaultValue = false)] + public double? AddressRevenue { get; set; } + + /// + /// The weight of the contact's cargo. + /// + [DataMember(Name = "address_weight", EmitDefaultValue = false)] + public double? AddressWeight { get; set; } + + /// + /// If present, the priority will sequence addresses in all the optimal routes so that + /// higher priority addresses are general at the beginning of the route sequence. + /// 1 is the highest priority, 100000 is the lowest. + /// + [DataMember(Name = "address_priority", EmitDefaultValue = false)] + public int? AddressPriority { get; set; } + + /// + /// The customer purchase order of the contact. + /// + [DataMember(Name = "address_customer_po", EmitDefaultValue = false)] + public string AddressCustomerPo { get; set; } + + /// + /// Assigned to the member + /// + [DataMember(Name = "assigned_to", EmitDefaultValue = false)] + public ContactAssignedTo IsAssigned { get; set; } + + /// + /// If true, the contact is eligigble for pickup. + /// + [DataMember(Name = "eligible_pickup", EmitDefaultValue = false)] + public bool? EligiblePickup { get; set; } + + /// + /// If true, the contact is eligigble for depot. + /// + [DataMember(Name = "eligible_depot", EmitDefaultValue = false)] + public bool? EligibleDepot { get; set; } + + [OnSerializing()] + internal void OnSerializingMethod(StreamingContext context) + { + if (_address_custom_data == null) return; + + if (_address_custom_data.GetType() != typeof(Dictionary)) + { + _address_custom_data = null; + } + } + } + + /// + /// Data structure of an assigned member. + /// + [DataContract] + public class ContactAssignedTo : QueryTypes.GenericParameters + { + /// + /// Unique ID of the member. + /// + [DataMember(Name = "member_id", EmitDefaultValue = false)] + public int? MemberId { get; set; } + + /// + /// The first name of the contact person. + /// + [DataMember(Name = "member_first_name", EmitDefaultValue = false)] + public string MemberFirstName { get; set; } + + /// + /// The last name of the contact person. + /// + [DataMember(Name = "member_last_name", EmitDefaultValue = false)] + public string MemberLastName { get; set; } + + /// + /// The contact's email. + /// + [DataMember(Name = "member_email", EmitDefaultValue = false)] + public string MemberEmail { get; set; } + + /// + /// Membership expiration date + /// + [DataMember(Name = "until", EmitDefaultValue = false)] + public string Until { get; set; } + } +} diff --git a/Route4MeSDKLibrary/DataTypes/V5/AddressBookContact/AddressBookContactsResponse.cs b/Route4MeSDKLibrary/DataTypes/V5/AddressBookContact/AddressBookContactsResponse.cs new file mode 100644 index 00000000..e4e2898f --- /dev/null +++ b/Route4MeSDKLibrary/DataTypes/V5/AddressBookContact/AddressBookContactsResponse.cs @@ -0,0 +1,29 @@ +using System.Runtime.Serialization; + +namespace Route4MeSDK.DataTypes.V5 +{ + /// + /// Response from the get address book contacts request + /// + [DataContract] + public sealed class AddressBookContactsResponse : QueryTypes.GenericParameters + { + /// + /// An array of the visible addresses + /// + [DataMember(Name = "fields", EmitDefaultValue = false)] + public string[] Fields { get; set; } + + /// + /// An array of the AddressBookContact type objects + /// + [DataMember(Name = "results", EmitDefaultValue = false)] + public AddressBookContact[] results { get; set; } + + /// + /// Total number of the returned address book contacts + /// + [DataMember(Name = "total", EmitDefaultValue = false)] + public int? total { get; set; } + } +} diff --git a/Route4MeSDKLibrary/DataTypes/cDatabase.cs b/Route4MeSDKLibrary/DataTypes/cDatabase.cs index c73ac171..8d3facbe 100644 --- a/Route4MeSDKLibrary/DataTypes/cDatabase.cs +++ b/Route4MeSDKLibrary/DataTypes/cDatabase.cs @@ -559,6 +559,8 @@ public void Csv2Table(string sFileName, string sTableName, string sIdName, int i } } + + /// /// Method for exporting addressbook data from SQL type server to the CSV file /// (with structure equal to the CSV file exported by Route4Me web UI). diff --git a/Route4MeSDKLibrary/FastProcessing/FastBulkGeocoding.cs b/Route4MeSDKLibrary/FastProcessing/FastBulkGeocoding.cs index 8c335deb..a00351ea 100644 --- a/Route4MeSDKLibrary/FastProcessing/FastBulkGeocoding.cs +++ b/Route4MeSDKLibrary/FastProcessing/FastBulkGeocoding.cs @@ -16,6 +16,8 @@ using Route4MeSDK.DataTypes; using Newtonsoft.Json.Serialization; using System.Diagnostics; +using System.IO; +using Route4MeSDK.DataTypes.V5; namespace Route4MeSDK.FastProcessing { @@ -41,12 +43,21 @@ public class FastBulkGeocoding : Connection bool largeJsonFileProcessingIsDone; bool geocodedAddressesDownloadingIsDone; + bool largeCsvFileProcessingIsDone; + bool uploadContactsIsDone; + + int totalCsvChunks; + List savedAddresses; JsonSerializer jsSer = new JsonSerializer(); public string apiKey { get; set; } + public int CsvChankSize { get; set; } = 300; + public int JsonChankSize { get; set; } = 300; + public int ChankPause { get; set; } = 2000; + public FastBulkGeocoding(string ApiKey, bool EnableTraceSource = false) { if (ApiKey!="") apiKey = ApiKey; @@ -122,6 +133,121 @@ public void uploadAndGeocodeLargeJsonFile(string fileName) } + public void uploadLargeContactsCsvFile(string fileName, out string errorString) + { + errorString = null; + totalCsvChunks = 0; + + if (!File.Exists(fileName)) + { + errorString = "The file " + fileName + " doesn't exist."; + return; + } + + var route4Me = new Route4MeManager(apiKey); + + largeCsvFileProcessingIsDone = false; + + fileReading = new FastFileReading(); + + fileReading.csvObjectsChunkSize = CsvChankSize; + fileReading.chunkPause = ChankPause; + fileReading.jsonObjectsChunkSize = JsonChankSize; + + fileReading.CsvFileChunkIsReady += FileReading_CsvFileChunkIsReady; + + //fileReading.CsvFileReadingIsDone += FileReading_CsvFileReadingIsDone; + + //fileReading.JsonFileChunkIsReady += FileReading_JsonFileChunkIsReady; + + fileReading.CsvFileReadingIsDone += FileReading_CsvFileReadingIsDone; + + mainResetEvent = new ManualResetEvent(false); + + fileReading.readingChunksFromLargeCsvFile(fileName, out errorString); + } + + private void FileReading_CsvFileReadingIsDone(object sender, FastFileReading.CsvFileReadingIsDoneArgs e) + { + bool isDone = e.IsDone; + if (isDone) + { + largeCsvFileProcessingIsDone = true; + mainResetEvent.Set(); + if (geocodedAddressesDownloadingIsDone) + { + OnGeocodingIsFinished(new GeocodingIsFinishedArgs() { isFinished = true }); + } + // fire here event for external (test) code + } + } + + private void FileReading_CsvFileChunkIsReadyOld(object sender, FastFileReading.CsvFileChunkIsReadyArgs e) + { + string csvAddressesChunk = e.AddressesChunk; + + var uploadAddressesResponse = uploadAddressesToTemporaryStorage(csvAddressesChunk); + + if (uploadAddressesResponse != null) + { + string tempAddressesStorageID = uploadAddressesResponse.optimization_problem_id; + int addressesInChunk = (int)uploadAddressesResponse.address_count; + + if (addressesInChunk < fileReading.csvObjectsChunkSize) requestedAddresses = addressesInChunk; // last chunk + + geocodedAddressesDownloadingIsDone = true; + + SaveAddressesToDatabase(tempAddressesStorageID); + + + //downloadGeocodedAddresses(tempAddressesStorageID, addressesInChunk); + } + + } + + private void FileReading_CsvFileChunkIsReady(object sender, FastFileReading.CsvFileChunkIsReadyArgs e) + { + var route4Me = new Route4MeManagerV5(apiKey); + + var contactParams = new Route4MeManagerV5.BatchCreatingAddressBookContactsRequest() + { + Data = e.multiContacts.ToArray() + }; + + var response = route4Me.BatchCreateAdressBookContacts(contactParams, out ResultResponse resultResponse); + + if (response?.status ?? false) totalCsvChunks += e.multiContacts.Count; + + Console.WriteLine( + (response?.status ?? false) + ? totalCsvChunks + " address book contacts added to database" + : "Faild to add " + e.multiContacts.Count + " address book contacts"); + + if (!(response?.status ?? false)) + { + Console.WriteLine("Exit code: " + resultResponse.ExitCode + Environment.NewLine+ + "Code: " + resultResponse.Code + Environment.NewLine + + "Status: " + resultResponse.Status + Environment.NewLine + ); + + foreach (var msg in resultResponse.Messages) + { + Console.WriteLine(msg.Key + ": " + msg.Value); + } + Console.WriteLine("-------------------------------"); + } + } + + private void SaveAddressesToDatabase(string tempOptimizationProblemId) + { + var r4me = new Route4MeManager(apiKey); + + bool saved = r4me.saveGeocodedAddressesToDatabase(tempOptimizationProblemId, out string errorString); + + Console.WriteLine(saved ? "Uploaded addesses saved to database" : "Cannot save uploaded addesses to database"); + + } + /// /// Event handler for the JsonFileReadingIsDone event /// @@ -163,6 +289,8 @@ private void FileReading_JsonFileChunkIsReady(object sender, FastFileReading.Jso if (addressesInChunk < fileReading.jsonObjectsChunkSize) requestedAddresses = addressesInChunk; // last chunk downloadGeocodedAddresses(tempAddressesStorageID, addressesInChunk); + + SaveAddressesToDatabase(tempAddressesStorageID); } } @@ -196,6 +324,7 @@ public Route4MeManager.uploadAddressesToTemporaryStorageResponse uploadAddresses return uploadResponse; } + /// /// Geocode and download the addresses from the temporary storage. /// @@ -314,7 +443,7 @@ public async void downloadGeocodedAddresses(string temporaryAddressesStorageID, JsonSerializerSettings jsonSettings = new JsonSerializerSettings() { - Error = delegate (object sender, ErrorEventArgs args) + Error = delegate (object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args) { errors.Add(args.ErrorContext.Error.Message); args.ErrorContext.Handled = true; diff --git a/Route4MeSDKLibrary/FastProcessing/FastFileReading.cs b/Route4MeSDKLibrary/FastProcessing/FastFileReading.cs index 203d037c..af383853 100644 --- a/Route4MeSDKLibrary/FastProcessing/FastFileReading.cs +++ b/Route4MeSDKLibrary/FastProcessing/FastFileReading.cs @@ -9,6 +9,7 @@ using Newtonsoft.Json; using Route4MeSDK.DataTypes; using System.Threading; +using CsvHelper; namespace Route4MeSDK.FastProcessing { @@ -21,8 +22,14 @@ public class FastFileReading const long length = 0x20000000; // 512 megabytes string jsonFileName; + string csvFileName; - public int jsonObjectsChunkSize { get; set; } + public int chunkPause { get; set; } = 2000; + + public int jsonObjectsChunkSize { get; set; } = 300; + public int csvObjectsChunkSize { get; set; } = 300; + + public static Dictionary csvAddressMapping { get; set; } private ManualResetEvent manualResetEvent = null; @@ -69,6 +76,53 @@ public class JsonFileReadingIsDoneArgs : EventArgs #endregion + #region // Event handler for the CsvFileChunkIsReady + + public event EventHandler CsvFileChunkIsReady; + + public event EventHandler CsvFileReadingIsDone; + + public delegate void CsvFileChunkIsReadyEventHandler(object sender, CsvFileChunkIsReadyArgs e); + + public class CsvFileChunkIsReadyArgs : EventArgs + { + public string AddressesChunk { get; set; } + + public List multiContacts { get; set; } + } + + protected virtual void OnCsvFileChunkIsReady(CsvFileChunkIsReadyArgs e) + { + EventHandler handler = CsvFileChunkIsReady; + + if (handler != null) + { + handler(this, e); + } + } + + #endregion + + #region // Event handler for the CsvFileReadingIsDone event + protected virtual void OnCsvFileReadingIsDone(CsvFileReadingIsDoneArgs e) + { + EventHandler handler = CsvFileReadingIsDone; + + if (handler != null) + { + handler(this, e); + } + } + + public delegate void CsvFileReadingIsDoneEventHandler(object sender, CsvFileReadingIsDoneArgs e); + + public class CsvFileReadingIsDoneArgs : EventArgs + { + public bool IsDone { get; set; } + } + + #endregion + public void fastReadFromFile(String sFileName) { if (sFileName.Substring(1, 1) != ":") @@ -152,7 +206,7 @@ public void readingChunksFromLargeJsonFile(string fileName) //manualResetEvent.Set(); OnJsonFileChunkIsReady(chunkIsReady); - Thread.Sleep(5000); + Thread.Sleep(chunkPause); //manualResetEvent.WaitOne(); } } @@ -166,7 +220,7 @@ public void readingChunksFromLargeJsonFile(string fileName) sJsonAddressesChunk = ""; OnJsonFileChunkIsReady(chunkIsReady); - System.Threading.Thread.Sleep(5000); + System.Threading.Thread.Sleep(chunkPause); } JsonFileReadingIsDoneArgs args = new JsonFileReadingIsDoneArgs() { IsDone = true }; @@ -175,6 +229,293 @@ public void readingChunksFromLargeJsonFile(string fileName) } } + public void readingChunksFromLargeCsvFile(string fileName, out string errorString) + { + errorString = null; + int curJsonObjects = 0; + //string sJsonAddressesChunk = ""; + //var serializer = new JsonSerializer(); + + var lsMultiContacts = new List(); + + using (TextReader reader = File.OpenText(fileName)) + { + var csv = new CsvReader(reader); + + csv.ReadHeader(); + string[] csvHeaders = csv.FieldHeaders.Where(x=>x.Length>0).ToArray(); + + foreach (var csvHeader in csvHeaders) + { + if (!csvAddressMapping.ContainsKey(csvHeader)) + { + errorString = "CSV file header " + csvHeader + " is not specified in the CSV address mapping."; + return; + } + } + + foreach (string k1 in csvAddressMapping.Keys) + { + if (!csvHeaders.Contains(k1)) + { + errorString = "The CSV address mapping key " + k1 + " is not found in the CSV header"; + return; + } + } + + while (csv.Read()) + { + var abContact = new DataTypes.V5.AddressBookContact(); + + foreach (var csvHeader in csvHeaders) + { + int fieldIndex = Array.IndexOf(csvHeaders, csvHeader); + var fieldValue = csv.GetField(fieldIndex); + + if (fieldValue != null) + { + string fieldType = abContact.GetType().GetProperty(csvAddressMapping[csvHeader]).PropertyType.Name; + + switch (fieldType) + { + case "String": + if (csvAddressMapping[csvHeader] == "address_alias" && fieldValue.ToString().Length > 59) + fieldValue = fieldValue.ToString().Substring(0, 59); + if (csvAddressMapping[csvHeader] == "address_zip" && fieldValue.ToString().Length > 6) + fieldValue = fieldValue.ToString().Substring(0, 5); + + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, fieldValue); + break; + case "Int32": + if (Int32.TryParse(fieldValue.ToString(), out Int32 __32)) + { + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, Convert.ToInt32(fieldValue)); + } + break; + case "Int64": + if (Int64.TryParse(fieldValue.ToString(), out Int64 __64)) + { + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, Convert.ToInt64(fieldValue)); + } + break; + case "Double": + if (Double.TryParse(fieldValue.ToString(), out double __d)) + { + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, Convert.ToDouble(fieldValue)); + } + break; + case "Boolean": + if (Boolean.TryParse(fieldValue.ToString(), out bool __b)) + { + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, Convert.ToBoolean(fieldValue)); + } + break; + default: + + break; + } + } + + } + + if (!csvAddressMapping.Values.Contains("AddressStopType")) abContact.AddressStopType = AddressStopType.Delivery.Description(); + + lsMultiContacts.Add(abContact); + + curJsonObjects++; + + if (curJsonObjects >= csvObjectsChunkSize) + { + CsvFileChunkIsReadyArgs chunkIsReady = new CsvFileChunkIsReadyArgs(); + chunkIsReady.multiContacts = lsMultiContacts; + curJsonObjects = 0; + + OnCsvFileChunkIsReady(chunkIsReady); + Thread.Sleep(chunkPause); + + lsMultiContacts = new List(); + } + + } + + if (lsMultiContacts.Count>0) + { + CsvFileChunkIsReadyArgs chunkIsReady = new CsvFileChunkIsReadyArgs(); + chunkIsReady.multiContacts = lsMultiContacts; + + OnCsvFileChunkIsReady(chunkIsReady); + + System.Threading.Thread.Sleep(chunkPause); + + lsMultiContacts = new List(); + } + + CsvFileReadingIsDoneArgs args = new CsvFileReadingIsDoneArgs() { IsDone = true }; + + OnCsvFileReadingIsDone(args); + } + } + + public void readingChunksFromLargeCsvFileOld(string fileName, out string errorString) + { + errorString = null; + int curJsonObjects = 0; + string sJsonAddressesChunk = ""; + var serializer = new JsonSerializer(); + + using (TextReader reader = File.OpenText(fileName)) + { + var csv = new CsvReader(reader); + + csv.ReadHeader(); + string[] csvHeaders = csv.FieldHeaders; + + foreach (var csvHeader in csvHeaders) + { + if (!csvAddressMapping.ContainsKey(csvHeader)) + { + errorString = "CSV file header " + csvHeader + " is not specified in the CSV address mapping."; + return; + } + } + + foreach (string k1 in csvAddressMapping.Keys) + { + if (!csvHeaders.Contains(k1)) + { + errorString = "The CSV address mapping key " + k1 + " is not found in the CSV header"; + return; + } + } + + while (csv.Read()) + { + var abContact = new AddressBookContact(); + + foreach (var csvHeader in csvHeaders) + { + int fieldIndex = Array.IndexOf(csvHeaders, csvHeader); + var fieldValue = csv.GetField(fieldIndex); + + if (fieldValue != null) + { + string fieldType = abContact.GetType().GetProperty(csvAddressMapping[csvHeader]).PropertyType.Name; + + switch (fieldType) + { + case "String": + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, fieldValue); + break; + case "Int32": + if (Int32.TryParse(fieldValue.ToString(), out Int32 __32)) + { + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, Convert.ToInt32(fieldValue)); + } + break; + case "Int64": + if (Int64.TryParse(fieldValue.ToString(), out Int64 __64)) + { + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, Convert.ToInt64(fieldValue)); + } + break; + case "Double": + if (Double.TryParse(fieldValue.ToString(), out double __d)) + { + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, Convert.ToDouble(fieldValue)); + } + break; + case "Boolean": + if (Boolean.TryParse(fieldValue.ToString(), out bool __b)) + { + abContact + .GetType() + .GetProperty(csvAddressMapping[csvHeader]) + .SetValue(abContact, Convert.ToBoolean(fieldValue)); + } + break; + default: + + break; + } + } + + } + + sJsonAddressesChunk += JsonConvert.SerializeObject(abContact, Formatting.None) + ","; + curJsonObjects++; + + if (curJsonObjects >= jsonObjectsChunkSize) + { + sJsonAddressesChunk = "{\"rows\":[" + sJsonAddressesChunk.TrimEnd(',') + "]}"; + //JsonFileChunkIsReadyArgs chunkIsReady = new JsonFileChunkIsReadyArgs(); + CsvFileChunkIsReadyArgs chunkIsReady = new CsvFileChunkIsReadyArgs(); + chunkIsReady.AddressesChunk = sJsonAddressesChunk; + sJsonAddressesChunk = ""; + curJsonObjects = 0; + + //manualResetEvent.Set(); + //OnJsonFileChunkIsReady(chunkIsReady); + OnCsvFileChunkIsReady(chunkIsReady); + Thread.Sleep(5000); + //manualResetEvent.WaitOne(); + } + + + } + + if (sJsonAddressesChunk != "") + { + sJsonAddressesChunk = "{\"rows\":[" + sJsonAddressesChunk.TrimEnd(',') + "]}"; + //JsonFileChunkIsReadyArgs chunkIsReady = new JsonFileChunkIsReadyArgs(); + CsvFileChunkIsReadyArgs chunkIsReady = new CsvFileChunkIsReadyArgs(); + chunkIsReady.AddressesChunk = sJsonAddressesChunk; + sJsonAddressesChunk = ""; + //OnJsonFileChunkIsReady(chunkIsReady); + OnCsvFileChunkIsReady(chunkIsReady); + + System.Threading.Thread.Sleep(5000); + } + + //JsonFileReadingIsDoneArgs args = new JsonFileReadingIsDoneArgs() { IsDone = true }; + CsvFileReadingIsDoneArgs args = new CsvFileReadingIsDoneArgs() { IsDone = true }; + //OnJsonFileReadingIsDone(args); + OnCsvFileReadingIsDone(args); + } + } + + private string csvRowToJsonObject(object csvRow) + { + + return null; + } + private void FbGeocoding_GeocodingIsFinished(object sender, FastBulkGeocoding.GeocodingIsFinishedArgs e) { //manualResetEvent.Set(); diff --git a/Route4MeSDKLibrary/Properties/AssemblyInfo.cs b/Route4MeSDKLibrary/Properties/AssemblyInfo.cs index 5b2942bc..ed1e0bc8 100755 --- a/Route4MeSDKLibrary/Properties/AssemblyInfo.cs +++ b/Route4MeSDKLibrary/Properties/AssemblyInfo.cs @@ -32,7 +32,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.1.6")] -[assembly: AssemblyFileVersion("1.0.1.6")] +[assembly: AssemblyVersion("1.0.1.7")] +[assembly: AssemblyFileVersion("1.0.1.7")] diff --git a/Route4MeSDKLibrary/QueryTypes/V5/AddressBookContact/AddressBookParameters.cs b/Route4MeSDKLibrary/QueryTypes/V5/AddressBookContact/AddressBookParameters.cs new file mode 100644 index 00000000..a538e76a --- /dev/null +++ b/Route4MeSDKLibrary/QueryTypes/V5/AddressBookContact/AddressBookParameters.cs @@ -0,0 +1,57 @@ +using System; + +namespace Route4MeSDK.QueryTypes.V5 +{ + /// + /// Parameters for the address book contact(s) request. + /// + /// + public sealed class AddressBookParameters : GenericParameters + { + /// + /// Unique ID of an address book contact. + /// Query parameter. + /// + [HttpQueryMemberAttribute(Name = "address_id", EmitDefaultValue = false)] + public string AddressId { get; set; } + + /// + /// Limit the number of records in response. + /// Query parameter. + /// + [HttpQueryMemberAttribute(Name = "limit", EmitDefaultValue = false)] + public uint? Limit { get; set; } + + /// + /// Only records from that offset will be considered. + /// Query parameter. + /// + [HttpQueryMemberAttribute(Name = "offset", EmitDefaultValue = false)] + public uint? Offset { get; set; } + + /// + /// Query string for filtering of the address book contacts. + /// Query parameter. + /// + [HttpQueryMemberAttribute(Name = "query", EmitDefaultValue = false)] + public string Query { get; set; } + + /// + /// An array of the fields. + /// If specified, the response will contain only the values of the listed fields. + /// Query parameter. + /// + [HttpQueryMemberAttribute(Name = "fields", EmitDefaultValue = false)] + public string[] Fields { get; set; } + + /// + /// Specifies which address book contacts to display. + /// Available values are: + /// 'all', 'routed', 'unrouted' + /// + /// Query parameter. + /// + [HttpQueryMemberAttribute(Name = "display", EmitDefaultValue = false)] + public string Display { get; set; } + } +} diff --git a/Route4MeSDKLibrary/Route4MeManager.cs b/Route4MeSDKLibrary/Route4MeManager.cs index 725c739f..0e24e72c 100755 --- a/Route4MeSDKLibrary/Route4MeManager.cs +++ b/Route4MeSDKLibrary/Route4MeManager.cs @@ -3362,6 +3362,35 @@ public uploadAddressesToTemporaryStorageResponse uploadAddressesToTemporaryStora return result.Item1; } + /// + /// Save addresses from temporary storage to database + /// + /// Temporary optimization problem ID with addresses + /// out: Error as string + /// If true, the addresses saved to the database + public bool saveGeocodedAddressesToDatabase(string tempOptimizationProblemID, out string errorString) + { + var request = new GeocodingRequest { }; + + string json = "{\"optimization_problem_id\":" + tempOptimizationProblemID + "}"; + HttpContent content = new StringContent(json); + content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); + + Tuple result = + GetJsonObjectFromAPIAsync( + request, + R4MEInfrastructureSettings.SaveGeocodedAddresses, + HttpMethodType.Post, + content, + false).GetAwaiter().GetResult(); + + Thread.SpinWait(5000); + + errorString = result.Item2; + + return result?.Item1?.status ?? false; + } + /// /// Asynchronous bath geocoding of the addresses. /// diff --git a/Route4MeSDKLibrary/Route4MeManagerV5.cs b/Route4MeSDKLibrary/Route4MeManagerV5.cs index 57dd2b4f..39e858cf 100644 --- a/Route4MeSDKLibrary/Route4MeManagerV5.cs +++ b/Route4MeSDKLibrary/Route4MeManagerV5.cs @@ -56,13 +56,13 @@ public Route4MeManagerV5(string apiKey) /// /// The request parameter for the address book contacts removing process. /// - [DataContract] - private sealed class RemoveAddressBookContactsRequest : QueryTypes.GenericParameters - { - /// The array of the address IDs - [DataMember(Name = "address_ids", EmitDefaultValue = false)] - public string[] AddressIds { get; set; } - } + // [DataContract] + // private sealed class RemoveAddressBookContactsRequest : QueryTypes.GenericParameters + // { + // /// The array of the address IDs + //[DataMember(Name = "address_ids", EmitDefaultValue = false)] + // public string[] AddressIds { get; set; } + // } /// /// Remove the address book contacts. @@ -70,19 +70,133 @@ private sealed class RemoveAddressBookContactsRequest : QueryTypes.GenericParame /// The array of the address IDs /// out: Error as string /// If true the contacts were removed successfully - public bool RemoveAddressBookContacts(string[] addressIds, out ResultResponse resultResponse) + public bool RemoveAddressBookContacts(int[] contactIDs, out ResultResponse resultResponse) { - var request = new RemoveAddressBookContactsRequest() + var request = new AddressBookContactsRequest() { - AddressIds = addressIds + AddressIds = contactIDs }; var response = GetJsonObjectFromAPI(request, - R4MEInfrastructureSettings.AddressBook, + R4MEInfrastructureSettingsV5.ContactsDeleteMultiple, HttpMethodType.Delete, out resultResponse); - return (response != null && response.status) ? true : false; + return response?.status ?? false; + } + + /// + /// Returns address book contacts + /// + /// An AddressParameters type object as the input parameters containg the parameters: Offset, Limit + /// Failing response + /// An AddressBookContactsResponse type object + public AddressBookContactsResponse GetAddressBookContacts(AddressBookParameters addressBookParameters, out ResultResponse resultResponse) + { + var response = GetJsonObjectFromAPI(addressBookParameters, + R4MEInfrastructureSettingsV5.ContactsGetAll, + HttpMethodType.Get, + out resultResponse); + + return response; + } + + /// + /// Get an address book contact by ID + /// + /// contact ID + /// Failing response + /// An AddressBookContact type object + public AddressBookContact GetAddressBookContactById(int contactId, out ResultResponse resultResponse) + { + var gparams = new Route4MeSDK.QueryTypes.GenericParameters(); + gparams.ParametersCollection.Add("address_id", contactId.ToString()); + + var response = GetJsonObjectFromAPI(gparams, + R4MEInfrastructureSettingsV5.ContactsFind, + HttpMethodType.Get, + out resultResponse); + + return response; + } + + /// + /// The request parameter for the address book contacts removing process. + /// + [DataContract] + private sealed class AddressBookContactsRequest : QueryTypes.GenericParameters + { + /// The array of the address IDs + [DataMember(Name = "address_ids", EmitDefaultValue = false)] + public int[] AddressIds { get; set; } + } + + /// + /// Get address book contacts by sending an array of address IDs. + /// + /// An array of address IDs + /// Failing response + /// An AddressBookContactsResponse type object + public AddressBookContactsResponse GetAddressBookContactsByIds(int[] contactIDs, out ResultResponse resultResponse) + { + var request = new AddressBookContactsRequest() + { + AddressIds = contactIDs + }; + + var response = GetJsonObjectFromAPI(request, + R4MEInfrastructureSettingsV5.ContactsFind, + HttpMethodType.Post, + out resultResponse); + + return response; + } + + /// + /// Add an address book contact to database. + /// + /// The contact parameters + /// Failing response + /// Created address book contact + public AddressBookContact AddAddressBookContact(AddressBookContact contactParams, out ResultResponse resultResponse) + { + parseWithNewtonJson = true; + + contactParams.PrepareForSerialization(); + + return GetJsonObjectFromAPI(contactParams, + R4MEInfrastructureSettingsV5.ContactsAddNew, + HttpMethodType.Post, + out resultResponse); + } + + /// + /// The request parameter for the multiple address book contacts creating process. + /// + [DataContract] + public sealed class BatchCreatingAddressBookContactsRequest : QueryTypes.GenericParameters + { + /// The array of the address IDs + [DataMember(Name = "data", EmitDefaultValue = false)] + public AddressBookContact[] Data { get; set; } + } + + /// + /// Add multiple address book contacts to database. + /// + /// The data with multiple contacts parameters + /// Failing response + /// Status response (TO DO: expected result with created multiple contacts) + public StatusResponse BatchCreateAdressBookContacts(BatchCreatingAddressBookContactsRequest contactParams, out ResultResponse resultResponse) + { + //parseWithNewtonJson = true; + + contactParams.PrepareForSerialization(); + + return GetJsonObjectFromAPI(contactParams, + R4MEInfrastructureSettingsV5.ContactsAddMultiple, + HttpMethodType.Post, + out resultResponse); } #endregion diff --git a/Route4MeSDKLibrary/Route4MeSDKLibrary.csproj b/Route4MeSDKLibrary/Route4MeSDKLibrary.csproj index fd73d65b..2e12c788 100755 --- a/Route4MeSDKLibrary/Route4MeSDKLibrary.csproj +++ b/Route4MeSDKLibrary/Route4MeSDKLibrary.csproj @@ -43,6 +43,9 @@ + + ..\packages\CsvHelper.2.16.3.0\lib\net45\CsvHelper.dll + ..\packages\fastJSON.2.2.0.1\lib\net40\fastJSON.dll True @@ -151,6 +154,8 @@ + + @@ -235,6 +240,7 @@ + diff --git a/Route4MeSDKLibrary/Utils.cs b/Route4MeSDKLibrary/Utils.cs index 74df0f1f..f7f4b220 100755 --- a/Route4MeSDKLibrary/Utils.cs +++ b/Route4MeSDKLibrary/Utils.cs @@ -14,6 +14,7 @@ using Route4MeSDK.DataTypes; using Microsoft.CSharp; using static Route4MeSDK.Route4MeManager; +using System.Linq.Expressions; namespace Route4MeSDK { @@ -495,6 +496,24 @@ public static Dictionary GetPropertyPositions() where T : class return propertyPositions; } + // + // Get the name of a static or instance property from a property access lambda. + // + // Type of the property + // lambda expression of the form: '() => Class.Property' or '() => object.Property' + // The name of the property + public static string GetPropertyName(Expression> propertyLambda) + { + var me = propertyLambda.Body as MemberExpression; + + if (me == null) + { + throw new ArgumentException("You must pass a lambda of the form: '() => Class.Property' or '() => object.Property'"); + } + + return me.Member.Name; + } + /// /// Returns ordered property names. /// diff --git a/Route4MeSDKLibrary/bin/Debug/CsvHelper.dll b/Route4MeSDKLibrary/bin/Debug/CsvHelper.dll new file mode 100644 index 00000000..0645170a Binary files /dev/null and b/Route4MeSDKLibrary/bin/Debug/CsvHelper.dll differ diff --git a/Route4MeSDKLibrary/bin/Debug/CsvHelper.xml b/Route4MeSDKLibrary/bin/Debug/CsvHelper.xml new file mode 100644 index 00000000..d987af92 --- /dev/null +++ b/Route4MeSDKLibrary/bin/Debug/CsvHelper.xml @@ -0,0 +1,3991 @@ + + + + CsvHelper + + + + + Represents errors that occur due to bad data. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Creates CsvHelper classes. + + + + + Creates an . + + The text reader to use for the csv parser. + The configuration to use for the csv parser. + The created parser. + + + + Creates an . + + The text reader to use for the csv parser. + The created parser. + + + + Creates an . + + The text reader to use for the csv reader. + The configuration to use for the reader. + The created reader. + + + + Creates an . + + The text reader to use for the csv reader. + The created reader. + + + + Creates an . + + The parser used to create the reader. + The created reader. + + + + Creates an . + + The text writer to use for the csv writer. + The configuration to use for the writer. + The created writer. + + + + Creates an . + + The text writer to use for the csv writer. + The created writer. + + + + Represents errors that occur in CsvHelper. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Represents an error caused because a field is missing + in the header while reading a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Parses a CSV file. + + + + + Gets the configuration. + + + + + Gets the field count. + + + + + Gets the character position that the parser is currently on. + + + + + Gets the byte position that the parser is currently on. + + + + + Gets the row of the CSV file that the parser is currently on. + This is the logical CSV row. + + + + + Gets the row of the CSV file that the parser is currently on. + This is the actual file row. + + + + + Gets the raw row for the current record that was parsed. + + + + + Creates a new parser using the given . + + The with the CSV file data. + + + + Creates a new parser using the given + and . + + The with the CSV file data. + The configuration. + + + + Reads a record from the CSV file. + + A of fields for the record read. + If there are no more records, null is returned. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + True if the instance needs to be disposed of. + + + + Checks if the instance has been disposed of. + + + + + + Adds the field to the current record. + + The record position to add the field to. + The field to add. + + + + Appends the current buffer data to the field. + + The field to append the current buffer to. + The start position in the buffer that the . + The length. + + + + Updates the byte position using the data from the reader buffer. + + The field start position. + The length. + + + + Reads the next line. + + The line separated into fields. + + + + Gets the current character from the buffer while + advancing the buffer if it ran out. + + The char that gets the read char set to. + The start position of the current field. + The start position of the raw field. + The field. + A value indicating if the previous char read was a delimiter. + The position in the record we are currently at. + The length of the field in the buffer. + A value indicating if the row is current a comment row. + A value indicating if this call is a peek. If true and the end of the record was found + no record handling will be done. + A value indicating if read a char was read. True if a char was read, otherwise false. + + + + Reads the Excel seperator and sets it to the delimiter. + + + + + Represents errors that occur while parsing a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Reads data that was parsed from . + + + + + Gets the configuration. + + + + + Gets the parser. + + + + + Gets the field headers. + + + + + Get the current record; + + + + + Gets the current row. + + + + + Creates a new CSV reader using the given and + as the default parser. + + The reader. + + + + Creates a new CSV reader using the given and + and as the default parser. + + The reader. + The configuration. + + + + Creates a new CSV reader using the given . + + The used to parse the CSV file. + + + + Reads the header field without reading the first row. + + True if there are more records, otherwise false. + + + + Advances the reader to the next record. + If HasHeaderRecord is true (true by default), the first record of + the CSV file will be automatically read in as the header record + and the second record will be returned. + + True if there are more records, otherwise false. + + + + Gets the raw field at position (column) index. + + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) index. + + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The raw field. + + + + Gets the raw field at position (column) name and the index + instance of that field. The index is used when there are + multiple columns with the same header name. + + The named index of the field. + The zero based index of the instance of the field. + The raw field. + + + + Gets the field converted to using + the specified . + + The index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The named index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The index of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The zero based index of the instance of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to T at position (column) index. + + The of the field. + The zero based index of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) name. + + The of the field. + The named index of the field. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + + + + + Gets the field converted to T at position (column) index using + the given . + + The of the field. + The zero based index of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position (column) name using + the given . + + The of the field. + The named index of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position (column) index using + the given . + + The of the field. + The used to convert the field to T. + The zero based index of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) name using + the given . + + The of the field. + The used to convert the field to T. + The named index of the field. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + The of the field. + The used to convert the field to T. + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) index. + + The of the field. + The zero based index of the field. + The field converted to type T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name. + + The of the field. + The named index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) index + using the specified . + + The of the field. + The zero based index of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The named index of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) index + using the specified . + + The of the field. + The used to convert the field to T. + The zero based index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The used to convert the field to T. + The named index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The used to convert the field to T. + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Determines whether the current record is empty. + A record is considered empty if all fields are empty. + + + true if [is record empty]; otherwise, false. + + + + + Gets the record converted into T. + + The of the record. + The record converted to T. + + + + Gets the record. + + The of the record. + The record. + + + + Gets all the records in the CSV file and + converts each to T. The Read method + should not be used when using this. + + The of the record. + An of records. + + + + Gets all the records in the CSV file and + converts each to T. The Read method + should not be used when using this. + + The of the record. + An of records. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The type to invalidate. + + + + Clears the record cache for all types. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + True if the instance needs to be disposed of. + + + + Checks if the instance has been disposed of. + + + + + + Checks if the reader has been read yet. + + + + + + Determines whether the current record is empty. + A record is considered empty if all fields are empty. + + True to check if the record + has been read, otherwise false. + + true if [is record empty]; otherwise, false. + + + + + Gets a function to test for an empty string. + Will check when making its decision. + + The function to test for an empty string. + + + + Gets the index of the field at name if found. + + The name of the field to get the index for. + The index of the field if there are multiple fields with the same name. + A value indicating if the call was initiated from a TryGet. + The index of the field if found, otherwise -1. + Thrown if there is no header record. + Thrown if there isn't a field with name. + + + + Gets the index of the field at name if found. + + The possible names of the field to get the index for. + The index of the field if there are multiple fields with the same name. + A value indicating if the call was initiated from a TryGet. + The index of the field if found, otherwise -1. + Thrown if there is no header record. + Thrown if there isn't a field with name. + + + + Parses the named indexes from the header record. + + + + + Checks if the current record should be skipped or not. + + true if the current record should be skipped, false otherwise. + + + + Creates the record for the given type. + + The type of record to create. + The created record. + + + + Creates the record for the given type. + + The type of record to create. + The created record. + + + + Gets the function delegate used to populate + a custom class object with data from the reader. + + The of object that is created + and populated. + The function delegate. + + + + Gets the function delegate used to populate + a custom class object with data from the reader. + + The of object that is created + and populated. + The function delegate. + + + + Creates the read record func for the given type if it + doesn't already exist. + + Type of the record. + + + + Creates the function for an object. + + The type of object to create the function for. + + + + Creates the function for a primitive. + + The type of the primitive to create the function for. + + + + Creates the property bindings for the given . + + The mapping to create the bindings for. + The type of record. + The bindings that will be added to from the mapping. + + + + Adds a for each property for it's field. + + The properties to add bindings for. + The bindings that will be added to from the properties. + + + + Determines if the property for the + can be read. + + The property map. + A value indicating of the property can be read. True if it can, otherwise false. + + + + Determines if the property for the + can be read. + + The reference map. + A value indicating of the property can be read. True if it can, otherwise false. + + + + Creates a dynamic object from the current record. + + The dynamic object. + + + + Represents errors that occur while reading a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Defines methods used to serialize data into a CSV file. + + + + + Gets the configuration. + + + + + Creates a new serializer using the given . + + The to write the CSV file data to. + + + + Creates a new serializer using the given + and . + + The to write the CSV file data to. + The configuration. + + + + Writes a record to the CSV file. + + The record to write. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + True if the instance needs to be disposed of. + + + + Checks if the instance has been disposed of. + + + + + + Used to write CSV files. + + + + + Gets the configuration. + + + + + Creates a new CSV writer using the given , + a default and + as the default serializer. + + The writer used to write the CSV file. + + + + Creates a new CSV writer using the given + and and + as the default serializer. + + The use to write the CSV file. + The configuration. + + + + Creates a new CSV writer using the given . + + The serializer. + + + + Writes the field to the CSV file. The field + may get quotes added to it. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The field to write. + + + + Writes the field to the CSV file. This will + ignore any need to quote and ignore the + + and just quote based on the shouldQuote + parameter. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The field to write. + True to quote the field, otherwise false. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + The converter used to convert the field into a string. + + + + Writes the field to the CSV file + using the given . + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The type of the converter. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + The converter used to convert the field into a string. + + + + Ends writing of the current record + and starts a new record. This is used + when manually writing records with WriteField. + + + + + Write the Excel seperator record. + + + + + Writes the header record from the given properties. + + The type of the record. + + + + Writes the header record from the given properties. + + The type of the record. + + + + Writes the record to the CSV file. + + The type of the record. + The record to write. + + + + Writes the record to the CSV file. + + The type of the record. + The record to write. + + + + Writes the list of records to the CSV file. + + The list of records to write. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The record type. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The record type. + + + + Clears the record cache for all types. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Adds the properties from the mapping. This will recursively + traverse the mapping tree and add all properties for + reference maps. + + The properties to be added to. + The mapping where the properties are added from. + + + + Creates a property expression for the given property on the record. + This will recursively traverse the mapping to find the property + and create a safe property accessor for each level as it goes. + + The current property expression. + The mapping to look for the property to map on. + The property map to look for on the mapping. + An Expression to access the given property. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + True if the instance needs to be disposed of. + + + + Checks if the instance has been disposed of. + + + + + + Gets the action delegate used to write the custom + class object to the writer. + + The type of the custom class being written. + The action delegate. + + + + Gets the action delegate used to write the custom + class object to the writer. + + The type of the custom class being written. + The action delegate. + + + + Creates the write record action for the given type if it + doesn't already exist. + + The type of the custom class being written. + + + + Creates the action for an object. + + The type of object to create the action for. + + + + Creates the action for a primitive. + + The type of primitive to create the action for. + + + + Combines the delegates into a single multicast delegate. + This is needed because Silverlight doesn't have the + Delegate.Combine( params Delegate[] ) overload. + + The delegates to combine. + A multicast delegate combined from the given delegates. + + + + Checks if the property can be written. + + The property map that we are checking. + A value indicating if the property can be written. + True if the property can be written, otherwise false. + + + + Represents errors that occur while writing a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Common exception tasks. + + + + + Adds CsvHelper specific information to . + + The exception to add the info to. + The parser. + The type of object that was being created in the . + The named indexes in the . + The current index of the . + The current record of the . + + + + Gets CsvHelper information to be added to an exception. + + The parser. + The type of object that was being created in the . + The named indexes in the . + The current index of the . + The current record of the . + The CsvHelper information. + + + + Defines methods used to create + CsvHelper classes. + + + + + Creates an . + + The text reader to use for the csv parser. + The configuration to use for the csv parser. + The created parser. + + + + Creates an . + + The text reader to use for the csv parser. + The created parser. + + + + Creates an . + + The text reader to use for the csv reader. + The configuration to use for the reader. + The created reader. + + + + Creates an . + + The text reader to use for the csv reader. + The created reader. + + + + Creates an . + + The parser used to create the reader. + The created reader. + + + + Creates an . + + The text writer to use for the csv writer. + The configuration to use for the writer. + The created writer. + + + + Creates an . + + The text writer to use for the csv writer. + The created writer. + + + + Defines methods used the parse a CSV file. + + + + + Gets the configuration. + + + + + Gets the field count. + + + + + Gets the character position that the parser is currently on. + + + + + Gets the byte position that the parser is currently on. + + + + + Gets the row of the CSV file that the parser is currently on. + + + + + Gets the raw row for the current record that was parsed. + + + + + Reads a record from the CSV file. + + A of fields for the record read. + + + + Defines methods used to read parsed data + from a CSV file. + + + + + Gets or sets the configuration. + + + + + Gets the parser. + + + + + Gets the field headers. + + + + + Reads the header field without reading the first row. + + True if there are more records, otherwise false. + + + + Advances the reader to the next record. If the header hasn't been read + yet, it'll automatically be read along with the first record. + + True if there are more records, otherwise false. + + + + Defines methods used to read parsed data + from a CSV file row. + + + + + Get the current record; + + + + + Gets the current row. + + + + + Gets the raw field at position (column) index. + + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) index. + + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The raw field. + + + + Gets the raw field at position (column) name and the index + instance of that field. The index is used when there are + multiple columns with the same header name. + + The named index of the field. + The zero based index of the instance of the field. + The raw field. + + + + Gets the field converted to using + the specified . + + The type of the field. + The index of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The zero based index of the instance of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to T at position (column) index. + + The of the field. + The zero based index of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) name. + + The of the field. + The named index of the field. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + + + + + Gets the field converted to T at position (column) index using + the given . + + The of the field. + The zero based index of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position (column) name using + the given . + + The of the field. + The named index of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + The of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position (column) index using + the given . + + The of the field. + The used to convert the field to T. + The zero based index of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) name using + the given . + + The of the field. + The used to convert the field to T. + The named index of the field. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + The of the field. + The used to convert the field to T. + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) index. + + The of the field. + The zero based index of the field. + The field converted to type T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name. + + The of the field. + The named index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) index + using the specified . + + The of the field. + The zero based index of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The named index of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) index + using the specified . + + The of the field. + The used to convert the field to T. + The zero based index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The used to convert the field to T. + The named index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The used to convert the field to T. + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Determines whether the current record is empty. + A record is considered empty if all fields are empty. + + + true if [is record empty]; otherwise, false. + + + + + Gets the record converted into T. + + The of the record. + The record converted to T. + + + + Gets the record. + + The of the record. + The record. + + + + Gets all the records in the CSV file and + converts each to T. The Read method + should not be used when using this. + + The of the record. + An of records. + + + + Gets all the records in the CSV file and + converts each to T. The Read method + should not be used when using this. + + The of the record. + An of records. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The type to invalidate. + + + + Clears the record cache for all types. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Defines methods used to serialize data into a CSV file. + + + + + Gets the configuration. + + + + + Writes a record to the CSV file. + + The record to write. + + + + Defines methods used to write to a CSV file. + + + + + Gets or sets the configuration. + + + + + Writes the field to the CSV file. The field + may get quotes added to it. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The field to write. + + + + Writes the field to the CSV file. This will + ignore any need to quote and ignore the + + and just quote based on the shouldQuote + parameter. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The field to write. + True to quote the field, otherwise false. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + The converter used to convert the field into a string. + + + + Writes the field to the CSV file + using the given . + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The type of the converter. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + The converter used to convert the field into a string. + + + + Ends writing of the current record + and starts a new record. This is used + when manually writing records with + + + + + Write the Excel seperator record. + + + + + Writes the header record from the given properties. + + The type of the record. + + + + Writes the header record from the given properties. + + The type of the record. + + + + Writes the record to the CSV file. + + The type of the record. + The record to write. + + + + Writes the record to the CSV file. + + The type of the record. + The record to write. + + + + Writes the list of records to the CSV file. + + The list of records to write. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The record type. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The record type. + + + + Clears the record cache for all types. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Common reflection tasks. + + + + + Creates an instance of type T. + + The type of instance to create. + The constructor arguments. + A new instance of type T. + + + + Creates an instance of the specified type. + + The type of instance to create. + The constructor arguments. + A new instance of the specified type. + + + + Gets the first attribute of type T on property. + + Type of attribute to get. + The to get the attribute from. + True to search inheritance tree, otherwise false. + The first attribute of type T, otherwise null. + + + + Gets the attributes of type T on property. + + Type of attribute to get. + The to get the attribute from. + True to search inheritance tree, otherwise false. + The attributes of type T. + + + + Gets the constructor from the give . + + The of the object that will be constructed. + The constructor . + A constructor . + Not a constructor expression.;expression + + + + Gets the property from the expression. + + The type of the model. + The expression. + The for the expression. + + + + Gets the member expression. + + The type of the model. + + The expression. + + + + + Common string tasks. + + + + + Tests is a string is null or whitespace. + + The string to test. + True if the string is null or whitespace, otherwise false. + + + + Maps class properties to CSV fields. + + + + + Called to create the mappings. + + + + + Gets the constructor expression. + + + + + The class property mappings. + + + + + The class property reference mappings. + + + + + Allow only internal creation of CsvClassMap. + + + + + Gets the property map for the given property expression. + + The type of the class the property belongs to. + The property expression. + The CsvPropertyMap for the given expression. + + + + Auto maps all properties for the given type. If a property + is mapped again it will override the existing map. + + A value indicating if references should be ignored when auto mapping. + True to ignore references, otherwise false. + A value indicating if headers of reference properties should + get prefixed by the parent property name. + True to prefix, otherwise false. + + + + Get the largest index for the + properties and references. + + The max index. + + + + Resets the indexes based on the given start index. + + The index start. + The last index + 1. + + + + Auto maps the given map and checks for circular references as it goes. + + The map to auto map. + A value indicating if references should be ignored when auto mapping. + True to ignore references, otherwise false. + A value indicating if headers of reference properties should + get prefixed by the parent property name. + True to prefix, otherwise false. + The list of parents for the map. + + + + Checks for circular references. + + The type to check for. + The list of parents to check against. + A value indicating if a circular reference was found. + True if a circular reference was found, otherwise false. + + + + Collection that holds CsvClassMaps for record types. + + + + + Gets the for the specified record type. + + + The . + + The record type. + The for the specified record type. + + + + Finds the for the specified record type. + + The record type. + The for the specified record type. + + + + Adds the specified map for it's record type. If a map + already exists for the record type, the specified + map will replace it. + + The map. + + + + Removes the class map. + + The class map type. + + + + Removes all maps. + + + + + Goes up the inheritance tree to find the type instance of CsvClassMap{}. + + The type to traverse. + The type that is CsvClassMap{}. + + + + Maps class properties to CSV fields. + + The of class to map. + + + + Constructs the row object using the given expression. + + The expression. + + + + Maps a property to a CSV field. + + The property to map. + The property mapping. + + + + Maps a property to another class map. + + The type of the class map. + The expression. + Constructor arguments used to create the reference map. + The reference mapping for the property. + + + + Maps a property to another class map. + + The type. + The expression. + Constructor arguments used to create the reference map. + The reference mapping for the property + + + + Configuration used for reading and writing CSV data. + + + + + The configured s. + + + + + Gets or sets the property binding flags. + This determines what properties on the custom + class are used. Default is Public | Instance. + + + + + Gets or sets a value indicating if the + CSV file has a header record. + Default is true. + + + + + Gets or sets a value indicating the if the CSV + file contains the Excel "sep=delimeter" config + option in the first row. + + + + + Gets or sets a value indicating if an exception will be + thrown if a field defined in a mapping is missing. + True to throw an exception, otherwise false. + Default is true. + + + + + Gets or sets a value indicating whether changes in the column + count should be detected. If true, a + will be thrown if a different column count is detected. + + + true if [detect column count changes]; otherwise, false. + + + + + Gets or sets a value indicating whether matching header + column names is case sensitive. True for case sensitive + matching, otherwise false. Default is true. + + + + + Gets or sets a value indicating whether matcher header + column names will ignore white space. True to ignore + white space, otherwise false. Default is false. + + + + + Gets or sets a value indicating whether references + should be ignored when auto mapping. True to ignore + references, otherwise false. Default is false. + + + + + Gets or sets a value indicating whether headers + should be trimmed. True to trim headers, + otherwise false. Default is false. + + + + + Gets or sets a value indicating whether fields + should be trimmed. True to trim fields, + otherwise false. Default is false. + + + + + Gets or sets the delimiter used to separate fields. + Default is ','; + + + + + Gets or sets the character used to quote fields. + Default is '"'. + + + + + Gets a string representation of the currently configured Quote character. + + + The new quote string. + + + + + Gets a string representation of two of the currently configured Quote characters. + + + The new double quote string. + + + + + Gets an array characters that require + the field to be quoted. + + + + + Gets or sets the character used to denote + a line that is commented out. Default is '#'. + + + + + Gets or sets a value indicating if comments are allowed. + True to allow commented out lines, otherwise false. + + + + + Gets or sets the size of the buffer + used for reading and writing CSV files. + Default is 2048. + + + + + Gets or sets a value indicating whether all fields are quoted when writing, + or just ones that have to be. and + cannot be true at the same time. Turning one + on will turn the other off. + + + true if all fields should be quoted; otherwise, false. + + + + + Gets or sets a value indicating whether no fields are quoted when writing. + and cannot be true + at the same time. Turning one on will turn the other off. + + + true if [quote no fields]; otherwise, false. + + + + + Gets or sets a value indicating whether the number of bytes should + be counted while parsing. Default is false. This will slow down parsing + because it needs to get the byte count of every char for the given encoding. + The needs to be set correctly for this to be accurate. + + + + + Gets or sets the encoding used when counting bytes. + + + + + Gets or sets the culture info used to read an write CSV files. + + + + + Gets or sets a value indicating whether empty rows should be skipped when reading. + A record is considered empty if all fields are empty. + + + true if [skip empty rows]; otherwise, false. + + + + + Gets or sets the callback that will be called to + determine whether to skip the given record or not. + This overrides the setting. + + + + + Gets or sets a value indicating if quotes should be + ingored when parsing and treated like any other character. + + + + + Gets or sets a value indicating if private + get and set property accessors should be + ignored when reading and writing. + True to ignore, otherwise false. Default is false. + + + + + Gets or sets a value indicating if blank lines + should be ignored when reading. + True to ignore, otherwise false. Default is true. + + + + + Gets or sets a value indicating if an Excel specific + format should be used when writing fields containing + numeric values. e.g. 00001 -> ="00001" + + + + + Gets or sets a value indicating if headers of reference + properties should get prefixed by the parent property name + when automapping. + True to prefix, otherwise false. Default is false. + + + + + Gets or sets a value indicating if an exception should + be thrown when bad field data is detected. + True to throw, otherwise false. Default is false. + + + + + Gets or sets a method that gets called when bad + data is detected. + + + + + Gets or sets a value indicating whether + exceptions that occur duruing reading + should be ignored. True to ignore exceptions, + otherwise false. Default is false. + This is only applicable when during + . + + + + + Gets or sets the callback that is called when a reading + exception occurs. This will only happen when + is true, and when + calling . + + + + + Gets or sets a value indicating that during writing if a new + object should be created when a reference property is null. + True to create a new object and use it's defaults for the + fields, or false to leave the fields empty for all the + reference property's properties. + + + + + Use a to configure mappings. + When using a class map, no properties are mapped by default. + Only properties specified in the mapping are used. + + The type of mapping class to use. + + + + Use a to configure mappings. + When using a class map, no properties are mapped by default. + Only properties specified in the mapping are used. + + The type of mapping class to use. + + + + Registers the class map. + + The class map to register. + + + + Unregisters the class map. + + The map type to unregister. + + + + Unregisters the class map. + + The map type to unregister. + + + + Unregisters all class maps. + + + + + Generates a for the type. + + The type to generate the map for. + The generate map. + + + + Generates a for the type. + + The type to generate for the map. + The generate map. + + + + Creates a new CsvConfiguration. + + + + + Builds the values for the RequiredQuoteChars property. + + + + + Represents configuration errors that occur. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Mapping info for a property to a CSV field. + + + + + Gets the property map data. + + + + + Creates a new instance using the specified property. + + + + + When reading, is used to get the field + at the index of the name if there was a + header specified. It will look for the + first name match in the order listed. + When writing, sets the name of the + field in the header record. + The first name will be used. + + The possible names of the CSV field. + + + + When reading, is used to get the + index of the name used when there + are multiple names that are the same. + + The index of the name. + + + + When reading, is used to get the field at + the given index. When writing, the fields + will be written in the order of the field + indexes. + + The index of the CSV field. + + + + Ignore the property when reading and writing. + + + + + Ignore the property when reading and writing. + + True to ignore, otherwise false. + + + + The default value that will be used when reading when + the CSV field is empty. + + The default value. + + + + Specifies the to use + when converting the property to and from a CSV field. + + The TypeConverter to use. + + + + Specifies the to use + when converting the property to and from a CSV field. + + The of the + to use. + + + + Specifies an expression to be used to convert data in the + row to the property. + + The type of the property that will be set. + The convert expression. + + + + The used when type converting. + This will override the global + setting. + + The culture info. + + + + The to use when type converting. + This is used when doing any conversions. + + The date time style. + + + + The to use when type converting. + This is used when doing any number conversions. + + + + + + The string format to be used when type converting. + + The format. + + + + The string values used to represent a boolean when converting. + + A value indicating whether true values or false values are being set. + The string boolean values. + + + + The string values used to represent a boolean when converting. + + A value indicating whether true values or false values are being set. + A value indication if the current values should be cleared before adding the new ones. + The string boolean values. + + + + A collection that holds 's. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The comparer to use when sorting the property maps. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + + Adds a range of items to the . + + The collection to add. + + + + Removes all items from the . + + The is read-only. + + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0.The number of elements in the source is greater than the available space from to the end of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the . + The is read-only. + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Determines the index of a specific item in the . + + + The index of if found in the list; otherwise, -1. + + The object to locate in the . + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + + + Gets or sets the element at the specified index. + + + The element at the specified index. + + The zero-based index of the element to get or set. + is not a valid index in the . + The property is set and the is read-only. + + + + + Used to compare s. + The order is by field index ascending. Any + fields that don't have an index are pushed + to the bottom. + + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + + Value + Condition + Less than zero + is less than . + Zero + equals . + Greater than zero + is greater than . + + The first object to compare. + The second object to compare. + Neither nor implements the interface. + -or- + and are of different types and neither one can handle comparisons with the other. + 2 + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + + Value + Condition + Less than zero + is less than . + Zero + equals . + Greater than zero + is greater than . + + The first object to compare. + The second object to compare. + + + + + The configured data for the property map. + + + + + Gets the that the data + is associated with. + + + + + Gets the list of column names. + + + + + Gets or sets the index of the name. + This is used if there are multiple + columns with the same names. + + + + + Gets or sets a value indicating if the name was + explicitly set. True if it was explicity set, + otherwise false. + + + + + Gets or sets the column index. + + + + + Gets or sets a value indicating if the index was + explicitly set. True if it was explicitly set, + otherwise false. + + + + + Gets or sets the type converter. + + + + + Gets or sets the type converter options. + + + + + Gets or sets a value indicating whether the field should be ignored. + + + + + Gets or sets the default value used when a CSV field is empty. + + + + + Gets or sets a value indicating whether this instance is default value set. + the default value was explicitly set. True if it was + explicitly set, otherwise false. + + + + + Gets or sets the expression used to convert data in the + row to the property. + + + + + Initializes a new instance of the class. + + The property. + + + + A collection that holds property names. + + + + + Gets the name at the given index. If a prefix is set, + it will be prepended to the name. + + + + + + + Gets the prefix to use for each name. + + + + + Gets the raw list of names without + the prefix being prepended. + + + + + Gets the count. + + + + + Adds the given name to the collection. + + The name to add. + + + + Clears all names from the collection. + + + + + Adds a range of names to the collection. + + The range to add. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Mapping info for a reference property mapping to a class. + + + + + Gets the property. + + + + + Gets the mapping. + + + + + Gets the property reference map data. + + + + + Initializes a new instance of the class. + + The property. + The to use for the reference map. + + + + Appends a prefix to the header of each field of the reference property + + The prefix to be prepended to headers of each reference property + The current + + + + Get the largest index for the + properties and references. + + The max index. + + + + The configuration data for the reference map. + + + + + Gets or sets the header prefix to use. + + + + + Gets the that the data + is associated with. + + + + + Gets the mapping this is a reference for. + + + + + Initializes a new instance of the class. + + The property. + The mapping this is a reference for. + + + + A default that can be used + to create a class map dynamically. + + + + + + Converts a Boolean to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a Byte to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a Char to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Represents errors that occur while reading a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Converts a DateTime to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a DateTimeOffset to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a Decimal to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an object to and from a string. + + + + + Converts the object to a string. + + The options to use when converting. + The object to convert to a string. + The string representation of the object. + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Determines whether this instance [can convert to] the specified type. + + The type. + + true if this instance [can convert to] the specified type; otherwise, false. + + + + + Converts a Double to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + + The object created from the string. + + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an Enum to and from a string. + + + + + Creates a new for the given . + + The type of the Enum. + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Throws an exception when used. This is here so that it's apparent + that there is no support for IEnumerable type coversion. A custom + converter will need to be created to have a field convert to and + from an IEnumerable. + + + + + Throws an exception. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Throws an exception. + + The options to use when converting. + The object to convert to a string. + The string representation of the object. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Determines whether this instance [can convert to] the specified type. + + The type. + + true if this instance [can convert to] the specified type; otherwise, false. + + + + + Converts a Guid to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an Int16 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an Int32 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an Int64 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts objects to and from strings. + + + + + Converts the object to a string. + + The options to use when converting. + The object to convert to a string. + The string representation of the object. + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Determines whether this instance [can convert to] the specified type. + + The type. + + true if this instance [can convert to] the specified type; otherwise, false. + + + + + Converts a Nullable to and from a string. + + + + + Gets the type of the nullable. + + + The type of the nullable. + + + + + Gets the underlying type of the nullable. + + + The underlying type. + + + + + Gets the type converter for the underlying type. + + + The type converter. + + + + + Creates a new for the given . + + The nullable type. + type is not a nullable type. + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Converts the object to a string. + + The options to use when converting. + The object to convert to a string. + The string representation of the object. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a SByte to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a Float to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a string to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a TimeSpan to and from a string. + + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Creates s. + + + + + Initializes the class. + + + + + Adds the for the given . + + The type the converter converts. + The type converter that converts the type. + + + + Adds the for the given . + + The type the converter converts. + The type converter that converts the type. + + + + Removes the for the given . + + The type to remove the converter for. + + + + Removes the for the given . + + The type to remove the converter for. + + + + Gets the converter for the given . + + The type to get the converter for. + The for the given . + + + + Gets the converter for the given . + + The type to get the converter for. + The for the given . + + + + Options used when doing type conversion. + + + + + Gets or sets the culture info. + + + + + Gets or sets the date time style. + + + + + Gets or sets the time span style. + + + + + Gets or sets the number style. + + + + + Gets the list of values that can be + used to represent a boolean of true. + + + + + Gets the list of values that can be + used to represent a boolean of false. + + + + + Gets or sets the string format. + + + + + Merges TypeConverterOptions by applying the values of sources in order to a + new TypeConverterOptions instance. + + The sources that will be applied. + A new instance of TypeConverterOptions with the source applied to it. + + + + Creates . + + + + + Adds the for the given . + + The type the options are for. + The options. + + + + Adds the for the given . + + The type the options are for. + The options. + + + + Removes the for the given type. + + The type to remove the options for. + + + + Removes the for the given type. + + The type to remove the options for. + + + + Get the for the given . + + The type the options are for. + The options for the given type. + + + + Get the for the given . + + The type the options are for. + The options for the given type. + + + + Converts a UInt16 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a UInt32 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a UInt64 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + diff --git a/Route4MeSDKLibrary/bin/Debug/Route4MeSDKLibrary.dll b/Route4MeSDKLibrary/bin/Debug/Route4MeSDKLibrary.dll index 9b24275b..de3cdde9 100644 Binary files a/Route4MeSDKLibrary/bin/Debug/Route4MeSDKLibrary.dll and b/Route4MeSDKLibrary/bin/Debug/Route4MeSDKLibrary.dll differ diff --git a/Route4MeSDKLibrary/bin/Debug/Route4MeSDKLibrary.pdb b/Route4MeSDKLibrary/bin/Debug/Route4MeSDKLibrary.pdb index 1fc6c2bc..49d329a0 100644 Binary files a/Route4MeSDKLibrary/bin/Debug/Route4MeSDKLibrary.pdb and b/Route4MeSDKLibrary/bin/Debug/Route4MeSDKLibrary.pdb differ diff --git a/Route4MeSDKLibrary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Route4MeSDKLibrary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index a643bb52..752551ba 100644 Binary files a/Route4MeSDKLibrary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Route4MeSDKLibrary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Route4MeSDKLibrary/obj/Debug/Route4MeSDKLibrary.csproj.FileListAbsolute.txt b/Route4MeSDKLibrary/obj/Debug/Route4MeSDKLibrary.csproj.FileListAbsolute.txt index e7fad8a4..d2ac2808 100644 --- a/Route4MeSDKLibrary/obj/Debug/Route4MeSDKLibrary.csproj.FileListAbsolute.txt +++ b/Route4MeSDKLibrary/obj/Debug/Route4MeSDKLibrary.csproj.FileListAbsolute.txt @@ -82,3 +82,5 @@ C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKLibrary\obj\Debug\Ro C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKLibrary\obj\Debug\Route4MeSDKLibrary.dll C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKLibrary\obj\Debug\Route4MeSDKLibrary.pdb C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKLibrary\obj\Debug\Route4MeSDKLibrary.csproj.AssemblyReference.cache +C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKLibrary\bin\Debug\CsvHelper.dll +C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKLibrary\bin\Debug\CsvHelper.xml diff --git a/Route4MeSDKTest/Examples/API5/AddressBookContact/RemoveSearchedContacts.cs b/Route4MeSDKTest/Examples/API5/AddressBookContact/RemoveSearchedContacts.cs new file mode 100644 index 00000000..36283c98 --- /dev/null +++ b/Route4MeSDKTest/Examples/API5/AddressBookContact/RemoveSearchedContacts.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Route4MeSDK.DataTypes.V5; +using Route4MeSDK.QueryTypes.V5; + +namespace Route4MeSDK.Examples +{ + public sealed partial class Route4MeExamples + { + public void RemoveSearchedContacts() + { + var route4Me = new Route4MeManagerV5(ActualApiKey); + + var addressBookParameters = new AddressBookParameters + { + Query = "ToDelete", + Offset = 0, + Limit = 500 + }; + + // Run the query + var response = route4Me.GetAddressBookContacts( + addressBookParameters, + out ResultResponse resultResponse); + + int[] addressIDs = response.results + .Where(x => x.address_id != null) + .Select(x => (int)x.address_id) + .ToArray(); + + Console.WriteLine("Length:", String.Join(",", addressIDs)); + + var removed = route4Me.RemoveAddressBookContacts(addressIDs, out resultResponse); + + Console.WriteLine(resultResponse==null + ? addressIDs.Length + " contacts removed from database" + : "Cannot remove "+ addressIDs.Length+" contacts."+Environment.NewLine+ + "Exit code: "+(resultResponse?.ExitCode.ToString() ?? "") + Environment.NewLine + + "Code: " + (resultResponse?.Code.ToString() ?? "") + Environment.NewLine + + "Status: " + (resultResponse?.Status.ToString() ?? "") + Environment.NewLine + ); + + if (resultResponse != null) + { + foreach (var msg in resultResponse.Messages) + { + Console.WriteLine(msg.Key + ": " + msg.Value + Environment.NewLine); + } + } + + Console.WriteLine("======================================="); + } + } +} diff --git a/Route4MeSDKTest/Examples/ExamplesInfrastructure.cs b/Route4MeSDKTest/Examples/ExamplesInfrastructure.cs index ca34a97f..ee604e74 100755 --- a/Route4MeSDKTest/Examples/ExamplesInfrastructure.cs +++ b/Route4MeSDKTest/Examples/ExamplesInfrastructure.cs @@ -1329,12 +1329,7 @@ private void CreateExampleOrder() EXT_FIELD_last_name = "Carol", EXT_FIELD_email = "lcarol654@yahoo.com", EXT_FIELD_phone = "897946541", - EXT_FIELD_custom_data = ( - new List>() - { - new Dictionary() { { "order_type", "scheduled order" } } - } - ).ToArray(), + EXT_FIELD_custom_data = new Dictionary() { { "order_type", "scheduled order" } }, local_time_window_end = 39000, local_time_window_end_2 = 46200, local_time_window_start = 37800, diff --git a/Route4MeSDKTest/Examples/Geocoding/uploaLargeContactsCsvFile.cs b/Route4MeSDKTest/Examples/Geocoding/uploaLargeContactsCsvFile.cs new file mode 100644 index 00000000..0f76a8b3 --- /dev/null +++ b/Route4MeSDKTest/Examples/Geocoding/uploaLargeContactsCsvFile.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using Route4MeSDK.DataTypes; +using Route4MeSDK.FastProcessing; + +namespace Route4MeSDK.Examples +{ + public sealed partial class Route4MeExamples + { + + public void uploaLargeContactsCsvFile() + { + var fastProcessing = new FastBulkGeocoding(ActualApiKey, false) + { + ChankPause = 1000, + CsvChankSize = 500 + }; + //var lsGeocodedAddressTotal = new List(); + var lsAddresses = new List(); + + int addressesInFile = 13; + + var ab = new AddressBookContact(); + + var csvAddressMapping = new Dictionary() + { + {"Alias", R4MeUtils.GetPropertyName(() => ab.address_alias)}, + {"Address", R4MeUtils.GetPropertyName(() => ab.address_1)}, + {"City", R4MeUtils.GetPropertyName(() => ab.address_city)}, + {"State", R4MeUtils.GetPropertyName(() => ab.address_state_id)}, + {"Zip", R4MeUtils.GetPropertyName(() => ab.address_zip)}, + {"Lat", R4MeUtils.GetPropertyName(() => ab.cached_lat)}, + {"Lng", R4MeUtils.GetPropertyName(() => ab.cached_lng)}, + {"Time", R4MeUtils.GetPropertyName(() => ab.service_time)}, + {"Time_window_start", R4MeUtils.GetPropertyName(() => ab.local_time_window_start)}, + {"Time_window_end", R4MeUtils.GetPropertyName(() => ab.local_time_window_end)} + }; + + FastFileReading.csvAddressMapping = csvAddressMapping; + + Console.WriteLine("Start: " + DateTime.Now.ToString("yyyy-MM-dd HH:mm")); + + var stPath = AppDomain.CurrentDomain.BaseDirectory; + fastProcessing.uploadLargeContactsCsvFile(stPath + @"Data\CSV\30k_geocoded.csv", out string errorString); + + Console.WriteLine("End: " + DateTime.Now.ToString("yyyy-MM-dd HH:mm")); + } + + } +} diff --git a/Route4MeSDKTest/Program.cs b/Route4MeSDKTest/Program.cs index 927c7c96..d52b1423 100755 --- a/Route4MeSDKTest/Program.cs +++ b/Route4MeSDKTest/Program.cs @@ -24,7 +24,7 @@ static void Main(string[] args) // "api4" - execute all the examples related to the API 4 // "api5" - execute all the examples related to the API 5 // a method name - execute a specifed example method (e.g. "GetTeamMemberById") - string executeOption = "ReoptimizeRemainingStops"; + string executeOption = "uploaLargeContactsCsvFile"; if (executeOption.ToLower() == "api4") { diff --git a/Route4MeSDKTest/bin/Debug/Route4MeSDKLibrary.dll b/Route4MeSDKTest/bin/Debug/Route4MeSDKLibrary.dll index bdabf63f..de3cdde9 100644 Binary files a/Route4MeSDKTest/bin/Debug/Route4MeSDKLibrary.dll and b/Route4MeSDKTest/bin/Debug/Route4MeSDKLibrary.dll differ diff --git a/Route4MeSDKTest/bin/Debug/Route4MeSDKLibrary.pdb b/Route4MeSDKTest/bin/Debug/Route4MeSDKLibrary.pdb index e44d7f6b..49d329a0 100644 Binary files a/Route4MeSDKTest/bin/Debug/Route4MeSDKLibrary.pdb and b/Route4MeSDKTest/bin/Debug/Route4MeSDKLibrary.pdb differ diff --git a/Route4MeSDKTest/bin/Debug/Route4MeSDKTest.exe b/Route4MeSDKTest/bin/Debug/Route4MeSDKTest.exe index d987b99c..f544ffe7 100644 Binary files a/Route4MeSDKTest/bin/Debug/Route4MeSDKTest.exe and b/Route4MeSDKTest/bin/Debug/Route4MeSDKTest.exe differ diff --git a/Route4MeSDKTest/bin/Debug/Route4MeSDKTest.pdb b/Route4MeSDKTest/bin/Debug/Route4MeSDKTest.pdb index 47bb5fe8..93800fa5 100644 Binary files a/Route4MeSDKTest/bin/Debug/Route4MeSDKTest.pdb and b/Route4MeSDKTest/bin/Debug/Route4MeSDKTest.pdb differ diff --git a/Route4MeSDKTest/obj/Debug/Route4MeSDKTest.csproj.FileListAbsolute.txt b/Route4MeSDKTest/obj/Debug/Route4MeSDKTest.csproj.FileListAbsolute.txt index 2fa8d23f..3ab59c62 100644 --- a/Route4MeSDKTest/obj/Debug/Route4MeSDKTest.csproj.FileListAbsolute.txt +++ b/Route4MeSDKTest/obj/Debug/Route4MeSDKTest.csproj.FileListAbsolute.txt @@ -99,10 +99,10 @@ C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\bin\Debug\Newto C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\bin\Debug\SocketIoClientDotNet.pdb C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\bin\Debug\SocketIoClientDotNet.dll.config C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\bin\Debug\System.Collections.Immutable.xml -C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\obj\Debug\Route4MeSDKTest.csprojAssemblyReference.cache C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\obj\Debug\Route4MeSDKTest.Properties.Resources.resources C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\obj\Debug\Route4MeSDKTest.csproj.GenerateResource.cache C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\obj\Debug\Route4MeSDKTest.csproj.CoreCompileInputs.cache C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\obj\Debug\Route4MeSDKTest.csproj.CopyComplete C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\obj\Debug\Route4MeSDKTest.exe C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\obj\Debug\Route4MeSDKTest.pdb +C:\Users\hp\Documents\GitHub\route4me-csharp-sdk\Route4MeSDKTest\obj\Debug\Route4MeSDKTest.csproj.AssemblyReference.cache diff --git a/Route4MeSDKTest/obj/Debug/Route4MeSDKTest.csprojAssemblyReference.cache b/Route4MeSDKTest/obj/Debug/Route4MeSDKTest.csprojAssemblyReference.cache deleted file mode 100644 index 9e0491b3..00000000 Binary files a/Route4MeSDKTest/obj/Debug/Route4MeSDKTest.csprojAssemblyReference.cache and /dev/null differ diff --git a/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKLibrary.dll b/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKLibrary.dll index 9b24275b..de3cdde9 100644 Binary files a/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKLibrary.dll and b/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKLibrary.dll differ diff --git a/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKLibrary.pdb b/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKLibrary.pdb index 1fc6c2bc..49d329a0 100644 Binary files a/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKLibrary.pdb and b/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKLibrary.pdb differ diff --git a/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKUnitTest.dll b/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKUnitTest.dll index 81b84b49..04e63c9c 100644 Binary files a/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKUnitTest.dll and b/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKUnitTest.dll differ diff --git a/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKUnitTest.pdb b/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKUnitTest.pdb index a720490e..7c7cb248 100644 Binary files a/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKUnitTest.pdb and b/Route4MeSDKUnitTest/bin/Debug/Route4MeSDKUnitTest.pdb differ diff --git a/Route4MeSDKUnitTest/bin/Debug/ru/Microsoft.VisualStudio.QualityTools.UnitTestFramework.resources.dll b/Route4MeSDKUnitTest/bin/Debug/ru/Microsoft.VisualStudio.QualityTools.UnitTestFramework.resources.dll deleted file mode 100644 index fc57d863..00000000 Binary files a/Route4MeSDKUnitTest/bin/Debug/ru/Microsoft.VisualStudio.QualityTools.UnitTestFramework.resources.dll and /dev/null differ diff --git a/Route4MeSdkV5UnitTest/V5/AddressBookContactApi/AddressBookContactApiTests.cs b/Route4MeSdkV5UnitTest/V5/AddressBookContactApi/AddressBookContactApiTests.cs new file mode 100644 index 00000000..6251275a --- /dev/null +++ b/Route4MeSdkV5UnitTest/V5/AddressBookContactApi/AddressBookContactApiTests.cs @@ -0,0 +1,212 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Route4MeSDK; +using Route4MeSDK.DataTypes.V5; +using Route4MeSDK.QueryTypes.V5; +using Route4MeSdkV5UnitTest.V5; +using Xunit; +using Xunit.Abstractions; + +namespace Route4MeSdkV5UnitTest.AddressBookContactApi +{ + public class AddressBookContactApiTests : IDisposable + { + static string c_ApiKey = ApiKeys.actualApiKey; + + private readonly ITestOutputHelper _output; + + static List lsCreatedContacts; + + public AddressBookContactApiTests(ITestOutputHelper output) + { + _output = output; + + #region Create Test Contacts + + var route4Me = new Route4MeManagerV5(c_ApiKey); + + lsCreatedContacts = new List(); + + var contactParams = new AddressBookContact() + { + first_name = "Test FirstName " + (new Random()).Next().ToString(), + address_1 = "Test Address1 " + (new Random()).Next().ToString(), + cached_lat = 38.024654, + cached_lng = -77.338814, + AddressStopType = AddressStopType.PickUp.Description() + }; + + var contact1 = route4Me.AddAddressBookContact(contactParams, out ResultResponse resultResponse); + + lsCreatedContacts.Add(contact1); + + + contactParams = new AddressBookContact() + { + first_name = "Test FirstName " + (new Random()).Next().ToString(), + address_1 = "Test Address1 " + (new Random()).Next().ToString(), + cached_lat = 38.024664, + cached_lng = -77.338834, + AddressStopType = AddressStopType.PickUp.Description() + }; + + var contact2 = route4Me.AddAddressBookContact(contactParams, out resultResponse); + + lsCreatedContacts.Add(contact2); + + + contactParams = new AddressBookContact() + { + first_name = "Test FirstName " + (new Random()).Next().ToString(), + address_1 = "Test Address1 " + (new Random()).Next().ToString(), + cached_lat = 38.024684, + cached_lng = -77.338854, + AddressStopType = AddressStopType.PickUp.Description() + }; + + var contact3 = route4Me.AddAddressBookContact(contactParams, out resultResponse); + + lsCreatedContacts.Add(contact3); + + #endregion + } + + public void Dispose() + { + var route4Me = new Route4MeManagerV5(c_ApiKey); + + var lsRemLocations = new List(); + + if (lsCreatedContacts.Count > 0) + { + //foreach (int loc1 in lsRemoveContacts) lsRemLocations.Add(loc1.ToString()); + + var contactIDs = lsCreatedContacts.Where(x=>(x!=null && x.address_id!=null)).Select(x => (int)(x.address_id)); + + bool removed = route4Me.RemoveAddressBookContacts( + contactIDs.ToArray(), + out ResultResponse resultResponse); + + Assert.Null(resultResponse); + } + } + + [Fact] + public void GetAddressBookContactsTest() + { + var route4Me = new Route4MeManagerV5(c_ApiKey); + + var addressBookParameters = new AddressBookParameters() + { + Limit = 1, + Offset = 16 + }; + + // Run the query + var response = route4Me.GetAddressBookContacts( + addressBookParameters, + out ResultResponse resultResponse); + + Assert.IsType(response); + } + + [Fact] + public void GetAddressBookContactByIdTest() + { + var route4Me = new Route4MeManagerV5(c_ApiKey); + + var response = route4Me.GetAddressBookContactById(66503168, out ResultResponse resultResponse); + + Assert.IsType(response); + } + + [Fact] + public void GetAddressBookContactsByIDsTest() + { + var route4Me = new Route4MeManagerV5(c_ApiKey); + + int[] addressIDs = new int[]{ 66503168, 66503169, 66503130 }; + + var response = route4Me.GetAddressBookContactsByIds(addressIDs, out ResultResponse resultResponse); + + Assert.IsType(response); + } + + [Fact] + public void DeleteAddressBookContacts() + { + var route4Me = new Route4MeManagerV5(c_ApiKey); + + var lsSize = lsCreatedContacts.Count - 1; + + int[] addressIDs = new int[] { (int)lsCreatedContacts[lsSize - 1].address_id, (int)lsCreatedContacts[lsSize - 2].address_id }; + + var response = route4Me.RemoveAddressBookContacts(addressIDs, out ResultResponse resultResponse); + + Assert.Null(resultResponse); + + lsCreatedContacts.RemoveAt(lsSize - 1); + lsCreatedContacts.RemoveAt(lsSize - 2); + } + + [Fact] + public void CreateAddressBookContact() + { + var route4Me = new Route4MeManagerV5(c_ApiKey); + + var contactParams = new AddressBookContact() + { + first_name = "Test FirstName " + (new Random()).Next().ToString(), + address_1 = "Test Address1 " + (new Random()).Next().ToString(), + cached_lat = 38.024654, + cached_lng = -77.338814, + AddressStopType = AddressStopType.PickUp.Description() + }; + + var contact = route4Me.AddAddressBookContact(contactParams, out ResultResponse resultResponse); + Assert.IsType(contact); + + lsCreatedContacts.Add(contact); + } + + [Fact] + public void BatchCreatingAddressBookContacts() + { + var route4Me = new Route4MeManagerV5(c_ApiKey); + + var lsContacts = new List() + { + new AddressBookContact() + { + first_name = "Test FirstName " + (new Random()).Next().ToString(), + address_1 = "Test Address1 " + (new Random()).Next().ToString(), + cached_lat = 38.024754, + cached_lng = -77.338914, + AddressStopType = AddressStopType.PickUp.Description() + }, + new AddressBookContact() + { + first_name = "Test FirstName " + (new Random()).Next().ToString(), + address_1 = "Test Address1 " + (new Random()).Next().ToString(), + cached_lat = 38.024554, + cached_lng = -77.338714, + AddressStopType = AddressStopType.PickUp.Description() + } + }; + + var contactParams = new Route4MeManagerV5.BatchCreatingAddressBookContactsRequest() + { + Data = lsContacts.ToArray() + }; + + var response = route4Me.BatchCreateAdressBookContacts(contactParams, out ResultResponse resultResponse); + + Assert.IsType(response); + Assert.True(response.status); + //foreach (var cont in response.results) lsCreatedContacts.Add(cont); + } + } +} diff --git a/Route4MeSdkV5UnitTest/V5/TestDataRepository.cs b/Route4MeSdkV5UnitTest/V5/TestDataRepository.cs index aeee2330..5f1fabf6 100644 --- a/Route4MeSdkV5UnitTest/V5/TestDataRepository.cs +++ b/Route4MeSdkV5UnitTest/V5/TestDataRepository.cs @@ -529,7 +529,7 @@ public bool MultipleDepotMultipleDriverWith24StopsTimeWindowTest() } } - public bool RemoveAddressBookContacts(List lsRemLocations, string ApiKey) + public bool RemoveAddressBookContacts(List lsRemLocations, string ApiKey) { var route4Me = new Route4MeManagerV5(ApiKey); diff --git a/Route4MeSdkV5UnitTest/bin/Debug/net48/CsvHelper.dll b/Route4MeSdkV5UnitTest/bin/Debug/net48/CsvHelper.dll new file mode 100644 index 00000000..0645170a Binary files /dev/null and b/Route4MeSdkV5UnitTest/bin/Debug/net48/CsvHelper.dll differ diff --git a/Route4MeSdkV5UnitTest/bin/Debug/net48/CsvHelper.xml b/Route4MeSdkV5UnitTest/bin/Debug/net48/CsvHelper.xml new file mode 100644 index 00000000..d987af92 --- /dev/null +++ b/Route4MeSdkV5UnitTest/bin/Debug/net48/CsvHelper.xml @@ -0,0 +1,3991 @@ + + + + CsvHelper + + + + + Represents errors that occur due to bad data. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Creates CsvHelper classes. + + + + + Creates an . + + The text reader to use for the csv parser. + The configuration to use for the csv parser. + The created parser. + + + + Creates an . + + The text reader to use for the csv parser. + The created parser. + + + + Creates an . + + The text reader to use for the csv reader. + The configuration to use for the reader. + The created reader. + + + + Creates an . + + The text reader to use for the csv reader. + The created reader. + + + + Creates an . + + The parser used to create the reader. + The created reader. + + + + Creates an . + + The text writer to use for the csv writer. + The configuration to use for the writer. + The created writer. + + + + Creates an . + + The text writer to use for the csv writer. + The created writer. + + + + Represents errors that occur in CsvHelper. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Represents an error caused because a field is missing + in the header while reading a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Parses a CSV file. + + + + + Gets the configuration. + + + + + Gets the field count. + + + + + Gets the character position that the parser is currently on. + + + + + Gets the byte position that the parser is currently on. + + + + + Gets the row of the CSV file that the parser is currently on. + This is the logical CSV row. + + + + + Gets the row of the CSV file that the parser is currently on. + This is the actual file row. + + + + + Gets the raw row for the current record that was parsed. + + + + + Creates a new parser using the given . + + The with the CSV file data. + + + + Creates a new parser using the given + and . + + The with the CSV file data. + The configuration. + + + + Reads a record from the CSV file. + + A of fields for the record read. + If there are no more records, null is returned. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + True if the instance needs to be disposed of. + + + + Checks if the instance has been disposed of. + + + + + + Adds the field to the current record. + + The record position to add the field to. + The field to add. + + + + Appends the current buffer data to the field. + + The field to append the current buffer to. + The start position in the buffer that the . + The length. + + + + Updates the byte position using the data from the reader buffer. + + The field start position. + The length. + + + + Reads the next line. + + The line separated into fields. + + + + Gets the current character from the buffer while + advancing the buffer if it ran out. + + The char that gets the read char set to. + The start position of the current field. + The start position of the raw field. + The field. + A value indicating if the previous char read was a delimiter. + The position in the record we are currently at. + The length of the field in the buffer. + A value indicating if the row is current a comment row. + A value indicating if this call is a peek. If true and the end of the record was found + no record handling will be done. + A value indicating if read a char was read. True if a char was read, otherwise false. + + + + Reads the Excel seperator and sets it to the delimiter. + + + + + Represents errors that occur while parsing a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Reads data that was parsed from . + + + + + Gets the configuration. + + + + + Gets the parser. + + + + + Gets the field headers. + + + + + Get the current record; + + + + + Gets the current row. + + + + + Creates a new CSV reader using the given and + as the default parser. + + The reader. + + + + Creates a new CSV reader using the given and + and as the default parser. + + The reader. + The configuration. + + + + Creates a new CSV reader using the given . + + The used to parse the CSV file. + + + + Reads the header field without reading the first row. + + True if there are more records, otherwise false. + + + + Advances the reader to the next record. + If HasHeaderRecord is true (true by default), the first record of + the CSV file will be automatically read in as the header record + and the second record will be returned. + + True if there are more records, otherwise false. + + + + Gets the raw field at position (column) index. + + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) index. + + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The raw field. + + + + Gets the raw field at position (column) name and the index + instance of that field. The index is used when there are + multiple columns with the same header name. + + The named index of the field. + The zero based index of the instance of the field. + The raw field. + + + + Gets the field converted to using + the specified . + + The index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The named index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The index of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The zero based index of the instance of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to T at position (column) index. + + The of the field. + The zero based index of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) name. + + The of the field. + The named index of the field. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + + + + + Gets the field converted to T at position (column) index using + the given . + + The of the field. + The zero based index of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position (column) name using + the given . + + The of the field. + The named index of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position (column) index using + the given . + + The of the field. + The used to convert the field to T. + The zero based index of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) name using + the given . + + The of the field. + The used to convert the field to T. + The named index of the field. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + The of the field. + The used to convert the field to T. + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) index. + + The of the field. + The zero based index of the field. + The field converted to type T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name. + + The of the field. + The named index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) index + using the specified . + + The of the field. + The zero based index of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The named index of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) index + using the specified . + + The of the field. + The used to convert the field to T. + The zero based index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The used to convert the field to T. + The named index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The used to convert the field to T. + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Determines whether the current record is empty. + A record is considered empty if all fields are empty. + + + true if [is record empty]; otherwise, false. + + + + + Gets the record converted into T. + + The of the record. + The record converted to T. + + + + Gets the record. + + The of the record. + The record. + + + + Gets all the records in the CSV file and + converts each to T. The Read method + should not be used when using this. + + The of the record. + An of records. + + + + Gets all the records in the CSV file and + converts each to T. The Read method + should not be used when using this. + + The of the record. + An of records. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The type to invalidate. + + + + Clears the record cache for all types. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + True if the instance needs to be disposed of. + + + + Checks if the instance has been disposed of. + + + + + + Checks if the reader has been read yet. + + + + + + Determines whether the current record is empty. + A record is considered empty if all fields are empty. + + True to check if the record + has been read, otherwise false. + + true if [is record empty]; otherwise, false. + + + + + Gets a function to test for an empty string. + Will check when making its decision. + + The function to test for an empty string. + + + + Gets the index of the field at name if found. + + The name of the field to get the index for. + The index of the field if there are multiple fields with the same name. + A value indicating if the call was initiated from a TryGet. + The index of the field if found, otherwise -1. + Thrown if there is no header record. + Thrown if there isn't a field with name. + + + + Gets the index of the field at name if found. + + The possible names of the field to get the index for. + The index of the field if there are multiple fields with the same name. + A value indicating if the call was initiated from a TryGet. + The index of the field if found, otherwise -1. + Thrown if there is no header record. + Thrown if there isn't a field with name. + + + + Parses the named indexes from the header record. + + + + + Checks if the current record should be skipped or not. + + true if the current record should be skipped, false otherwise. + + + + Creates the record for the given type. + + The type of record to create. + The created record. + + + + Creates the record for the given type. + + The type of record to create. + The created record. + + + + Gets the function delegate used to populate + a custom class object with data from the reader. + + The of object that is created + and populated. + The function delegate. + + + + Gets the function delegate used to populate + a custom class object with data from the reader. + + The of object that is created + and populated. + The function delegate. + + + + Creates the read record func for the given type if it + doesn't already exist. + + Type of the record. + + + + Creates the function for an object. + + The type of object to create the function for. + + + + Creates the function for a primitive. + + The type of the primitive to create the function for. + + + + Creates the property bindings for the given . + + The mapping to create the bindings for. + The type of record. + The bindings that will be added to from the mapping. + + + + Adds a for each property for it's field. + + The properties to add bindings for. + The bindings that will be added to from the properties. + + + + Determines if the property for the + can be read. + + The property map. + A value indicating of the property can be read. True if it can, otherwise false. + + + + Determines if the property for the + can be read. + + The reference map. + A value indicating of the property can be read. True if it can, otherwise false. + + + + Creates a dynamic object from the current record. + + The dynamic object. + + + + Represents errors that occur while reading a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Defines methods used to serialize data into a CSV file. + + + + + Gets the configuration. + + + + + Creates a new serializer using the given . + + The to write the CSV file data to. + + + + Creates a new serializer using the given + and . + + The to write the CSV file data to. + The configuration. + + + + Writes a record to the CSV file. + + The record to write. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + True if the instance needs to be disposed of. + + + + Checks if the instance has been disposed of. + + + + + + Used to write CSV files. + + + + + Gets the configuration. + + + + + Creates a new CSV writer using the given , + a default and + as the default serializer. + + The writer used to write the CSV file. + + + + Creates a new CSV writer using the given + and and + as the default serializer. + + The use to write the CSV file. + The configuration. + + + + Creates a new CSV writer using the given . + + The serializer. + + + + Writes the field to the CSV file. The field + may get quotes added to it. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The field to write. + + + + Writes the field to the CSV file. This will + ignore any need to quote and ignore the + + and just quote based on the shouldQuote + parameter. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The field to write. + True to quote the field, otherwise false. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + The converter used to convert the field into a string. + + + + Writes the field to the CSV file + using the given . + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The type of the converter. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + The converter used to convert the field into a string. + + + + Ends writing of the current record + and starts a new record. This is used + when manually writing records with WriteField. + + + + + Write the Excel seperator record. + + + + + Writes the header record from the given properties. + + The type of the record. + + + + Writes the header record from the given properties. + + The type of the record. + + + + Writes the record to the CSV file. + + The type of the record. + The record to write. + + + + Writes the record to the CSV file. + + The type of the record. + The record to write. + + + + Writes the list of records to the CSV file. + + The list of records to write. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The record type. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The record type. + + + + Clears the record cache for all types. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Adds the properties from the mapping. This will recursively + traverse the mapping tree and add all properties for + reference maps. + + The properties to be added to. + The mapping where the properties are added from. + + + + Creates a property expression for the given property on the record. + This will recursively traverse the mapping to find the property + and create a safe property accessor for each level as it goes. + + The current property expression. + The mapping to look for the property to map on. + The property map to look for on the mapping. + An Expression to access the given property. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + True if the instance needs to be disposed of. + + + + Checks if the instance has been disposed of. + + + + + + Gets the action delegate used to write the custom + class object to the writer. + + The type of the custom class being written. + The action delegate. + + + + Gets the action delegate used to write the custom + class object to the writer. + + The type of the custom class being written. + The action delegate. + + + + Creates the write record action for the given type if it + doesn't already exist. + + The type of the custom class being written. + + + + Creates the action for an object. + + The type of object to create the action for. + + + + Creates the action for a primitive. + + The type of primitive to create the action for. + + + + Combines the delegates into a single multicast delegate. + This is needed because Silverlight doesn't have the + Delegate.Combine( params Delegate[] ) overload. + + The delegates to combine. + A multicast delegate combined from the given delegates. + + + + Checks if the property can be written. + + The property map that we are checking. + A value indicating if the property can be written. + True if the property can be written, otherwise false. + + + + Represents errors that occur while writing a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Common exception tasks. + + + + + Adds CsvHelper specific information to . + + The exception to add the info to. + The parser. + The type of object that was being created in the . + The named indexes in the . + The current index of the . + The current record of the . + + + + Gets CsvHelper information to be added to an exception. + + The parser. + The type of object that was being created in the . + The named indexes in the . + The current index of the . + The current record of the . + The CsvHelper information. + + + + Defines methods used to create + CsvHelper classes. + + + + + Creates an . + + The text reader to use for the csv parser. + The configuration to use for the csv parser. + The created parser. + + + + Creates an . + + The text reader to use for the csv parser. + The created parser. + + + + Creates an . + + The text reader to use for the csv reader. + The configuration to use for the reader. + The created reader. + + + + Creates an . + + The text reader to use for the csv reader. + The created reader. + + + + Creates an . + + The parser used to create the reader. + The created reader. + + + + Creates an . + + The text writer to use for the csv writer. + The configuration to use for the writer. + The created writer. + + + + Creates an . + + The text writer to use for the csv writer. + The created writer. + + + + Defines methods used the parse a CSV file. + + + + + Gets the configuration. + + + + + Gets the field count. + + + + + Gets the character position that the parser is currently on. + + + + + Gets the byte position that the parser is currently on. + + + + + Gets the row of the CSV file that the parser is currently on. + + + + + Gets the raw row for the current record that was parsed. + + + + + Reads a record from the CSV file. + + A of fields for the record read. + + + + Defines methods used to read parsed data + from a CSV file. + + + + + Gets or sets the configuration. + + + + + Gets the parser. + + + + + Gets the field headers. + + + + + Reads the header field without reading the first row. + + True if there are more records, otherwise false. + + + + Advances the reader to the next record. If the header hasn't been read + yet, it'll automatically be read along with the first record. + + True if there are more records, otherwise false. + + + + Defines methods used to read parsed data + from a CSV file row. + + + + + Get the current record; + + + + + Gets the current row. + + + + + Gets the raw field at position (column) index. + + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) index. + + The zero based index of the field. + The raw field. + + + + Gets the raw field at position (column) name. + + The named index of the field. + The raw field. + + + + Gets the raw field at position (column) name and the index + instance of that field. The index is used when there are + multiple columns with the same header name. + + The named index of the field. + The zero based index of the instance of the field. + The raw field. + + + + Gets the field converted to using + the specified . + + The type of the field. + The index of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The zero based index of the instance of the field. + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to using + the specified . + + The type of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to . + The field converted to . + + + + Gets the field converted to T at position (column) index. + + The of the field. + The zero based index of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) name. + + The of the field. + The named index of the field. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + + + + + Gets the field converted to T at position (column) index using + the given . + + The of the field. + The zero based index of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position (column) name using + the given . + + The of the field. + The named index of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + The of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to T. + The field converted to T. + + + + Gets the field converted to T at position (column) index using + the given . + + The of the field. + The used to convert the field to T. + The zero based index of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) name using + the given . + + The of the field. + The used to convert the field to T. + The named index of the field. + The field converted to T. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + The of the field. + The used to convert the field to T. + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + + + + Gets the field converted to T at position (column) index. + + The of the field. + The zero based index of the field. + The field converted to type T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name. + + The of the field. + The named index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position + (column) name and the index instance of that field. The index + is used when there are multiple columns with the same header name. + + + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) index + using the specified . + + The of the field. + The zero based index of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The named index of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The named index of the field. + The zero based index of the instance of the field. + The used to convert the field to T. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) index + using the specified . + + The of the field. + The used to convert the field to T. + The zero based index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The used to convert the field to T. + The named index of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Gets the field converted to T at position (column) name + using the specified . + + The of the field. + The used to convert the field to T. + The named index of the field. + The zero based index of the instance of the field. + The field converted to T. + A value indicating if the get was successful. + + + + Determines whether the current record is empty. + A record is considered empty if all fields are empty. + + + true if [is record empty]; otherwise, false. + + + + + Gets the record converted into T. + + The of the record. + The record converted to T. + + + + Gets the record. + + The of the record. + The record. + + + + Gets all the records in the CSV file and + converts each to T. The Read method + should not be used when using this. + + The of the record. + An of records. + + + + Gets all the records in the CSV file and + converts each to T. The Read method + should not be used when using this. + + The of the record. + An of records. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The type to invalidate. + + + + Clears the record cache for all types. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Defines methods used to serialize data into a CSV file. + + + + + Gets the configuration. + + + + + Writes a record to the CSV file. + + The record to write. + + + + Defines methods used to write to a CSV file. + + + + + Gets or sets the configuration. + + + + + Writes the field to the CSV file. The field + may get quotes added to it. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The field to write. + + + + Writes the field to the CSV file. This will + ignore any need to quote and ignore the + + and just quote based on the shouldQuote + parameter. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The field to write. + True to quote the field, otherwise false. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + The converter used to convert the field into a string. + + + + Writes the field to the CSV file + using the given . + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The type of the converter. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + + + + Writes the field to the CSV file. + When all fields are written for a record, + must be called + to complete writing of the current record. + + The type of the field. + The field to write. + The converter used to convert the field into a string. + + + + Ends writing of the current record + and starts a new record. This is used + when manually writing records with + + + + + Write the Excel seperator record. + + + + + Writes the header record from the given properties. + + The type of the record. + + + + Writes the header record from the given properties. + + The type of the record. + + + + Writes the record to the CSV file. + + The type of the record. + The record to write. + + + + Writes the record to the CSV file. + + The type of the record. + The record to write. + + + + Writes the list of records to the CSV file. + + The list of records to write. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The record type. + + + + Clears the record cache for the given type. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + The record type. + + + + Clears the record cache for all types. After is called the + first time, code is dynamically generated based on the , + compiled, and stored for the given type T. If the + changes, needs to be called to update the + record cache. + + + + + Common reflection tasks. + + + + + Creates an instance of type T. + + The type of instance to create. + The constructor arguments. + A new instance of type T. + + + + Creates an instance of the specified type. + + The type of instance to create. + The constructor arguments. + A new instance of the specified type. + + + + Gets the first attribute of type T on property. + + Type of attribute to get. + The to get the attribute from. + True to search inheritance tree, otherwise false. + The first attribute of type T, otherwise null. + + + + Gets the attributes of type T on property. + + Type of attribute to get. + The to get the attribute from. + True to search inheritance tree, otherwise false. + The attributes of type T. + + + + Gets the constructor from the give . + + The of the object that will be constructed. + The constructor . + A constructor . + Not a constructor expression.;expression + + + + Gets the property from the expression. + + The type of the model. + The expression. + The for the expression. + + + + Gets the member expression. + + The type of the model. + + The expression. + + + + + Common string tasks. + + + + + Tests is a string is null or whitespace. + + The string to test. + True if the string is null or whitespace, otherwise false. + + + + Maps class properties to CSV fields. + + + + + Called to create the mappings. + + + + + Gets the constructor expression. + + + + + The class property mappings. + + + + + The class property reference mappings. + + + + + Allow only internal creation of CsvClassMap. + + + + + Gets the property map for the given property expression. + + The type of the class the property belongs to. + The property expression. + The CsvPropertyMap for the given expression. + + + + Auto maps all properties for the given type. If a property + is mapped again it will override the existing map. + + A value indicating if references should be ignored when auto mapping. + True to ignore references, otherwise false. + A value indicating if headers of reference properties should + get prefixed by the parent property name. + True to prefix, otherwise false. + + + + Get the largest index for the + properties and references. + + The max index. + + + + Resets the indexes based on the given start index. + + The index start. + The last index + 1. + + + + Auto maps the given map and checks for circular references as it goes. + + The map to auto map. + A value indicating if references should be ignored when auto mapping. + True to ignore references, otherwise false. + A value indicating if headers of reference properties should + get prefixed by the parent property name. + True to prefix, otherwise false. + The list of parents for the map. + + + + Checks for circular references. + + The type to check for. + The list of parents to check against. + A value indicating if a circular reference was found. + True if a circular reference was found, otherwise false. + + + + Collection that holds CsvClassMaps for record types. + + + + + Gets the for the specified record type. + + + The . + + The record type. + The for the specified record type. + + + + Finds the for the specified record type. + + The record type. + The for the specified record type. + + + + Adds the specified map for it's record type. If a map + already exists for the record type, the specified + map will replace it. + + The map. + + + + Removes the class map. + + The class map type. + + + + Removes all maps. + + + + + Goes up the inheritance tree to find the type instance of CsvClassMap{}. + + The type to traverse. + The type that is CsvClassMap{}. + + + + Maps class properties to CSV fields. + + The of class to map. + + + + Constructs the row object using the given expression. + + The expression. + + + + Maps a property to a CSV field. + + The property to map. + The property mapping. + + + + Maps a property to another class map. + + The type of the class map. + The expression. + Constructor arguments used to create the reference map. + The reference mapping for the property. + + + + Maps a property to another class map. + + The type. + The expression. + Constructor arguments used to create the reference map. + The reference mapping for the property + + + + Configuration used for reading and writing CSV data. + + + + + The configured s. + + + + + Gets or sets the property binding flags. + This determines what properties on the custom + class are used. Default is Public | Instance. + + + + + Gets or sets a value indicating if the + CSV file has a header record. + Default is true. + + + + + Gets or sets a value indicating the if the CSV + file contains the Excel "sep=delimeter" config + option in the first row. + + + + + Gets or sets a value indicating if an exception will be + thrown if a field defined in a mapping is missing. + True to throw an exception, otherwise false. + Default is true. + + + + + Gets or sets a value indicating whether changes in the column + count should be detected. If true, a + will be thrown if a different column count is detected. + + + true if [detect column count changes]; otherwise, false. + + + + + Gets or sets a value indicating whether matching header + column names is case sensitive. True for case sensitive + matching, otherwise false. Default is true. + + + + + Gets or sets a value indicating whether matcher header + column names will ignore white space. True to ignore + white space, otherwise false. Default is false. + + + + + Gets or sets a value indicating whether references + should be ignored when auto mapping. True to ignore + references, otherwise false. Default is false. + + + + + Gets or sets a value indicating whether headers + should be trimmed. True to trim headers, + otherwise false. Default is false. + + + + + Gets or sets a value indicating whether fields + should be trimmed. True to trim fields, + otherwise false. Default is false. + + + + + Gets or sets the delimiter used to separate fields. + Default is ','; + + + + + Gets or sets the character used to quote fields. + Default is '"'. + + + + + Gets a string representation of the currently configured Quote character. + + + The new quote string. + + + + + Gets a string representation of two of the currently configured Quote characters. + + + The new double quote string. + + + + + Gets an array characters that require + the field to be quoted. + + + + + Gets or sets the character used to denote + a line that is commented out. Default is '#'. + + + + + Gets or sets a value indicating if comments are allowed. + True to allow commented out lines, otherwise false. + + + + + Gets or sets the size of the buffer + used for reading and writing CSV files. + Default is 2048. + + + + + Gets or sets a value indicating whether all fields are quoted when writing, + or just ones that have to be. and + cannot be true at the same time. Turning one + on will turn the other off. + + + true if all fields should be quoted; otherwise, false. + + + + + Gets or sets a value indicating whether no fields are quoted when writing. + and cannot be true + at the same time. Turning one on will turn the other off. + + + true if [quote no fields]; otherwise, false. + + + + + Gets or sets a value indicating whether the number of bytes should + be counted while parsing. Default is false. This will slow down parsing + because it needs to get the byte count of every char for the given encoding. + The needs to be set correctly for this to be accurate. + + + + + Gets or sets the encoding used when counting bytes. + + + + + Gets or sets the culture info used to read an write CSV files. + + + + + Gets or sets a value indicating whether empty rows should be skipped when reading. + A record is considered empty if all fields are empty. + + + true if [skip empty rows]; otherwise, false. + + + + + Gets or sets the callback that will be called to + determine whether to skip the given record or not. + This overrides the setting. + + + + + Gets or sets a value indicating if quotes should be + ingored when parsing and treated like any other character. + + + + + Gets or sets a value indicating if private + get and set property accessors should be + ignored when reading and writing. + True to ignore, otherwise false. Default is false. + + + + + Gets or sets a value indicating if blank lines + should be ignored when reading. + True to ignore, otherwise false. Default is true. + + + + + Gets or sets a value indicating if an Excel specific + format should be used when writing fields containing + numeric values. e.g. 00001 -> ="00001" + + + + + Gets or sets a value indicating if headers of reference + properties should get prefixed by the parent property name + when automapping. + True to prefix, otherwise false. Default is false. + + + + + Gets or sets a value indicating if an exception should + be thrown when bad field data is detected. + True to throw, otherwise false. Default is false. + + + + + Gets or sets a method that gets called when bad + data is detected. + + + + + Gets or sets a value indicating whether + exceptions that occur duruing reading + should be ignored. True to ignore exceptions, + otherwise false. Default is false. + This is only applicable when during + . + + + + + Gets or sets the callback that is called when a reading + exception occurs. This will only happen when + is true, and when + calling . + + + + + Gets or sets a value indicating that during writing if a new + object should be created when a reference property is null. + True to create a new object and use it's defaults for the + fields, or false to leave the fields empty for all the + reference property's properties. + + + + + Use a to configure mappings. + When using a class map, no properties are mapped by default. + Only properties specified in the mapping are used. + + The type of mapping class to use. + + + + Use a to configure mappings. + When using a class map, no properties are mapped by default. + Only properties specified in the mapping are used. + + The type of mapping class to use. + + + + Registers the class map. + + The class map to register. + + + + Unregisters the class map. + + The map type to unregister. + + + + Unregisters the class map. + + The map type to unregister. + + + + Unregisters all class maps. + + + + + Generates a for the type. + + The type to generate the map for. + The generate map. + + + + Generates a for the type. + + The type to generate for the map. + The generate map. + + + + Creates a new CsvConfiguration. + + + + + Builds the values for the RequiredQuoteChars property. + + + + + Represents configuration errors that occur. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Mapping info for a property to a CSV field. + + + + + Gets the property map data. + + + + + Creates a new instance using the specified property. + + + + + When reading, is used to get the field + at the index of the name if there was a + header specified. It will look for the + first name match in the order listed. + When writing, sets the name of the + field in the header record. + The first name will be used. + + The possible names of the CSV field. + + + + When reading, is used to get the + index of the name used when there + are multiple names that are the same. + + The index of the name. + + + + When reading, is used to get the field at + the given index. When writing, the fields + will be written in the order of the field + indexes. + + The index of the CSV field. + + + + Ignore the property when reading and writing. + + + + + Ignore the property when reading and writing. + + True to ignore, otherwise false. + + + + The default value that will be used when reading when + the CSV field is empty. + + The default value. + + + + Specifies the to use + when converting the property to and from a CSV field. + + The TypeConverter to use. + + + + Specifies the to use + when converting the property to and from a CSV field. + + The of the + to use. + + + + Specifies an expression to be used to convert data in the + row to the property. + + The type of the property that will be set. + The convert expression. + + + + The used when type converting. + This will override the global + setting. + + The culture info. + + + + The to use when type converting. + This is used when doing any conversions. + + The date time style. + + + + The to use when type converting. + This is used when doing any number conversions. + + + + + + The string format to be used when type converting. + + The format. + + + + The string values used to represent a boolean when converting. + + A value indicating whether true values or false values are being set. + The string boolean values. + + + + The string values used to represent a boolean when converting. + + A value indicating whether true values or false values are being set. + A value indication if the current values should be cleared before adding the new ones. + The string boolean values. + + + + A collection that holds 's. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The comparer to use when sorting the property maps. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + + Adds a range of items to the . + + The collection to add. + + + + Removes all items from the . + + The is read-only. + + + + + Determines whether the contains a specific value. + + + true if is found in the ; otherwise, false. + + The object to locate in the . + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.The zero-based index in at which copying begins. is null. is less than 0.The number of elements in the source is greater than the available space from to the end of the destination . + + + + Removes the first occurrence of a specific object from the . + + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The object to remove from the . + The is read-only. + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + + Determines the index of a specific item in the . + + + The index of if found in the list; otherwise, -1. + + The object to locate in the . + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + + + Gets or sets the element at the specified index. + + + The element at the specified index. + + The zero-based index of the element to get or set. + is not a valid index in the . + The property is set and the is read-only. + + + + + Used to compare s. + The order is by field index ascending. Any + fields that don't have an index are pushed + to the bottom. + + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + + Value + Condition + Less than zero + is less than . + Zero + equals . + Greater than zero + is greater than . + + The first object to compare. + The second object to compare. + Neither nor implements the interface. + -or- + and are of different types and neither one can handle comparisons with the other. + 2 + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + + Value + Condition + Less than zero + is less than . + Zero + equals . + Greater than zero + is greater than . + + The first object to compare. + The second object to compare. + + + + + The configured data for the property map. + + + + + Gets the that the data + is associated with. + + + + + Gets the list of column names. + + + + + Gets or sets the index of the name. + This is used if there are multiple + columns with the same names. + + + + + Gets or sets a value indicating if the name was + explicitly set. True if it was explicity set, + otherwise false. + + + + + Gets or sets the column index. + + + + + Gets or sets a value indicating if the index was + explicitly set. True if it was explicitly set, + otherwise false. + + + + + Gets or sets the type converter. + + + + + Gets or sets the type converter options. + + + + + Gets or sets a value indicating whether the field should be ignored. + + + + + Gets or sets the default value used when a CSV field is empty. + + + + + Gets or sets a value indicating whether this instance is default value set. + the default value was explicitly set. True if it was + explicitly set, otherwise false. + + + + + Gets or sets the expression used to convert data in the + row to the property. + + + + + Initializes a new instance of the class. + + The property. + + + + A collection that holds property names. + + + + + Gets the name at the given index. If a prefix is set, + it will be prepended to the name. + + + + + + + Gets the prefix to use for each name. + + + + + Gets the raw list of names without + the prefix being prepended. + + + + + Gets the count. + + + + + Adds the given name to the collection. + + The name to add. + + + + Clears all names from the collection. + + + + + Adds a range of names to the collection. + + The range to add. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Mapping info for a reference property mapping to a class. + + + + + Gets the property. + + + + + Gets the mapping. + + + + + Gets the property reference map data. + + + + + Initializes a new instance of the class. + + The property. + The to use for the reference map. + + + + Appends a prefix to the header of each field of the reference property + + The prefix to be prepended to headers of each reference property + The current + + + + Get the largest index for the + properties and references. + + The max index. + + + + The configuration data for the reference map. + + + + + Gets or sets the header prefix to use. + + + + + Gets the that the data + is associated with. + + + + + Gets the mapping this is a reference for. + + + + + Initializes a new instance of the class. + + The property. + The mapping this is a reference for. + + + + A default that can be used + to create a class map dynamically. + + + + + + Converts a Boolean to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a Byte to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a Char to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Represents errors that occur while reading a CSV file. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that + is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Converts a DateTime to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a DateTimeOffset to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a Decimal to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an object to and from a string. + + + + + Converts the object to a string. + + The options to use when converting. + The object to convert to a string. + The string representation of the object. + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Determines whether this instance [can convert to] the specified type. + + The type. + + true if this instance [can convert to] the specified type; otherwise, false. + + + + + Converts a Double to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + + The object created from the string. + + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an Enum to and from a string. + + + + + Creates a new for the given . + + The type of the Enum. + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Throws an exception when used. This is here so that it's apparent + that there is no support for IEnumerable type coversion. A custom + converter will need to be created to have a field convert to and + from an IEnumerable. + + + + + Throws an exception. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Throws an exception. + + The options to use when converting. + The object to convert to a string. + The string representation of the object. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Determines whether this instance [can convert to] the specified type. + + The type. + + true if this instance [can convert to] the specified type; otherwise, false. + + + + + Converts a Guid to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an Int16 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an Int32 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts an Int64 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts objects to and from strings. + + + + + Converts the object to a string. + + The options to use when converting. + The object to convert to a string. + The string representation of the object. + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Determines whether this instance [can convert to] the specified type. + + The type. + + true if this instance [can convert to] the specified type; otherwise, false. + + + + + Converts a Nullable to and from a string. + + + + + Gets the type of the nullable. + + + The type of the nullable. + + + + + Gets the underlying type of the nullable. + + + The underlying type. + + + + + Gets the type converter for the underlying type. + + + The type converter. + + + + + Creates a new for the given . + + The nullable type. + type is not a nullable type. + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Converts the object to a string. + + The options to use when converting. + The object to convert to a string. + The string representation of the object. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a SByte to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a Float to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a string to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a TimeSpan to and from a string. + + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Creates s. + + + + + Initializes the class. + + + + + Adds the for the given . + + The type the converter converts. + The type converter that converts the type. + + + + Adds the for the given . + + The type the converter converts. + The type converter that converts the type. + + + + Removes the for the given . + + The type to remove the converter for. + + + + Removes the for the given . + + The type to remove the converter for. + + + + Gets the converter for the given . + + The type to get the converter for. + The for the given . + + + + Gets the converter for the given . + + The type to get the converter for. + The for the given . + + + + Options used when doing type conversion. + + + + + Gets or sets the culture info. + + + + + Gets or sets the date time style. + + + + + Gets or sets the time span style. + + + + + Gets or sets the number style. + + + + + Gets the list of values that can be + used to represent a boolean of true. + + + + + Gets the list of values that can be + used to represent a boolean of false. + + + + + Gets or sets the string format. + + + + + Merges TypeConverterOptions by applying the values of sources in order to a + new TypeConverterOptions instance. + + The sources that will be applied. + A new instance of TypeConverterOptions with the source applied to it. + + + + Creates . + + + + + Adds the for the given . + + The type the options are for. + The options. + + + + Adds the for the given . + + The type the options are for. + The options. + + + + Removes the for the given type. + + The type to remove the options for. + + + + Removes the for the given type. + + The type to remove the options for. + + + + Get the for the given . + + The type the options are for. + The options for the given type. + + + + Get the for the given . + + The type the options are for. + The options for the given type. + + + + Converts a UInt16 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a UInt32 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + + Converts a UInt64 to and from a string. + + + + + Converts the string to an object. + + The options to use when converting. + The string to convert to an object. + The object created from the string. + + + + Determines whether this instance [can convert from] the specified type. + + The type. + + true if this instance [can convert from] the specified type; otherwise, false. + + + + diff --git a/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSDKLibrary.dll b/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSDKLibrary.dll index bdabf63f..de3cdde9 100644 Binary files a/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSDKLibrary.dll and b/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSDKLibrary.dll differ diff --git a/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSDKLibrary.pdb b/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSDKLibrary.pdb index e44d7f6b..49d329a0 100644 Binary files a/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSDKLibrary.pdb and b/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSDKLibrary.pdb differ diff --git a/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSdkV5UnitTest.dll b/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSdkV5UnitTest.dll index ef461dc6..4e2a338a 100644 Binary files a/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSdkV5UnitTest.dll and b/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSdkV5UnitTest.dll differ diff --git a/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSdkV5UnitTest.pdb b/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSdkV5UnitTest.pdb index 7ce5e228..c65fd47d 100644 Binary files a/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSdkV5UnitTest.pdb and b/Route4MeSdkV5UnitTest/bin/Debug/net48/Route4MeSdkV5UnitTest.pdb differ