Пример #1
0
        public static CompilationResult <TriggerDelegate> Compile(IReadOnlyDictionary <string, IReadOnlyDictionary <string, Type> > properties, string body)
        {
            var className = $"Generated_{Guid.NewGuid():N}";

            body = GenerateExplosionCode(properties) + Environment.NewLine + body;

            var result = CompileHelper.CompileTo <TriggerDelegate>(Namespace, className, MethodName, body,
                                                                   ReferencedAssemblies, Usings);

            return(result);
        }