public void PutEndpoint(string file)
        {
            if (file == null)
            {
                throw new ArgumentNullException(nameof(file));
            }
            if (!File.Exists(file))
            {
                throw new FileNotFoundException(nameof(file));
            }

            using (var maint = MaintenanceClient.LoginLogoutClient(Config.ApiConnectionConfig))
            {
                maint.PutFileSchema(file);
            }

            Console.WriteLine($"Endpoint successfully updated from file {file}.");
        }
        public void GetAndSaveEndpoint(string version, string endpoint, string file)
        {
            if (version == null)
            {
                throw new ArgumentNullException(nameof(version));
            }
            if (endpoint == null)
            {
                throw new ArgumentNullException(nameof(endpoint));
            }
            if (file == null)
            {
                throw new ArgumentNullException(nameof(file));
            }

            using (var maint = MaintenanceClient.LoginLogoutClient(Config.ApiConnectionConfig))
            {
                maint.GetAndSaveSchema(version, endpoint, file);
            }

            Console.WriteLine($"Endpoint {endpoint}/{version} successfully saved to file {file}.");
        }
Example #3
0
 MaintenanceImpl(ClientConnectionManager connectionManager)
 {
     this.connectionManager = connectionManager;
     managedChannel         = connectionManager.NewChannel();
     maintenanceClient      = new MaintenanceClient(managedChannel.Channel);
 }