/// <summary> /// Restore the state of this drawer /// </summary> public void Load(object state) { if (state is DrawerState) { DrawerState ds = (DrawerState)state; currentTransform = ds.CurrentTransform; matrixStack = ds.MatrixStack; transformRequired = currentTransform != null; } else { IncompatibleTypeException.Publish(state, typeof(DrawerState)); } }
public static void Publish(object obj, Type type) { var error = new IncompatibleTypeException(obj, type); BasePublish(error); }