Dichroism in core-excited and core-ionized methyloxirane