public static ComponentControlWrapper GetById(Client client, Guid id) { var type = new ComponentTypeControlOffline(client, "fake"); var wrapper = new ComponentControlWrapper(client, type); wrapper.ControlActivator = new ControlActivator <IComponentControl>( () => wrapper.GetByIdOnline(id), () => wrapper.GetByIdOffline(id)); return(wrapper); }
public static ComponentControlWrapper GetDefault(Client client) { var type = new ComponentTypeControlOffline(client, "fake"); var wrapper = new ComponentControlWrapper(client, type); wrapper.ControlActivator = new ControlActivator <IComponentControl>( wrapper.GetDefaultControlOnline, () => wrapper.GetByIdOffline(Guid.Empty)); return(wrapper); }