Exemple #1
0
 ///<summary>
 ///carga el objeto con la estructura general a partir de una cadena de texto emulando el json del fichero de configuracion
 ///</summary>
 ///<param name="json">cadena de texto emulando el json del fichero de configuracion</param>
 public void LoadConfigJson(string json)
 {
     try
     {
         _uriSchema = ReaderConfigJson.Read(json);
         if (!IsCorrectFormedUriStructure())
         {
             throw new FailedLoadConfigJsonException("Could not load config file, the structure is not correctly");
         }
     }
     catch (Exception)
     {
         throw new FailedLoadConfigJsonException("Could not load config file, maybe Config/UrisConfig.json does not exist or is bad formed");
     }
 }
Exemple #2
0
 ///<summary>
 ///carga el objeto con la estructura general a partir del fichero de configuracion
 ///</summary>
 public void LoadConfigJson()
 {
     try
     {
         _uriSchema = ReaderConfigJson.Read();
         string baseUrl = _configService.GetBase();
         if (!string.IsNullOrEmpty(baseUrl))
         {
             _uriSchema.Base = baseUrl;
         }
         if (!IsCorrectFormedUriStructure())
         {
             throw new FailedLoadConfigJsonException("Could not load config file, the structure is not correctly");
         }
     }
     catch (Exception)
     {
         throw new FailedLoadConfigJsonException("Could not load config file, maybe Config/UrisConfig.json does not exist or is bad formed");
     }
 }