public Presenter() { saveBackgroundWorker = new BackgroundWorker(); saveBackgroundWorker.DoWork += (sender, args) => PerformActualSave(); saveBackgroundWorker.RunWorkerCompleted += (sender, args) => CompleteSave(); Model = new Model { Action = DataBindingFactory.Create <ToDoAction>(), AllowEditing = new Observable <bool>(true) }; }
private static void Main(string[] args) { Mapper.CreateMap <CustomerDto, CustomerDomainModel>() .ForMember(d => d.Id, opt => opt.Ignore()) .ConstructUsing((Func <ResolutionContext, CustomerDomainModel>)(rc => DataBindingFactory.Create <CustomerDomainModel>())); var dto = new CustomerDto { FirstName = "First", LastName = "Last" }; var domain = Mapper.Map <CustomerDto, CustomerDomainModel>(dto); Console.WriteLine("First: " + domain.FirstName); Console.WriteLine("Last: " + domain.LastName); Console.ReadLine(); }
/// <summary> /// The add record. /// </summary> public void AddRecord() { this.DataItems.Add(DataBindingFactory.Create <T>()); }
public override Request CreateNewRequest() { return(DataBindingFactory.Create <Request>()); }
public override Priority CreateNewPriority() { return(DataBindingFactory.Create <Priority>()); }
public override Category CreateNewCategory() { return(DataBindingFactory.Create <Category>()); }
public override User CreateNewUser() { return(DataBindingFactory.Create <User>()); }