A framework to perform quadrature task for infinite dimensional functions