Search Results for

    Show / Hide Table of Contents

    Class BasicTransformContext

    Inheritance
    Object
    StackContext
    BasicTransformContext
    Implements
    ICodeTransformContext
    Inherited Members
    StackContext.InputStack
    StackContext.Depth
    StackContext.FindAncestor<T>()
    StackContext.FindAncestorNotSelf<T>()
    StackContext.FindAncestorIndex<T>()
    StackContext.FindAncestorNotSelfIndex<T>()
    StackContext.FindTopAncestorIndex<T>()
    StackContext.GetAncestor(Int32)
    StackContext.GetAncestorIndex(Object)
    StackContext.FindAncestors<T>()
    StackContext.FindAncestors<T>(Int32)
    StackContext.FindAncestorsBelow<T>(Int32)
    StackContext.FindTopAncestor<T>()
    StackContext.FindOutputForAncestor<TAnc, TTransformed>()
    StackContext.GetOutputForAncestorIndex<TTransformed>(Int32)
    StackContext.AddStatementsBeforeAncestorIndex(Int32, IEnumerable<IStatement>, Boolean)
    StackContext.AddStatementBeforeCurrent(IStatement)
    StackContext.AddStatementsBeforeCurrent(IEnumerable<IStatement>)
    StackContext.AddStatementAfterCurrent(IStatement)
    StackContext.AddStatementsAfterCurrent(IEnumerable<IStatement>)
    StackContext.AddStatementAfter(IStatement, IStatement)
    StackContext.AddStatementsAfter(IStatement, IEnumerable<IStatement>)
    StackContext.AddStatementsAfterAncestorIndex(Int32, IEnumerable<IStatement>, Boolean)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Compiler
    Assembly: Microsoft.ML.Probabilistic.Compiler.dll
    Syntax
    public class BasicTransformContext : StackContext, ICodeTransformContext

    Fields

    outputOfElement

    The output of each input element. Collected only if trackTransform=true. Used by DeclarationView.

    Declaration
    public List<KeyValuePair<object, TransformOutput>> outputOfElement
    Field Value
    Type Description
    List<KeyValuePair<Object, TransformOutput>>

    OutputStack

    The output of each input element on the InputStack. Updated only if trackTransform=true. Used by DeclarationView.

    Declaration
    protected Stack<TransformOutput> OutputStack
    Field Value
    Type Description
    Stack<TransformOutput>

    results

    Declaration
    protected TransformResults results
    Field Value
    Type Description
    TransformResults

    trackTransform

    Indicates if the association between input and output elements should be stored.

    Declaration
    public bool trackTransform
    Field Value
    Type Description
    Boolean

    typesToTransform

    Declaration
    protected List<ITypeDeclaration> typesToTransform
    Field Value
    Type Description
    List<ITypeDeclaration>

    Properties

    InputAttributes

    Declaration
    public AttributeRegistry<object, ICompilerAttribute> InputAttributes { get; set; }
    Property Value
    Type Description
    AttributeRegistry<Object, ICompilerAttribute>

    OutputAttributes

    Declaration
    public AttributeRegistry<object, ICompilerAttribute> OutputAttributes { get; }
    Property Value
    Type Description
    AttributeRegistry<Object, ICompilerAttribute>

    Results

    Declaration
    public TransformResults Results { get; set; }
    Property Value
    Type Description
    TransformResults

    TypesToTransform

    Declaration
    public List<ITypeDeclaration> TypesToTransform { get; }
    Property Value
    Type Description
    List<ITypeDeclaration>

    Methods

    AddMember(IMemberDeclaration)

    Declaration
    public virtual void AddMember(IMemberDeclaration imd)
    Parameters
    Type Name Description
    IMemberDeclaration imd

    AddOutput(Object)

    Declaration
    protected void AddOutput(object outputElement)
    Parameters
    Type Name Description
    Object outputElement

    AddStatementAfterAncestorIndex(Int32, IStatement, Boolean)

    Declaration
    public override void AddStatementAfterAncestorIndex(int ancInd, IStatement statementToAdd, bool convertBeforeAdding = false)
    Parameters
    Type Name Description
    Int32 ancInd
    IStatement statementToAdd
    Boolean convertBeforeAdding
    Overrides
    StackContext.AddStatementAfterAncestorIndex(Int32, IStatement, Boolean)

    AddStatementBeforeAncestorIndex(Int32, IStatement, Boolean)

    Declaration
    public override void AddStatementBeforeAncestorIndex(int ancInd, IStatement stmt, bool convertBeforeAdding = false)
    Parameters
    Type Name Description
    Int32 ancInd
    IStatement stmt
    Boolean convertBeforeAdding
    Overrides
    StackContext.AddStatementBeforeAncestorIndex(Int32, IStatement, Boolean)

    Close(Object)

    Closes the current input object, indicating that its transformation has been completed.

    Declaration
    protected virtual void Close(object inputItem)
    Parameters
    Type Name Description
    Object inputItem

    CloseExpression(IExpression)

    Declaration
    public virtual void CloseExpression(IExpression iexpr)
    Parameters
    Type Name Description
    IExpression iexpr

    CloseMember(IMemberDeclaration)

    Declaration
    public virtual void CloseMember(IMemberDeclaration imd)
    Parameters
    Type Name Description
    IMemberDeclaration imd

    CloseOutput(Object)

    Declaration
    protected void CloseOutput(object inputItem)
    Parameters
    Type Name Description
    Object inputItem

    CloseStatement(IStatement)

    Declaration
    public virtual void CloseStatement(IStatement istmt)
    Parameters
    Type Name Description
    IStatement istmt

    CloseType(ITypeDeclaration)

    Declaration
    public virtual void CloseType(ITypeDeclaration itd)
    Parameters
    Type Name Description
    ITypeDeclaration itd

    Error(String)

    Declaration
    public void Error(string msg)
    Parameters
    Type Name Description
    String msg

    Error(String, Exception)

    Declaration
    public void Error(string msg, Exception ex)
    Parameters
    Type Name Description
    String msg
    Exception ex

    Error(String, Exception, Object)

    Declaration
    public void Error(string msg, Exception ex, object inputElement)
    Parameters
    Type Name Description
    String msg
    Exception ex
    Object inputElement

    FatalError(String)

    Declaration
    public void FatalError(string msg)
    Parameters
    Type Name Description
    String msg

    GetAttribute<T>(Object)

    Declaration
    public T GetAttribute<T>(object obj)
        where T : class, ICompilerAttribute
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetContextString()

    Declaration
    protected string GetContextString()
    Returns
    Type Description
    String

    Open(Object)

    Opens the input object for transforming.

    Declaration
    protected virtual void Open(object inputItem)
    Parameters
    Type Name Description
    Object inputItem

    Input code element

    OpenExpression(IExpression)

    Declaration
    public virtual void OpenExpression(IExpression iexpr)
    Parameters
    Type Name Description
    IExpression iexpr

    OpenMember(IMemberDeclaration)

    Declaration
    public virtual void OpenMember(IMemberDeclaration imd)
    Parameters
    Type Name Description
    IMemberDeclaration imd

    OpenOutput()

    Declaration
    protected virtual void OpenOutput()

    OpenStatement(IStatement)

    Declaration
    public virtual void OpenStatement(IStatement istmt)
    Parameters
    Type Name Description
    IStatement istmt

    OpenType(ITypeDeclaration)

    Declaration
    public virtual void OpenType(ITypeDeclaration itd)
    Parameters
    Type Name Description
    ITypeDeclaration itd

    SetPrimaryOutput(Object)

    Declaration
    public override void SetPrimaryOutput(object outputItem)
    Parameters
    Type Name Description
    Object outputItem
    Overrides
    StackContext.SetPrimaryOutput(Object)

    Warning(String)

    Declaration
    public void Warning(string msg)
    Parameters
    Type Name Description
    String msg

    Warning(String, Exception)

    Declaration
    public void Warning(string msg, Exception ex)
    Parameters
    Type Name Description
    String msg
    Exception ex

    Implements

    ICodeTransformContext
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.