• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ProtoCore.Core类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ProtoCore.Core的典型用法代码示例。如果您正苦于以下问题:C# ProtoCore.Core类的具体用法?C# ProtoCore.Core怎么用?C# ProtoCore.Core使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProtoCore.Core类属于命名空间,在下文中一共展示了ProtoCore.Core类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Setup

 public void Setup()
 {
     core = new ProtoCore.Core(new ProtoCore.Options());
     core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
     core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
     coreRunner = new ProtoScript.Runners.ProtoScriptTestRunner();
 }
开发者ID:Benglin,项目名称:designscript,代码行数:7,代码来源:CoreDump.cs


示例2: BuildStatus

        //  logs all errors and warnings by default
        //
        public BuildStatus(Core core,bool warningAsError, System.IO.TextWriter writer = null, bool errorAsWarning = false)
        {
            this.core = core;
            //this.errorCount = 0;
            //this.warningCount = 0;
            warnings = new List<BuildData.WarningEntry>();

            errors = new List<BuildData.ErrorEntry>();
            this.warningAsError = warningAsError;
            this.errorAsWarning = errorAsWarning;

            if (writer != null)
            {
                consoleOut = System.Console.Out;
                System.Console.SetOut(writer);
            }

            // Create a default console output stream, and this can
            // be overwritten in IDE by assigning it a different value.
            this.MessageHandler = new ConsoleOutputStream();
            if (core.Options.WebRunner)
            {
                this.WebMsgHandler = new WebOutputStream(core);
            }
        }
开发者ID:Benglin,项目名称:designscript,代码行数:27,代码来源:BuildStatus.cs


示例3: DebugRunner

 public DebugRunner(ProtoCore.Core core)
 {
     this.core = core;
     this.core.Options.IDEDebugMode = true;
     RegisteredBreakpoints = new List<Breakpoint>();
     executionsuspended = false;
 }
开发者ID:joespiff,项目名称:Dynamo,代码行数:7,代码来源:DebugRunner.cs


示例4: Setup

 public void Setup()
 {
     ProtoCore.Options options = new ProtoCore.Options();
     core = new ProtoCore.Core(options);
     core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
     core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
 }
开发者ID:whztt07,项目名称:Dynamo,代码行数:7,代码来源:GCTest.cs


示例5: _PreStart

        /// <summary>
        /// Setup to run with customised launch options
        /// </summary>
        /// <returns>Ready to run?</returns>
        /// 
        private bool _PreStart(string code, string fileName)
        {
            this.code = code;
            if (null == core)
            {
                core = new ProtoCore.Core(new ProtoCore.Options { IDEDebugMode = true });
                core.Compilers.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Compiler(core));
                core.Compilers.Add(ProtoCore.Language.kImperative, new ProtoImperative.Compiler(core));

            }


            if (null != fileName)
            {
                core.CurrentDSFileName = Path.GetFullPath(fileName);
                core.Options.RootModulePathName = Path.GetFullPath(fileName);
            }

            //Run the compilation process
            if (Compile(out resumeBlockID))
            {
                inited = true;
                runtimeCore = CreateRuntimeCore(core);

                FirstExec();
                diList = BuildReverseIndex();
                return true;
            }
            else
            {
                inited = false;
                return false;
            }
        }
开发者ID:joespiff,项目名称:Dynamo,代码行数:39,代码来源:DebugRunner.cs


示例6: TestClassUsageInImpeartive

        public void TestClassUsageInImpeartive()
        {
            ProtoCore.Core core = new ProtoCore.Core(new ProtoCore.Options());
            core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
            core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
            ProtoScript.Runners.ProtoScriptTestRunner fsr = new ProtoScript.Runners.ProtoScriptTestRunner();
            ExecutionMirror mirror = fsr.Execute(
            @"
            class foo
            {
            m : var;
            constructor Create(a1 : int)
            {
            m = a1;
            }
            }
            x;y;
            [Imperative]
            {
            p = foo.Create(16);
            x = p.m;

            p.m = 32;
            y = p.m;
            }
            "
            , core, out compileState);
            Assert.IsTrue((Int64)mirror.GetValue("x", 0).Payload == 16);
            Assert.IsTrue((Int64)mirror.GetValue("y", 0).Payload == 32);
        }
开发者ID:samuto,项目名称:designscript,代码行数:30,代码来源:MultiLanugageBasic.cs


示例7: Setup

 public void Setup()
 {
     core = new ProtoCore.Core(new ProtoCore.Options());
     core.Options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
     core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
     core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
 }
开发者ID:RobertiF,项目名称:Dynamo,代码行数:7,代码来源:ModifierStack.cs


示例8: Setup

 public void Setup()
 {
     Console.WriteLine("Setup");
     core = new ProtoCore.Core(new ProtoCore.Options());
     core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
     core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
 }
开发者ID:Benglin,项目名称:designscript,代码行数:7,代码来源:MicroFeatureTests.cs


示例9: DebugRunner

 public DebugRunner(ProtoCore.Core core)
 {
     this.core = core;
     this.core.Options.IDEDebugMode = true;
     RegisteredBreakpoints = new List<Breakpoint>();
     core.ExecMode = ProtoCore.DSASM.InterpreterMode.kNormal;
     executionsuspended = false;
 }
开发者ID:TheChosen0ne,项目名称:Dynamo,代码行数:8,代码来源:DebugRunner.cs


示例10: ExpressionInterpreterRunner

        public ExpressionInterpreterRunner(ProtoCore.Core core, ProtoLanguage.CompileStateTracker compileState)
        {
            Core = core;
            core.ExecMode = ProtoCore.DSASM.InterpreterMode.kExpressionInterpreter;

            this.compileState = compileState;
            compileState.ExecMode = ProtoCore.DSASM.InterpreterMode.kExpressionInterpreter; ;
        }
开发者ID:qingemeng,项目名称:designscript,代码行数:8,代码来源:ExpressionInterpreterRunner.cs


示例11: TestScriptFile

            ProtoScript.Runners.ProtoScriptTestRunner fsr = new ProtoScript.Runners.ProtoScriptTestRunner();
            ProtoLanguage.CompileStateTracker compileState = null;
            fsr.Execute(scriptCode, core, out compileState);
        }

        public void TestScriptFile(string filename)
        {
            ProtoCore.Core core = new ProtoCore.Core(new ProtoCore.Options());
开发者ID:samuto,项目名称:designscript,代码行数:8,代码来源:FFITests.cs


示例12: TestScript

            core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
            //DLLFFIHandler.Env = ProtoFFI.CPPModuleHelper.GetEnv();
            //DLLFFIHandler.Register(FFILanguage.CPlusPlus, new ProtoFFI.PInvokeModuleHelper());
        }

        public void TestScript(string scriptCode)
        {
            ProtoCore.Core core = new ProtoCore.Core(new ProtoCore.Options());
            core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
开发者ID:samuto,项目名称:designscript,代码行数:9,代码来源:FFITests.cs


示例13: Setup

        public virtual void Setup()
        {
            core = new ProtoCore.Core(new ProtoCore.Options());
            core.Compilers.Add(ProtoCore.Language.Associative, new ProtoAssociative.Compiler(core));
            core.Compilers.Add(ProtoCore.Language.Imperative, new ProtoImperative.Compiler(core));

            // This is set when a test is executed 
            runtimeCore = null;
        }
开发者ID:ankushraizada,项目名称:Dynamo,代码行数:9,代码来源:ProtoTestBase.cs


示例14: BasicInfrastructureTest

        public void BasicInfrastructureTest()
        {
            ProtoCore.Core core = new ProtoCore.Core(new ProtoCore.Options());
            core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
            core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
            ProtoScript.Runners.ProtoScriptTestRunner fsr = new ProtoScript.Runners.ProtoScriptTestRunner();
            fsr.Execute(
@"
[Imperative]
开发者ID:RobertiF,项目名称:Dynamo,代码行数:9,代码来源:ProtoScriptTest.cs


示例15: ExecutionMirror

        /// <summary>
        /// Create a mirror for a given executive
        /// </summary>
        /// <param name="exec"></param>
        public ExecutionMirror(ProtoCore.DSASM.Executive exec, ProtoCore.Core coreObj)
        {
            Debug.Assert(exec != null, "Can't mirror a null executive");

            core = coreObj;
            MirrorTarget = exec;

            LoadPropertyFilters();
        }
开发者ID:Benglin,项目名称:designscript,代码行数:13,代码来源:ExecutionMirror.cs


示例16: TestMultLanguageAssociativeImperative

 }
 [Test]
 public void TestMultLanguageAssociativeImperative()
 {
     ProtoCore.Core core = new ProtoCore.Core(new ProtoCore.Options());
     core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
     core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
     ProtoScript.Runners.ProtoScriptTestRunner fsr = new ProtoScript.Runners.ProtoScriptTestRunner();
     fsr.Execute(
开发者ID:RobertiF,项目名称:Dynamo,代码行数:9,代码来源:MultiLanugageBasic.cs


示例17: TestSingleLanguageAssociative

    a = 3;
    b = 4;
}
", core);
        }
        [Test]
        public void TestSingleLanguageAssociative()
        {
            ProtoCore.Core core = new ProtoCore.Core(new ProtoCore.Options());
开发者ID:RobertiF,项目名称:Dynamo,代码行数:9,代码来源:MultiLanugageBasic.cs


示例18: Setup

 public ProtoCore.Core Setup()
 {
     ProtoCore.Core core = new ProtoCore.Core(new ProtoCore.Options());
     core.Options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
     core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
     core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
     DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
     CLRModuleType.ClearTypes();
     return core;
 }
开发者ID:RobertiF,项目名称:Dynamo,代码行数:10,代码来源:CSFFITest.cs


示例19: Setup

            Obj o = mirror.GetValue("a");
            Assert.IsTrue((Int64)o.Payload == 24);
        }

        [SetUp]
        public void Setup()
        {
            Console.WriteLine("Setup");
            core = new ProtoCore.Core(new ProtoCore.Options());

            core.Configurations.Add(ConfigurationKeys.GeometryFactory, "DSGeometry.dll");
            core.Configurations.Add(ConfigurationKeys.PersistentManager, "DSGeometry.dll");
开发者ID:samuto,项目名称:designscript,代码行数:12,代码来源:FFITests.cs


示例20: ParserFailTest2

        public void ParserFailTest2()
        {
            ProtoCore.Core core = new ProtoCore.Core(new ProtoCore.Options());
            core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
            core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
            ProtoScript.Runners.ProtoScriptTestRunner fsr = new ProtoScript.Runners.ProtoScriptTestRunner();
            //@TODO: What exception should this throw
            Assert.Throws(typeof(ProtoCore.Exceptions.CompileErrorsOccured), () =>
            {
                fsr.Execute(
    @"
[
{
开发者ID:RobertiF,项目名称:Dynamo,代码行数:13,代码来源:ProtoScriptTest.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ProtoCore.Type类代码示例发布时间:2022-05-24
下一篇:
C# CompileTime.Context类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap