示例#1
0
 /// <summary> Directly set the microservice configuration </summary>
 /// <param name="EndpointConfig"> Configuration of all the endpoint information </param>
 public static void Set_Endpoints(MicroservicesClient_Configuration EndpointConfig)
 {
     ConfigObj             = EndpointConfig;
     Config_Read_Attempted = true;
     Aggregations          = new SobekEngineClient_AggregationEndpoints(ConfigObj);
     WebSkins   = new SobekEngineClient_WebSkinEndpoints(ConfigObj);
     Items      = new SobekEngineClient_ItemEndpoints(ConfigObj);
     Search     = new SobekEngineClient_SearchEndpoints(ConfigObj);
     WebContent = new SobekEngineClient_WebContentEndpoints(ConfigObj);
     Navigation = new SobekEngineClient_NavigationEndpoints(ConfigObj);
     Builder    = new SobekEngineClient_BuilderEndpoints(ConfigObj);
     Admin      = new SobekEngineClient_AdminEndpoints(ConfigObj);
 }
示例#2
0
        /// <summary> Read the microservices configuration file </summary>
        /// <param name="ConfigFile"> File ( including path )</param>
        /// <param name="SystemBaseUrl"></param>
        /// <returns> TRUE if successful, otherwise FALSE </returns>
        /// <remarks> This also sets the <see cref="Config_Read_Attempted"/> flag to TRUE and set the <see cref="Config_Read_Error"/> flag </remarks>
        public static bool Read_Config_File(string ConfigFile, string SystemBaseUrl)
        {
            ConfigObj             = MicroservicesClient_Config_Reader.Read_Config(ConfigFile, SystemBaseUrl);
            Config_Read_Attempted = true;
            if (String.IsNullOrEmpty(ConfigObj.Error))
            {
                Aggregations = new SobekEngineClient_AggregationEndpoints(ConfigObj);
                WebSkins     = new SobekEngineClient_WebSkinEndpoints(ConfigObj);
                Items        = new SobekEngineClient_ItemEndpoints(ConfigObj);
                Search       = new SobekEngineClient_SearchEndpoints(ConfigObj);
                WebContent   = new SobekEngineClient_WebContentEndpoints(ConfigObj);
                Navigation   = new SobekEngineClient_NavigationEndpoints(ConfigObj);
                Builder      = new SobekEngineClient_BuilderEndpoints(ConfigObj);
                Admin        = new SobekEngineClient_AdminEndpoints(ConfigObj);

                return(true);
            }

            Config_Read_Error = ConfigObj.Error;
            return(false);
        }