D-Meson Azimuthal Anisotropy in Midcentral Pb-Pb Collisions at s NN=5.02 TeV