public IServerSource FetchSource(Guid resourceID)
        {
            var xaml = _queryProxy.FetchResourceXaml(resourceID);

            var    connection = new Connection(xaml.ToXElement());
            string address    = null;

            if (Uri.TryCreate(connection.Address, UriKind.RelativeOrAbsolute, out Uri uri))
            {
                address = uri.Host;
            }

            var selectedServer = new ServerSource
            {
                Address            = connection.Address,
                ID                 = connection.ResourceID,
                AuthenticationType = connection.AuthenticationType,
                UserName           = connection.UserName,
                Password           = connection.Password,
                ResourcePath       = connection.GetSavePath(),
                ServerName         = address,
                Name               = connection.ResourceName
            };

            return(selectedServer);
        }
        public IOAuthSource FetchSource(Guid resourceID)
        {
            var xaml = _queryProxy.FetchResourceXaml(resourceID);
            var db   = new DropBoxSource(xaml.ToXElement());

            return(db);
        }
        public IComPluginSource FetchSource(Guid pluginSourceId)
        {
            var xaml = _queryProxy.FetchResourceXaml(pluginSourceId);
            var db   = new ComPluginSource(xaml.ToXElement());
            var def  = new ComPluginSourceDefinition(db);

            return(def);
        }
Exemple #4
0
        public IDbSource FetchDbSource(Guid resourceID)
        {
            var xaml = _queryProxy.FetchResourceXaml(resourceID);
            var db   = new DbSource(xaml.ToXElement());
            var def  = new DbSourceDefinition(db);

            return(def);
        }
        public IRabbitMQServiceSourceDefinition FetchSource(Guid resourceID)
        {
            var xaml   = _queryManager.FetchResourceXaml(resourceID);
            var source = new RabbitMQSource(xaml.ToXElement());
            var def    = new RabbitMQServiceSourceDefinition(source);

            return(def);
        }
Exemple #6
0
        public ISharepointServerSource FetchSource(Guid resourceID)
        {
            var xaml = _queryProxy.FetchResourceXaml(resourceID);
            var db   = new SharepointSource(xaml.ToXElement());
            var def  = new SharePointServiceSourceDefinition(db);

            return(def);
        }
        public IWebServiceSource FetchSource(Guid id)
        {
            var xaml = _queryProxy.FetchResourceXaml(id);
            var db   = new WebSource(xaml.ToXElement());

            var def = new WebServiceSourceDefinition(db);

            return(def);
        }
Exemple #8
0
        public IElasticsearchSourceDefinition FetchSource(Guid id)
        {
            var xaml   = _queryManager.FetchResourceXaml(id);
            var source = new ElasticsearchSource(xaml.ToXElement());

            var def = new ElasticsearchSourceDefinition(source);

            return(def);
        }
        public IExchangeSource FetchSource(Guid exchangeSourceResourceID)
        {
            var xaml = _queryProxy.FetchResourceXaml(exchangeSourceResourceID);
            var db   = new ExchangeSource(xaml.ToXElement());

            var def = new ExchangeSourceDefinition(db);

            return(def);
        }
Exemple #10
0
        public IRedisServiceSource FetchSource(Guid id)
        {
            var xaml        = _queryProxy.FetchResourceXaml(id);
            var redisSource = new RedisSource(xaml.ToXElement());

            var def = new RedisSourceDefinition(redisSource);

            return(def);
        }
        public IWcfServerSource FetchSource(Guid resourceID)
        {
            var xaml      = _queryProxy.FetchResourceXaml(resourceID);
            var wcfsource = new WcfSource(xaml.ToXElement());

            var def = new WcfServiceSourceDefinition(wcfsource);

            return(def);
        }
        public IWcfServerSource FetchSource(Guid resourceID)
        {
            var xaml      = _queryProxy.FetchResourceXaml(resourceID);
            var wcfsource = new WcfSource(xaml.ToXElement());

            var def = new WcfServiceSourceDefinition
            {
                Id           = wcfsource.Id,
                Name         = wcfsource.ResourceName,
                Path         = wcfsource.GetSavePath(),
                ResourceName = wcfsource.Name,
                EndpointUrl  = wcfsource.EndpointUrl
            };

            return(def);
        }
        public IExchangeSource FetchSource(Guid exchangeSourceResourceID)
        {
            var xaml = _queryProxy.FetchResourceXaml(exchangeSourceResourceID);
            var db   = new ExchangeSource(xaml.ToXElement());

            var def = new ExchangeSourceDefinition
            {
                AutoDiscoverUrl = db.AutoDiscoverUrl,
                Id           = db.ResourceID,
                Password     = db.Password,
                UserName     = db.UserName,
                Path         = "",
                Timeout      = db.Timeout,
                ResourceName = db.ResourceName,
            };

            return(def);
        }