예제 #1
0
 public TypeMemberCollection()
 {
     _fields     = new FieldCollection();
     _methods    = new MethodCollection();
     _properties = new PropertyCollection();
     _events     = new EventCollection();
 }
예제 #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;
 }
예제 #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;
                    }
                }
            }
예제 #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);
        }
예제 #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;
        }
예제 #6
0
 public PipelineBuilder(string?name)
 {
     _methods = new MethodCollection <Method <Func <object, object, CancellationToken, Task> > >();
     _name    = name;
 }
예제 #7
0
 public AsyncPipeline(IMediatorBuilder mediatorBuilder)
 {
     _mediatorBuilder = mediatorBuilder;
     _methods         = new MethodCollection <Method <Func <object, object, Task> > > ();
     _direct          = null !;
 }
예제 #8
0
 public Pipeline(IMediatorBuilder mediatorBuilder)
 {
     _mediatorBuilder = mediatorBuilder;
     _methods         = new MethodCollection <Method <Action <object, object> > > ();
     _direct          = null !;
 }
예제 #9
0
 public PipelineBuilder(string?name)
 {
     _methods = new MethodCollection <Method <Action <object, object> > >();
     _name    = name;
 }
예제 #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 !;
 }
예제 #13
0
 public Pipeline(IMethodCollection <Method <Action <object, object> > > methods, IDirect?direct, Type requestType)
 {
     _methods    = methods;
     _direct     = direct;
     RequestType = requestType;
 }
예제 #14
0
 public AsyncPipeline(IMethodCollection <Method <Func <object, object, Task> > > methods, IDirectAsync direct, Type requestType)
 {
     _methods     = methods;
     _direct      = direct;
     _requestType = requestType;
 }
예제 #15
0
 public CancellablePipeline(IMediatorBuilder mediatorBuilder)
 {
     _mediatorBuilder = mediatorBuilder;
     _methods         = new MethodCollection <Method <Func <object, object, CancellationToken, Task> > > ();
     _direct          = null !;
 }
예제 #16
0
 public PipelineBuilder()
 {
     _methods = new MethodCollection <Method <Action <object, object> > >();
 }