شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Service2

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

Service Entity Framework class for Next Generation Network (NGN) business model.

   1:  using System.Collections.Generic;
   2:   
   3:  namespace Ia.Ngn.Cl.Model.Business
   4:  {
   5:      ////////////////////////////////////////////////////////////////////////////
   6:   
   7:      /// <summary publish="true">
   8:      /// Service Entity Framework class for Next Generation Network (NGN) business model.
   9:      /// </summary>
  10:      /// 
  11:      /// <remarks> 
  12:      /// Copyright © 2006-2019 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  13:      ///
  14:      /// 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
  15:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  16:      ///
  17:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  18:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  19:      /// 
  20:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  21:      /// 
  22:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  23:      /// </remarks> 
  24:      public partial class Service2
  25:      {
  26:          private static int sequentialQueueOriginalCount;
  27:          private static Queue<string> sequentialQueue = new Queue<string>();
  28:   
  29:          /// <summary/>
  30:          public Service2() { }
  31:   
  32:          ////////////////////////////////////////////////////////////////////////////
  33:   
  34:          /// <summary>
  35:          ///
  36:          /// </summary>
  37:          public static string ServiceId(string service, int serviceType)
  38:          {
  39:              string id;
  40:   
  41:              id = Ia.Ngn.Cl.Model.Business.Service.ServiceToServiceId(service, serviceType);
  42:   
  43:              return id;
  44:          }
  45:   
  46:          ////////////////////////////////////////////////////////////////////////////
  47:   
  48:          /// <summary>
  49:          ///
  50:          /// </summary>
  51:          public static string ServiceIdToService(string serviceId)
  52:          {
  53:              string service;
  54:   
  55:              service = Ia.Ngn.Cl.Model.Business.Service.ServiceIdToService(serviceId);
  56:   
  57:              return service;
  58:          }
  59:   
  60:          ////////////////////////////////////////////////////////////////////////////    
  61:   
  62:          /// <summary>
  63:          ///
  64:          /// </summary>
  65:          public static string SequentialServiceNotInServiceRequestServiceManager(out int sequentialQueueCount, out string progressCounterString)
  66:          {
  67:              string service;
  68:              Dictionary<string, string> dictionary;
  69:   
  70:              if (sequentialQueue.Count == 0)
  71:              {
  72:                  dictionary = Ia.Ngn.Cl.Model.Data.Service2.ServiceNotInServiceRequestServiceToSiteDictionary;
  73:   
  74:                  sequentialQueue = new Queue<string>(dictionary.Keys);
  75:   
  76:                  sequentialQueueOriginalCount = sequentialQueue.Count;
  77:              }
  78:   
  79:              if (sequentialQueue.Count > 0) service = sequentialQueue.Dequeue();
  80:              else service = string.Empty;
  81:   
  82:              progressCounterString = "(" + sequentialQueue.Count + "/" + sequentialQueueOriginalCount + ")";
  83:   
  84:              sequentialQueueCount = sequentialQueue.Count;
  85:   
  86:              return service;
  87:          }
  88:   
  89:          ////////////////////////////////////////////////////////////////////////////
  90:          ////////////////////////////////////////////////////////////////////////////
  91:      }
  92:   
  93:      ////////////////////////////////////////////////////////////////////////////
  94:      ////////////////////////////////////////////////////////////////////////////
  95:  }