public void @__Expr1Set(BusinessObject.DtoModels.Game value) { #line 62 "C:\USERS\MOSESSHILENGE\DOCUMENTS\VISUAL STUDIO 2013\PROJECTS\WORKFLOWNTIER\WORKFLOW\BUSINESSLOGIC\SUB WORKFLOWS\PROMPT.XAML" Result = value; #line default #line hidden }
public BusinessObject.DtoModels.Game CreateGame(BusinessObject.DtoModels.Game game) { using (var dbContext = new DataContext()) { dbContext.Game.Add(game); dbContext.SaveChanges(); return(dbContext.Game.Find(game.Id)); } }
public void ResumeWorkFlow(BusinessObject.DtoModels.Game game) { Exception exception = new Exception(); Guid workflowInstanceID = game.InstanceId; SqlWorkflowInstanceStore store = new SqlWorkflowInstanceStore(databaseConnection); store.InstanceLockedExceptionAction = InstanceLockedExceptionAction.BasicRetry; store.HostLockRenewalPeriod = TimeSpan.FromSeconds(2); InstanceHandle instanceHandle = store.CreateInstanceHandle(); CreateWorkflowOwnerCommand createOwnerCmd = new CreateWorkflowOwnerCommand(); InstanceView view = store.Execute(instanceHandle, createOwnerCmd, TimeSpan.FromSeconds(10)); store.DefaultInstanceOwner = view.InstanceOwner; WorkflowApplicationInstance instance = WorkflowApplication.GetInstance(workflowInstanceID, store); AutoResetEvent syncEvent = new AutoResetEvent(false); WorkflowApplication wfApplication = new WorkflowApplication(new FlowchartNumberGuessWorkflow(), instance.DefinitionIdentity); wfApplication.PersistableIdle = (e) => PersistableIdleAction.Unload; wfApplication.Unloaded = (e) => { syncEvent.Set(); }; wfApplication.OnUnhandledException = (e) => { exception = e.UnhandledException; syncEvent.Set(); return(UnhandledExceptionAction.Cancel); }; wfApplication.Load(instance); BookmarkResumptionResult result = wfApplication.ResumeBookmark("Decision", game); syncEvent.WaitOne(); if (exception.Message != string.Empty && exception.StackTrace != null) { throw exception; } DeleteWorkflowOwnerCommand deleteOwnerCmd = new DeleteWorkflowOwnerCommand(); store.Execute(instanceHandle, deleteOwnerCmd, TimeSpan.FromSeconds(10)); }
public void ValueType___Expr1Set(BusinessObject.DtoModels.Game value) { this.GetValueTypeValues(); this.@__Expr1Set(value); this.SetValueTypeValues(); }