// dynamically create provider private static void CreateProvider() { _providerList = new Dictionary <string, TaxInterface>(); var pluginData = new PluginData(PortalSettings.Current.PortalId); var l = pluginData.GetTaxProviders(false); foreach (var p in l) { var prov = p.Value; ObjectHandle handle = null; handle = Activator.CreateInstance(prov.GetXmlProperty("genxml/textbox/assembly"), prov.GetXmlProperty("genxml/textbox/namespaceclass")); var objProvider = (TaxInterface)handle.Unwrap(); var ctrlkey = prov.GetXmlProperty("genxml/textbox/ctrl"); if (!_providerList.ContainsKey(ctrlkey)) { _providerList.Add(ctrlkey, objProvider); } } }
// dynamically create provider private static void CreateProvider() { _providerList = new Dictionary<string, TaxInterface>(); var pluginData = new PluginData(PortalSettings.Current.PortalId); var l = pluginData.GetTaxProviders(); foreach (var p in l) { var prov = p.Value; ObjectHandle handle = null; handle = Activator.CreateInstance(prov.GetXmlProperty("genxml/textbox/assembly"), prov.GetXmlProperty("genxml/textbox/namespaceclass")); var objProvider = (TaxInterface)handle.Unwrap(); var ctrlkey = prov.GetXmlProperty("genxml/textbox/ctrl"); if (!_providerList.ContainsKey(ctrlkey)) { _providerList.Add(ctrlkey, objProvider); } } }