A multi-function sensor based on an all-dielectric metastructure for temperature and refractive index sensing simultaneously is designed and analyzed in this paper. The structure is composed of a periodic array of silicon dimers placed on the silicon dioxide substrate. By breaking the symmetry of the structure, the ideal bound states in the continuum can be converted to the quasi-bound states in the continuum, and three Fano resonances are excited in the near-infrared wavelength. Combining with the electromagnetic field distributions, the resonant modes of three Fano resonances are analyzed as magnetic dipole, magnetic toroidal dipole, and electric toroidal dipole, respectively. The proposed sensor exhibits an impressive maximal Q-factor of 9352, with a modulation depth approaching 100%. Our investigation into temperature and refractive index sensing properties reveals a maximum temperature sensitivity of 60 pm/K. Regarding refractive index sensing, the sensitivity and figure of merit are determined to be 279.5 nm/RIU and 2055.1 RIU-1, respectively. These findings underscore the potential of the all-dielectric metastructure for simultaneous multi-parameter measurements. The sensor's versatility suggests promising applications in biological and chemical sensing.