Search Results for

    Show / Hide Table of Contents

    Class AssemblyDescriptor

    Represents an assembly with report script code.

    Inheritance
    System.Object
    AssemblyDescriptor
    Namespace: FastReport.Code
    Assembly: FastReport.Base.dll
    Syntax
    public abstract class AssemblyDescriptor : IDisposable

    Constructors

    AssemblyDescriptor(Report, String)

    Initializes a new instance of the assembly descriptor.

    Declaration
    public AssemblyDescriptor(Report report, string scriptText)
    Parameters
    Type Name Description
    Report report

    The report instance.

    System.String scriptText

    The script text.

    Exceptions
    Type Condition
    CompilerException

    Properties

    Instance

    Gets or sets an instance of report script class.

    Declaration
    public object Instance { get; protected set; }
    Property Value
    Type Description
    System.Object

    NeedCompile

    Indicates that a compilation is required.

    Declaration
    protected bool NeedCompile { get; }
    Property Value
    Type Description
    System.Boolean

    Report

    Gets a reference to parent Report object.

    Declaration
    public Report Report { get; }
    Property Value
    Type Description
    Report

    ScriptText

    Gets a script text.

    Declaration
    protected StringBuilder ScriptText { get; }
    Property Value
    Type Description
    System.Text.StringBuilder

    Methods

    Compile()

    Compiles an assembly.

    Declaration
    public abstract void Compile()

    CompileAsync(CancellationToken)

    Compiles an assembly, async way.

    Declaration
    public abstract Task CompileAsync(CancellationToken token = default(CancellationToken))
    Parameters
    Type Name Description
    System.Threading.CancellationToken token

    The cancellation token.

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task result.

    CreateExpressionDescriptor(String)

    Creates a new expression descriptor.

    Declaration
    protected abstract ExpressionDescriptor CreateExpressionDescriptor(string methodName)
    Parameters
    Type Name Description
    System.String methodName

    Name of a method used to calculate an expression.

    Returns
    Type Description
    ExpressionDescriptor

    A new instance of descriptor.

    Dispose()

    Disposes any unmanaged resources used during the compilation.

    Declaration
    public virtual void Dispose()

    GetErrorObjectName(Int32)

    Gets a name of report object in which an error occured.

    Declaration
    protected string GetErrorObjectName(int errorLine)
    Parameters
    Type Name Description
    System.Int32 errorLine

    Line number of script code with an error.

    Returns
    Type Description
    System.String

    An object name, if any, or an empty string.

    GetScriptLine(Int32)

    Gets actual line of script code.

    Declaration
    protected int GetScriptLine(int errorLine)
    Parameters
    Type Name Description
    System.Int32 errorLine

    Line number of script code with an error.

    Returns
    Type Description
    System.Int32

    Actual line of script code.

    InitField(String, Object)

    Inits a field of report script class instance.

    Declaration
    protected abstract void InitField(string name, object c)
    Parameters
    Type Name Description
    System.String name

    Name of a field.

    System.Object c

    Value of a field.

    InitInstance(Object)

    Inits the instance of the report script.

    Declaration
    public void InitInstance(object instance)
    Parameters
    Type Name Description
    System.Object instance

    An instance.

    ReplaceDataItems(Report, String)

    Replaces data items in an expression with calls to Calc.

    Declaration
    public static string ReplaceDataItems(Report report, string expression)
    Parameters
    Type Name Description
    Report report

    The report instance.

    System.String expression

    The expression.

    Returns
    Type Description
    System.String

    A new expression.

    ReplaceExpression(String, TextObjectBase)

    Replaces a text with an eroor message.

    Declaration
    protected string ReplaceExpression(string error, TextObjectBase text)
    Parameters
    Type Name Description
    System.String error

    Error message.

    TextObjectBase text

    Text object with text to replace.

    Returns
    Type Description
    System.String

    A new text.

    Back to top © 1998-2025 Copyright Fast Reports Inc.