)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Default (Ia.Ftn.Cl.Model.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.Model.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:     ///
   19:     /// 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
   20:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   21:     ///
   22:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   23:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   24:     /// 
   25:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   26:     /// 
   27:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   28:     /// </remarks> 
   29:     public class Default
   30:     {
   31:         private static List<Ia.Ftn.Cl.Model.Business.Application.Default.ApiKey> apiKeyList;
   32:  
   33:         private static readonly object objectLock = new object();
   34:  
   35:         /// <summary/>
   36:         public class ApiKey
   37:         {
   38:             /// <summary/>
   39:             public string Name { get; set; }
   40:  
   41:             /// <summary/>
   42:             public DateTime Created { get; set; }
   43:  
   44:             /// <summary/>
   45:             public string Key { get; set; }
   46:         }
   47:  
   48:         ////////////////////////////////////////////////////////////////////////////
   49:  
   50:         /// <summary>
   51:         ///
   52:         /// </summary>
   53:         public Default() { }
   54:  
   55:         ////////////////////////////////////////////////////////////////////////////
   56:  
   57:         /// <summary>
   58:         ///
   59:         /// </summary>
   60:         public static List<Ia.Ftn.Cl.Model.Business.Application.Default.ApiKey> ApiKeyList
   61:         {
   62:             get
   63:             {
   64:                 // Key name and value are in ~/web.config
   65:                 if (apiKeyList == null || apiKeyList.Count == 0)
   66:                 {
   67:                     lock (objectLock)
   68:                     {
   69:                         apiKeyList = new List<Ia.Ftn.Cl.Model.Business.Application.Default.ApiKey>
   70:                         {
   71:                             new Ia.Ftn.Cl.Model.Business.Application.Default.ApiKey{ Name="customer service api key", Key = ConfigurationManager.AppSettings["customer service api key"]},
   72:                         };
   73:                     }
   74:                 }
   75:  
   76:                 return apiKeyList;
   77:             }
   78:         }
   79:  
   80:         ////////////////////////////////////////////////////////////////////////////
   81:         ////////////////////////////////////////////////////////////////////////////   
   82:     }
   83:  
   84:     ////////////////////////////////////////////////////////////////////////////
   85:     ////////////////////////////////////////////////////////////////////////////   
   86: }