Exemplo n.º 1
0
        private ModelIdentity GetModelIdentity()
        {
            var sessionToken = SessionTokenGenerator.CreateServiceSessionToken();
            IClientProxy <IModelService> bufferedProxy = GetBufferedProxy();
            IModelService proxy = bufferedProxy.Proxy;

            return(proxy.IdentifyModel(sessionToken, _credential.ModelPath, true));
        }
Exemplo n.º 2
0
        public async Task <FoldersAndModels> ListSubFoldersAndModels(string relativeFolderPath)
        {
            var foldersAndModels = await Task <FoldersAndModels> .Factory.StartNew(() =>
            {
                var sessionToken = SessionTokenGenerator.CreateServiceSessionToken();
                _bufferedProxy.ListSubFoldersAndModels(sessionToken, relativeFolderPath, out var folders, out var models);
                var result = new FoldersAndModels(ParseList(folders), ParseList(models));
                return(result);
            });

            return(foldersAndModels);
        }