private static void WriteExample(IInteractivity interactivity, Action <string> evaluate, ITutorialSnippet snippet) { interactivity.Write("Example:"); interactivity.Write(Environment.NewLine); interactivity.WritePrompt(); interactivity.Write(snippet.ExampleCommand); interactivity.Write(Environment.NewLine); evaluate.Invoke(snippet.ExampleCommand); }
private static void WriteSolution(IInteractivity interactivity, Action <String> evaluate, ITutorialSnippet snippet) { interactivity.Write("Solution:"); interactivity.Write(Environment.NewLine); interactivity.WritePrompt(); interactivity.Write(snippet.Solution); interactivity.Write(Environment.NewLine); evaluate.Invoke(snippet.Solution); interactivity.Write(Environment.NewLine); }