17 using System.Collections.Generic;
29 private readonly Type _brokerageType;
42 get {
return _brokerageType; }
82 _brokerageType = brokerageType;
88 protected static T
Read<T>(IReadOnlyDictionary<string, string> brokerageData,
string key, ICollection<string> errors)
89 where T : IConvertible
92 if (!brokerageData.TryGetValue(key, out value))
94 errors.Add(
"BrokerageFactory.CreateBrokerage(): Missing key: " + key);
100 return value.ConvertTo<T>();
102 catch (Exception err)
104 errors.Add($
"BrokerageFactory.CreateBrokerage(): Error converting key '{key}' with value '{value}'. {err.Message}");