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 FromStreamAsync(Stream stream, string otherVertex, string otherEndpoint, CancellationToken token)
        {
            IEndpointContent streamEndpoint = new StreamEndpoint(stream);

            if (_isSecondaryInput)
            {
                _operator.AddSecondaryInput(_thisId, ref streamEndpoint);
                _operator.WaitForSecondaryInputCompletion(_thisId);
            }
            else
            {
                _operator.AddInput(_thisId, ref streamEndpoint);
                _operator.WaitForInputCompletion(_thisId);
            }
        }