// POST: Service/PluginServices/Methods public ServiceMethodList Methods(PluginService args, Guid workspaceId, Guid dataListId) { var result = new ServiceMethodList(); try { // BUG 9500 - 2013.05.31 - TWR : changed to use PluginService as args var broker = new PluginBroker(); result = broker.GetMethods(((PluginSource)args.Source).AssemblyLocation, ((PluginSource)args.Source).AssemblyName, args.Namespace); return(result); } catch (Exception ex) { RaiseError(ex); } return(result); }
// POST: Service/PluginServices/Methods public ServiceMethodList Methods(string args, Guid workspaceId, Guid dataListId) { var result = new ServiceMethodList(); try { // BUG 9500 - 2013.05.31 - TWR : changed to use PluginService as args var service = JsonConvert.DeserializeObject <PluginService>(args); var broker = new PluginBroker(); result = broker.GetMethods(((PluginSource)service.Source).AssemblyLocation, ((PluginSource)service.Source).AssemblyName, service.Namespace); return(result); } catch (Exception ex) { RaiseError(ex); } return(result); }
// POST: Service/PluginServices/Methods public ServiceMethodList Methods(string args, Guid workspaceId, Guid dataListId) { var result = new ServiceMethodList(); try { // BUG 9500 - 2013.05.31 - TWR : changed to use PluginService as args var service = JsonConvert.DeserializeObject <PluginService>(args); var pluginSourceFromCatalog = _resourceCatalog.GetResource <PluginSource>(workspaceId, service.Source.ResourceID); if (pluginSourceFromCatalog == null) { try { var xmlStr = Resources.ReadXml(workspaceId, ResourceType.PluginSource, service.Source.ResourceID.ToString()); if (!string.IsNullOrEmpty(xmlStr)) { var xml = XElement.Parse(xmlStr); pluginSourceFromCatalog = new PluginSource(xml); } } catch (Exception) { //ignore this } } if (pluginSourceFromCatalog != null) { service.Source = pluginSourceFromCatalog; } var broker = new PluginBroker(); var pluginSource = (PluginSource)service.Source; if (pluginSource != null) { result = broker.GetMethods(pluginSource.AssemblyLocation, pluginSource.AssemblyName, service.Namespace); } return(result); } catch (Exception ex) { RaiseError(ex); } return(result); }