本文整理汇总了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();
}
示例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;
}
示例3: CriticReviewListViewModel
public CriticReviewListViewModel(IPresentationManager presentationManager, IApiClient apiClient, IImageManager imageManager, string itemId)
{
ImageManager = imageManager;
_itemId = itemId;
ApiClient = apiClient;
PresentationManager = presentationManager;
}
示例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"));
}
示例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);
}
});
}
示例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;
}
});
}
示例7: ThemeSongEntryPoint
public ThemeSongEntryPoint(INavigationService nav, IPlaybackManager playback, IApiClient apiClient, ISessionManager session)
{
_nav = nav;
_playback = playback;
_apiClient = apiClient;
_session = session;
}
示例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()));
}
示例9: PlaybackProgressReporter
public PlaybackProgressReporter(IApiClient apiClient, IMediaPlayer mediaPlayer, ILogger logger, IPlaybackManager playback)
{
_apiClient = apiClient;
_mediaPlayer = mediaPlayer;
_logger = logger;
_playback = playback;
}
示例10: CreateController
public CreateController(IApiClient apiClient, IUserImagesService userImagesService, ICurrentUserSession currentUserSession)
{
_apiClient = apiClient;
_userImagesService = userImagesService;
_currentUserSession = currentUserSession;
_imageCleanup = _userImagesService.ImageCleanup;
}
示例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 }
//);
}
示例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"));
}
示例13: BeginNextRoundSetup
public void BeginNextRoundSetup(IApiClient client, SetupState setupState)
{
SetupState = setupState;
SetupState.IsAttackerReady = false;
SetupState.IsDefenderReady = false;
client.SetupStarted();
}
示例14: PoGoNavigation
public PoGoNavigation(IApiPlayer player, IApiClient client, ILogicSettings logicSettings, ISettings settings)
{
_player = player;
_client = client;
_logicSettings = logicSettings;
_settings = settings;
}
示例15: PoGoLogin
public PoGoLogin(IApiLogin apiLogin, IApiClient client)
{
_apiLogin = apiLogin;
_client = client;
_apiLogin.GoogleDeviceCodeEvent += OnGoogleDeviceCode;
}