private bool CanGenerateAFAMultiEventListPipe() { 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 => AfaMultiEventListTemplate.GenerateAFA(this)); this.errorMessages = generatedPipeType.Item2; return(generatedPipeType.Item1 != null); }
private UnaryPipe <TKey, TPayload, TRegister> GetAFAMultiEventListPipe(IStreamObserver <TKey, TRegister> observer) { var lookupKey = CacheKey.Create((object)this.afa); var generatedPipeType = cachedPipes.GetOrAdd(lookupKey, key => AfaMultiEventListTemplate.GenerateAFA(this)); var instance = Activator.CreateInstance(generatedPipeType.Item1, this, observer, this.afa, this.MaxDuration); var returnValue = (UnaryPipe <TKey, TPayload, TRegister>)instance; return(returnValue); }