private bool CanGenerateGroupedAFAMultiEventPipe() { var typeOfTKey = typeof(TKey); var typeOfTPayload = typeof(TPayload); var typeOfTRegister = typeof(TRegister); if (!typeOfTPayload.CanRepresentAsColumnar()) { return(false); } if (!typeOfTRegister.CanRepresentAsColumnar()) { return(false); } if (typeOfTKey.GetPartitionType() != null) { return(false); } var lookupKey = CacheKey.Create((object)this.afa); var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => GroupedAfaMultiEventTemplate.GenerateAFA(this)); this.errorMessages = generatedPipeType.Item2; return(generatedPipeType.Item1 != null); }
private UnaryPipe <TKey, TPayload, TRegister> GetGroupedAFAMultiEventPipe(IStreamObserver <TKey, TRegister> observer) { var lookupKey = CacheKey.Create((object)this.afa); var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => GroupedAfaMultiEventTemplate.GenerateAFA(this)); var instance = Activator.CreateInstance(generatedPipeType.Item1, this, observer, this.afa, this.MaxDuration); var returnValue = (UnaryPipe <TKey, TPayload, TRegister>)instance; return(returnValue); }