Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
f7d2e80c
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f7d2e80c
编写于
1月 18, 2017
作者:
F
filipw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added exceptions to docs, renamed stream => code
上级
78d2ed42
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
18 deletion
+26
-18
src/Scripting/CSharp/CSharpScript.cs
src/Scripting/CSharp/CSharpScript.cs
+10
-6
src/Scripting/CSharp/PublicAPI.Unshipped.txt
src/Scripting/CSharp/PublicAPI.Unshipped.txt
+2
-2
src/Scripting/Core/PublicAPI.Unshipped.txt
src/Scripting/Core/PublicAPI.Unshipped.txt
+2
-2
src/Scripting/Core/Script.cs
src/Scripting/Core/Script.cs
+12
-8
未找到文件。
src/Scripting/CSharp/CSharpScript.cs
浏览文件 @
f7d2e80c
...
...
@@ -31,14 +31,16 @@ public static Script<T> Create<T>(string code, ScriptOptions options = null, Typ
/// <summary>
/// Create a new C# script.
/// </summary>
/// <param name="
stream
">The <see cref="Stream"/> representing the source code of the script.</param>
/// <param name="
code
">The <see cref="Stream"/> representing the source code of the script.</param>
/// <param name="options">The script options.</param>
/// <param name="globalsType">Type of global object.</param>
/// <param name="assemblyLoader">Custom assembly loader.</param>
/// <typeparam name="T">The return type of the script</typeparam>
public
static
Script
<
T
>
Create
<
T
>(
Stream
stream
,
ScriptOptions
options
=
null
,
Type
globalsType
=
null
,
InteractiveAssemblyLoader
assemblyLoader
=
null
)
/// <exception cref="ArgumentNullException">Stream is null.</exception>
/// <exception cref="ArgumentException">Stream is not readable or seekable.</exception>
public
static
Script
<
T
>
Create
<
T
>(
Stream
code
,
ScriptOptions
options
=
null
,
Type
globalsType
=
null
,
InteractiveAssemblyLoader
assemblyLoader
=
null
)
{
return
Script
.
CreateInitialScript
<
T
>(
CSharpScriptCompiler
.
Instance
,
stream
,
options
,
globalsType
,
assemblyLoader
);
return
Script
.
CreateInitialScript
<
T
>(
CSharpScriptCompiler
.
Instance
,
code
,
options
,
globalsType
,
assemblyLoader
);
}
/// <summary>
...
...
@@ -57,13 +59,15 @@ public static Script<object> Create(string code, ScriptOptions options = null, T
/// <summary>
/// Create a new C# script.
/// </summary>
/// <param name="
stream
">The <see cref="Stream"/> representing the source code of the script.</param>
/// <param name="
code
">The <see cref="Stream"/> representing the source code of the script.</param>
/// <param name="options">The script options.</param>
/// <param name="globalsType">Type of global object.</param>
/// <param name="assemblyLoader">Custom assembly loader.</param>
public
static
Script
<
object
>
Create
(
Stream
stream
,
ScriptOptions
options
=
null
,
Type
globalsType
=
null
,
InteractiveAssemblyLoader
assemblyLoader
=
null
)
/// <exception cref="ArgumentNullException">Stream is null.</exception>
/// <exception cref="ArgumentException">Stream is not readable or seekable.</exception>
public
static
Script
<
object
>
Create
(
Stream
code
,
ScriptOptions
options
=
null
,
Type
globalsType
=
null
,
InteractiveAssemblyLoader
assemblyLoader
=
null
)
{
return
Create
<
object
>(
stream
,
options
,
globalsType
,
assemblyLoader
);
return
Create
<
object
>(
code
,
options
,
globalsType
,
assemblyLoader
);
}
/// <summary>
...
...
src/Scripting/CSharp/PublicAPI.Unshipped.txt
浏览文件 @
f7d2e80c
static Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScript.Create(System.IO.Stream stream, Microsoft.CodeAnalysis.Scripting.ScriptOptions options = null, System.Type globalsType = null, Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveAssemblyLoader assemblyLoader = null) -> Microsoft.CodeAnalysis.Scripting.Script<object>
static Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScript.Create<T>(System.IO.Stream stream, Microsoft.CodeAnalysis.Scripting.ScriptOptions options = null, System.Type globalsType = null, Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveAssemblyLoader assemblyLoader = null) -> Microsoft.CodeAnalysis.Scripting.Script<T>
\ No newline at end of file
static Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScript.Create(System.IO.Stream code, Microsoft.CodeAnalysis.Scripting.ScriptOptions options = null, System.Type globalsType = null, Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveAssemblyLoader assemblyLoader = null) -> Microsoft.CodeAnalysis.Scripting.Script<object>
static Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScript.Create<T>(System.IO.Stream code, Microsoft.CodeAnalysis.Scripting.ScriptOptions options = null, System.Type globalsType = null, Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveAssemblyLoader assemblyLoader = null) -> Microsoft.CodeAnalysis.Scripting.Script<T>
\ No newline at end of file
src/Scripting/Core/PublicAPI.Unshipped.txt
浏览文件 @
f7d2e80c
Microsoft.CodeAnalysis.Scripting.Script.ContinueWith(System.IO.Stream
stream
, Microsoft.CodeAnalysis.Scripting.ScriptOptions options = null) -> Microsoft.CodeAnalysis.Scripting.Script<object>
Microsoft.CodeAnalysis.Scripting.Script.ContinueWith<TResult>(System.IO.Stream
stream
, Microsoft.CodeAnalysis.Scripting.ScriptOptions options = null) -> Microsoft.CodeAnalysis.Scripting.Script<TResult>
Microsoft.CodeAnalysis.Scripting.Script.ContinueWith(System.IO.Stream
code
, Microsoft.CodeAnalysis.Scripting.ScriptOptions options = null) -> Microsoft.CodeAnalysis.Scripting.Script<object>
Microsoft.CodeAnalysis.Scripting.Script.ContinueWith<TResult>(System.IO.Stream
code
, Microsoft.CodeAnalysis.Scripting.ScriptOptions options = null) -> Microsoft.CodeAnalysis.Scripting.Script<TResult>
Microsoft.CodeAnalysis.Scripting.Script.SourceText.get -> Microsoft.CodeAnalysis.Text.SourceText
Microsoft.CodeAnalysis.Scripting.ScriptOptions.EmitDebugInformation.get -> bool
Microsoft.CodeAnalysis.Scripting.ScriptOptions.FileEncoding.get -> System.Text.Encoding
...
...
src/Scripting/Core/Script.cs
浏览文件 @
f7d2e80c
...
...
@@ -49,9 +49,9 @@ internal static Script<T> CreateInitialScript<T>(ScriptCompiler compiler, string
return
new
Script
<
T
>(
compiler
,
new
ScriptBuilder
(
assemblyLoaderOpt
??
new
InteractiveAssemblyLoader
()),
codeOpt
??
""
,
optionsOpt
??
ScriptOptions
.
Default
,
globalsTypeOpt
,
previousOpt
:
null
);
}
internal
static
Script
<
T
>
CreateInitialScript
<
T
>(
ScriptCompiler
compiler
,
Stream
stream
,
ScriptOptions
optionsOpt
,
Type
globalsTypeOpt
,
InteractiveAssemblyLoader
assemblyLoaderOpt
)
internal
static
Script
<
T
>
CreateInitialScript
<
T
>(
ScriptCompiler
compiler
,
Stream
code
,
ScriptOptions
optionsOpt
,
Type
globalsTypeOpt
,
InteractiveAssemblyLoader
assemblyLoaderOpt
)
{
return
new
Script
<
T
>(
compiler
,
new
ScriptBuilder
(
assemblyLoaderOpt
??
new
InteractiveAssemblyLoader
()),
stream
,
optionsOpt
??
ScriptOptions
.
Default
,
globalsTypeOpt
,
previousOpt
:
null
);
return
new
Script
<
T
>(
compiler
,
new
ScriptBuilder
(
assemblyLoaderOpt
??
new
InteractiveAssemblyLoader
()),
code
,
optionsOpt
??
ScriptOptions
.
Default
,
globalsTypeOpt
,
previousOpt
:
null
);
}
/// <summary>
...
...
@@ -102,8 +102,10 @@ internal static Script<T> CreateInitialScript<T>(ScriptCompiler compiler, Stream
/// <summary>
/// Continues the script with given <see cref="Stream"/> representing code.
/// </summary>
public
Script
<
object
>
ContinueWith
(
Stream
stream
,
ScriptOptions
options
=
null
)
=>
ContinueWith
<
object
>(
stream
,
options
);
/// <exception cref="ArgumentNullException">Stream is null.</exception>
/// <exception cref="ArgumentException">Stream is not readable or seekable.</exception>
public
Script
<
object
>
ContinueWith
(
Stream
code
,
ScriptOptions
options
=
null
)
=>
ContinueWith
<
object
>(
code
,
options
);
/// <summary>
/// Continues the script with given code snippet.
...
...
@@ -115,8 +117,10 @@ internal static Script<T> CreateInitialScript<T>(ScriptCompiler compiler, Stream
/// <summary>
/// Continues the script with given <see cref="Stream"/> representing code.
/// </summary>
public
Script
<
TResult
>
ContinueWith
<
TResult
>(
Stream
stream
,
ScriptOptions
options
=
null
)
=>
new
Script
<
TResult
>(
Compiler
,
Builder
,
stream
,
options
??
InheritOptions
(
Options
),
GlobalsType
,
this
);
/// <exception cref="ArgumentNullException">Stream is null.</exception>
/// <exception cref="ArgumentException">Stream is not readable or seekable.</exception>
public
Script
<
TResult
>
ContinueWith
<
TResult
>(
Stream
code
,
ScriptOptions
options
=
null
)
=>
new
Script
<
TResult
>(
Compiler
,
Builder
,
code
,
options
??
InheritOptions
(
Options
),
GlobalsType
,
this
);
private
static
ScriptOptions
InheritOptions
(
ScriptOptions
previous
)
{
...
...
@@ -309,8 +313,8 @@ internal Script(ScriptCompiler compiler, ScriptBuilder builder, string code, Scr
{
}
internal
Script
(
ScriptCompiler
compiler
,
ScriptBuilder
builder
,
Stream
stream
,
ScriptOptions
options
,
Type
globalsTypeOpt
,
Script
previousOpt
)
:
base
(
compiler
,
builder
,
SourceText
.
From
(
stream
,
options
.
FileEncoding
),
options
,
globalsTypeOpt
,
previousOpt
)
internal
Script
(
ScriptCompiler
compiler
,
ScriptBuilder
builder
,
Stream
code
,
ScriptOptions
options
,
Type
globalsTypeOpt
,
Script
previousOpt
)
:
base
(
compiler
,
builder
,
SourceText
.
From
(
code
,
options
.
FileEncoding
),
options
,
globalsTypeOpt
,
previousOpt
)
{
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录