Пример #1
0
        public BaseClientFactory(
            Func <Type, IPerimeter> epcFactory,
            Func <string, string, T> serviceFactory,
            Func <string, string, IEndPointValidator> validatorFactory,
            EndPointCache endPointCache,
            EndPointContext endPointContext,
            Action <string> logger)
        {
            this.epcFactory       = epcFactory;
            this.serviceFactory   = serviceFactory;
            this.validatorFactory = validatorFactory;
            this.endPointCache    = endPointCache;
            this.endPointContext  = endPointContext;
            this.logger           = logger;

            perimeter = epcFactory(typeof(T));

            if (perimeter == null)
            {
                throw new Exception($"A Perimeter object could not be resolved for type {typeof(T).Name}.  A possible reason for this error is that type {typeof(T).Name} was not registered with a specific API_Name.", null);
            }

            if (perimeter.EndPoints == null || !perimeter.EndPoints.Any())
            {
                throw new Exception($"A Perimeter object with an API_Name of {perimeter.API_Name} was resolved for type {typeof(T).Name},  however the EndPointConfigurationItems collection is null or contains no entries.", null);
            }
        }
Пример #2
0
 public ClientEvaluator(
     Func <Type, IPerimeter> epcFactory,
     Func <string, string, T> serviceFactory,
     EndPointCache endPointCache,
     EndPointContext endPointContext,
     Action <string> logger) : base(epcFactory, serviceFactory, null, endPointCache, endPointContext, logger)
 {
 }
Пример #3
0
 public ClientFactory(
     Func <Type, IPerimeter> epcFactory,
     Func <string, string, T> serviceFactory,
     Func <string, string, IEndPointValidator> validatorFactory,
     EndPointCache endPointCache,
     EndPointContext endPointContext,
     Action <string> logger) : base(epcFactory, serviceFactory, validatorFactory, endPointCache, endPointContext, logger)
 {
 }