|
|
|
@ -23,11 +23,15 @@ namespace NzbDrone.Core.Datastore.Converters
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var ordinal = context.DataRecord.GetOrdinal("ConfigContract");
|
|
|
|
|
var contract = context.DataRecord.GetString(ordinal);
|
|
|
|
|
|
|
|
|
|
var implementation = context.DataRecord.GetString(ordinal);
|
|
|
|
|
|
|
|
|
|
var impType = typeof (IProviderConfig).Assembly.FindTypeByName(contract);
|
|
|
|
|
|
|
|
|
|
var impType = typeof (IProviderConfig).Assembly.FindTypeByName(implementation);
|
|
|
|
|
if (impType == null)
|
|
|
|
|
{
|
|
|
|
|
throw new ConfigContractNotFoundException(contract);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Json.Deserialize(stringValue, impType);
|
|
|
|
|
}
|
|
|
|
|