Olvasás angol nyelven

Megosztás a következőn keresztül:


Microsoft.PowerFx Namespace

Classes

BasicServiceProvider

Trivial IServiceProvider implementation that allows chaining and composition.

BasicUserInfo

Helper for implementing UserInfo with static values.

CheckContextSummary

Get summary of information from the CheckResult. This can be used for editor features that help write expressions.

CheckResult

Holds work such as parsing, binding, error checking done on a single expression. Different options require different work. Tracks which work is done so that it is not double repeated.

CheckResultExtensions
ConfigExtensions
ConsoleReplOutput

Default implementation of Repl output that writes to console.

DeferredSymbolPlaceholder

Used with a Microsoft.PowerFx.DeferredSymbolTable. This is returned to lazily provide the type for (logical,displayName).

EditorContextScope

Implement aIPowerFxScope for intellisense on top of anEngine instance. A scope is the context for a specific formula bar. This includes helpers to aide in customizing the editing experience.

EditorEngineExtensions
Engine

Expose binding logic for Power Fx. Derive from this to provide evaluation abilities.

ExpressionError

Error message. This could be a compile time error from parsing or binding, or it could be a runtime error wrapped in a ErrorValue.

Features
FormulaValueSerializerSettings

Provide settings to FormulaValues in order to serialize values in different situations.

FormulaWithParameters

Encapsulate a formula and the parameters it has available.

FunctionInfo

Information about a built-in function.

Governor

Throttling object to allow a host to control limits of memory and hardware resources. These virtuals are called by the evaluator, and exceptions thrown by them will abort the evaluation. This is a service passed to RuntimeConfig, and a derived class can override and throw their own host exceptions if hardware limits are exceeded.

InterpreterConfigException

The interpreter is called in an illegal way.

IReplOutputExtensions
NameCollisionException
ObjectMarshaller

Marshal a specific type of object to a record.

ObjectMarshallerProvider

Marshal .Net classes (with fields) to RecordValue. This supports both strong typing and lazy marshalling. It will return a ObjectMarshaller.

OptionSet
ParseResult

Result of parsing an expression.

ParserOptions

Options for parsing an expression.

PowerFxConfig

A container that allows for compiler customization.

PowerFxConfigExtensions
PowerFxREPL

A REPL (Read-Eval-Print Loop) for Power Fx. This accepts input, evaluates it, and prints the result.

PrimitiveMarshallerProvider

Marshalling provider to handle builtin primitive types.

PrimitiveTypeMarshaller

Marshaller for builtin primitives.

ReadOnlySymbolTable

ReadOnly version of a Symbol Table. This feeds functions, variables, enums, etc into the binder.
See SymbolTable for mutable version.

ReadOnlySymbolValues

Runtime values corresponding to static values described in a SymbolTable. See SymbolValues for a mutable derived class.

RecalcEngine

Holds a set of Power Fx variables and formulas. Formulas are recalculated when their dependent variables change.

ReflectionFunction

Base class for importing a C# function into Power Fx. Dervied class should follow this convention:

  • class name should folow this convention: "[Method Name]" + "Function" + optional postfix for function orevloading
  • it should have a public static method 'Execute'. this class will reflect over that signature to import to Power Fx.
ReplResult

Result from HandleCommandAsync(String, CancellationToken).

RuntimeConfig

Runtime configuration for the execution of an expression. This can be reused across multiple evals - so it shouldn't have any state that expires such as a cancellation token.

SymbolEntry
SymbolExtensions
SymbolProperties
SymbolTable

Provides symbols to the engine. This includes variables (locals, globals), enums, options sets, and functions. SymbolTables are mutable to support sessionful scenarios and can be chained together. This is a publicly facing class around a Microsoft.PowerFx.Core.Binding.INameResolver.

SymbolValues

Mutable collection for runtime Values for a SymbolTable. Will lazily create a symbol table. To match to an existing symbol table, call CreateValues(ReadOnlySymbolTable, ReadOnlySymbolValues[]).

TableMarshallerProvider

Marshal .Net classes (with fields). This supports strong typing and lazy marshalling. Handles any IEnumerable (including arrays).

TypeCoercionProvider

Convert value to target format.

TypeMarshallerCache

Marshal .net objects into Power Fx values.
This allows customizing the marshallers, as well as caching the conversion rules for a given type. This is an immutable object representing a collection of immutable providers.

TypeMarshallerCacheExtensions

Marshal .net objects into Power Fx values.
This allows customizing the marshallers, as well as caching the conversion rules for a given type. This is an immutable object representing a collection of immutable providers.

UserInfo

Definition for User object.

  • Names of C# members match the names we get in Power Fx's User object.
  • This has a curated set of user identifiers. This list can grow (hence this is a class, not an interface).
  • Host can specify which symbols are available, and leave these blank if not supported on this host.
  • Some information may require a network call to fetch, so we use task and virtual. Different properties may require different fetches, so let host override each property (rather than a single virtual). Callbacks can throw a CustomFunctionErrorException to specify a runtime error.

Interfaces

IDynamicTypeMarshaller

Some types (like Dictionary, JObject, or DataTable) are dynamic.
Dynamic marshallers can take a runtime instance and then inspect the runtime properties and create a strongly-typed FormulaType. Whereas ITypeMarshaller only accepts the static type, so it must marshal these dynamic objects as weakly-typed UntypedObjectType.

IExpressionEvaluator

Evaluate an expression that was successfully bound.
Get this from CheckResult.GetEvaluator() extension method.

IReplOutput

Callback interface to write to output. Handles different kinds, which could be mapped to different console colors or output streams.

IRuntimeConfig
ISymbolSlot

A "slot" is the opaque handle to acts as a storage location for a symbol. It can be used for both get and set on symbols. The IR will refer to slots when accessing symbols. Unique slots mean unique symbols. Runtime allocates storage for these slots.

ITypeMarshaller

A marshaller for a given System.Type to a given power fx type. . This can only marshal types that have a static mapping to a FormulaType.

ITypeMarshallerProvider

Handles marshalling a given type. Invoked by the TypeMarshallerCache.

Enums

ErrorKind

Indicates the error on a record in a connected data source. This must be kept in sync with the document enum "ErrorKind".

ErrorSeverity

Severity of errors provided.

OutputKind

Kinds of output from repl.

Delegates

ObjectMarshaller.FieldTypeAndValueMarshallerGetter

Method that should return the Type and Value Marshalling function for a field.

ObjectMarshaller.FieldValueMarshaller

Value Marshalling function for a field.