Example #1
0
        /// <summary>
        /// Chequea la disponibilidad del despachador de servicio
        /// </summary>
        /// <returns>Mensaje en caso de que el servicio no esté disponible</returns>
        /// <summary>
        /// Chequea si un Dispatcher esta activo
        /// </summary>
        /// <returns></returns>
        public DispatcherInfoBE CheckServiceAvailability(bool includeCnnstSrings, bool includeAppSettings, bool includeMetadata)
        {
            RetriveDispatcherInfoReq req = new RetriveDispatcherInfoReq();

            req.BusinessData.IncludeAppSettings = includeAppSettings;
            req.BusinessData.IncludeCnnstSrings = includeCnnstSrings;
            req.BusinessData.IncludeMetadata    = includeMetadata;
            var res = this.ExecuteService <RetriveDispatcherInfoReq, RetriveDispatcherInfoRes>(req);

            if (res.Error != null)
            {
                throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error);
            }

            return(res.BusinessData);
        }
Example #2
0
        /// <summary>
        /// Chequea si un Dispatcher esta activo
        /// </summary>
        /// <returns></returns>
        public DispatcherInfoBE CheckServiceAvailability(bool includeCnnstSrings, bool includeAppSettings, bool includeMetadata)
        {
            RetriveDispatcherInfoReq req = new RetriveDispatcherInfoReq();

            req.BusinessData.IncludeAppSettings = includeAppSettings;
            req.BusinessData.IncludeCnnstSrings = includeCnnstSrings;
            req.BusinessData.IncludeMetadata    = includeMetadata;
            var res = this.ExecuteService <RetriveDispatcherInfoReq, RetriveDispatcherInfoRes>(req);

            if (res.Error != null)
            {
                throw Fwk.Exceptions.ExceptionHelper.ProcessException(res.Error);
            }
            //RetriveDispatcherInfoRequest wcfReq = new RetriveDispatcherInfoRequest();
            //RetriveDispatcherInfoResponse wcfRes = null;

            //var channelFactory = new ChannelFactory<IFwkService>(binding, address);
            //IFwkService client = null;
            //try
            //{
            //    client = channelFactory.CreateChannel();

            //    wcfRes = client.RetriveDispatcherInfo(wcfReq);
            //    ((ICommunicationObject)client).Close();
            //}
            //catch (Exception ex)
            //{
            //    if (client != null)
            //    {
            //        ((ICommunicationObject)client).Abort();
            //    }
            //    throw ex;
            //}



            return(res.BusinessData);
        }