X-ray crystallography has long been used to determine the structure of crystals and molecular samples. More recent advancements in light sources and computational methods made it possible to routinely determine the structure of large proteins. The introduction of X-ray free-electron lasers opens up the possibility to track the dynamics of molecular structures on a femtosecond time scale and to create molecular movies of chemical reactions. The theory of time-independent diffraction is well known. However, time-resolved diffraction techniques pose not only new challenges to experiments but also to their interpretation. In this work, we present a unified theoretical framework that will aid experimental interpretations as well as predictions of types of X-ray diffraction experiments.