当前位置: 首页>>代码示例>>C#>>正文


C# IApiClient类代码示例

本文整理汇总了C#中IApiClient的典型用法代码示例。如果您正苦于以下问题:C# IApiClient类的具体用法?C# IApiClient怎么用?C# IApiClient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IApiClient类属于命名空间,在下文中一共展示了IApiClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ScreensaverManager

        public ScreensaverManager(IUserInputManager userInput, IPresentationManager presentationManager, IPlaybackManager playback, ISessionManager session, IApiClient apiClient, ITheaterConfigurationManager theaterConfigurationManager, ILogManager logManager, IServerEvents serverEvents)
        {
            _userInput = userInput;
            _presentationManager = presentationManager;
            _playback = playback;
            _session = session;
            _apiClient = apiClient;
            _theaterConfigurationManager = theaterConfigurationManager;
            _logger = logManager.GetLogger(GetType().Name);
            _serverEvents = serverEvents;

            _session.UserLoggedIn += session_UserChanged;
            _session.UserLoggedOut += session_UserChanged;

            _playback.PlaybackCompleted += _playback_PlaybackCompleted;
            _playback.PlaybackStarted += _playback_PlaybackStarted;

            _serverEvents.BrowseCommand += _serverEvents_BrowseCommand;
            _serverEvents.MessageCommand += _serverEvents_MessageCommand;
            _serverEvents.PlayCommand += _serverEvents_PlayCommand;
            _serverEvents.PlaystateCommand += _serverEvents_PlaystateCommand;
            _serverEvents.GeneralCommand += _serverEvents_GeneralCommand; 

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;

            StartTimer();
        }
开发者ID:Rainking720,项目名称:MediaBrowser.Theater,代码行数:27,代码来源:ScreensaverManager.cs

示例2: PageContentViewModel

        public PageContentViewModel(INavigationService navigationService, ISessionManager sessionManager, IPlaybackManager playbackManager, ILogger logger, ITheaterApplicationHost appHost, IApiClient apiClient, IPresentationManager presentationManager, IServerEvents serverEvents)
        {
            NavigationService = navigationService;
            SessionManager = sessionManager;
            PlaybackManager = playbackManager;
            Logger = logger;
            AppHost = appHost;
            ApiClient = apiClient;
            PresentationManager = presentationManager;
            ServerEvents = serverEvents;

            MasterCommands = new MasterCommandsViewModel(navigationService, sessionManager, presentationManager, apiClient, logger, appHost, serverEvents);

            NavigationService.Navigated += NavigationServiceNavigated;
            SessionManager.UserLoggedIn += SessionManagerUserLoggedIn;
            SessionManager.UserLoggedOut += SessionManagerUserLoggedOut;
            PlaybackManager.PlaybackStarted += PlaybackManager_PlaybackStarted;
            PlaybackManager.PlaybackCompleted += PlaybackManager_PlaybackCompleted;            

            _dispatcher = Dispatcher.CurrentDispatcher;

            _clockTimer = new Timer(ClockTimerCallback, null, 0, 10000);

            IsLoggedIn = SessionManager.CurrentUser != null;
            var page = NavigationService.CurrentPage;
            IsOnHomePage = page is IHomePage;
            IsOnFullscreenVideo = page is IFullscreenVideoPage;
        }
开发者ID:Rainking720,项目名称:MediaBrowser.Theater,代码行数:28,代码来源:PageContentViewModel.cs

示例3: CriticReviewListViewModel

 public CriticReviewListViewModel(IPresentationManager presentationManager, IApiClient apiClient, IImageManager imageManager, string itemId)
 {
     ImageManager = imageManager;
     _itemId = itemId;
     ApiClient = apiClient;
     PresentationManager = presentationManager;
 }
开发者ID:Rainking720,项目名称:MediaBrowser.Theater,代码行数:7,代码来源:CriticReviewListViewModel.cs

示例4: FavoritesViewModel

        public FavoritesViewModel(IPresentationManager presentation, IImageManager imageManager, IApiClient apiClient, ISessionManager session, INavigationService nav, IPlaybackManager playback, ILogger logger, double tileWidth, double tileHeight, IServerEvents serverEvents)
            : base(presentation, apiClient)
        {
            _sessionManager = session;
            _playbackManager = playback;
            _imageManager = imageManager;
            _navService = nav;
            _logger = logger;
            _serverEvents = serverEvents;

            TileWidth = tileWidth;
            TileHeight = tileHeight;

            var spotlightTileWidth = TileWidth * 2 + TilePadding;
            var spotlightTileHeight = spotlightTileWidth * 9 / 16;

            SpotlightViewModel = new ImageViewerViewModel(_imageManager, new List<ImageViewerImage>())
            {
                Height = spotlightTileHeight,
                Width = spotlightTileWidth,
                CustomCommandAction = i => _navService.NavigateToItem(i.Item, ViewType.Tv)
            };

            LoadViewModels();

            NavigateToFavoriteMoviesCommand = new RelayCommand(o => NavigateToFavorites("Movie"));
        }
开发者ID:jfrankelp,项目名称:MediaBrowser.Theater,代码行数:27,代码来源:FavoritesViewModel.cs

示例5: ItemSpotlightViewModel

        public ItemSpotlightViewModel(IImageManager imageManager, IApiClient apiClient)
        {
            _apiClient = apiClient;
            _urlsToItems = new Dictionary<string, BaseItemDto>();
            Images = new ImageSlideshowViewModel(imageManager, Enumerable.Empty<string>()) {
                ImageStretch = Stretch.UniformToFill
            };

            Images.PropertyChanged += (s, e) => {
                if (e.PropertyName == "CurrentImageUrl") {
                    BaseItemDto item = CurrentItem;
                    CurrentCaption = item != null ? item.Name : null;
                    OnPropertyChanged("CurrentItem");
                }
            };

            ItemSelectedCommand = new RelayCommand(o => {
                BaseItemDto item = CurrentItem;
                Action<BaseItemDto> action = ItemSelectedAction;

                if (action != null && item != null) {
                    action(item);
                }
            });
        }
开发者ID:TomGillen,项目名称:MBT,代码行数:25,代码来源:ItemSpotlightViewModel.cs

示例6: ServerDetailsViewModel

        public ServerDetailsViewModel(ILogManager logManager, IApiClient apiClient, ITheaterConfigurationManager config)
        {
            _apiClient = apiClient;
            _config = config;

            IsSearchingForServer = true;
            HostName = _config.Configuration.ServerHostName ?? "127.0.0.1";
            Port = _config.Configuration.ServerApiPort;

            Task.Run(async () => {
                try {
                    var address = await new ServerLocator().FindServer(500, CancellationToken.None).ConfigureAwait(false);
                    var parts = address.ToString().Split(':');

                    HostName = parts[0];
                    Port = address.Port;
                }
                catch (Exception e) {
                    var log = logManager.GetLogger("SetupWizard.SeverDetails");
                    log.ErrorException("Failed to discover server", e);
                }
                finally {
                    IsSearchingForServer = false;
                }
            });
        }
开发者ID:TomGillen,项目名称:MBT,代码行数:26,代码来源:ServerDetailsViewModel.cs

示例7: ThemeSongEntryPoint

 public ThemeSongEntryPoint(INavigationService nav, IPlaybackManager playback, IApiClient apiClient, ISessionManager session)
 {
     _nav = nav;
     _playback = playback;
     _apiClient = apiClient;
     _session = session;
 }
开发者ID:Rainking720,项目名称:MediaBrowser.Theater,代码行数:7,代码来源:ThemeSongEntryPoint.cs

示例8: OpenSideMenuMenuCommand

 public OpenSideMenuMenuCommand(INavigator navigator, ISessionManager sessionManager,IImageManager imageManager, IApiClient apiClient)
 {
     _sessionManager = sessionManager;
     _imageManager = imageManager;
     _apiClient = apiClient;
     ExecuteCommand = new RelayCommand(arg => navigator.Navigate(Go.To.SideMenu()));
 }
开发者ID:TomGillen,项目名称:MBT,代码行数:7,代码来源:OpenSideMenuCommand.cs

示例9: PlaybackProgressReporter

 public PlaybackProgressReporter(IApiClient apiClient, IMediaPlayer mediaPlayer, ILogger logger, IPlaybackManager playback)
 {
     _apiClient = apiClient;
     _mediaPlayer = mediaPlayer;
     _logger = logger;
     _playback = playback;
 }
开发者ID:pjrollo2000,项目名称:MediaBrowser.Theater,代码行数:7,代码来源:PlaybackProgressReporter.cs

示例10: CreateController

 public CreateController(IApiClient apiClient, IUserImagesService userImagesService, ICurrentUserSession currentUserSession)
 {
     _apiClient = apiClient;
     _userImagesService = userImagesService;
     _currentUserSession = currentUserSession;
     _imageCleanup = _userImagesService.ImageCleanup;
 }
开发者ID:JustGiving,项目名称:CharitySearch,代码行数:7,代码来源:CreateController.cs

示例11: MainWindow

        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow" /> class.
        /// </summary>
        public MainWindow(ILogger logger, IPlaybackManager playbackManager, IApiClient apiClient, IImageManager imageManager, IApplicationHost appHost, IPresentationManager appWindow, IUserInputManager userInput, ITheaterConfigurationManager config, INavigationService nav, IScreensaverManager screensaverManager)
            : base()
        {
            _logger = logger;
            _appHost = appHost;
            _appWindow = appWindow;
            _config = config;
            _playbackManager = playbackManager;
            UserInputManager = userInput;
            NavigationManager = nav;

            Loaded += MainWindow_Loaded;

            InitializeComponent();

            RotatingBackdrops = new RotatingBackdropsViewModel(apiClient, _config, imageManager, playbackManager, logger, screensaverManager);

            _config.ConfigurationUpdated += _config_ConfigurationUpdated;
            _playbackManager.PlaybackStarted += _playbackManager_PlaybackStarted;
            _playbackManager.PlaybackCompleted += _playbackManager_PlaybackCompleted;

            //Timeline.DesiredFrameRateProperty.OverrideMetadata(
            //    typeof(Timeline),
            //    new FrameworkPropertyMetadata { DefaultValue = 30 }
            //);
        }
开发者ID:Rainking720,项目名称:MediaBrowser.Theater,代码行数:29,代码来源:MainWindow.xaml.cs

示例12: ImageManager

        /// <summary>
        /// Initializes a new instance of the <see cref="ImageManager" /> class.
        /// </summary>
        /// <param name="apiClient">The API client.</param>
        /// <param name="paths">The paths.</param>
        /// <param name="config"></param>
        public ImageManager(IApiClient apiClient, IApplicationPaths paths, ITheaterConfigurationManager config)
        {
            _apiClient = apiClient;
            _config = config;

            _remoteImageCache = new FileSystemRepository(Path.Combine(paths.CachePath, "remote-images"));
        }
开发者ID:amoisis,项目名称:MediaBrowser.Theater,代码行数:13,代码来源:ImageManager.cs

示例13: BeginNextRoundSetup

 public void BeginNextRoundSetup(IApiClient client, SetupState setupState)
 {
     SetupState = setupState;
     SetupState.IsAttackerReady = false;
     SetupState.IsDefenderReady = false;
     client.SetupStarted();
 }
开发者ID:pkasiulisadf,项目名称:summercamp_2015_towerdefense,代码行数:7,代码来源:SetupController.cs

示例14: PoGoNavigation

 public PoGoNavigation(IApiPlayer player, IApiClient client, ILogicSettings logicSettings, ISettings settings)
 {
     _player = player;
     _client = client;
     _logicSettings = logicSettings;
     _settings = settings;
 }
开发者ID:RoaderKills,项目名称:HaxtonBot,代码行数:7,代码来源:PoGoNavigation.cs

示例15: PoGoLogin

        public PoGoLogin(IApiLogin apiLogin, IApiClient client)
        {
            _apiLogin = apiLogin;
            _client = client;

            _apiLogin.GoogleDeviceCodeEvent += OnGoogleDeviceCode;
        }
开发者ID:ChainsawPolice,项目名称:HaxtonBot,代码行数:7,代码来源:PoGoLogin.cs


注:本文中的IApiClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。