Show / Hide Table of Contents

Class DefaultScriptProcessor

The default script processor.

Inheritance
System.Object
Loggable
DefaultScriptProcessor
Implements
ILoggable
IScriptProcessor
Inherited Members
Loggable.Logger
Loggable.GetLogger()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Scripting
Assembly: Kephas.Scripting.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultScriptProcessor : Loggable, ILoggable, IScriptProcessor

Constructors

| Improve this Doc View Source

DefaultScriptProcessor(IContextFactory, ICollection<IExportFactory<ILanguageService, LanguageServiceMetadata>>, ICollection<IExportFactory<IScriptingBehavior, ScriptingBehaviorMetadata>>)

Initializes a new instance of the DefaultScriptProcessor class.

Declaration
public DefaultScriptProcessor(IContextFactory contextFactory, ICollection<IExportFactory<ILanguageService, LanguageServiceMetadata>> languageServiceFactories, ICollection<IExportFactory<IScriptingBehavior, ScriptingBehaviorMetadata>> scriptingBehaviorFactories)
Parameters
Type Name Description
IContextFactory contextFactory

The context factory.

System.Collections.Generic.ICollection<IExportFactory<ILanguageService, LanguageServiceMetadata>> languageServiceFactories

The language service factories.

System.Collections.Generic.ICollection<IExportFactory<IScriptingBehavior, ScriptingBehaviorMetadata>> scriptingBehaviorFactories

The scripting behavior factories.

Properties

| Improve this Doc View Source

ContextFactory

Gets the context factory.

Declaration
public IContextFactory ContextFactory { get; }
Property Value
Type Description
IContextFactory

The context factory.

Methods

| Improve this Doc View Source

CreateScriptingContext(IScript, IExpando, IContext)

Creates the scripting context.

Declaration
protected virtual IScriptingContext CreateScriptingContext(IScript script, IExpando args, IContext executionContext)
Parameters
Type Name Description
IScript script

The script to be interpreted/executed.

IExpando args

The arguments.

IContext executionContext

The execution context.

Returns
Type Description
IScriptingContext

The new scripting context.

| Improve this Doc View Source

ExecuteAsync(IScript, IExpando, IContext, CancellationToken)

Executes the expression asynchronously.

Declaration
public Task<object> ExecuteAsync(IScript script, IExpando args = null, IContext executionContext = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IScript script

The script to be interpreted/executed.

IExpando args

Optional. The arguments.

IContext executionContext

Optional. The execution context.

System.Threading.CancellationToken cancellationToken

Optional. The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Object>

A promise of the execution result.

Exceptions
Type Condition
ScriptingException

Thrown when a Scripting error condition occurs.

Implements

ILoggable
IScriptProcessor

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX