Share via


ICSharpHelper.Fragment Method

Definition

Overloads

Fragment(AttributeCodeFragment)

Generates an attribute specification.

Fragment(MethodCallCodeFragment)

Generates a method call code fragment.

Fragment(PropertyAccessorCodeFragment)

Generates a property accessor lambda code fragment.

Fragment(IMethodCallCodeFragment, Int32)

Generates a method call code fragment.

Fragment(NestedClosureCodeFragment, Int32)

Generates a lambda code fragment.

Fragment(IMethodCallCodeFragment, String, Boolean)

Generates a method call code fragment.

Fragment(MethodCallCodeFragment, String, Boolean)

Generates a method call code fragment.

Fragment(AttributeCodeFragment)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates an attribute specification.

public string Fragment (Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment fragment);
abstract member Fragment : Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment -> string
Public Function Fragment (fragment As AttributeCodeFragment) As String

Parameters

fragment
AttributeCodeFragment

The attribute code fragment.

Returns

The attribute specification code.

Applies to

Fragment(MethodCallCodeFragment)

Source:
ICSharpHelper.cs

Generates a method call code fragment.

public string Fragment (Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment fragment);
abstract member Fragment : Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment -> string
Public Function Fragment (fragment As MethodCallCodeFragment) As String

Parameters

fragment
MethodCallCodeFragment

The method call.

Returns

The fragment.

Applies to

Fragment(PropertyAccessorCodeFragment)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a property accessor lambda code fragment.

public string Fragment (Microsoft.EntityFrameworkCore.Design.PropertyAccessorCodeFragment fragment);
abstract member Fragment : Microsoft.EntityFrameworkCore.Design.PropertyAccessorCodeFragment -> string
Public Function Fragment (fragment As PropertyAccessorCodeFragment) As String

Parameters

fragment
PropertyAccessorCodeFragment

The property accessor lambda.

Returns

A code representation of the lambda.

Applies to

Fragment(IMethodCallCodeFragment, Int32)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a method call code fragment.

public string Fragment (Microsoft.EntityFrameworkCore.Design.IMethodCallCodeFragment? fragment, int indent = 0);
abstract member Fragment : Microsoft.EntityFrameworkCore.Design.IMethodCallCodeFragment * int -> string
Public Function Fragment (fragment As IMethodCallCodeFragment, Optional indent As Integer = 0) As String

Parameters

fragment
IMethodCallCodeFragment

The method call. If null, no code is generated.

indent
Int32

The indentation level to use when multiple lines are generated.

Returns

The fragment.

Applies to

Fragment(NestedClosureCodeFragment, Int32)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a lambda code fragment.

public string Fragment (Microsoft.EntityFrameworkCore.Design.NestedClosureCodeFragment fragment, int indent = 0);
abstract member Fragment : Microsoft.EntityFrameworkCore.Design.NestedClosureCodeFragment * int -> string
Public Function Fragment (fragment As NestedClosureCodeFragment, Optional indent As Integer = 0) As String

Parameters

fragment
NestedClosureCodeFragment

The lambda.

indent
Int32

The indentation level to use when multiple lines are generated.

Returns

The fragment.

Applies to

Fragment(IMethodCallCodeFragment, String, Boolean)

Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs
Source:
ICSharpHelper.cs

Generates a method call code fragment.

public string Fragment (Microsoft.EntityFrameworkCore.Design.IMethodCallCodeFragment fragment, string? instanceIdentifier, bool typeQualified);
abstract member Fragment : Microsoft.EntityFrameworkCore.Design.IMethodCallCodeFragment * string * bool -> string
Public Function Fragment (fragment As IMethodCallCodeFragment, instanceIdentifier As String, typeQualified As Boolean) As String

Parameters

fragment
IMethodCallCodeFragment

The method call.

instanceIdentifier
String

An identifier on which the method call will be generated.

typeQualified
Boolean

true if the method call should be type-qualified, false for instance/extension syntax.

Returns

The fragment.

Applies to

Fragment(MethodCallCodeFragment, String, Boolean)

Source:
ICSharpHelper.cs

Generates a method call code fragment.

public string Fragment (Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment fragment, string? instanceIdentifier = default, bool typeQualified = false);
abstract member Fragment : Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment * string * bool -> string
Public Function Fragment (fragment As MethodCallCodeFragment, Optional instanceIdentifier As String = Nothing, Optional typeQualified As Boolean = false) As String

Parameters

fragment
MethodCallCodeFragment

The method call.

instanceIdentifier
String

An identifier on which the method call will be generated.

typeQualified
Boolean

true if the method call should be type-qualified, false for instance/extension syntax.

Returns

The fragment.

Applies to