public override void GetContent(Invert.Core.GraphDesigner.IDocumentationBuilder _) { base.GetContent(_); _.Paragraph("Commands define a property of type ISignal<TCommandClass> on an element. These act as a delegate to a pre-initialized handler." + "The handlers are setup in the controllers initialize method to point to a method, this makes a controller a factory for a view-model." + ""); var ele = new ScaffoldGraph() .BeginNode<ElementNode>("Player") .AddItem<CommandsChildItem>("Hit") .EndNode(); _.Title2("Executing a command from a viewmodel."); _.CodeSnippet("MyViewModel.CommandName.OnNext(new {CommandName}Command() { });"); _.Break(); _.Title2("Generated Model Commands"); _.TemplateExample<ViewModelTemplate, ElementNode>(ele as ElementNode, true, "CommandItems", "Bind"); _.Break(); _.Title2("Generated Controller Command Handlers"); _.TemplateExample<ControllerTemplate, ElementNode>(ele as ElementNode, true, "CommandItems", "CommandMethod"); _.Break(); _.Break(); _.Title3("Also See"); _.LinkToPage<Controllers>(); _.LinkToPage<CreationAndInitialization>(); }
public override void GetContent(Invert.Core.GraphDesigner.IDocumentationBuilder _) { base.GetContent(_); _.Paragraph("While services can serve for almost any purpose, they can be used to seperate various features of uFrame, and your application. " + "Examples might include, FacebookService, NetworkingService, AchievementsService...etc"); _.Break(); _.Paragraph("As a matter of fact, at the time of this writing, uFrame ships with two default services, The 'ViewService', and the 'SceneManagementService'."); _.Break(); _.Paragraph("There is really only one general rule of thumb when implementing services, " + "they should only be listening to events, processing them, and publishing its own " + "events that might be useful to other services. While you can inject other services " + "and use them directly, it's highly reommended to use events as the means of communication."); _.Break(); _.Title2("Accesing ViewModels in services."); _.Paragraph("To access a running list of a specific viewmodel just add this property to any service, and make sure you specify the viewmodel type you need."); _.CodeSnippet("[Inject] IViewModelManager<PlayerViewModel> AllPlayers { get;set; }"); _.LinkToPage<ViewModelManagers>(); var service = ServiceNode(); _.Title2("Designer File Implementation"); _.TemplateExample<ServiceTemplate, ServiceNode>(service); _.Break(); _.Title2("Editable File Implementation"); _.TemplateExample<ServiceTemplate, ServiceNode>(service,false); }