語言

ICSharpHelper 介面

定義

用於產生 C# 程式碼的輔助工具。

public interface ICSharpHelper
type ICSharpHelper = interface
Public Interface ICSharpHelper

備註

更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。

方法

名稱 Description
Arguments(IEnumerable<Object>)

產生一個逗號分隔的參數列表。

Expression(Expression, ISet<String>, ISet<String>, IReadOnlyDictionary<Object,String>, IReadOnlyDictionary<MemberInfo,QualifiedName>)

將代表表達式的節點轉換成能產生該表達式的原始碼。

Expression(Expression, ISet<String>)

將代表表達式的節點轉換成能產生該表達式的原始碼。

Fragment(AttributeCodeFragment)

產生屬性規格。

Fragment(IMethodCallCodeFragment, Int32)

產生方法呼叫碼片段。

Fragment(IMethodCallCodeFragment, String, Boolean)

產生方法呼叫碼片段。

Fragment(MethodCallCodeFragment, String, Boolean)

產生方法呼叫碼片段。

Fragment(MethodCallCodeFragment)

產生方法呼叫碼片段。

Fragment(NestedClosureCodeFragment, Int32)

產生一個 lambda 碼片段。

Fragment(PropertyAccessorCodeFragment)

產生屬性存取器 lambda 程式碼片段。

GetRequiredUsings(Type)

取得引用型別時所需的使用語句。

Identifier(String, ICollection<String>, Nullable<Boolean>)

從指定的字串產生一個有效的 C# 識別碼,且該字串對作用域來說是唯一的。

Identifier(String, ICollection<String>)

從指定的字串產生一個有效的 C# 識別碼,且該字串對作用域來說是唯一的。

Identifier<T>(String, T, IDictionary<String,T>, Nullable<Boolean>)

從指定的字串產生一個有效的 C# 識別碼,且該字串對作用域來說是唯一的。

Lambda(IEnumerable<IProperty>, String)

產生一個屬性存取器 lambda。

Lambda(IEnumerable<IPropertyBase>, String)

產生一個屬性存取器 lambda。 在複雜型態上宣告的屬性會透過點狀路徑從實體類型到該屬性的輸出。

Lambda(IReadOnlyList<String>, String)

產生一個屬性存取器 lambda。

Lambda(IReadOnlyList<String>)

產生一個屬性存取器 lambda。

Literal(BigInteger)

產生一個 BigInteger 字面值。

Literal(Boolean)

產生一個布爾字面值。

Literal(Byte)

會產生一個位元組的字面值。

Literal(Byte[])

產生一個位元組陣列的字面值。

Literal(Char)

會產生一個字面字面值。

Literal(DateOnly)

產生一個僅約會的字面資料。

Literal(DateTime)

產生一個 DateTime 的字面值。

Literal(DateTimeOffset)

產生一個 DateTimeOffset 的字面值。

Literal(Decimal)

產生一個小數字面值。

Literal(Double)

產生一個雙重字面值。

Literal(Enum, Boolean)

產生一個列舉字面值。

Literal(Enum)

產生一個列舉字面值。

Literal(Guid)

會產生一個 Guid 字面值。

Literal(Int16)

產生一個簡短的字面值。

Literal(Int32)

產生一個 int litral。

Literal(Int64)

產生一個長字面值。

Literal(IReadOnlyList<Object>, Boolean)

產生一個物件陣列的字面值。

Literal(IReadOnlyList<Object>)

產生一個物件陣列的字面值。

Literal(Object[,])

產生一個多維陣列的字面值。

Literal(SByte)

會產生一個 sbyte literal。

Literal(Single)

會產生一個浮點數值。

Literal(String)

產生字串字元。

Literal(TimeOnly)

會產生一個 TimeOnly 字面值。

Literal(TimeSpan)

會產生一個 TimeSpan(時間跨度)字面值。

Literal(Type, Nullable<Boolean>)

產生一個 Type 字面值。

Literal(UInt16)

產生一個 ushort 字面值。

Literal(UInt32)

產生一個字面值。

Literal(UInt64)

產生一個 ulong 字面值。

Literal<T>(IReadOnlyList<T>)

產生一個 字面值的陣列。

Literal<T>(List<T>, Boolean)

會直接產生一份清單。

Literal<T>(Nullable<T>)

產生一個可空的字面值。

Literal<T>(T[], Boolean)

產生一個物件陣列的字面值。

Literal<TKey,TValue>(Dictionary<TKey,TValue>, Boolean)

產生字典字面值。

Namespace(String[])

從指定的部分產生有效的 C# 命名空間。

Reference(Type, Nullable<Boolean>)

產生一個 C# 類型的參考。

Reference(Type)

產生一個 C# 類型的參考。

Statement(Expression, ISet<String>, ISet<String>, IReadOnlyDictionary<Object,String>, IReadOnlyDictionary<MemberInfo,QualifiedName>)

將代表陳述句的節點轉換成能產生該陳述的原始碼。

Statement(Expression, ISet<String>)

將代表陳述句的節點轉換成能產生該陳述的原始碼。

UnknownLiteral(Object)

產生一個在編譯時尚未確定的型別的文字。

XmlComment(String, Int32)

產生一份 XML 文件註解。 手柄逃脫和換線。

適用於