public List <string> GetResources(string resourceType)
        {
            try
            {
                Log.Debug($"客户端获取资源列表.类型:{resourceType}");

                return(ResourceManager.GetResourceNames(resourceType));
            }
            catch (Exception ex)
            {
                Log.Error("ResourceService异常报错" + ex.ToString());
                return(null);
            }
        }
        public List <string> GetAllResources()
        {
            try
            {
                Log.Debug("客户端获取资源列表.");

                return(ResourceManager.GetAllResourceNames());
            }
            catch (Exception ex)
            {
                Log.Error("ResourceService异常报错" + ex.ToString());
                return(null);
            }
        }
        public string CallResourceService(string resourceName, string serviceName, string strParameter)
        {
            try
            {
                //LOG.Debug(string.Format("客户端{0}调用接口{1}.", ResourceName, ServiceName));

                var resource = ResourceManager.GetResource(resourceName);
                var export   = resource.GetExportService();

                var strResult = export.CallExportService(serviceName, strParameter);
                return(strResult);
            }
            catch (Exception ex)
            {
                Log.Error($"调用ResourceService异常报错: 资源名:{resourceName},服务方法:{serviceName},参数:{strParameter}" + ex);
                return(null);
            }
        }
        public List <ResourceServiceModel> GetResourceService(string resourceName)
        {
            try
            {
                Log.Debug($"客户端{resourceName}获取接口服务列表.");

                var resource = ResourceManager.GetResource(resourceName);
                var export   = resource.GetExportService();

                var result = export.GetExportServices();
                return(result);
            }
            catch (Exception ex)
            {
                Log.Error("ResourceService异常报错" + ex);
                return(null);
            }
        }
 public bool IsMaster()
 {
     return(ResourceManager.GetRedundancyMode() == RedundancyMode.Master);
 }