Exemple #1
0
 public static void Compilation(CompilationAnalysis compilation)
 {
     compilation
     .match <ClassDeclarationSyntax>(isService)
     .then(jsService)
     .match <ClassDeclarationSyntax>(isConcurrentClass)
     .then(jsConcurrentClass)
     .after(addJSFiles);
 }
Exemple #2
0
        public static void AppCompilation(CompilationAnalysis compilation)
        {
            //app support
            var Programs   = new List <ClassDeclarationSyntax>();
            var Singletons = new List <ClassDeclarationSyntax>();

            compilation
            .match <ClassDeclarationSyntax>((@class, model, scpe) =>
                                            @class.Identifier.ToString() == "Program" &&
                                            @class
                                            .Members
                                            .OfType <MethodDeclarationSyntax>()
                                            .Any(method => method.Identifier.ToString() == "Main"))
            .then((node, model, scpe) => Programs.Add((ClassDeclarationSyntax)node))
            .match <ClassDeclarationSyntax>((@class, model, scpe) => isSingleton(@class))
            .then((node, model, scpe) => Singletons.Add((ClassDeclarationSyntax)node))
            .after(AddAppProgram(Programs, Singletons));
        }