コード例 #1
0
 /// <summary>
 /// Initializes a new instance of AVTransportControlPoint
 /// </summary>
 /// <param name="ssdp">discovery service</param>
 /// <param name="syndicationClient">syndication client</param>
 /// <param name="premiumLinkGenerators">premium link generators</param>
 public AVTransportControlPoint(ISsdp ssdp, ISyndicationClient syndicationClient = null, params IPremiumLinkGenerator[] premiumLinkGenerators)
 {
     Ssdp = ssdp;
     SyndicationClient = syndicationClient;
     PremiumLinkGenerators = premiumLinkGenerators;
     var xmlSerializer = new XmlSerializer(typeof(MimeTypes));
     using (var stream = GetType().GetTypeInfo().Assembly.GetManifestResourceStream("UPnP.MimeTypes.xml"))
     {
         MimeTypes = ((MimeTypes)xmlSerializer.Deserialize(stream)).Collection;
     }
 }
コード例 #2
0
ファイル: NewsFeedsController.cs プロジェクト: jbe2277/waf
        public NewsFeedsController(IResourceService resourceService, IAppService appService, ILauncherService launcherService, IMessageService messageService,
            ISyndicationService syndicationService, SelectionService selectionService, Lazy<FeedListViewModel> feedListViewModel)
        {
            this.resourceService = resourceService;
            this.appService = appService;
            this.launcherService = launcherService;
            this.messageService = messageService;
            this.selectionService = selectionService;
            this.feedListViewModel = feedListViewModel;
            this.client = syndicationService.CreateClient();
            this.addNewFeedCommand = new AsyncDelegateCommand(AddNewFeed);
            this.removeFeedCommand = new AsyncDelegateCommand(RemoveFeedAsync, CanRemoveFeed);
            this.refreshFeedCommand = new AsyncDelegateCommand(RefreshFeed, CanRefreshFeed);
            this.readUnreadCommand = new DelegateCommand(MarkAsReadUnread, CanMarkAsReadUnread);
            this.launchWebBrowserCommand = new AsyncDelegateCommand(LaunchWebBrowser, CanLaunchWebBrowser);

            this.selectionService.PropertyChanged += SelectionServicePropertyChanged;
        }
コード例 #3
0
        public NewsFeedsController(IResourceService resourceService, IAppService appService, ILauncherService launcherService, IMessageService messageService,
                                   ISyndicationService syndicationService, SelectionService selectionService, Lazy <FeedListViewModel> feedListViewModel)
        {
            this.resourceService         = resourceService;
            this.appService              = appService;
            this.launcherService         = launcherService;
            this.messageService          = messageService;
            this.selectionService        = selectionService;
            this.feedListViewModel       = feedListViewModel;
            this.client                  = syndicationService.CreateClient();
            this.addNewFeedCommand       = new AsyncDelegateCommand(AddNewFeed);
            this.removeFeedCommand       = new AsyncDelegateCommand(RemoveFeedAsync, CanRemoveFeed);
            this.refreshFeedCommand      = new AsyncDelegateCommand(RefreshFeed, CanRefreshFeed);
            this.readUnreadCommand       = new DelegateCommand(MarkAsReadUnread, CanMarkAsReadUnread);
            this.launchWebBrowserCommand = new AsyncDelegateCommand(LaunchWebBrowser, CanLaunchWebBrowser);

            this.selectionService.PropertyChanged += SelectionServicePropertyChanged;
        }
コード例 #4
0
 public ISyndicationClient CreateClient()
 {
     LastCreatedClient = CreateClientStub?.Invoke() ?? new MockSyndicationClient();
     return(LastCreatedClient);
 }
コード例 #5
0
ファイル: MockSyndicationService.cs プロジェクト: jbe2277/waf
 public ISyndicationClient CreateClient()
 {
     LastCreatedClient = CreateClientStub?.Invoke() ?? new MockSyndicationClient();
     return LastCreatedClient;
 }