Hi there,
It seems that I must add at least one configurable field to a configurable addin even though I don't need one. For example, consider the following TaxProvider:
[AddInName("My flat fee tax provider")] public class SimpleTaxProvider : TaxProvider { public override void AddTaxOrderLinesToOrder(Order order) { //TODO } }
When configuring this provider, I get the following exception:
[NullReferenceException: Object reference not set to an instance of an object.]
Dynamicweb.Extensibility.ConfigurableAddIn.GetInstanceFromParameterXml(String xml) +241
Dynamicweb.eCommerce.Products.Taxes.TaxSetting.get_TaxProvider() +53
Dynamicweb.Admin.eComBackend.EcomTaxSetting_Edit.Page_Load(Object sender, EventArgs e) +397
System.Web.UI.Control.OnLoad(EventArgs e) +92
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
Note how this crashes in the base ConfigurableAddin class. If I add a fake field like this:
[AddInName("My flat fee tax provider")] public class SimpleTaxProvider : TaxProvider { [AddInParameterEditor(typeof(TextParameterEditor), "size=80"), AddInParameter("SomeFakeField")] public string SomeFakeField { get; set; } public override void AddTaxOrderLinesToOrder(Order order) { // TODO } }
it works fine. Is this a bug, or am I supposed to override GetInstanceFromParameterXml in this case and deal with it in a different way?
Thanks,
Imar