public ISillyView Index(ISillyContext context) { Stopwatch timer2 = new Stopwatch(); Stopwatch timer3 = new Stopwatch(); timer3.Start(); Task <Document> data = base.DynamoGetItemAsync(Amazon.RegionEndpoint.USWest1, "sillywidgets", "*****@*****.**"); timer2.Start(); SillyView home = new SillyView(); SillyView content = new SillyView(); SillyView header = new SillyView(); Task <bool> result = home.LoadS3Async("sillywidgets.com", "diagnostic/diag.html", Amazon.RegionEndpoint.USWest1); Task <bool> result2 = content.LoadS3Async("sillywidgets.com", "diagnostic/content.html", Amazon.RegionEndpoint.USWest1); Task <bool> result3 = header.LoadS3Async("sillywidgets.com", "diagnostic/header.html", Amazon.RegionEndpoint.USWest1); data.Wait(); timer3.Stop(); result.Wait(); result2.Wait(); result3.Wait(); timer2.Stop(); home.Bind(data.Result); home.Bind("content", content); home.Bind("header", header); home.Bind("dynamoGetValue", timer3.Elapsed.TotalMilliseconds + "ms"); home.Bind("s3source", "diagnostic/diag.html"); home.Bind("loadViewValue", timer2.Elapsed.TotalMilliseconds + "ms"); return(home); }
public ISillyView D***o(ISillyContext context, object var, object var2) { ISillyView content = new SillyView(); content.Content = "<h1>Admin.D***o(v1, v2)</h1>"; return(content); }
public ISillyView Users(ISillyContext context, object var, object names) { ISillyView content = new SillyView(); content.Content = "<h1>Admin.Users(v1, v2)</h1>"; return(content); }
public ISillyView Dashboard(ISillyContext context) { ISillyView content = new SillyView(); content.Content = "<h1>Admin.Dashboard</h1>"; return(content); }
public ISillyView Index(ISillyContext context) { ISillyView content = new SillyView(); content.Content = "<h1>Admin.Index</h1>"; return(content); }
public ISillyView SexTaco(ISillyContext context) { ISillyView content = new SillyView(); content.Content = "<h1>Root.SexTaco</h1>"; return(content); }
public ISillyView About(ISillyContext context) { ISillyView content = new SillyView(); content.Content = "<h1>Root.About</h1>"; return(content); }
public void GetFromS3Test() { Console.Write("Controller Get S3 -> "); SillyView view = new SillyView(); Task <bool> result = view.LoadS3Async("sillywidgets.com", "testdata/testS3.html", Amazon.RegionEndpoint.USWest1); result.Wait(); Assert.True(result.Result); Console.WriteLine(view.Render()); }
public ISillyView Index(ISillyContext context) { SillyView home = new SillyView(); Task <bool> result = home.LoadS3Async("sillywidgets.com", "index.html", Amazon.RegionEndpoint.USWest1); Task <Document> data = base.DynamoGetItemAsync(Amazon.RegionEndpoint.USWest1, "sillywidgets", "*****@*****.**"); result.Wait(); data.Wait(); if (!result.Result) { return(null); } home.Bind(data.Result); return(home); }
public void WidgetTest() { Console.Write("Controller Widget Test -> "); SillyController controller = new SillyController(); SillyView view = new SillyView(); Task <Document> data = controller.DynamoGetItemAsync(Amazon.RegionEndpoint.USWest1, "sillywidgets", "*****@*****.**"); Task <bool> result = view.LoadS3Async("sillywidgets.com", "diagnostic/diag.html", Amazon.RegionEndpoint.USWest1); Task <bool> bound = view.BindAsync("content", "sillywidgets.com", "diagnostic/content.html", Amazon.RegionEndpoint.USWest1); Task <bool> widgetBound = view.BindAsync("header", "sillywidgets.com", "diagnostic/header.html", Amazon.RegionEndpoint.USWest1); data.Wait(); result.Wait(); bound.Wait(); widgetBound.Wait(); view.Bind(data.Result); view.Bind("dynamoGetValue", "This is a test"); Console.WriteLine(view.Render()); }