Ejemplo n.º 1
0
        public static FSharpKernel UseKernelHelpers(
            this FSharpKernel kernel)
        {
            Task.Run(() =>
                     kernel.SendAsync(new SubmitCode($@"
open {typeof(FSharpKernelHelpers).FullName}
"))).Wait();

            return(kernel);
        }
        public static FSharpKernel UseDefaultRendering(
            this FSharpKernel kernel)
        {
            Task.Run(() =>
                     kernel.SendAsync(
                         new SubmitCode($@"
{ReferenceFromType(typeof(IHtmlContent))}
{ReferenceFromType(typeof(FSharpPocketViewTags))}
open {typeof(FSharpPocketViewTags).FullName}
"))).Wait();

            return(kernel);
        }
Ejemplo n.º 3
0
        public static FSharpKernel UseDefaultNamespaces(
            this FSharpKernel kernel)
        {
            Task.Run(() =>
                     kernel.SendAsync(
                         new SubmitCode($@"
open System
open System.Text
open System.Threading.Tasks
open System.Linq
"))).Wait();
            return(kernel);
        }