Type MakeClosedVersionOfDeclaringType()
        {
            var parameters = GetGenericParametersForDeclaringType();

            return(DeclaringType.MakeGenericType(parameters));
        }