NServiceBus.InitializableEndpoint.IsIProvideConfiguration C# (CSharp) Method

IsIProvideConfiguration() static private method

static private IsIProvideConfiguration ( Type type ) : bool
type System.Type
return bool
        static bool IsIProvideConfiguration(Type type)
        {
            if (!type.IsGenericType)
            {
                return false;
            }

            var args = type.GetGenericArguments();
            if (args.Length != 1)
            {
                return false;
            }

            return typeof(IProvideConfiguration<>).MakeGenericType(args)
                .IsAssignableFrom(type);
        }