Ejemplo n.º 1
0
 public TypeMemberCollection()
 {
     _fields     = new FieldCollection();
     _methods    = new MethodCollection();
     _properties = new PropertyCollection();
     _events     = new EventCollection();
 }
Ejemplo n.º 2
0
 public Pipeline(IMethodCollection <Method <Func <object, object, Task> > > methods, IDirect?direct, Type requestType, string?name)
 {
     _methods    = methods;
     _direct     = direct;
     RequestType = requestType;
     Name        = name;
 }
Ejemplo n.º 3
0
            public InterpretedClass(ClassDeclarationExpression expression, Scope scope)
            {
                _rootscope        = scope.Root;
                _name             = expression.Name;
                _parents          = expression.Parents;
                _interfaces       = expression.Interfaces;
                _methods          = new MethodCollection();
                _fields           = new FieldCollection();
                _classes          = new ClassCollection();
                _static_variables = new VariableCollection();

                ScriptScope script_scope = null;

                scope.FindNearestScope <ScriptScope> (ss => script_scope = ss);

                foreach (ClassMethodDeclarationExpression m in expression.Methods)
                {
                    _methods.Add(new InterpretedMethod(m, script_scope));
                }

                foreach (ClassFieldDeclarationExpression f in expression.Fields)
                {
                    IVariable var = _static_variables.EnsureExists(f.Name);
                    if (f.Initializer is Expression initializer_expr)
                    {
                        var.Value = Interpreters.Execute(initializer_expr, script_scope).ResultValue;
                    }
                }
            }
Ejemplo n.º 4
0
        private void InitMembers()
        {
            if (_members != null)
            {
                return;
            }

            _fields     = new FieldList(this);
            _properties = new PropertyList(this);
            _events     = new EventList(this);
            _methods    = new MethodList(this);
            _members    = new TypeMemberCollection(_fields, _methods, _properties, _events);
        }
Ejemplo n.º 5
0
        public TypeMemberCollection(IFieldCollection fields, IMethodCollection methods, IPropertyCollection properties, IEventCollection events)
        {
            if (fields == null)
            {
                throw new ArgumentNullException("fields");
            }
            if (methods == null)
            {
                throw new ArgumentNullException("methods");
            }
            if (properties == null)
            {
                throw new ArgumentNullException("properties");
            }
            if (events == null)
            {
                throw new ArgumentNullException("events");
            }

            _fields     = fields;
            _methods    = methods;
            _properties = properties;
            _events     = events;
        }
Ejemplo n.º 6
0
 public PipelineBuilder(string?name)
 {
     _methods = new MethodCollection <Method <Func <object, object, CancellationToken, Task> > >();
     _name    = name;
 }
Ejemplo n.º 7
0
 public AsyncPipeline(IMediatorBuilder mediatorBuilder)
 {
     _mediatorBuilder = mediatorBuilder;
     _methods         = new MethodCollection <Method <Func <object, object, Task> > > ();
     _direct          = null !;
 }
Ejemplo n.º 8
0
 public Pipeline(IMediatorBuilder mediatorBuilder)
 {
     _mediatorBuilder = mediatorBuilder;
     _methods         = new MethodCollection <Method <Action <object, object> > > ();
     _direct          = null !;
 }
Ejemplo n.º 9
0
 public PipelineBuilder(string?name)
 {
     _methods = new MethodCollection <Method <Action <object, object> > >();
     _name    = name;
 }
Ejemplo n.º 10
0
 public CancellablePipeline(IMethodCollection <Method <Func <object, object, CancellationToken, Task> > > methods, ICancellableAsync direct, Type requestType)
 {
     _methods     = methods;
     _direct      = direct;
     _requestType = requestType;
 }
 public AsyncPipelineBuilder()
 {
     _methods = new MethodCollection <Method <Func <object, object, Task> > >();
     _direct  = null !;
 }
 public CancellablePipelineBuilder()
 {
     _methods = new MethodCollection <Method <Func <object, object, CancellationToken, Task> > >();
     _direct  = null !;
 }
Ejemplo n.º 13
0
 public Pipeline(IMethodCollection <Method <Action <object, object> > > methods, IDirect?direct, Type requestType)
 {
     _methods    = methods;
     _direct     = direct;
     RequestType = requestType;
 }
Ejemplo n.º 14
0
 public AsyncPipeline(IMethodCollection <Method <Func <object, object, Task> > > methods, IDirectAsync direct, Type requestType)
 {
     _methods     = methods;
     _direct      = direct;
     _requestType = requestType;
 }
Ejemplo n.º 15
0
 public CancellablePipeline(IMediatorBuilder mediatorBuilder)
 {
     _mediatorBuilder = mediatorBuilder;
     _methods         = new MethodCollection <Method <Func <object, object, CancellationToken, Task> > > ();
     _direct          = null !;
 }
Ejemplo n.º 16
0
 public PipelineBuilder()
 {
     _methods = new MethodCollection <Method <Action <object, object> > >();
 }