Ejemplo n.º 1
0
 public static Task <ContentViewModel> Reload(string viewState)
 {
     using (var content = StorageServer.Load <Content, ContentViewModel>(viewState, out ViewModel))
     {
         return(content.ViewModelTask <Content, ContentViewModel>());
     }
 }
Ejemplo n.º 2
0
 public static Task <CalculatorViewModel> Load(Storage sessionStorage)
 {
     using (var calculator = StorageServer.Load <Calculator, CalculatorViewModel>(null, out CalculatorViewModel, sessionStorage))
     {
         return(calculator.ViewModelTask <Calculator, CalculatorViewModel>());
     }
 }
Ejemplo n.º 3
0
 public static Task <CalculatorViewModel> Div(string viewState)
 {
     using (var calculator = StorageServer.Load <Calculator, CalculatorViewModel>(viewState, out CalculatorViewModel))
     {
         calculator.Fsm.Div(calculator.Stack);
         return(calculator.ViewModelTask <Calculator, CalculatorViewModel>());
     }
 }
Ejemplo n.º 4
0
 public static Task <CalculatorViewModel> Enter(string viewState, string value)
 {
     using (var calculator = StorageServer.Load <Calculator, CalculatorViewModel>(viewState, out CalculatorViewModel))
     {
         calculator.Fsm.Enter(value);
         return(calculator.ViewModelTask <Calculator, CalculatorViewModel>());
     }
 }
Ejemplo n.º 5
0
 public static Task <ContentViewModel> Add(string viewState, string item)
 {
     using (var content = StorageServer.Load <Content, ContentViewModel>(viewState, out ViewModel))
     {
         content.Add(item);
         return(content.ViewModelTask <Content, ContentViewModel>());
     }
 }