Dev2.Runtime.ServiceModel.Resources.ReadXml C# (CSharp) Method

ReadXml() public static method

public static ReadXml ( System.Guid workspaceID, ResourceType resourceType, string resourceID ) : string
workspaceID System.Guid
resourceType ResourceType
resourceID string
return string
        public static string ReadXml(Guid workspaceID, ResourceType resourceType, string resourceID)
        {
            return ReadXml(workspaceID, RootFolders[resourceType], resourceID);
        }

Same methods

Resources::ReadXml ( System.Guid workspaceID, string directoryName, string resourceID ) : string

Usage Example

Example #1
0
        // 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);
        }
All Usage Examples Of Dev2.Runtime.ServiceModel.Resources::ReadXml