Beispiel #1
0
 static bool TestFiles(IList<string> unparsed)
 {
     string appname = unparsed[0];
     string path = unparsed[1];
     IVcapClient vc = new VcapClient();
     VcapFilesResult result = vc.Files(appname, path, 0);
     Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented));
     return true;
 }
Beispiel #2
0
        static bool TestFiles(IList <string> unparsed)
        {
            string          appname = unparsed[0];
            string          path    = unparsed[1];
            IVcapClient     vc      = new VcapClient();
            VcapFilesResult result  = vc.Files(appname, path, 0);

            Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented));
            return(true);
        }
        public ProviderResponse <VcapFilesResult> GetFiles(Cloud cloud, Application application, string path, ushort instanceId)
        {
            ProviderResponse <VcapFilesResult> response = new ProviderResponse <VcapFilesResult>();

            try
            {
                IVcapClient client = new VcapClient(cloud);
                var         result = client.Files(application.Name, path, instanceId);
                response.Response = result;
            }
            catch (Exception ex)
            {
                response.Message = ex.Message;
            }
            return(response);
        }
 public ProviderResponse<VcapFilesResult> GetFiles(Cloud cloud, Application application, string path, ushort instanceId)
 {
     var response = new ProviderResponse<VcapFilesResult>();
     try
     {
         IVcapClient client = new VcapClient(cloud);
         var result = client.Files(application.Name, path, instanceId);
         response.Response = result;
     }
     catch (Exception ex)
     {
         response.Message = ex.Message;
     }
     return response;
 }