public void EndNew() { var row = content.Dispatcher.Invoke(() => { content.BeginEdit(authentication); content.EnterEdit(authentication); return(content.AddNew(authentication, null)); }); content.EndNew(authentication, row); }
public static void ClassInit(TestContext context) { app = new CremaBootstrapper(); app.Initialize(context, nameof(ITableContent_Deleted_DispatcherTest)); cremaHost = app.GetService(typeof(ICremaHost)) as ICremaHost; cremaHost.Dispatcher.Invoke(() => { authentication = cremaHost.Start(); dataBase = cremaHost.DataBases.Random(); dataBase.Load(authentication); dataBase.Enter(authentication); dataBase.Initialize(authentication); content = dataBase.TableContext.Tables.Random(item => item.Parent == null).Content; content.BeginEdit(authentication); content.EnterEdit(authentication); row = content.AddNew(authentication, null); dataBase.Leave(authentication); dataBase.Unload(authentication); }); }