private EgressBoundary <Empty, TPayload, StreamEvent <TPayload> > GetPipe(IObserver <StreamEvent <TPayload> > observer)
        {
            var lookupKey         = CachedPipeLookupKey();
            var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => TemporalEgressTemplate.Generate(this));

            var instance    = Activator.CreateInstance(generatedPipeType.Item1, observer, this.container);
            var returnValue = (EgressBoundary <Empty, TPayload, StreamEvent <TPayload> >)instance;

            return(returnValue);
        }
        private EgressBoundary <PartitionKey <TKey>, TPayload, TResult> GetPipe(IObserver <TResult> observer)
        {
            var lookupKey         = CachedPipeLookupKey();
            var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => TemporalEgressTemplate.Generate(this));

            var instance    = Activator.CreateInstance(generatedPipeType.Item1, observer, this.container);
            var returnValue = (EgressBoundary <PartitionKey <TKey>, TPayload, TResult>)instance;

            return(returnValue);
        }
Esempio n. 3
0
        private EgressBoundary <PartitionKey <TKey>, TPayload, TResult> GetPipe(IObserver <TResult> observer)
        {
            var lookupKey = CacheKey.Create(this.constructor.Body.ExpressionToCSharp(), this.source.Properties.IsColumnar);

            var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => TemporalEgressTemplate.Generate(this));

            var instance    = Activator.CreateInstance(generatedPipeType.Item1, observer, this.container);
            var returnValue = (EgressBoundary <PartitionKey <TKey>, TPayload, TResult>)instance;

            return(returnValue);
        }
Esempio n. 4
0
        private EgressBoundary <PartitionKey <TKey>, TPayload, PartitionedStreamEvent <TKey, TPayload> > GetPipe(IObserver <PartitionedStreamEvent <TKey, TPayload> > observer)
        {
            var lookupKey = CacheKey.Create(this.source.Properties.IsColumnar);

            var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => TemporalEgressTemplate.Generate(this));

            var instance    = Activator.CreateInstance(generatedPipeType.Item1, observer, this.container);
            var returnValue = (EgressBoundary <PartitionKey <TKey>, TPayload, PartitionedStreamEvent <TKey, TPayload> >)instance;

            return(returnValue);
        }
        private bool CanGenerateColumnar()
        {
            if (typeof(TPayload).IsAnonymousTypeName())
            {
                return(false);
            }
            if (!typeof(TPayload).GetTypeInfo().IsVisible)
            {
                return(false);
            }

            var lookupKey         = CachedPipeLookupKey();
            var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => TemporalEgressTemplate.Generate(this));

            this.errorMessages = generatedPipeType.Item2;
            return(generatedPipeType.Item1 != null);
        }
Esempio n. 6
0
        private bool CanGenerateColumnar()
        {
            if (typeof(TKey).IsAnonymousTypeName() || typeof(TPayload).IsAnonymousTypeName() || typeof(TResult).IsAnonymousTypeName())
            {
                return(false);
            }
            if (!typeof(TKey).GetTypeInfo().IsVisible || !typeof(TPayload).GetTypeInfo().IsVisible || !typeof(TResult).GetTypeInfo().IsVisible)
            {
                return(false);
            }

            var lookupKey = CacheKey.Create(this.constructor.Body.ExpressionToCSharp(), this.source.Properties.IsColumnar);

            var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => TemporalEgressTemplate.Generate(this));

            this.errorMessages = generatedPipeType.Item2;
            return(generatedPipeType.Item1 != null);
        }