本文整理汇总了C#中IConnectionManager类的典型用法代码示例。如果您正苦于以下问题:C# IConnectionManager类的具体用法?C# IConnectionManager怎么用?C# IConnectionManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IConnectionManager类属于命名空间,在下文中一共展示了IConnectionManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel(IConnectionManager connectionManager, INavigationService navigationService, IPlaybackManager playbackManager)
: base(navigationService, connectionManager)
{
_playbackManager = playbackManager;
Folders = new ObservableCollection<BaseItemDto>();
RecentItems = new ObservableCollection<BaseItemDto>();
FavouriteItems = new ObservableCollection<BaseItemDto>();
InProgressItems = new ObservableCollection<BaseItemDto>();
UserViews = new ObservableCollection<BaseItemDto>();
if (IsInDesignMode)
{
Folders.Add(new BaseItemDto { Id = "78dbff5aa1c2101b98ebaf42b72a988d", Name = "Movies", UserData = new UserItemDataDto { UnplayedItemCount = 6 } });
RecentItems.Add(new BaseItemDto { Id = "2fc6f321b5f8bbe842fcd0eed089561d", Name = "A Night To Remember" });
}
else
{
WireCommands();
DummyFolder = new BaseItemDto
{
Type = "folder",
Name = AppResources.LabelRecent.ToLower()
};
}
}
示例2: ActorViewModel
/// <summary>
/// Initializes a new instance of the ActorViewModel class.
/// </summary>
public ActorViewModel(IConnectionManager connectionManager, INavigationService navigationService)
: base (navigationService, connectionManager)
{
if (IsInDesignMode)
{
SelectedPerson = new BaseItemPerson {Name = "Jeff Goldblum"};
var list = new List<BaseItemDto>
{
new BaseItemDto
{
Id = "6536a66e10417d69105bae71d41a6e6f",
Name = "Jurassic Park",
SortName = "Jurassic Park",
Overview = "Lots of dinosaurs eating people!",
People = new[]
{
new BaseItemPerson {Name = "Steven Spielberg", Type = "Director"},
new BaseItemPerson {Name = "Sam Neill", Type = "Actor"},
new BaseItemPerson {Name = "Richard Attenborough", Type = "Actor"},
new BaseItemPerson {Name = "Laura Dern", Type = "Actor"}
}
}
};
Films = Utils.GroupItemsByName(list).Result;
}
}
示例3: InternalDirectShowPlayer
public InternalDirectShowPlayer(ILogManager logManager, IHiddenWindow hiddenWindow, IPresentationManager presentation, ISessionManager sessionManager, IPlaybackManager playbackManager, ITheaterConfigurationManager config, IIsoManager isoManager, IUserInputManager inputManager, IZipClient zipClient, IHttpClient httpClient, IConnectionManager connectionManager)
{
_logger = logManager.GetLogger("InternalDirectShowPlayer");
_hiddenWindow = hiddenWindow;
_presentation = presentation;
_sessionManager = sessionManager;
_httpClient = httpClient;
_connectionManager = connectionManager;
_playbackManager = playbackManager;
_config = config;
_isoManager = isoManager;
_inputManager = inputManager;
_zipClient = zipClient;
_config.Configuration.InternalPlayerConfiguration.VideoConfig.SetDefaults();
_config.Configuration.InternalPlayerConfiguration.AudioConfig.SetDefaults();
_config.Configuration.InternalPlayerConfiguration.SubtitleConfig.SetDefaults();
_config.Configuration.InternalPlayerConfiguration.COMConfig.SetDefaults();
//use a static object so we keep the libraries in the same place. Doesn't usually matter, but the EVR Presenter does some COM hooking that has problems if we change the lib address.
//if (_privateCom == null)
// _privateCom = new URCOMLoader(_config, _zipClient);
URCOMLoader.Instance.Initialize(_config, _zipClient, logManager);
EnsureMediaFilters();
}
示例4: playerHub
/// <summary>
/// Constructs the player hub
/// </summary>
/// <param name="manager">The player hub connection manager</param>
public playerHub(IConnectionManager manager)
{
// Make sure the player hub context is avaiable when needed.
serviceHelpers.playerHubContext = manager.GetHubContext<playerHub>();
// Create or get the playerSignals instance
_signals = playerSignals.Instance;
}
示例5: MainWindow
/// <summary>
/// Initializes a new instance of the <see cref="MainWindow" /> class.
/// </summary>
public MainWindow(ILogger logger, IPlaybackManager playbackManager, IImageManager imageManager, IApplicationHost appHost, IPresentationManager appWindow, IUserInputManager userInput, ITheaterConfigurationManager config, INavigationService nav, IScreensaverManager screensaverManager, IConnectionManager connectionManager)
: base()
{
_logger = logger;
_appHost = appHost;
_appWindow = appWindow;
_config = config;
_playbackManager = playbackManager;
UserInputManager = userInput;
NavigationManager = nav;
Loaded += MainWindow_Loaded;
InitializeComponent();
RotatingBackdrops = new RotatingBackdropsViewModel(_config, imageManager, playbackManager, logger, screensaverManager, connectionManager);
_config.ConfigurationUpdated += _config_ConfigurationUpdated;
_playbackManager.PlaybackStarted += _playbackManager_PlaybackStarted;
_playbackManager.PlaybackCompleted += _playbackManager_PlaybackCompleted;
//Timeline.DesiredFrameRateProperty.OverrideMetadata(
// typeof(Timeline),
// new FrameworkPropertyMetadata { DefaultValue = 30 }
//);
}
示例6: VMMainPage
public VMMainPage(ILocalizationService localizationService, IPhoneCallService phoneCallService, MapItemsModel mapsItemModel, IVibrationService vibrationService, IAvailabilityService availabilityService, IConnectionManager connectionManager)
{
_localizationService = localizationService;
_phoneCallService = phoneCallService;
_mapsItemModel = mapsItemModel;
_vibrationService = vibrationService;
_availabilityService = availabilityService;
_connectionManager = connectionManager;
_dispatcherTimerChronometer = new DispatcherTimer { Interval = new TimeSpan(0, 0, 0, 1) };
_dispatcherTimerChronometer.Tick += _dispatcherTimer_Tick;
var dispatcherTimerAvailability = new DispatcherTimer()
{
Interval = new TimeSpan(0, 0, 0, 30)
};
dispatcherTimerAvailability.Tick += _dispatcherTimerAvailability_Tick;
dispatcherTimerAvailability.Start();
_mapsItemModel.GetNearMapItemsCompleted += GetNearMapItemsCompleted;
_localizationService.Geolocator.PositionChanged += _geolocator_PositionChanged;
SetCurrentPositionAsync();
ZoomLevel = 15;
_lazyPhoneCallCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(PhoneCallCommandExecute));
_lazyGetNearStationsCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(GetNearStationsCommandExecute));
_lazyStartChronometerCommand = new Lazy<DelegateCommand>(() => new DelegateCommand(StartChronometerCommandExecute));
}
示例7: SimpleSyncComponent
public SimpleSyncComponent(IActor actor, IConnectionManager connectionManager)
{
_actor = actor;
_connectionManager = connectionManager;
_connectionManager.ConnectionInitialized += new EventHandler<EventArgs<IConnection>>(_connectionManager_ConnectionInitialized);
_connectionManager.ConnectionTerminated += new EventHandler<EventArgs<IConnection>>(_connectionManager_ConnectionTerminated);
}
示例8: ChirpPostController
public ChirpPostController(IChirpRepository a_repository, ILogger<ChirpPostController> a_logger, IConnectionManager a_connectionManager, UserManager<ChirpUser> a_userManager)
{
m_repository = a_repository;
m_logger = a_logger;
m_connectionManager = a_connectionManager;
m_userManager = a_userManager;
}
示例9: ClientsViewModel
public ClientsViewModel(IEventAggregator aggregator, IRegionManager regionManager,
IConnectionManager connectionManager, IInteractionService interactionService, ILoggerFacade loggerFacade) :
base(aggregator, regionManager, connectionManager, interactionService, loggerFacade)
{
//aggregator.GetEvent<BootstrappingCompleteUiEvent>().Subscribe(BootstrappCompletedHandler);
AdditionalRoomsValues = new ObservableCollection<string> {"Yes", "No"};
}
示例10: LiveTvChannelsViewModel
/// <summary>
/// Initializes a new instance of the ChannelsViewModel class.
/// </summary>
public LiveTvChannelsViewModel(INavigationService navigationService, IConnectionManager connectionManager)
: base(navigationService, connectionManager)
{
if (IsInDesignMode)
{
Channels = new List<ChannelInfoDto>
{
new ChannelInfoDto
{
Name = "BBC One",
Number = "1",
CurrentProgram = new BaseItemDto
{
Name = "Sherlock"
}
},
new ChannelInfoDto
{
Name = "BBC Two",
Number = "2",
CurrentProgram = new BaseItemDto
{
Name = "Top Gear"
}
}
};
GroupChannels().ConfigureAwait(false);
}
}
示例11: PageContentViewModel
public PageContentViewModel(INavigationService navigationService, ISessionManager sessionManager, IPlaybackManager playbackManager, ILogger logger, ITheaterApplicationHost appHost, IConnectionManager connectionManager, IPresentationManager presentationManager)
{
NavigationService = navigationService;
SessionManager = sessionManager;
PlaybackManager = playbackManager;
Logger = logger;
AppHost = appHost;
ConnectionManager = connectionManager;
PresentationManager = presentationManager;
MasterCommands = new MasterCommandsViewModel(navigationService, sessionManager, presentationManager, connectionManager, logger, appHost);
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;
}
示例12: TvViewModel
/// <summary>
/// Initializes a new instance of the TvViewModel class.
/// </summary>
public TvViewModel(INavigationService navigationService, IConnectionManager connectionManager, IMessageBoxService messageBox)
: base(navigationService, connectionManager)
{
_messageBox = messageBox;
RecentItems = new ObservableCollection<BaseItemDto>();
Episodes = new List<BaseItemDto>();
CanUpdateFavourites = true;
if (IsInDesignMode)
{
SelectedTvSeries = new BaseItemDto
{
Name = "Scrubs"
};
SelectedSeason = new BaseItemDto
{
Name = "Season 1"
};
Episodes = new[]
{
new BaseItemDto
{
Id = "e252ea3059d140a0274282bc8cd194cc",
Name = "1x01 - Pilot",
Overview =
"A Kindergarten teacher starts speaking gibberish and passed out in front of her class. What looks like a possible brain tumor does not respond to treatment and provides many more questions than answers for House and his team as they engage in a risky trial-and-error approach to her case. When the young teacher refuses any additional variations of treatment and her life starts slipping away, House must act against his code of conduct and make a personal visit to his patient to convince her to trust him one last time."
}
}.ToList();
SelectedEpisode = Episodes[0];
}
else
{
WireCommands();
}
}
示例13: SettingsViewModel
/// <summary>
/// Initializes a new instance of the PushViewModel class.
/// </summary>
public SettingsViewModel(
IConnectionManager connectionManager,
INavigationService navigationService,
IApplicationSettingsService applicationSettings,
IMessageBoxService messageBox,
IServerInfoService serverInfo)
: base(navigationService, connectionManager)
{
_applicationSettings = applicationSettings.Legacy;
_messageBox = messageBox;
_serverInfo = serverInfo;
if (IsInDesignMode)
{
FoundServers = new ObservableCollection<ServerInfo>
{
new ServerInfo{Id = Guid.NewGuid().ToString(), Name = "Home", LocalAddress = "http://192.168.0.2:8096"}
};
}
else
{
LoadingFromSettings = true;
SendTileUpdates = SendToastUpdates = true;
RegisteredText = AppResources.DeviceNotRegistered;
LoadingFromSettings = false;
SetStreamingQuality();
_ignoreRunUnderLockChanged = true;
RunUnderLock = App.SpecificSettings.PlayVideosUnderLock;
_ignoreRunUnderLockChanged = false;
}
}
示例14: DlnaServerService
public DlnaServerService(IDlnaManager dlnaManager, IContentDirectory contentDirectory, IConnectionManager connectionManager, IConfigurationManager config)
{
_dlnaManager = dlnaManager;
_contentDirectory = contentDirectory;
_connectionManager = connectionManager;
_config = config;
}
示例15: GuideViewModel
/// <summary>
/// Initializes a new instance of the GuideViewModel class.
/// </summary>
public GuideViewModel(INavigationService navigationService, IConnectionManager connectionManager)
: base(navigationService, connectionManager)
{
if (IsInDesignMode)
{
SelectedChannel = new ChannelInfoDto
{
Name = "BBC One",
Number = "1"
};
Programmes = new ObservableCollection<BaseItemDto>
{
new BaseItemDto
{
StartDate = new DateTime(2014, 1, 16, 6, 0, 0),
Name = "Breakfast News",
EpisodeTitle = "16/01/2013",
Overview = "The latest news, sport, business and weather from the BBC's Breakfast Team"
},
new BaseItemDto
{
StartDate = new DateTime(2014, 1, 16, 9, 15, 0),
Name = "Wanted Down Under",
EpisodeTitle = "Series 8, Davidson Family",
Overview = "A mum and son want to move toAustralia, but can they presaude the rest of the family?"
}
};
}
}