Dev2.Runtime.ServiceModel.DbSources.Get C# (CSharp) Method

Get() public method

public Get ( string resourceId, System.Guid workspaceId, System.Guid dataListId ) : DbSource
resourceId string
workspaceId System.Guid
dataListId System.Guid
return Dev2.Runtime.ServiceModel.Data.DbSource
        public DbSource Get(string resourceId, Guid workspaceId, Guid dataListId)
        {
            var result = new DbSource { ResourceID = Guid.Empty, ResourceType = ResourceType.DbSource, AuthenticationType = AuthenticationType.Windows };

            try
            {
                var xmlStr = ResourceCatalog.Instance.GetResourceContents(workspaceId, Guid.Parse(resourceId)).ToString();
                if (!string.IsNullOrEmpty(xmlStr))
                {
                    var xml = XElement.Parse(xmlStr);
                    result = new DbSource(xml);
                }
            }
            catch (Exception ex)
            {
                RaiseError(ex);
            }
            return result;
        }