Akka.Interfaced.NotificationHandlerBuilder.BuildGenericHandler C# (CSharp) Method

BuildGenericHandler() private static method

private static BuildGenericHandler ( Type targetType, Type invokePayloadType, MethodInfo method, FilterChain filterChain ) : NotificationHandler
targetType System.Type
invokePayloadType System.Type
method System.Reflection.MethodInfo
filterChain FilterChain
return NotificationHandler
        private static NotificationHandler BuildGenericHandler(
            Type targetType, Type invokePayloadType, MethodInfo method, FilterChain filterChain)
        {
            var argTypes = invokePayloadType.GetGenericArguments();
            var genericMethod = method.MakeGenericMethod(argTypes.Skip(argTypes.Length - method.GetGenericArguments().Length).ToArray());
            return BuildHandler(targetType, invokePayloadType, genericMethod, filterChain);
        }