예제 #1
0
 public override WorkQueue Get(string key)
 {
     return(Get(key, (name) =>
     {
         var queueGen = new WorkQueueGenerator();
         return queueGen.GetOrCreate(key);
     }));
 }
예제 #2
0
        public void LoadOrCreateProcessRoles()
        {
            var processGen = new ProcessGenerator();
            var groupGen   = new GroupGenerator();
            var queueGen   = new WorkQueueGenerator();

            Load = processGen.GetOrCreate(Simulator.GetProcessName("Load"));
            OnProgressMessage(string.Format("Get or create {0}", Load.Name));
            Main = processGen.GetOrCreate(Simulator.GetProcessName("Main"));
            OnProgressMessage(string.Format("Get or create {0}", Main.Name));
            Execute = processGen.GetOrCreate(Simulator.GetProcessName("Execute"));
            OnProgressMessage(string.Format("Get or create {0}", Execute.Name));
            Load.Groups    = groupGen.GetOrCreate(Load, Simulator.Region, Simulator.ServiceLine, Simulator.BusinessUnit, Simulator.GetProcessGroup());
            Main.Groups    = groupGen.GetOrCreate(Main, Simulator.Region, Simulator.ServiceLine, Simulator.BusinessUnit, Simulator.GetProcessGroup());
            Execute.Groups = groupGen.GetOrCreate(Execute, Simulator.Region, Simulator.ServiceLine, Simulator.BusinessUnit, Simulator.GetProcessGroup());
            Main.Queue     = queueGen.GetOrCreate(Simulator.GetProcessName("WQ"));
            OnProgressMessage(string.Format("Get or create {0}", Main.Queue.Name));
        }