Example #1
0
 public EventsViewModel(
     IEventsService service,
     IServiceCaller serviceCaller) : base(serviceCaller)
 {
     this.service = service;
     Events       = new ObservableCollection <Event>();
 }
Example #2
0
 public SpeakersViewModel(
     ISpeakersService service,
     IServiceCaller serviceCaller) : base(serviceCaller)
 {
     this.service = service;
     Speakers     = new ObservableCollection <Speaker>();
 }
 public CustomerController()
 {
     purchaseOrderStatusRetriever = new PurchaseOrderStatusRetriever();
     poStatusResolver             = new POStatusResolver();
     serviceCaller = new ServiceCaller {
         size = 100
     };
 }
Example #4
0
 public ExportToExcelController()
 {
     purchaseOrderStatusRetriever = new PurchaseOrderStatusRetriever();
     poStatusResolver             = new POStatusResolver();
     serviceCaller = new ServiceCaller {
         size = 100
     };
 }
Example #5
0
 public JobSession(IServiceCaller serviceCaller, string jobId)
 {
     _serviceCaller = new HeaderDecorationServiceCaller(serviceCaller, new Dictionary <string, string>()
     {
         { "Job-ID", jobId }
     });
     JobId = jobId;
 }
Example #6
0
 public SessionsViewModel(
     ISessionsService service,
     IServiceCaller serviceCaller) : base(serviceCaller)
 {
     this.service = service;
     Sessions     = new ObservableCollection <Session>();
     allSessions  = new List <Session>();
 }
Example #7
0
        private object Invoke(MethodInfo method, object[] parameters)
        {
            IServiceCaller serviceCaller = kernel[typeof(IServiceCaller)] as IServiceCaller;

            if (serviceCaller == null)
            {
                throw new InvalidOperationException("无法获取 [ServiceCaller] 服务");
            }
            return(serviceCaller.Invoke(method, parameters));
        }
Example #8
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="proxyName">服务名称</param>
 /// <param name="serviceInfos">服务配置信息</param>
 /// <param name="serviceCaller">服务调用器对象,默认为DefaultServiceCaller</param>
 /// <param name="nodeClientContainer">NodeClient容器,默认为DefaultNodeClientContainer</param>
 public ServiceProxy(string proxyName,
                     IList <ServiceInfo> serviceInfos         = null,
                     IServiceCaller serviceCaller             = null,
                     INodeClientContainer nodeClientContainer = null)
 {
     ProxyName                = proxyName;
     logger                   = LoggerManager.ClientLoggerFactory.CreateLogger <ServiceProxy>();
     this.serviceInfos        = serviceInfos;
     this.serviceCaller       = serviceCaller ?? new DefaultServiceCaller();
     this.nodeClientContainer = nodeClientContainer ?? new DefaultNodeClientContainer();
 }
Example #9
0
        public NavigationViewModel(IServiceCaller caller) : base(caller, false)
        {
            MenuItems = new ObservableCollection <MenuItem>();

            MenuItems.Add(new MenuItem("Feeds", typeof(FeedsPage), MenuItemType.Feeds, "rss.png", true));
            MenuItems.Add(new MenuItem("Sessions", typeof(SessionsPage), MenuItemType.Sessions, "session.png"));
            MenuItems.Add(new MenuItem("Events", typeof(EventsPage), MenuItemType.Events, "event.png"));
            MenuItems.Add(new MenuItem("Speakers", typeof(SpeakersPage), MenuItemType.Speakers, "speaker.png"));

            MenuItems.Add(new MenuItem("Sponsors", typeof(SponsorsPage), MenuItemType.Sponsors, "sponsors.png"));
            MenuItems.Add(new MenuItem("About", typeof(AboutPage), MenuItemType.About, "about.png"));

            SelectedItem = MenuItems.First();
        }
Example #10
0
        /// <summary>
        /// 添加ServiceCaller
        /// </summary>
        /// <param name="serviceCaller">ServiceCaller实例</param>
        /// <returns></returns>
        public ServiceCallerBuilder Append(IServiceCaller serviceCaller)
        {
            if (serviceCaller == null)
            {
                return(this);
            }

            if (this.serviceCaller == null)
            {
                this.serviceCaller = lastServiceCaller = serviceCaller;
            }
            else
            {
                lastServiceCaller.Next = serviceCaller;
                lastServiceCaller      = serviceCaller;
            }

            return(this);
        }
Example #11
0
        public MusicBrainzCaller(IServiceCaller serviceCaller)
        {
            Verify.NotNull(serviceCaller, nameof(serviceCaller));

            _serviceCaller = serviceCaller;
        }
 public UserProfileController()
 {
     serviceCaller = new ServiceCaller();
 }
Example #13
0
        /// <summary>
        /// 创建默认ServiceProxyFactory
        /// </summary>
        /// <param name="serviceCaller"></param>
        /// <returns></returns>
        public static Func <ServiceProxyArgs, IServiceProxy> CreateDefaultServiceProxyFactory(IServiceCaller serviceCaller)
        {
            IServiceProxy serviceProxyFactory(ServiceProxyArgs args)
            {
                return(new ServiceProxy(
                           args.Name,
                           new List <ServiceInfo>()
                {
                    args.ServiceInfo
                },
                           serviceCaller));
            }

            return(serviceProxyFactory);
        }
 public CustomerController(IServiceCaller _serviceCaller)
 {
     poStatusResolver = new POStatusResolver();
     serviceCaller    = _serviceCaller;
 }
Example #15
0
 public BaseViewModel(IServiceCaller serviceCaller, bool shouldSubscribeMessages = true)
 {
     ServiceCaller   = serviceCaller;
     ShouldSubscribe = shouldSubscribeMessages;
 }
 public PaymentProcessor(IValidator creditCardValidator, IServiceCaller paymentServiceCaller)
 {
     _creditCardValidator  = creditCardValidator;
     _paymentServiceCaller = paymentServiceCaller;
 }
Example #17
0
 public SpeakerDetailsViewModel(
     IServiceCaller serviceCaller) : base(serviceCaller)
 {
 }
Example #18
0
        public LyricsOvhCaller(IServiceCaller serviceCaller)
        {
            Verify.NotNull(serviceCaller, nameof(serviceCaller));

            _serviceCaller = serviceCaller;
        }
Example #19
0
 public AboutViewModel(
     IInfoService service,
     IServiceCaller serviceCaller) : base(serviceCaller)
 {
     this.service = service;
 }
Example #20
0
 public Client(ICredentials credentials, IConfiguration configuration = null)
 {
     _service = new BaseServiceCaller(credentials, configuration);
 }
Example #21
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="token">A unique token, a JSON Web Token (JWT), valid for a limited period of time, typically an hour. Used to provide in the 'Authorization' header of forthcoming requests.</param>
 /// <param name="configuration"></param>
 public Client(ISessionToken token, IConfiguration configuration = null)
 {
     _service = new BaseServiceCaller(token, configuration);
 }
Example #22
0
 public HeaderDecorationServiceCaller(IServiceCaller innerCaller, IDictionary <string, string> headers)
 {
     _innerCaller = innerCaller;
     _headers     = headers;
 }
Example #23
0
 public AdditionalDetailsController()
 {
     serviceCaller = new ServiceCaller();
 }
Example #24
0
 public PurchaseOrderController()
 {
     serviceCaller = new ServiceCaller {
         size = 100
     };
 }
 public UserMetricsController()
 {
     serviceCaller = new ServiceCaller();
 }
Example #26
0
 public ExportToExcelController(IServiceCaller _serviceCaller)
 {
     poStatusResolver = new POStatusResolver();
     serviceCaller    = _serviceCaller;
 }
Example #27
0
 public FeedsViewModel(
     IServiceCaller serviceCaller) : base(serviceCaller)
 {
 }
Example #28
0
 public ProfileIDLookupController()
 {
     serviceCaller = new ServiceCaller();
 }
 public SessionDetailsViewModel(
     IServiceCaller serviceCaller) : base(serviceCaller)
 {
 }