Example #1
0
 internal static IInterpetedMethod <TIn, TOut> InternalMethod <TIn, TOut>(InterpetedMemberDefinition <TIn> parameterDefinition,
                                                                          IInterpetedOperation <IInterpetedAnyType>[] body,
                                                                          InterpetedContext context,
                                                                          IInterpetedScopeTemplate scope,
                                                                          IMethodType methodType)
     where TIn : IInterpetedAnyType
     where TOut : IInterpetedAnyType
 => Root(new Func <IRunTimeAnyRoot, RunTimeAnyRootEntry>[] { InterpetedMethodIntention <TIn, TOut>(parameterDefinition, body, context, scope, methodType) }).Has <IInterpetedMethod <TIn, TOut> >();
 public void Init(
     InterpetedMemberDefinition <TIn> parameterDefinition,
     IInterpetedOperation <IInterpetedAnyType>[] methodBody,
     IInterpetedScopeTemplate scope,
     IMethodType methodType)
 {
     ParameterDefinition = parameterDefinition ?? throw new ArgumentNullException(nameof(parameterDefinition));
     Body       = methodBody ?? throw new ArgumentNullException(nameof(methodBody));
     Scope      = scope ?? throw new ArgumentNullException(nameof(scope));
     MethodType = methodType ?? throw new ArgumentNullException(nameof(methodType));
 }
Example #3
0
 internal static Func <IRunTimeAnyRoot, RunTimeAnyRootEntry> InterpetedMethodIntention <TIn, TOut>(
     InterpetedMemberDefinition <TIn> parameterDefinition,
     IInterpetedOperation <IInterpetedAnyType>[] body,
     InterpetedContext context,
     IInterpetedScopeTemplate scope,
     IMethodType methodType)
     where TIn : IInterpetedAnyType
     where TOut : IInterpetedAnyType
 => root => {
     var item = new InterpetedMethod <TIn, TOut>(parameterDefinition, body, context, scope, methodType, root);
     return(new RunTimeAnyRootEntry(item, methodType));
 };
Example #4
0
 public void Init(
     InterpetedMemberDefinition <TMethodIn> parameterDefinition,
     InterpetedMemberDefinition <TIn> contextDefinition,
     IInterpetedOperation <IInterpetedAnyType>[] methodBody,
     IInterpetedScopeTemplate scope,
     IImplementationType implementationType)
 {
     ParameterDefinition = parameterDefinition ?? throw new ArgumentNullException(nameof(parameterDefinition));
     ContextDefinition   = contextDefinition ?? throw new ArgumentNullException(nameof(contextDefinition));
     MethodBody          = methodBody ?? throw new ArgumentNullException(nameof(methodBody));
     Scope = scope ?? throw new ArgumentNullException(nameof(scope));
     ImplementationType = implementationType ?? throw new ArgumentNullException(nameof(implementationType));
 }
Example #5
0
 public InterpetedMethod(
     InterpetedMemberDefinition <TIn> parameterDefinition,
     IInterpetedOperation <IInterpetedAnyType>[] body,
     InterpetedContext context,
     IInterpetedScopeTemplate scope,
     IMethodType methodType,
     IRunTimeAnyRoot root) : base(root)
 {
     ParameterDefinition = parameterDefinition ?? throw new System.ArgumentNullException(nameof(parameterDefinition));
     Body       = body ?? throw new System.ArgumentNullException(nameof(body));
     Context    = context ?? throw new System.ArgumentNullException(nameof(context));
     Scope      = scope ?? throw new System.ArgumentNullException(nameof(scope));
     MethodType = methodType ?? throw new ArgumentNullException(nameof(methodType));
 }
 public InterpetedImplementation(
     InterpetedMemberDefinition <TMethodIn> parameterDefinition,
     InterpetedMemberDefinition <TIn> contextDefinition,
     IInterpetedOperation <IInterpetedAnyType>[] body,
     InterpetedContext context,
     IInterpetedScopeTemplate scope,
     IImplementationType implementationType,
     IRunTimeAnyRoot root) : base(root)
 {
     ParameterDefinition    = parameterDefinition ?? throw new ArgumentNullException(nameof(parameterDefinition));
     this.contextDefinition = contextDefinition ?? throw new ArgumentNullException(nameof(contextDefinition));
     Body = body ?? throw new ArgumentNullException(nameof(body));
     InterpetedContext  = context ?? throw new ArgumentNullException(nameof(context));
     Scope              = scope ?? throw new ArgumentNullException(nameof(scope));
     ImplementationType = implementationType ?? throw new ArgumentNullException(nameof(implementationType));
 }
 internal static IInterpetedImplementation <TIn, TMethodIn, TMethodOut> Implementation <TIn, TMethodIn, TMethodOut>(InterpetedMemberDefinition <TMethodIn> parameterDefinition,
                                                                                                                    InterpetedMemberDefinition <TIn> contextDefinition,
                                                                                                                    IInterpetedOperation <IInterpetedAnyType>[] body,
                                                                                                                    InterpetedContext context,
                                                                                                                    IInterpetedScopeTemplate scope,
                                                                                                                    IImplementationType implementationType)
     where TIn : class, IInterpetedAnyType
     where TMethodIn : class, IInterpetedAnyType
     where TMethodOut : class, IInterpetedAnyType
 => Root(new Func <IRunTimeAnyRoot, RunTimeAnyRootEntry>[] { InterpetedImplementationIntention <TIn, TMethodIn, TMethodOut>(parameterDefinition, contextDefinition, body, context, scope, implementationType) }).Has <IInterpetedImplementation <TIn, TMethodIn, TMethodOut> >();
Example #8
0
 public InterpetedMemberReferance <T> Init(InterpetedMemberDefinition <T> memberDefinition)
 {
     MemberDefinition = memberDefinition ?? throw new ArgumentNullException(nameof(memberDefinition));
     return(this);
 }