public override async Task <Protocol.FlightInfo> GetFlightInfo(Protocol.FlightDescriptor request, ServerCallContext context)
        {
            var flightDescriptor = new FlightDescriptor(request);
            var flightInfo       = await _flightServer.GetFlightInfo(flightDescriptor, context).ConfigureAwait(false);

            return(flightInfo.ToProtocol());
        }
Пример #2
0
 internal FlightDescriptor(Protocol.FlightDescriptor flightDescriptor)
 {
     if (flightDescriptor.Type != Protocol.FlightDescriptor.Types.DescriptorType.Cmd && flightDescriptor.Type != Protocol.FlightDescriptor.Types.DescriptorType.Path)
     {
         throw new NotSupportedException();
     }
     _flightDescriptor = flightDescriptor;
 }
Пример #3
0
 private FlightDescriptor(ByteString command)
 {
     _flightDescriptor = new Protocol.FlightDescriptor()
     {
         Cmd  = command,
         Type = Protocol.FlightDescriptor.Types.DescriptorType.Cmd
     };
 }
        public override async Task <SchemaResult> GetSchema(Protocol.FlightDescriptor request, ServerCallContext context)
        {
            var flightDescriptor = new FlightDescriptor(request);
            var schema           = await _flightServer.GetSchema(flightDescriptor, context).ConfigureAwait(false);

            return(new SchemaResult()
            {
                Schema = SchemaWriter.SerializeSchema(schema)
            });
        }
Пример #5
0
        private FlightDescriptor(params string[] paths)
        {
            _flightDescriptor = new Protocol.FlightDescriptor()
            {
                Type = Protocol.FlightDescriptor.Types.DescriptorType.Path
            };

            foreach (var path in paths)
            {
                _flightDescriptor.Path.Add(path);
            }
        }