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

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

Default Application network information support class for the Fixed Telecommunications Network business model

    1: using System;
    2: using System.Collections.Generic;
    3: using System.Configuration;
    4: using System.Linq;
    5: using System.Text.RegularExpressions;
    6: using System.Threading.Tasks;
    7:  
    8: namespace Ia.Ftn.Cl.Models.Business.Application
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// Default Application network information support class for the Fixed Telecommunications Network business model
   14:     /// </summary>
   15:     /// 
   16:     /// <remarks> 
   17:     /// Copyright © 2020-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   18:     /// </remarks> 
   19:     public class Default
   20:     {
   21:         private static List<Ia.Ftn.Cl.Models.Business.Application.Default.ApiKey> apiKeyList;
   22:  
   23:         private static readonly object objectLock = new object();
   24:  
   25:         /// <summary/>
   26:         public class ApiKey
   27:         {
   28:             /// <summary/>
   29:             public string Name { get; set; }
   30:  
   31:             /// <summary/>
   32:             public DateTime Created { get; set; }
   33:  
   34:             /// <summary/>
   35:             public string Key { get; set; }
   36:         }
   37:  
   38:         ////////////////////////////////////////////////////////////////////////////
   39:  
   40:         /// <summary>
   41:         ///
   42:         /// </summary>
   43:         public Default() { }
   44:  
   45:         ////////////////////////////////////////////////////////////////////////////
   46:  
   47:         /// <summary>
   48:         ///
   49:         /// </summary>
   50:         public static List<Ia.Ftn.Cl.Models.Business.Application.Default.ApiKey> ApiKeyList
   51:         {
   52:             get
   53:             {
   54:                 // Key name and value are in ~/appsettings.json
   55:                 if (apiKeyList == null || apiKeyList.Count == 0)
   56:                 {
   57:                     lock (objectLock)
   58:                     {
   59:                         apiKeyList = new List<Ia.Ftn.Cl.Models.Business.Application.Default.ApiKey>
   60:                         {
   61:                             new Ia.Ftn.Cl.Models.Business.Application.Default.ApiKey{ Name="CustomerServiceApiKey", Key = Ia.Cl.Models.ApplicationConfiguration.GetSetting("AppSettings:CustomerServiceApiKey") }
   62:                         };
   63:                     }
   64:                 }
   65:  
   66:                 return apiKeyList;
   67:             }
   68:         }
   69:  
   70:         ////////////////////////////////////////////////////////////////////////////
   71:         ////////////////////////////////////////////////////////////////////////////   
   72:     }
   73:  
   74:     ////////////////////////////////////////////////////////////////////////////
   75:     ////////////////////////////////////////////////////////////////////////////   
   76: }