Ejemplo n.º 1
0
        public async Task ToStreamAsync(Stream stream, string otherVertex, string otherEndpoint, CancellationToken token)
        {
            IEndpointContent streamEndpoint = new StreamEndpoint(stream);

            _operator.AddOutput(_thisId, ref streamEndpoint);
            _operator.WaitForOutputCompletion(_thisId);
        }
Ejemplo n.º 2
0
        public async Task ToInputAsync(IAsyncVertexInputEndpoint inputEndpoint, string otherVertex, string otherEndpoint, CancellationToken token)
        {
            _inputEndpoint = inputEndpoint as OperatorFusableInput;
            bool isAdded = await _inputEndpoint.AddOperatorFusableInput();

            if (isAdded)
            {
                IEndpointContent endpointContent = new ObjectEndpoint();
                ((ObjectEndpoint)endpointContent).SetOperatorOutputEndpoint(this);

                _operator.AddOutput(_thisId, ref endpointContent);
                _operator.WaitForOutputCompletion(_thisId);
            }
        }