ICSharpHelper Interface

Definition

Helper for generating C# code.

public interface ICSharpHelper
type ICSharpHelper = interface
Public Interface ICSharpHelper

Remarks

See Implementation of database providers and extensions for more information and examples.

Methods

Arguments(IEnumerable<Object>)

Generates a comma-sepearated argument list of values.

Expression(Expression, ISet<String>)

Translates a node representing an expression into source code that would produce it.

Fragment(AttributeCodeFragment)

Generates an attribute specification.

Fragment(IMethodCallCodeFragment, Int32)

Generates a method call code fragment.

Fragment(IMethodCallCodeFragment, String, Boolean)

Generates a method call code fragment.

Fragment(MethodCallCodeFragment)

Generates a method call code fragment.

Fragment(MethodCallCodeFragment, String, Boolean)

Generates a method call code fragment.

Fragment(NestedClosureCodeFragment, Int32)

Generates a lambda code fragment.

Fragment(PropertyAccessorCodeFragment)

Generates a property accessor lambda code fragment.

GetRequiredUsings(Type)

Gets the using statements required when referencing a type.

Identifier(String, ICollection<String>)

Generates a valid C# identifier from the specified string unique to the scope.

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

Generates a valid C# identifier from the specified string unique to the scope.

Lambda(IEnumerable<IProperty>, String)

Generates a property accessor lambda.

Lambda(IReadOnlyList<String>)

Generates a property accessor lambda.

Lambda(IReadOnlyList<String>, String)

Generates a property accessor lambda.

Literal(BigInteger)

Generates a BigInteger literal.

Literal(Boolean)

Generates a bool literal.

Literal(Byte)

Generates a byte literal.

Literal(Byte[])

Generates a byte array literal.

Literal(Char)

Generates a char literal.

Literal(DateOnly)

Generates a DateOnly literal.

Literal(DateTime)

Generates a DateTime literal.

Literal(DateTimeOffset)

Generates a DateTimeOffset literal.

Literal(Decimal)

Generates a decimal literal.

Literal(Double)

Generates a double literal.

Literal(Enum)

Generates an enum literal.

Literal(Enum, Boolean)

Generates an enum literal.

Literal(Guid)

Generates a Guid literal.

Literal(Int16)

Generates a short literal.

Literal(Int32)

Generates an int literal.

Literal(Int64)

Generates a long literal.

Literal(IReadOnlyList<Object>)

Generates an object array literal.

Literal(IReadOnlyList<Object>, Boolean)

Generates an object array literal.

Literal(Object[,])

Generates a multidimensional array literal.

Literal(SByte)

Generates a sbyte literal.

Literal(Single)

Generates a float literal.

Literal(String)

Generates a string literal.

Literal(TimeOnly)

Generates a TimeOnly literal.

Literal(TimeSpan)

Generates a TimeSpan literal.

Literal(Type, Nullable<Boolean>)

Generates a Type literal.

Literal(UInt16)

Generates a ushort literal.

Literal(UInt32)

Generates a uint literal.

Literal(UInt64)

Generates a ulong literal.

Literal<T>(IReadOnlyList<T>)

Generates an array literal.

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

Generates a list literal.

Literal<T>(Nullable<T>)

Generates a nullable literal.

Literal<T>(T[], Boolean)

Generates an object array literal.

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

Generates a dictionary literal.

Namespace(String[])

Generates a valid C# namespace from the specified parts.

Reference(Type)

Generates a C# type reference.

Reference(Type, Nullable<Boolean>)

Generates a C# type reference.

Statement(Expression, ISet<String>)

Translates a node representing a statement into source code that would produce it.

UnknownLiteral(Object)

Generates a literal for a type not known at compile time.

XmlComment(String, Int32)

Generates an XML documentation comment. Handles escaping and newlines.

Applies to