)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » MessageQueue (Ia.Ftn.Cl.Models.Data)

Public general use code classes and xml files that we've compiled and used over the years:

MessageQueue support class for Fixed Telecommunications Network (FTN) data model.

    1: using System;
    2: using System.Collections.Generic;
    3:  
    4: namespace Ia.Ftn.Cl.Models.Data
    5: {
    6:     ////////////////////////////////////////////////////////////////////////////
    7:  
    8:     /// <summary publish="true">
    9:     /// MessageQueue support class for Fixed Telecommunications Network (FTN) data model.
   10:     /// </summary>
   11:     /// 
   12:     /// <remarks> 
   13:     /// Copyright © 2018-2024 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   14:     ///
   15:     /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
   16:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   17:     ///
   18:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   19:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   20:     /// 
   21:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   22:     /// 
   23:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   24:     /// </remarks> 
   25:     public abstract class MessageQueue
   26:     {
   27:         ////////////////////////////////////////////////////////////////////////////
   28:         ////////////////////////////////////////////////////////////////////////////
   29:  
   30:         /// <summary>
   31:         ///
   32:         /// </summary>
   33:         public abstract class ServiceApplication
   34:         {
   35:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.ServiceApplication.Name;
   36:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
   37:  
   38:             /// <summary/>
   39:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
   40:             {
   41:                 get
   42:                 {
   43:                     var body = rabbitMq.Consume<string>(queueName);
   44:  
   45:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
   46:                 }
   47:             }
   48:  
   49:             /// <summary/>
   50:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
   51:             {
   52:                 get
   53:                 {
   54:                     var body = rabbitMq.Peek<string>(queueName);
   55:  
   56:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
   57:                 }
   58:             }
   59:  
   60:             /// <summary/>
   61:             public static List<string> List
   62:             {
   63:                 get
   64:                 {
   65:                     return rabbitMq.PeekList<string>(queueName);
   66:                 }
   67:             }
   68:  
   69:             /// <summary/>
   70:             public static long Count
   71:             {
   72:                 get
   73:                 {
   74:                     return rabbitMq.Count(queueName);
   75:                 }
   76:             }
   77:  
   78:             ////////////////////////////////////////////////////////////////////////////
   79:  
   80:             /// <summary>
   81:             ///
   82:             /// </summary>
   83:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, string service)
   84:             {
   85:                 var process = Ia.Ftn.Cl.Models.Business.MessageQueue.Process.ReadService;
   86:  
   87:                 Enqueue(sender, process, service);
   88:             }
   89:  
   90:             ////////////////////////////////////////////////////////////////////////////
   91:  
   92:             /// <summary>
   93:             ///
   94:             /// </summary>
   95:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
   96:             {
   97:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
   98:  
   99:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.ServiceApplication.List.Contains(message.Serialization))
  100:                 {
  101:                     rabbitMq.Publish(queueName, message.Serialization);
  102:                 }
  103:             }
  104:  
  105:             ////////////////////////////////////////////////////////////////////////////
  106:  
  107:             /// <summary>
  108:             ///
  109:             /// </summary>
  110:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service)
  111:             {
  112:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service);
  113:                 var switchVendor = Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.SwitchVendorByService(message.Service);
  114:  
  115:                 if (switchVendor == Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Vendor.Nokia || switchVendor == Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Vendor.Huawei)
  116:                 {
  117:                     if (!Ia.Ftn.Cl.Models.Data.MessageQueue.ServiceApplication.List.Contains(message.Serialization))
  118:                     {
  119:                         rabbitMq.Publish(queueName, message.Serialization);
  120:                     }
  121:                 }
  122:             }
  123:  
  124:             ////////////////////////////////////////////////////////////////////////////
  125:  
  126:             /// <summary>
  127:             ///
  128:             /// </summary>
  129:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, int gatewayId)
  130:             {
  131:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, gatewayId);
  132:  
  133:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.ServiceApplication.List.Contains(message.Serialization))
  134:                 {
  135:                     rabbitMq.Publish(queueName, message.Serialization);
  136:                 }
  137:             }
  138:  
  139:             ////////////////////////////////////////////////////////////////////////////
  140:         }
  141:  
  142:         ////////////////////////////////////////////////////////////////////////////
  143:         ////////////////////////////////////////////////////////////////////////////
  144:  
  145:         /// <summary>
  146:         ///
  147:         /// </summary>
  148:         public abstract class NetManagerApplication
  149:         {
  150:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.NetManagerApplication.Name;
  151:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  152:  
  153:             /// <summary/>
  154:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  155:             {
  156:                 get
  157:                 {
  158:                     var body = rabbitMq.Consume<string>(queueName);
  159:  
  160:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  161:                 }
  162:             }
  163:  
  164:             /// <summary/>
  165:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  166:             {
  167:                 get
  168:                 {
  169:                     var body = rabbitMq.Peek<string>(queueName);
  170:  
  171:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  172:                 }
  173:             }
  174:  
  175:             /// <summary/>
  176:             public static List<string> List
  177:             {
  178:                 get
  179:                 {
  180:                     return rabbitMq.PeekList<string>(queueName);
  181:                 }
  182:             }
  183:  
  184:             /// <summary/>
  185:             public static long Count
  186:             {
  187:                 get
  188:                 {
  189:                     return rabbitMq.Count(queueName);
  190:                 }
  191:             }
  192:  
  193:  
  194:             ////////////////////////////////////////////////////////////////////////////
  195:  
  196:             /// <summary>
  197:             ///
  198:             /// </summary>
  199:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
  200:             {
  201:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
  202:  
  203:                 rabbitMq.Publish(queueName, message.Serialization);
  204:             }
  205:  
  206:             ////////////////////////////////////////////////////////////////////////////
  207:  
  208:             /// <summary>
  209:             ///
  210:             /// </summary>
  211:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service)
  212:             {
  213:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service);
  214:  
  215:                 rabbitMq.Publish(queueName, message.Serialization);
  216:             }
  217:  
  218:             ////////////////////////////////////////////////////////////////////////////
  219:         }
  220:  
  221:         ////////////////////////////////////////////////////////////////////////////
  222:         ////////////////////////////////////////////////////////////////////////////
  223:  
  224:         /// <summary>
  225:         ///
  226:         /// </summary>
  227:         public abstract class ServiceRequestApplication
  228:         {
  229:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.ServiceRequestApplication.Name;
  230:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  231:  
  232:             /// <summary/>
  233:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  234:             {
  235:                 get
  236:                 {
  237:                     var body = rabbitMq.Consume<string>(queueName);
  238:  
  239:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  240:                 }
  241:             }
  242:  
  243:             /// <summary/>
  244:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  245:             {
  246:                 get
  247:                 {
  248:                     var body = rabbitMq.Peek<string>(queueName);
  249:  
  250:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  251:                 }
  252:             }
  253:  
  254:             /// <summary/>
  255:             public static List<string> List
  256:             {
  257:                 get
  258:                 {
  259:                     return rabbitMq.PeekList<string>(queueName);
  260:                 }
  261:             }
  262:  
  263:             /// <summary/>
  264:             public static long Count
  265:             {
  266:                 get
  267:                 {
  268:                     return rabbitMq.Count(queueName);
  269:                 }
  270:             }
  271:  
  272:  
  273:             ////////////////////////////////////////////////////////////////////////////
  274:  
  275:             /// <summary>
  276:             ///
  277:             /// </summary>
  278:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
  279:             {
  280:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
  281:  
  282:                 rabbitMq.Publish(queueName, message.Serialization);
  283:             }
  284:  
  285:             ////////////////////////////////////////////////////////////////////////////
  286:  
  287:             /// <summary>
  288:             ///
  289:             /// </summary>
  290:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string accessName)
  291:             {
  292:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, accessName);
  293:  
  294:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.ServiceRequestApplication.List.Contains(message.Serialization))
  295:                 {
  296:                     rabbitMq.Publish(queueName, message.Serialization);
  297:                 }
  298:             }
  299:  
  300:             ////////////////////////////////////////////////////////////////////////////
  301:         }
  302:  
  303:         ////////////////////////////////////////////////////////////////////////////
  304:         ////////////////////////////////////////////////////////////////////////////
  305:  
  306:         /// <summary>
  307:         ///
  308:         /// </summary>
  309:         public abstract class SpsApplication
  310:         {
  311:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.SpsApplication.Name;
  312:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  313:  
  314:             /// <summary/>
  315:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  316:             {
  317:                 get
  318:                 {
  319:                     var body = rabbitMq.Consume<string>(queueName);
  320:  
  321:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  322:                 }
  323:             }
  324:  
  325:             /// <summary/>
  326:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  327:             {
  328:                 get
  329:                 {
  330:                     var body = rabbitMq.Peek<string>(queueName);
  331:  
  332:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  333:                 }
  334:             }
  335:  
  336:             /// <summary/>
  337:             public static List<string> List
  338:             {
  339:                 get
  340:                 {
  341:                     return rabbitMq.PeekList<string>(queueName);
  342:                 }
  343:             }
  344:  
  345:             /// <summary/>
  346:             public static long Count
  347:             {
  348:                 get
  349:                 {
  350:                     return rabbitMq.Count(queueName);
  351:                 }
  352:             }
  353:  
  354:  
  355:             ////////////////////////////////////////////////////////////////////////////
  356:  
  357:             /// <summary>
  358:             ///
  359:             /// </summary>
  360:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
  361:             {
  362:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
  363:  
  364:                 rabbitMq.Publish(queueName, message.Serialization);
  365:             }
  366:  
  367:             ////////////////////////////////////////////////////////////////////////////
  368:  
  369:             /// <summary>
  370:             ///
  371:             /// </summary>
  372:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service)
  373:             {
  374:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service);
  375:  
  376:                 rabbitMq.Publish(queueName, message.Serialization);
  377:             }
  378:  
  379:             ////////////////////////////////////////////////////////////////////////////
  380:         }
  381:  
  382:         ////////////////////////////////////////////////////////////////////////////
  383:         ////////////////////////////////////////////////////////////////////////////
  384:  
  385:         /// <summary>
  386:         ///
  387:         /// </summary>
  388:         public abstract class SoftXApplication
  389:         {
  390:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.SoftXApplication.Name;
  391:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  392:  
  393:             /// <summary/>
  394:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  395:             {
  396:                 get
  397:                 {
  398:                     var body = rabbitMq.Consume<string>(queueName);
  399:  
  400:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  401:                 }
  402:             }
  403:  
  404:             /// <summary/>
  405:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  406:             {
  407:                 get
  408:                 {
  409:                     var body = rabbitMq.Peek<string>(queueName);
  410:  
  411:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  412:                 }
  413:             }
  414:  
  415:             /// <summary/>
  416:             public static List<string> List
  417:             {
  418:                 get
  419:                 {
  420:                     return rabbitMq.PeekList<string>(queueName);
  421:                 }
  422:             }
  423:  
  424:             /// <summary/>
  425:             public static long Count
  426:             {
  427:                 get
  428:                 {
  429:                     return rabbitMq.Count(queueName);
  430:                 }
  431:             }
  432:  
  433:             ////////////////////////////////////////////////////////////////////////////
  434:  
  435:             /// <summary>
  436:             ///
  437:             /// </summary>
  438:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
  439:             {
  440:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
  441:  
  442:                 rabbitMq.Publish(queueName, message.Serialization);
  443:             }
  444:  
  445:             ////////////////////////////////////////////////////////////////////////////
  446:  
  447:             /// <summary>
  448:             ///
  449:             /// </summary>
  450:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service)
  451:             {
  452:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service);
  453:  
  454:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.SoftXApplication.List.Contains(message.Serialization))
  455:                 {
  456:                     rabbitMq.Publish(queueName, message.Serialization);
  457:                 }
  458:             }
  459:  
  460:             ////////////////////////////////////////////////////////////////////////////
  461:  
  462:             /// <summary>
  463:             ///
  464:             /// </summary>
  465:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, bool overrideRouterDomainRestriction, string staffUserId)
  466:             {
  467:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, overrideRouterDomainRestriction, staffUserId);
  468:  
  469:                 rabbitMq.Publish(queueName, message.Serialization);
  470:             }
  471:  
  472:             ////////////////////////////////////////////////////////////////////////////
  473:  
  474:             /// <summary>
  475:             ///
  476:             /// </summary>
  477:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, int port, bool overrideRouterDomainRestriction, string staffUserId)
  478:             {
  479:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, port, overrideRouterDomainRestriction, staffUserId);
  480:  
  481:                 rabbitMq.Publish(queueName, message.Serialization);
  482:             }
  483:  
  484:             ////////////////////////////////////////////////////////////////////////////
  485:         }
  486:  
  487:         ////////////////////////////////////////////////////////////////////////////
  488:         ////////////////////////////////////////////////////////////////////////////
  489:  
  490:         /// <summary>
  491:         ///
  492:         /// </summary>
  493:         public abstract class AxeApplication
  494:         {
  495:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.AxeApplication.Name;
  496:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  497:  
  498:             /// <summary/>
  499:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  500:             {
  501:                 get
  502:                 {
  503:                     var body = rabbitMq.Consume<string>(queueName);
  504:  
  505:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  506:                 }
  507:             }
  508:  
  509:             /// <summary/>
  510:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  511:             {
  512:                 get
  513:                 {
  514:                     var body = rabbitMq.Peek<string>(queueName);
  515:  
  516:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  517:                 }
  518:             }
  519:  
  520:             /// <summary/>
  521:             public static List<string> List
  522:             {
  523:                 get
  524:                 {
  525:                     return rabbitMq.PeekList<string>(queueName);
  526:                 }
  527:             }
  528:  
  529:             /// <summary/>
  530:             public static long Count
  531:             {
  532:                 get
  533:                 {
  534:                     return rabbitMq.Count(queueName);
  535:                 }
  536:             }
  537:  
  538:             ////////////////////////////////////////////////////////////////////////////
  539:  
  540:             /// <summary>
  541:             ///
  542:             /// </summary>
  543:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
  544:             {
  545:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
  546:  
  547:                 rabbitMq.Publish(queueName, message.Serialization);
  548:             }
  549:  
  550:             ////////////////////////////////////////////////////////////////////////////
  551:  
  552:             /// <summary>
  553:             ///
  554:             /// </summary>
  555:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service)
  556:             {
  557:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service);
  558:  
  559:                 rabbitMq.Publish(queueName, message.Serialization);
  560:             }
  561:  
  562:             ////////////////////////////////////////////////////////////////////////////
  563:         }
  564:  
  565:         ////////////////////////////////////////////////////////////////////////////
  566:         ////////////////////////////////////////////////////////////////////////////
  567:  
  568:         /// <summary>
  569:         ///
  570:         /// </summary>
  571:         public abstract class AmsApplication
  572:         {
  573:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.AmsApplication.Name;
  574:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  575:  
  576:             /// <summary/>
  577:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  578:             {
  579:                 get
  580:                 {
  581:                     var body = rabbitMq.Consume<string>(queueName);
  582:  
  583:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  584:                 }
  585:             }
  586:  
  587:             /// <summary/>
  588:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  589:             {
  590:                 get
  591:                 {
  592:                     var body = rabbitMq.Peek<string>(queueName);
  593:  
  594:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  595:                 }
  596:             }
  597:  
  598:             /// <summary/>
  599:             public static List<string> List
  600:             {
  601:                 get
  602:                 {
  603:                     return rabbitMq.PeekList<string>(queueName);
  604:                 }
  605:             }
  606:  
  607:             /// <summary/>
  608:             public static long Count
  609:             {
  610:                 get
  611:                 {
  612:                     return rabbitMq.Count(queueName);
  613:                 }
  614:             }
  615:  
  616:             ////////////////////////////////////////////////////////////////////////////
  617:  
  618:             /// <summary>
  619:             ///
  620:             /// </summary>
  621:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
  622:             {
  623:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
  624:  
  625:                 rabbitMq.Publish(queueName, message.Serialization);
  626:             }
  627:  
  628:             ////////////////////////////////////////////////////////////////////////////
  629:  
  630:             /// <summary>
  631:             ///
  632:             /// </summary>
  633:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service)
  634:             {
  635:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service);
  636:  
  637:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.AmsApplication.List.Contains(message.Serialization))
  638:                 {
  639:                     rabbitMq.Publish(queueName, message.Serialization);
  640:                 }
  641:             }
  642:  
  643:             ////////////////////////////////////////////////////////////////////////////
  644:  
  645:             /// <summary>
  646:             ///
  647:             /// </summary>
  648:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, int port)
  649:             {
  650:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, port);
  651:  
  652:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.AmsApplication.List.Contains(message.Serialization))
  653:                 {
  654:                     rabbitMq.Publish(queueName, message.Serialization);
  655:                 }
  656:             }
  657:  
  658:             ////////////////////////////////////////////////////////////////////////////
  659:  
  660:             /// <summary>
  661:             ///
  662:             /// </summary>
  663:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, bool overrideRouterDomainRestriction, string staffUserId)
  664:             {
  665:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, overrideRouterDomainRestriction, staffUserId);
  666:  
  667:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.AmsApplication.List.Contains(message.Serialization))
  668:                 {
  669:                     rabbitMq.Publish(queueName, message.Serialization);
  670:                 }
  671:             }
  672:  
  673:             ////////////////////////////////////////////////////////////////////////////
  674:  
  675:             /// <summary>
  676:             ///
  677:             /// </summary>
  678:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, int port, bool overrideRouterDomainRestriction, string staffUserId)
  679:             {
  680:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, port, overrideRouterDomainRestriction, staffUserId);
  681:  
  682:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.AmsApplication.List.Contains(message.Serialization))
  683:                 {
  684:                     rabbitMq.Publish(queueName, message.Serialization);
  685:                 }
  686:             }
  687:  
  688:             ////////////////////////////////////////////////////////////////////////////
  689:         }
  690:  
  691:         ////////////////////////////////////////////////////////////////////////////
  692:         ////////////////////////////////////////////////////////////////////////////
  693:  
  694:         /// <summary>
  695:         ///
  696:         /// </summary>
  697:         public abstract class NceApplication
  698:         {
  699:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.NceApplication.Name;
  700:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  701:  
  702:             /// <summary/>
  703:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  704:             {
  705:                 get
  706:                 {
  707:                     var body = rabbitMq.Consume<string>(queueName);
  708:  
  709:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  710:                 }
  711:             }
  712:  
  713:             /// <summary/>
  714:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  715:             {
  716:                 get
  717:                 {
  718:                     var body = rabbitMq.Peek<string>(queueName);
  719:  
  720:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  721:                 }
  722:             }
  723:  
  724:             /// <summary/>
  725:             public static List<string> List
  726:             {
  727:                 get
  728:                 {
  729:                     return rabbitMq.PeekList<string>(queueName);
  730:                 }
  731:             }
  732:  
  733:             /// <summary/>
  734:             public static long Count
  735:             {
  736:                 get
  737:                 {
  738:                     return rabbitMq.Count(queueName);
  739:                 }
  740:             }
  741:  
  742:             ////////////////////////////////////////////////////////////////////////////
  743:  
  744:             /// <summary>
  745:             ///
  746:             /// </summary>
  747:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
  748:             {
  749:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
  750:  
  751:                 rabbitMq.Publish(queueName, message.Serialization);
  752:             }
  753:  
  754:             ////////////////////////////////////////////////////////////////////////////
  755:  
  756:             /// <summary>
  757:             ///
  758:             /// </summary>
  759:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string serviceOrAccessName)
  760:             {
  761:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, serviceOrAccessName);
  762:  
  763:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.NceApplication.List.Contains(message.Serialization))
  764:                 {
  765:                     rabbitMq.Publish(queueName, message.Serialization);
  766:                 }
  767:             }
  768:  
  769:             ////////////////////////////////////////////////////////////////////////////
  770:  
  771:             /// <summary>
  772:             ///
  773:             /// </summary>
  774:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, int port)
  775:             {
  776:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, port);
  777:  
  778:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.NceApplication.List.Contains(message.Serialization))
  779:                 {
  780:                     rabbitMq.Publish(queueName, message.Serialization);
  781:                 }
  782:             }
  783:  
  784:             ////////////////////////////////////////////////////////////////////////////
  785:  
  786:             /// <summary>
  787:             ///
  788:             /// </summary>
  789:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, bool overrideRouterDomainRestriction, string staffUserId)
  790:             {
  791:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, overrideRouterDomainRestriction, staffUserId);
  792:  
  793:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.NceApplication.List.Contains(message.Serialization))
  794:                 {
  795:                     rabbitMq.Publish(queueName, message.Serialization);
  796:                 }
  797:             }
  798:  
  799:             ////////////////////////////////////////////////////////////////////////////
  800:  
  801:             /// <summary>
  802:             ///
  803:             /// </summary>
  804:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, int port, bool overrideRouterDomainRestriction, string staffUserId)
  805:             {
  806:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, port, overrideRouterDomainRestriction, staffUserId);
  807:  
  808:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.NceApplication.List.Contains(message.Serialization))
  809:                 {
  810:                     rabbitMq.Publish(queueName, message.Serialization);
  811:                 }
  812:             }
  813:  
  814:             ////////////////////////////////////////////////////////////////////////////
  815:  
  816:             /// <summary>
  817:             ///
  818:             /// </summary>
  819:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string msanDevId, int fn, int sn, int pn, string service)
  820:             {
  821:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, msanDevId, fn, sn, pn, service);
  822:  
  823:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.NceApplication.List.Contains(message.Serialization))
  824:                 {
  825:                     rabbitMq.Publish(queueName, message.Serialization);
  826:                 }
  827:             }
  828:  
  829:             ////////////////////////////////////////////////////////////////////////////
  830:         }
  831:  
  832:         ////////////////////////////////////////////////////////////////////////////
  833:         ////////////////////////////////////////////////////////////////////////////
  834:  
  835:         /// <summary>
  836:         ///
  837:         /// </summary>
  838:         public abstract class ProvisionApplication
  839:         {
  840:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.ProvisionApplication.Name;
  841:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  842:  
  843:             /// <summary/>
  844:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  845:             {
  846:                 get
  847:                 {
  848:                     var body = rabbitMq.Consume<string>(queueName);
  849:  
  850:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  851:                 }
  852:             }
  853:  
  854:             /// <summary/>
  855:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  856:             {
  857:                 get
  858:                 {
  859:                     var body = rabbitMq.Peek<string>(queueName);
  860:  
  861:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  862:                 }
  863:             }
  864:  
  865:             /// <summary/>
  866:             public static List<string> List
  867:             {
  868:                 get
  869:                 {
  870:                     return rabbitMq.PeekList<string>(queueName);
  871:                 }
  872:             }
  873:  
  874:             /// <summary/>
  875:             public static long Count
  876:             {
  877:                 get
  878:                 {
  879:                     return rabbitMq.Count(queueName);
  880:                 }
  881:             }
  882:  
  883:             ////////////////////////////////////////////////////////////////////////////
  884:  
  885:             /// <summary>
  886:             ///
  887:             /// </summary>
  888:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
  889:             {
  890:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
  891:  
  892:                 rabbitMq.Publish(queueName, message.Serialization);
  893:             }
  894:  
  895:             ////////////////////////////////////////////////////////////////////////////
  896:  
  897:             /// <summary>
  898:             ///
  899:             /// </summary>
  900:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service)
  901:             {
  902:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service);
  903:  
  904:                 rabbitMq.Publish(queueName, message.Serialization);
  905:             }
  906:  
  907:             ////////////////////////////////////////////////////////////////////////////
  908:  
  909:             /// <summary>
  910:             ///
  911:             /// </summary>
  912:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, bool overrideRouterDomainRestriction, string staffUserId)
  913:             {
  914:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, overrideRouterDomainRestriction, staffUserId);
  915:  
  916:                 rabbitMq.Publish(queueName, message.Serialization);
  917:             }
  918:  
  919:             ////////////////////////////////////////////////////////////////////////////
  920:  
  921:             /// <summary>
  922:             ///
  923:             /// </summary>
  924:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, int port, bool overrideRouterDomainRestriction, string staffUserId)
  925:             {
  926:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, port, overrideRouterDomainRestriction, staffUserId);
  927:  
  928:                 rabbitMq.Publish(queueName, message.Serialization);
  929:             }
  930:  
  931:             ////////////////////////////////////////////////////////////////////////////
  932:  
  933:             /// <summary>
  934:             ///
  935:             /// </summary>
  936:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, Ia.Ftn.Cl.Models.Business.Service.SupplementaryService supplementaryService, bool supplementaryServiceState, string staffUserId)
  937:             {
  938:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, supplementaryService, supplementaryServiceState, staffUserId);
  939:  
  940:                 rabbitMq.Publish(queueName, message.Serialization);
  941:             }
  942:  
  943:             ////////////////////////////////////////////////////////////////////////////
  944:         }
  945:  
  946:         ////////////////////////////////////////////////////////////////////////////
  947:         ////////////////////////////////////////////////////////////////////////////
  948:  
  949:         /// <summary>
  950:         ///
  951:         /// </summary>
  952:         public abstract class FtnApplication
  953:         {
  954:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.FtnApplication.Name;
  955:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
  956:  
  957:             /// <summary/>
  958:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
  959:             {
  960:                 get
  961:                 {
  962:                     var body = rabbitMq.Consume<string>(queueName);
  963:  
  964:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  965:                 }
  966:             }
  967:  
  968:             /// <summary/>
  969:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
  970:             {
  971:                 get
  972:                 {
  973:                     var body = rabbitMq.Peek<string>(queueName);
  974:  
  975:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
  976:                 }
  977:             }
  978:  
  979:             /// <summary/>
  980:             public static List<string> List
  981:             {
  982:                 get
  983:                 {
  984:                     return rabbitMq.PeekList<string>(queueName);
  985:                 }
  986:             }
  987:  
  988:             /// <summary/>
  989:             public static long Count
  990:             {
  991:                 get
  992:                 {
  993:                     return rabbitMq.Count(queueName);
  994:                 }
  995:             }
  996:  
  997:             ////////////////////////////////////////////////////////////////////////////
  998:  
  999:             /// <summary>
 1000:             ///
 1001:             /// </summary>
 1002:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
 1003:             {
 1004:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
 1005:  
 1006:                 rabbitMq.Publish(queueName, message.Serialization);
 1007:             }
 1008:  
 1009:             ////////////////////////////////////////////////////////////////////////////
 1010:  
 1011:             /// <summary>
 1012:             ///
 1013:             /// </summary>
 1014:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string payload)
 1015:             {
 1016:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, payload);
 1017:  
 1018:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.FtnApplication.List.Contains(message.Serialization))
 1019:                 {
 1020:                     rabbitMq.Publish(queueName, message.Serialization);
 1021:                 }
 1022:             }
 1023:  
 1024:             ////////////////////////////////////////////////////////////////////////////
 1025:  
 1026:             /// <summary>
 1027:             ///
 1028:             /// </summary>
 1029:             public static void EnqueueSerializedPayload<T>(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, T t)
 1030:             {
 1031:                 var payload = Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Serialize<T>(t);
 1032:  
 1033:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, payload);
 1034:  
 1035:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.FtnApplication.List.Contains(message.Serialization))
 1036:                 {
 1037:                     rabbitMq.Publish(queueName, message.Serialization);
 1038:                 }
 1039:             }
 1040:  
 1041:             ////////////////////////////////////////////////////////////////////////////
 1042:         }
 1043:  
 1044:         ////////////////////////////////////////////////////////////////////////////
 1045:         ////////////////////////////////////////////////////////////////////////////
 1046:  
 1047:         /// <summary>
 1048:         ///
 1049:         /// </summary>
 1050:         public abstract class TelegramApplication
 1051:         {
 1052:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.TelegramApplication.Name;
 1053:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
 1054:  
 1055:             /// <summary/>
 1056:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
 1057:             {
 1058:                 get
 1059:                 {
 1060:                     var body = rabbitMq.Consume<string>(queueName);
 1061:  
 1062:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1063:                 }
 1064:             }
 1065:  
 1066:             /// <summary/>
 1067:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
 1068:             {
 1069:                 get
 1070:                 {
 1071:                     var body = rabbitMq.Peek<string>(queueName);
 1072:  
 1073:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1074:                 }
 1075:             }
 1076:  
 1077:             /// <summary/>
 1078:             public static List<string> List
 1079:             {
 1080:                 get
 1081:                 {
 1082:                     return rabbitMq.PeekList<string>(queueName);
 1083:                 }
 1084:             }
 1085:  
 1086:             /// <summary/>
 1087:             public static long Count
 1088:             {
 1089:                 get
 1090:                 {
 1091:                     return rabbitMq.Count(queueName);
 1092:                 }
 1093:             }
 1094:  
 1095:             ////////////////////////////////////////////////////////////////////////////
 1096:  
 1097:             /// <summary>
 1098:             ///
 1099:             /// </summary>
 1100:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
 1101:             {
 1102:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
 1103:  
 1104:                 rabbitMq.Publish(queueName, message.Serialization);
 1105:             }
 1106:  
 1107:             ////////////////////////////////////////////////////////////////////////////
 1108:  
 1109:             /// <summary>
 1110:             ///
 1111:             /// </summary>
 1112:             public static void EnqueueSerializedPayload<T>(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, T t)
 1113:             {
 1114:                 var payload = Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Serialize<T>(t);
 1115:  
 1116:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, payload);
 1117:  
 1118:                 if (!Ia.Ftn.Cl.Models.Data.MessageQueue.TelegramApplication.List.Contains(message.Serialization))
 1119:                 {
 1120:                     rabbitMq.Publish(queueName, message.Serialization);
 1121:                 }
 1122:             }
 1123:  
 1124:             ////////////////////////////////////////////////////////////////////////////
 1125:         }
 1126:  
 1127:         ////////////////////////////////////////////////////////////////////////////
 1128:         ////////////////////////////////////////////////////////////////////////////
 1129:  
 1130:         /// <summary>
 1131:         ///
 1132:         /// </summary>
 1133:         public abstract class SecretaryApplication
 1134:         {
 1135:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.SecretaryApplication.Name;
 1136:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
 1137:  
 1138:             /// <summary/>
 1139:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
 1140:             {
 1141:                 get
 1142:                 {
 1143:                     var body = rabbitMq.Consume<string>(queueName);
 1144:  
 1145:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1146:                 }
 1147:             }
 1148:  
 1149:             /// <summary/>
 1150:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
 1151:             {
 1152:                 get
 1153:                 {
 1154:                     var body = rabbitMq.Peek<string>(queueName);
 1155:  
 1156:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1157:                 }
 1158:             }
 1159:  
 1160:             /// <summary/>
 1161:             public static List<string> List
 1162:             {
 1163:                 get
 1164:                 {
 1165:                     return rabbitMq.PeekList<string>(queueName);
 1166:                 }
 1167:             }
 1168:  
 1169:             /// <summary/>
 1170:             public static long Count
 1171:             {
 1172:                 get
 1173:                 {
 1174:                     return rabbitMq.Count(queueName);
 1175:                 }
 1176:             }
 1177:  
 1178:             ////////////////////////////////////////////////////////////////////////////
 1179:  
 1180:             /// <summary>
 1181:             ///
 1182:             /// </summary>
 1183:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
 1184:             {
 1185:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
 1186:  
 1187:                 rabbitMq.Publish(queueName, message.Serialization);
 1188:             }
 1189:  
 1190:             ////////////////////////////////////////////////////////////////////////////
 1191:  
 1192:             /// <summary>
 1193:             ///
 1194:             /// </summary>
 1195:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, bool state)
 1196:             {
 1197:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, state);
 1198:  
 1199:                 rabbitMq.Publish(queueName, message.Serialization);
 1200:             }
 1201:  
 1202:             ////////////////////////////////////////////////////////////////////////////
 1203:  
 1204:             /// <summary>
 1205:             ///
 1206:             /// </summary>
 1207:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string serviceOrAccessName)
 1208:             {
 1209:                 serviceOrAccessName = serviceOrAccessName.ToUpper();
 1210:  
 1211:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, serviceOrAccessName);
 1212:  
 1213:                 rabbitMq.Publish(queueName, message.Serialization);
 1214:             }
 1215:  
 1216:             ////////////////////////////////////////////////////////////////////////////
 1217:  
 1218:             /// <summary>
 1219:             ///
 1220:             /// </summary>
 1221:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, List<string> serviceOrAccessNameList)
 1222:             {
 1223:                 foreach (string serviceOrAccessName in serviceOrAccessNameList)
 1224:                 {
 1225:                     Enqueue(sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process.ReadAccess, serviceOrAccessName);
 1226:                 }
 1227:             }
 1228:  
 1229:             ////////////////////////////////////////////////////////////////////////////
 1230:  
 1231:             /// <summary>
 1232:             ///
 1233:             /// </summary>
 1234:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, int gatewayId)
 1235:             {
 1236:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, gatewayId);
 1237:  
 1238:                 rabbitMq.Publish(queueName, message.Serialization);
 1239:             }
 1240:  
 1241:             ////////////////////////////////////////////////////////////////////////////
 1242:  
 1243:             /// <summary>
 1244:             ///
 1245:             /// </summary>
 1246:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, Ia.Ftn.Cl.Models.Business.Service.SupplementaryService supplementaryService, bool supplementaryServiceState, string staffUserId)
 1247:             {
 1248:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, supplementaryService, supplementaryServiceState, staffUserId);
 1249:  
 1250:                 rabbitMq.Publish(queueName, message.Serialization);
 1251:             }
 1252:  
 1253:             ////////////////////////////////////////////////////////////////////////////
 1254:  
 1255:             /// <summary>
 1256:             ///
 1257:             /// </summary>
 1258:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, bool overrideRouterDomainRestriction, string staffUserId)
 1259:             {
 1260:                 accessName = accessName.ToUpper();
 1261:  
 1262:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, overrideRouterDomainRestriction, staffUserId);
 1263:  
 1264:                 rabbitMq.Publish(queueName, message.Serialization);
 1265:             }
 1266:  
 1267:             ////////////////////////////////////////////////////////////////////////////
 1268:  
 1269:             /// <summary>
 1270:             ///
 1271:             /// </summary>
 1272:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, int port, bool overrideRouterDomainRestriction, string staffUserId)
 1273:             {
 1274:                 accessName = accessName.ToUpper();
 1275:  
 1276:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, port, overrideRouterDomainRestriction, staffUserId);
 1277:  
 1278:                 rabbitMq.Publish(queueName, message.Serialization);
 1279:             }
 1280:  
 1281:             ////////////////////////////////////////////////////////////////////////////
 1282:  
 1283:             /// <summary>
 1284:             ///
 1285:             /// </summary>
 1286:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service, string accessName, int port)
 1287:             {
 1288:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service, accessName, port);
 1289:  
 1290:                 rabbitMq.Publish(queueName, message.Serialization);
 1291:             }
 1292:  
 1293:             ////////////////////////////////////////////////////////////////////////////
 1294:  
 1295:             /// <summary>
 1296:             ///
 1297:             /// </summary>
 1298:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string msanDevId, int fn, int sn, int pn, string service)
 1299:             {
 1300:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, msanDevId, fn, sn, pn, service);
 1301:  
 1302:                 rabbitMq.Publish(queueName, message.Serialization);
 1303:             }
 1304:  
 1305:             ////////////////////////////////////////////////////////////////////////////
 1306:             ////////////////////////////////////////////////////////////////////////////
 1307:         }
 1308:  
 1309:         ////////////////////////////////////////////////////////////////////////////
 1310:         ////////////////////////////////////////////////////////////////////////////
 1311:  
 1312:         /// <summary>
 1313:         ///
 1314:         /// </summary>
 1315:         public abstract class EmailApplication
 1316:         {
 1317:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.EmailApplication.Name;
 1318:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
 1319:  
 1320:             /// <summary/>
 1321:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
 1322:             {
 1323:                 get
 1324:                 {
 1325:                     var body = rabbitMq.Consume<string>(queueName);
 1326:  
 1327:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1328:                 }
 1329:             }
 1330:  
 1331:             /// <summary/>
 1332:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
 1333:             {
 1334:                 get
 1335:                 {
 1336:                     var body = rabbitMq.Peek<string>(queueName);
 1337:  
 1338:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1339:                 }
 1340:             }
 1341:  
 1342:             /// <summary/>
 1343:             public static List<string> List
 1344:             {
 1345:                 get
 1346:                 {
 1347:                     return rabbitMq.PeekList<string>(queueName);
 1348:                 }
 1349:             }
 1350:  
 1351:             /// <summary/>
 1352:             public static long Count
 1353:             {
 1354:                 get
 1355:                 {
 1356:                     return rabbitMq.Count(queueName);
 1357:                 }
 1358:             }
 1359:  
 1360:             ////////////////////////////////////////////////////////////////////////////
 1361:  
 1362:             /// <summary>
 1363:             ///
 1364:             /// </summary>
 1365:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
 1366:             {
 1367:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
 1368:  
 1369:                 rabbitMq.Publish(queueName, message.Serialization);
 1370:             }
 1371:  
 1372:             ////////////////////////////////////////////////////////////////////////////
 1373:         }
 1374:  
 1375:         ////////////////////////////////////////////////////////////////////////////
 1376:         ////////////////////////////////////////////////////////////////////////////
 1377:  
 1378:         /// <summary>
 1379:         ///
 1380:         /// </summary>
 1381:         public abstract class SdcApplication
 1382:         {
 1383:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.SdcApplication.Name;
 1384:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
 1385:  
 1386:             /// <summary/>
 1387:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
 1388:             {
 1389:                 get
 1390:                 {
 1391:                     var body = rabbitMq.Consume<string>(queueName);
 1392:  
 1393:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1394:                 }
 1395:             }
 1396:  
 1397:             /// <summary/>
 1398:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
 1399:             {
 1400:                 get
 1401:                 {
 1402:                     var body = rabbitMq.Peek<string>(queueName);
 1403:  
 1404:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1405:                 }
 1406:             }
 1407:  
 1408:             /// <summary/>
 1409:             public static List<string> List
 1410:             {
 1411:                 get
 1412:                 {
 1413:                     return rabbitMq.PeekList<string>(queueName);
 1414:                 }
 1415:             }
 1416:  
 1417:             /// <summary/>
 1418:             public static long Count
 1419:             {
 1420:                 get
 1421:                 {
 1422:                     return rabbitMq.Count(queueName);
 1423:                 }
 1424:             }
 1425:  
 1426:             ////////////////////////////////////////////////////////////////////////////
 1427:  
 1428:             /// <summary>
 1429:             ///
 1430:             /// </summary>
 1431:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
 1432:             {
 1433:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
 1434:  
 1435:                 rabbitMq.Publish(queueName, message.Serialization);
 1436:             }
 1437:  
 1438:             ////////////////////////////////////////////////////////////////////////////
 1439:         }
 1440:  
 1441:         ////////////////////////////////////////////////////////////////////////////
 1442:         ////////////////////////////////////////////////////////////////////////////
 1443:  
 1444:         /// <summary>
 1445:         ///
 1446:         /// </summary>
 1447:         public abstract class SchedulerApplication
 1448:         {
 1449:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.SchedulerApplication.Name;
 1450:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
 1451:  
 1452:             /// <summary/>
 1453:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
 1454:             {
 1455:                 get
 1456:                 {
 1457:                     var body = rabbitMq.Consume<string>(queueName);
 1458:  
 1459:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1460:                 }
 1461:             }
 1462:  
 1463:             /// <summary/>
 1464:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
 1465:             {
 1466:                 get
 1467:                 {
 1468:                     var body = rabbitMq.Peek<string>(queueName);
 1469:  
 1470:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1471:                 }
 1472:             }
 1473:  
 1474:             /// <summary/>
 1475:             public static List<string> List
 1476:             {
 1477:                 get
 1478:                 {
 1479:                     return rabbitMq.PeekList<string>(queueName);
 1480:                 }
 1481:             }
 1482:  
 1483:             /// <summary/>
 1484:             public static long Count
 1485:             {
 1486:                 get
 1487:                 {
 1488:                     return rabbitMq.Count(queueName);
 1489:                 }
 1490:             }
 1491:  
 1492:             ////////////////////////////////////////////////////////////////////////////
 1493:  
 1494:             /// <summary>
 1495:             ///
 1496:             /// </summary>
 1497:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
 1498:             {
 1499:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
 1500:  
 1501:                 rabbitMq.Publish(queueName, message.Serialization);
 1502:             }
 1503:  
 1504:             ////////////////////////////////////////////////////////////////////////////
 1505:         }
 1506:  
 1507:         ////////////////////////////////////////////////////////////////////////////
 1508:         ////////////////////////////////////////////////////////////////////////////
 1509:  
 1510:         /// <summary>
 1511:         ///
 1512:         /// </summary>
 1513:         public abstract class MdaaApplication
 1514:         {
 1515:             private static readonly string queueName = Ia.Ftn.Cl.Models.Business.MessageQueue.Application.MdaaApplication.Name;
 1516:             private static Ia.Cl.Models.RabbitMq rabbitMq = new Ia.Cl.Models.RabbitMq();
 1517:  
 1518:             /// <summary/>
 1519:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Dequeue
 1520:             {
 1521:                 get
 1522:                 {
 1523:                     var body = rabbitMq.Consume<string>(queueName);
 1524:  
 1525:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1526:                 }
 1527:             }
 1528:  
 1529:             /// <summary/>
 1530:             public static Ia.Ftn.Cl.Models.Business.MessageQueue.Message Peek
 1531:             {
 1532:                 get
 1533:                 {
 1534:                     var body = rabbitMq.Peek<string>(queueName);
 1535:  
 1536:                     return Ia.Ftn.Cl.Models.Business.MessageQueue.Message.Deserialize(body);
 1537:                 }
 1538:             }
 1539:  
 1540:             /// <summary/>
 1541:             public static List<string> List
 1542:             {
 1543:                 get
 1544:                 {
 1545:                     return rabbitMq.PeekList<string>(queueName);
 1546:                 }
 1547:             }
 1548:  
 1549:             /// <summary/>
 1550:             public static long Count
 1551:             {
 1552:                 get
 1553:                 {
 1554:                     return rabbitMq.Count(queueName);
 1555:                 }
 1556:             }
 1557:  
 1558:             ////////////////////////////////////////////////////////////////////////////
 1559:  
 1560:             /// <summary>
 1561:             ///
 1562:             /// </summary>
 1563:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process)
 1564:             {
 1565:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process);
 1566:  
 1567:                 rabbitMq.Publish(queueName, message.Serialization);
 1568:             }
 1569:  
 1570:             ////////////////////////////////////////////////////////////////////////////
 1571:  
 1572:             /// <summary>
 1573:             ///
 1574:             /// </summary>
 1575:             public static void Enqueue(Ia.Ftn.Cl.Models.Business.MessageQueue.Application sender, Ia.Ftn.Cl.Models.Business.MessageQueue.Process process, string service)
 1576:             {
 1577:                 var message = new Ia.Ftn.Cl.Models.Business.MessageQueue.Message(sender, process, service);
 1578:  
 1579:                 rabbitMq.Publish(queueName, message.Serialization);
 1580:             }
 1581:  
 1582:             ////////////////////////////////////////////////////////////////////////////
 1583:         }
 1584:  
 1585:         ////////////////////////////////////////////////////////////////////////////
 1586:         ////////////////////////////////////////////////////////////////////////////
 1587:     }
 1588:  
 1589:     ////////////////////////////////////////////////////////////////////////////
 1590:     ////////////////////////////////////////////////////////////////////////////
 1591: }
 1592: