SemanticEdit 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SemanticEdit(SemanticEditKind, ISymbol, ISymbol, Func<SyntaxNode,SyntaxNode>, Boolean)
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
警告
Use other overload
初始化 SemanticEdit 的執行個體。
public SemanticEdit (Microsoft.CodeAnalysis.Emit.SemanticEditKind kind, Microsoft.CodeAnalysis.ISymbol oldSymbol, Microsoft.CodeAnalysis.ISymbol newSymbol, Func<Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.SyntaxNode> syntaxMap = default, bool preserveLocalVariables = false);
public SemanticEdit (Microsoft.CodeAnalysis.Emit.SemanticEditKind kind, Microsoft.CodeAnalysis.ISymbol? oldSymbol, Microsoft.CodeAnalysis.ISymbol? newSymbol, Func<Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.SyntaxNode?>? syntaxMap = default, bool preserveLocalVariables = false);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public SemanticEdit (Microsoft.CodeAnalysis.Emit.SemanticEditKind kind, Microsoft.CodeAnalysis.ISymbol? oldSymbol, Microsoft.CodeAnalysis.ISymbol? newSymbol, Func<Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.SyntaxNode?>? syntaxMap, bool preserveLocalVariables);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("Use other overload")]
public SemanticEdit (Microsoft.CodeAnalysis.Emit.SemanticEditKind kind, Microsoft.CodeAnalysis.ISymbol? oldSymbol, Microsoft.CodeAnalysis.ISymbol? newSymbol, Func<Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.SyntaxNode?>? syntaxMap, bool preserveLocalVariables);
new Microsoft.CodeAnalysis.Emit.SemanticEdit : Microsoft.CodeAnalysis.Emit.SemanticEditKind * Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.ISymbol * Func<Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode> * bool -> Microsoft.CodeAnalysis.Emit.SemanticEdit
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
new Microsoft.CodeAnalysis.Emit.SemanticEdit : Microsoft.CodeAnalysis.Emit.SemanticEditKind * Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.ISymbol * Func<Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode> * bool -> Microsoft.CodeAnalysis.Emit.SemanticEdit
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
[<System.Obsolete("Use other overload")>]
new Microsoft.CodeAnalysis.Emit.SemanticEdit : Microsoft.CodeAnalysis.Emit.SemanticEditKind * Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.ISymbol * Func<Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode> * bool -> Microsoft.CodeAnalysis.Emit.SemanticEdit
Public Sub New (kind As SemanticEditKind, oldSymbol As ISymbol, newSymbol As ISymbol, Optional syntaxMap As Func(Of SyntaxNode, SyntaxNode) = Nothing, Optional preserveLocalVariables As Boolean = false)
Public Sub New (kind As SemanticEditKind, oldSymbol As ISymbol, newSymbol As ISymbol, syntaxMap As Func(Of SyntaxNode, SyntaxNode), preserveLocalVariables As Boolean)
參數
- kind
- SemanticEditKind
編輯的類型。
- oldSymbol
- ISymbol
來自先前編譯的符號,如果編輯代表加法,則為 null。
- newSymbol
- ISymbol
稍後編譯的符號,如果編輯代表刪除,則為 null。
- syntaxMap
- Func<SyntaxNode,SyntaxNode>
從稍後編譯的語法節點對應到上一個編譯中的語法節點,如果 preserveLocalVariables
為 false,則為 null,而且不需要對應或目前方法的來源與先前方法的來源相同。
- preserveLocalVariables
- Boolean
如果編輯是使用中方法的更新,且應保留本機值,則為 True;否則為 false。
- 屬性
例外狀況
kind
不是有效的種類。
適用於
SemanticEdit(SemanticEditKind, ISymbol, ISymbol, Func<SyntaxNode,SyntaxNode>, Boolean, MethodInstrumentation)
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
- Source:
- SemanticEdit.cs
警告
Use other overload
初始化 SemanticEdit 的執行個體。
public SemanticEdit (Microsoft.CodeAnalysis.Emit.SemanticEditKind kind, Microsoft.CodeAnalysis.ISymbol? oldSymbol, Microsoft.CodeAnalysis.ISymbol? newSymbol, Func<Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.SyntaxNode?>? syntaxMap = default, bool preserveLocalVariables = false, Microsoft.CodeAnalysis.Emit.MethodInstrumentation instrumentation = default);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("Use other overload")]
public SemanticEdit (Microsoft.CodeAnalysis.Emit.SemanticEditKind kind, Microsoft.CodeAnalysis.ISymbol? oldSymbol, Microsoft.CodeAnalysis.ISymbol? newSymbol, Func<Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.SyntaxNode?>? syntaxMap, bool preserveLocalVariables, Microsoft.CodeAnalysis.Emit.MethodInstrumentation instrumentation);
new Microsoft.CodeAnalysis.Emit.SemanticEdit : Microsoft.CodeAnalysis.Emit.SemanticEditKind * Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.ISymbol * Func<Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode> * bool * Microsoft.CodeAnalysis.Emit.MethodInstrumentation -> Microsoft.CodeAnalysis.Emit.SemanticEdit
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
[<System.Obsolete("Use other overload")>]
new Microsoft.CodeAnalysis.Emit.SemanticEdit : Microsoft.CodeAnalysis.Emit.SemanticEditKind * Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.ISymbol * Func<Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode> * bool * Microsoft.CodeAnalysis.Emit.MethodInstrumentation -> Microsoft.CodeAnalysis.Emit.SemanticEdit
Public Sub New (kind As SemanticEditKind, oldSymbol As ISymbol, newSymbol As ISymbol, Optional syntaxMap As Func(Of SyntaxNode, SyntaxNode) = Nothing, Optional preserveLocalVariables As Boolean = false, Optional instrumentation As MethodInstrumentation = Nothing)
Public Sub New (kind As SemanticEditKind, oldSymbol As ISymbol, newSymbol As ISymbol, syntaxMap As Func(Of SyntaxNode, SyntaxNode), preserveLocalVariables As Boolean, instrumentation As MethodInstrumentation)
參數
- kind
- SemanticEditKind
編輯的類型。
- oldSymbol
- ISymbol
來自先前編譯的符號,如果編輯代表加法,則為 null。
- newSymbol
- ISymbol
稍後編譯的符號,如果編輯代表刪除,則為 null。
- syntaxMap
- Func<SyntaxNode,SyntaxNode>
從稍後編譯的語法節點對應到上一個編譯中的語法節點,如果 preserveLocalVariables
為 false,則為 null,而且不需要對應或目前方法的來源與先前方法的來源相同。
- preserveLocalVariables
- Boolean
如果編輯是使用中方法的更新,且應保留本機值,則為 True;否則為 false。
- instrumentation
- MethodInstrumentation
要套用至方法的檢測更新。
- 屬性
例外狀況
kind
不是有效的種類。
適用於
SemanticEdit(SemanticEditKind, ISymbol, ISymbol, Func<SyntaxNode,SyntaxNode>, Func<SyntaxNode,Nullable<RuntimeRudeEdit>>, MethodInstrumentation)
- Source:
- SemanticEdit.cs
初始化 SemanticEdit 的執行個體。
public SemanticEdit (Microsoft.CodeAnalysis.Emit.SemanticEditKind kind, Microsoft.CodeAnalysis.ISymbol? oldSymbol, Microsoft.CodeAnalysis.ISymbol? newSymbol, Func<Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.SyntaxNode?>? syntaxMap = default, Func<Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.Emit.RuntimeRudeEdit?>? runtimeRudeEdit = default, Microsoft.CodeAnalysis.Emit.MethodInstrumentation instrumentation = default);
new Microsoft.CodeAnalysis.Emit.SemanticEdit : Microsoft.CodeAnalysis.Emit.SemanticEditKind * Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.ISymbol * Func<Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.SyntaxNode> * Func<Microsoft.CodeAnalysis.SyntaxNode, Nullable<Microsoft.CodeAnalysis.Emit.RuntimeRudeEdit>> * Microsoft.CodeAnalysis.Emit.MethodInstrumentation -> Microsoft.CodeAnalysis.Emit.SemanticEdit
Public Sub New (kind As SemanticEditKind, oldSymbol As ISymbol, newSymbol As ISymbol, Optional syntaxMap As Func(Of SyntaxNode, SyntaxNode) = Nothing, Optional runtimeRudeEdit As Func(Of SyntaxNode, Nullable(Of RuntimeRudeEdit)) = Nothing, Optional instrumentation As MethodInstrumentation = Nothing)
參數
- kind
- SemanticEditKind
編輯的類型。
- oldSymbol
- ISymbol
來自先前編譯的符號,如果編輯代表加法,則為 null。
- syntaxMap
- Func<SyntaxNode,SyntaxNode>
從稍後編譯的語法節點對應到先前編譯中的語法節點,如果方法狀態 (局部變數、關閉等,則為 null。) 不需要保留。
- runtimeRudeEdit
- Func<SyntaxNode,Nullable<RuntimeRudeEdit>>
- instrumentation
- MethodInstrumentation
要套用至方法的檢測更新。
例外狀況
kind
不是有效的種類。