コード例 #1
0
ファイル: Actor.cs プロジェクト: NcuboIdeas/EventSourcing
        internal string Perform(string script, Libraries.FechaHora ahora)
        {
            if (script == null)
            {
                throw new ArgumentNullException(nameof(script));
            }

            tablaDeSimbolos.GuardarVariable("Now", ahora);

            parser.EstablecerComando(script);
            Programa programa  = parser.Procesar();
            string   resultado = programa.Ejecutar();

            if (eventStorage != null)
            {
                string formatedScript = programa.Write();
                eventStorage.EscribirEnDairy(formatedScript);
            }
            return(resultado == "{}" ? "" : resultado);
        }