Пример #1
0
        public LandingPageDetailViewModel(ISystemControlClient systemControlService, INavigationService navigationService, IApplicationPropertiesWrapper appPropertiesWrapper)
        {
            if (systemControlService == null)
            {
                throw new ArgumentNullException("systemControlService");
            }
            if (navigationService == null)
            {
                throw new ArgumentNullException("navigationService");
            }
            if (appPropertiesWrapper == null)
            {
                throw new ArgumentNullException("appPropertiesWrapper");
            }
            _systemControlService = systemControlService;
            _navigationService    = navigationService;
            _appPropertiesWrapper = appPropertiesWrapper;
            var lastKnownIP = _appPropertiesWrapper.GetValue <string>(ApplicationStrings.LastKnownIPValue);

            if (!string.IsNullOrEmpty(lastKnownIP))
            {
                IP = lastKnownIP;
            }
            else
            {
                IP = "192.168.0.27";
            }
        }
Пример #2
0
 public SystemControlClient(IApplicationPropertiesWrapper appPropertiesWrapper)
 {
     if (appPropertiesWrapper == null)
     {
         throw new ArgumentNullException("appPropertiesWrapper");
     }
     _appPropertiesWrapper = appPropertiesWrapper;
     _systemServiceCient   = new SystemServiceClient(SystemServiceClient.EndpointConfiguration.BasicHttpBinding_ISystemService);
 }
Пример #3
0
 public YouTubeClient(IApplicationPropertiesWrapper appPropertiesWrapper)
 {
     if (appPropertiesWrapper == null)
     {
         throw new ArgumentNullException("appPropertiesWrapper");
     }
     _appPropertiesWrapper          = appPropertiesWrapper;
     _youTubeCient                  = new YouTubeServiceClient(YouTubeServiceClient.EndpointConfiguration.BasicHttpBinding_IYouTubeService);
     _youTubeCient.Endpoint.Address = new System.ServiceModel.EndpointAddress(GenerateUri(_appPropertiesWrapper.GetValue <string>(ApplicationStrings.LastKnownIPValue)));
 }