public static string NoRecordsMessage(this HtmlHelper html, Application app, bool isLanguageSet) { if (app.Tweets.Count > 0) { RouteBuilder routeBuilder = html.CurrentRoute(); bool hasSearch = routeBuilder.ContainsKey("search"); bool isLatestPage = routeBuilder.Action.Equals("latest", StringComparison.InvariantCultureIgnoreCase); if (!isLatestPage && !hasSearch && !isLanguageSet) { return "No one has voted yet."; } else { string message = "No tweets found. Try broadening your search criteria"; if (isLanguageSet) { message += ", or selecting a different language"; } message += "."; return message; } } else { return "No tweets have been indexed yet. Please wait a while, I'm sure there will be some soon."; } }
public Tweet(Application app, Tweeter tweeter) : this() { this.App = app; this.Tweeter = tweeter; }
public MasterFrontEndView(Application app, LanguageSelectForm languages, TagCloudView tagCloud) { this.App = app; this.Languages = languages; this.TagCloud = tagCloud; }
public Stylesheet(Application app) { this.App = app; }
private Tweet CreateTweet() { Application app = new Application(); Tweeter tweeter = new Tweeter(); return new Tweet(app, tweeter); }