Akka.Dispatch.Mailboxes.GetRequiredType C# (CSharp) Method

GetRequiredType() private method

private GetRequiredType ( Type actorType ) : Type
actorType System.Type
return System.Type
        private Type GetRequiredType(Type actorType)
        {
            return actorType.GetInterfaces()
                .Where(i => i.IsGenericType)
                .Where(i => i.GetGenericTypeDefinition() == typeof (IRequiresMessageQueue<>))
                .Select(i => i.GetGenericArguments().First())
                .FirstOrDefault();
        }