예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QuickLabor"/> class.
        /// </summary>
        /// <param name="laborersCount">The laborersCount<see cref="int"/>.</param>
        /// <param name="evokerCount">The evokerCount<see cref="int"/>.</param>
        /// <param name="safeClose">The safeClose<see cref="bool"/>.</param>
        /// <param name="method">The method<see cref="IDeputy"/>.</param>
        /// <param name="evoker">The evoker<see cref="IDeputy"/>.</param>
        public QuickLabor(int laborersCount, int evokerCount, bool safeClose, IDeputy method, IDeputy evoker)
        {
            LaborMethods _ant = new LaborMethods();

            _ant.Put(method);
            _ant.Put(evoker);
            Lab = new Laboratory(_ant);
            Lab.Scope["Primary"].LaborersCount = laborersCount;
            Lab.RunLaborators();
            Subject = Lab.Scope["Primary"];
            Visor   = Subject.Visor;
            Laborer = Subject.Labors.AsValues().ElementAt(0).Laborer;
            Laborer.AddEvoker(Subject.Labors.AsCards().Skip(1).First().Value);
            Lab.Elaborate(method.Info.Name, method.ParameterValues);
            Subject.Visor.Close(safeClose);
        }
예제 #2
0
 public void Expanse(LaborMethods _labors, Subject _mission)
 {
     if (methods != null && (methods.Count > 0))
     {
         foreach (var cr in _labors)
         {
             methods.Put(cr);
         }
     }
     else
     {
         methods = _labors;
     }
     if (_mission != null)
     {
         _mission.AddRange(methods.AsValues().ToList());
         Scope.Add(_mission);
     }
 }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QuickLabor"/> class.
        /// </summary>
        /// <param name="laborersCount">The laborersCount<see cref="int"/>.</param>
        /// <param name="safeClose">The safeClose<see cref="bool"/>.</param>
        /// <param name="classObject">The classObject<see cref="object"/>.</param>
        /// <param name="methodName">The methodName<see cref="string"/>.</param>
        /// <param name="input">The input<see cref="object[]"/>.</param>
        public QuickLabor(int laborersCount, bool safeClose, object classObject, string methodName, params object[] input)
        {
            IDeputy      am   = new Deputy(classObject, methodName);
            LaborMethods _ant = new LaborMethods();

            _ant.Put(am);
            Lab = new Laboratory(_ant);
            Lab.Scope["Primary"].LaborersCount = laborersCount;
            Lab.RunLaborators();
            Subject = Lab.Scope["Primary"];
            Visor   = Subject.Visor;
            Laborer = Subject.Labors.AsValues().ElementAt(0).Laborer;
            Lab.Elaborate(am.Info.Name, input);
            Subject.Visor.Close(safeClose);
        }
예제 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QuickLabor"/> class.
        /// </summary>
        /// <param name="laborersCount">The laborersCount<see cref="int"/>.</param>
        /// <param name="safeClose">The safeClose<see cref="bool"/>.</param>
        /// <param name="_methods">The _methods<see cref="IDeck{IDeputy}"/>.</param>
        public QuickLabor(int laborersCount, bool safeClose, IDeck <IDeputy> _methods)
        {
            LaborMethods _ant = new LaborMethods();

            foreach (var am in _methods)
            {
                _ant.Put(am);
            }
            Lab = new Laboratory(_ant);
            Lab.Scope["Primary"].LaborersCount = laborersCount;
            Lab.RunLaborators();
            Subject = Lab.Scope["Primary"];
            Visor   = Subject.Visor;
            foreach (var am in _methods)
            {
                Lab.Elaborate(am.Info.Name, am.ParameterValues);
            }
            Subject.Visor.Close(safeClose);
        }
예제 #5
0
        public Laboratory(LaborMethods _methods, Scope _scope = null)
        {
            methods = new LaborMethods();
            foreach (var rd in _methods)
            {
                methods.Put(rd);
            }

            if (_scope == null)
            {
                scope = new Scope("ThreadLab", new LaborNotes());
            }
            else
            {
                scope = _scope;
            }

            scope.Add("Primary", _methods.AsValues().ToList());
            Scope = scope;
            Notes = Scope.Notes;
            StartLaboring();
        }