当前位置: 首页>>代码示例>>C#>>正文


C# Processor.Execute方法代码示例

本文整理汇总了C#中Processor.Execute方法的典型用法代码示例。如果您正苦于以下问题:C# Processor.Execute方法的具体用法?C# Processor.Execute怎么用?C# Processor.Execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Processor的用法示例。


在下文中一共展示了Processor.Execute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        public override bool Execute()
        {
            var referenceCopyLocalPaths = ReferenceCopyLocalPaths.Select(x => x.ItemSpec).ToList();
            var defineConstants = DefineConstants.GetConstants();
            processor = new Processor
            {
                Logger = new BuildLogger
                {
                    BuildEngine = BuildEngine,
                },
                AssemblyFilePath = AssemblyPath,
                IntermediateDirectory = IntermediateDir,
                KeyFilePath = KeyFilePath,
                SignAssembly = SignAssembly,
                ProjectDirectory = ProjectDirectory,
                References = References,
                SolutionDirectory = SolutionDir,
                ReferenceCopyLocalPaths = referenceCopyLocalPaths,
                DefineConstants = defineConstants,
                NuGetPackageRoot = NuGetPackageRoot
            };
            var success = processor.Execute();
            if (success)
            {
                var weavers = processor.Weavers.Select(x => x.AssemblyName);
                ExecutedWeavers = string.Join(";", weavers) + ";";
            }

            return success;
        }
开发者ID:GeertvanHorrik,项目名称:Fody,代码行数:30,代码来源:WeavingTask.cs

示例2: EmptyScript

        public void EmptyScript()
        {
            var processor = new Processor();

            processor.Execute("//Nothing but a comment");
            var result = processor.Evaluate("//Nothing but a comment");
            Assert.IsNull(result);
        }
开发者ID:jgabb8989,项目名称:DotQL,代码行数:8,代码来源:LanguageTests.cs

示例3: EmptyModuleDeclaration

        public void EmptyModuleDeclaration()
        {
            var processor = new Processor();
            processor.Execute("module TestModule 1.0.0 { }");

            dynamic result = processor.Evaluate("return Modules");
            Assert.AreEqual(2, result.Count);
        }
开发者ID:jgabb8989,项目名称:DotQL,代码行数:8,代码来源:LanguageTests.cs

示例4: ParallelTasks

        private static void ParallelTasks()
        {
            Console.WriteLine("BP Console: running tasks.\n");
            Processor proc = new Processor(PARALLEL_PROCESSING,
                                           ConfigReader.GetTaskList("ParallelTasks.config")
                                            );

            proc.Execute();
        }
开发者ID:k0emt,项目名称:BatchProcessor,代码行数:9,代码来源:Program.cs

示例5: TearDownTasks

        private static void TearDownTasks()
        {
            Console.WriteLine("BP Console: running tear down tasks.\n");
            Processor proc = new Processor(SERIAL_PROCESSING,
                ConfigReader.GetTaskList("TearDownTasks.config")
                );

            proc.Execute();
        }
开发者ID:k0emt,项目名称:BatchProcessor,代码行数:9,代码来源:Program.cs

示例6: SetupTasks

        private static void SetupTasks()
        {
            Console.WriteLine("BP Console: running set up tasks.\n");
            Processor proc = new Processor(SERIAL_PROCESSING,
                                            ConfigReader.GetTaskList("SetupTasks.config")
                                            );
            proc.Execute();

            Console.WriteLine("BP Console: setup complete.\n");
        }
开发者ID:k0emt,项目名称:BatchProcessor,代码行数:10,代码来源:Program.cs

示例7: InitializeProvider

        public void InitializeProvider()
        {
            string moduleCode;
            using (var reader = new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream("Ancestry.QueryProcessor.Sql.Test.Module.dql")))
                moduleCode = reader.ReadToEnd();

            var settings = new ProcessorSettings();
            settings.RepositoryFactory = new SqlFactory("System.Data.SqlServerCe.4.0", "Data Source=TestDB.sdf;Persist Security Info=False;");
            _processor = new Processor(settings);
            _processor.Execute(moduleCode);
        }
开发者ID:Ancestry,项目名称:DotQL,代码行数:11,代码来源:SqlTests.cs

示例8: doWork

        public void doWork(string[] args)
        {
            GeneticAPI.JsonFileReader<City> importer = new GeneticAPI.JsonFileReader<City>();
            List<City> lo_data = importer.Import(args[0]);

            for (int i = 0; i < lo_data.Count; i++)
            {
                Console.WriteLine(lo_data[i].id);
            }

            Processor<City> lo_processor = new Processor<City>();
            lo_processor.Changed += new ChangedEventHandler(Changed);
            lo_processor.Execute(lo_data, 30, 200000, 0.001, 0.5, GeneticAPI.Selection.Selectors.Tournament,GeneticAPI.Recombination.Recombinators.TwoPointCrossoverPMX, GeneticAPI.Shared.Util.Randoms.Advanced, 2, 4);
        }
开发者ID:dam44,项目名称:AI_SEM6120_A2,代码行数:14,代码来源:Program.cs

示例9: Run

        /// <summary>
        /// Runs the compiled code
        /// </summary>
        public void Run()
        {
            Console.WriteLine("Delabeled code:");
            Console.WriteLine(Utils.PrintCode(compiler.code));
            Console.WriteLine("\nInstructions:");
            Console.WriteLine(Utils.PrintInstructions(compiler.instructions));
            Console.WriteLine("Press enter to execute.");
            Console.ReadLine();

            Processor processor = new Processor(compiler.instructions);
            processor.Execute();

            Console.WriteLine("\nPress enter to exit.");
            Console.ReadLine();
        }
开发者ID:StupidChris,项目名称:LMC-Emulator,代码行数:18,代码来源:Machine.cs

示例10: Execute

 public override bool Execute()
 {
     var referenceCopyLocalPaths = ReferenceCopyLocalPaths.Select(x => x.ItemSpec).ToList();
     var defineConstants = DefineConstants.GetConstants();
     processor = new Processor
     {
         Logger = new BuildLogger
         {
             BuildEngine = BuildEngine,
         },
         AssemblyFilePath = AssemblyPath,
         IntermediateDirectory = IntermediateDir,
         KeyFilePath = KeyFilePath,
         SignAssembly = SignAssembly,
         ProjectDirectory = ProjectDirectory,
         References = References,
         SolutionDirectory = SolutionDir,
         ReferenceCopyLocalPaths = referenceCopyLocalPaths,
         DefineConstants = defineConstants
     };
     return processor.Execute();
 }
开发者ID:bcuff,项目名称:Fody,代码行数:22,代码来源:WeavingTask.cs

示例11: Execute

        public void Execute()
        {
            var processor = new Processor();

            processor.Execute("//Do nothing");
        }
开发者ID:Ancestry,项目名称:DotQL,代码行数:6,代码来源:ProcessorTests.cs

示例12: ModuleSelfReferencing

        public void ModuleSelfReferencing()
        {
            // TODO: FIX const values - cannot compile builders into a dynamic method
            var processor = new Processor();
            processor.Execute
            (
                @"
                    module TestModule 1.0.0
                    {
                        ForwardTypedef: Int,
                        ForwardEnum: Color,
                        //ForwardEnumValue: const Red,
                        //ForwardConst: const Five,

                        Int: typedef Int32,
                        Color: enum { Red Green },
                        Five: const 5,

                        BackwardTypedef: { x: Int },
                        BackwardEnum: Color,
                        //BackwardEnumValue: const Green,
                        //BackwardConst: const Five
                    }
                "
            );
        }
开发者ID:JPercival,项目名称:DotQL,代码行数:26,代码来源:LanguageTests.cs

示例13: SimpleModuleFunctionVar

        public void SimpleModuleFunctionVar()
        {
            var processor = new Processor();
            processor.Execute("module TestModule 1.0.0 { MyFunc: (x: Int32) : Int32 }");

            dynamic result =
                processor.Evaluate
                (
                    @"
                        using TestModule 1.0.0
                        set MyFunc := (x: Int32) return x + 1
                        return MyFunc(5)
                    "
                );
            Assert.AreEqual(6, result.Result);
        }
开发者ID:JPercival,项目名称:DotQL,代码行数:16,代码来源:LanguageTests.cs

示例14: SimpleModuleEnum

        public void SimpleModuleEnum()
        {
            var processor = new Processor();
            processor.Execute("module TestModule 1.0.0 { MyEnum: enum { Red Green } }");

            dynamic result = processor.Evaluate("using TestModule 1.0.0 return Green");
            Assert.AreEqual("Green", result.ToString());
        }
开发者ID:jgabb8989,项目名称:DotQL,代码行数:8,代码来源:LanguageTests.cs

示例15: Index

 public void Index(string e, string a = null)
 {
     var service = new Processor(QueryConfig.Settings);
     service.Execute(e, a == null ? null : JsonInterop.JsonArgsToNative(JObject.Parse(a)));
 }
开发者ID:Ancestry,项目名称:DotQL,代码行数:5,代码来源:ExecController.cs


注:本文中的Processor.Execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。