コード例 #1
0
ファイル: Script.cs プロジェクト: noahstein/roslyn
        internal Script(string code, string path, ScriptOptions options, Type globalsType, ScriptBuilder builder, Script previous)
        {
            _code = code ?? "";
            _path = path ?? "";
            _options = options ?? ScriptOptions.Default;
            _globalsType = globalsType;
            _previous = previous;

            if (_previous != null && builder != null && _previous._lazyBuilder != builder)
            {
                throw new ArgumentException("Incompatible script builder.");
            }

            _lazyBuilder = builder;
        }
コード例 #2
0
ファイル: Script.cs プロジェクト: daking2014/roslyn
 /// <summary>
 /// Creates a new instance of a script of this type.
 /// </summary>
 internal abstract Script Make(string code, string path, ScriptOptions options, Type globalsType, Type returnType, ScriptBuilder builder, Script previous);
コード例 #3
0
ファイル: Script.cs プロジェクト: daking2014/roslyn
 /// <summary>
 /// Creates a new version of this script with the <see cref="ScriptBuilder"/> specified.
 /// </summary>
 internal Script WithBuilder(ScriptBuilder builder)
 {
     return this.With(builder: builder);
 }
コード例 #4
0
        internal Script(string code, string path, ScriptOptions options, Type globalsType, Type returnType, ScriptBuilder builder, Script previous)
        {
            _code        = code ?? "";
            _path        = path ?? "";
            _options     = options ?? ScriptOptions.Default;
            _globalsType = globalsType;
            _returnType  = returnType ?? typeof(object);
            _previous    = previous;

            if (_previous != null && builder != null && _previous._lazyBuilder != builder)
            {
                throw new ArgumentException("Incompatible script builder.");
            }

            _lazyBuilder = builder;
        }
コード例 #5
0
 /// <summary>
 /// Creates a new instance of a script of this type.
 /// </summary>
 internal abstract Script Make(string code, string path, ScriptOptions options, Type globalsType, Type returnType, ScriptBuilder builder, Script previous);
コード例 #6
0
 /// <summary>
 /// Creates a new verion of this script with the <see cref="ScriptBuilder"/> specified.
 /// </summary>
 internal Script WithBuilder(ScriptBuilder builder)
 {
     return(this.With(builder: builder));
 }
コード例 #7
0
        internal Script(ScriptCompiler compiler, string code, ScriptOptions options, Type globalsType, ScriptBuilder builder, Script previous)
        {
            Compiler    = compiler;
            Code        = code ?? "";
            Options     = options ?? ScriptOptions.Default;
            GlobalsType = globalsType;
            Previous    = previous;

            if (Previous != null && builder != null && Previous._lazyBuilder != builder)
            {
                throw new ArgumentException("Incompatible script builder.");
            }

            _lazyBuilder = builder;
        }