コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NavigationService"/> class.
 /// </summary>
 /// <param name="container">
 /// The container.
 /// </param>
 /// <param name="logManager">
 /// The log manager.
 /// </param>
 public NavigationService(
     IDependencyResolverContainer container,
     ILogManager logManager)
 {
     this.container = container;
     this.logger    = logManager.CreateLogger("NavigationService");
 }
コード例 #2
0
 public AlbumPageViewPresenter(
     IDependencyResolverContainer container,
     IAlbumsRepository albumsRepository)
     : base(container)
 {
     this.albumsRepository = albumsRepository;
 }
コード例 #3
0
 public ApplicationSettingViewsService(
     ILogManager logManager,
     IDependencyResolverContainer container)
 {
     this.logger    = logManager.CreateLogger("ApplicationSettingViewsService");
     this.container = container;
 }
コード例 #4
0
        public GoogleMusicWebService(
            IDependencyResolverContainer container,
            ILogManager logManager,
            IGoogleMusicSessionService sessionService)
        {
            var httpClientHandler = new HttpClientHandler
            {
                UseCookies        = false,
                AllowAutoRedirect = false
            };

            this.httpClient = new HttpClient(httpClientHandler)
            {
                BaseAddress           = new Uri(OriginUrl),
                Timeout               = TimeSpan.FromSeconds(90),
                DefaultRequestHeaders =
                {
                    { HttpRequestHeader.UserAgent.ToString(), "Music Manager (1, 0, 54, 4672 - Windows)" }
                }
            };

            this.container      = container;
            this.sessionService = sessionService;

            this.logger = logManager.CreateLogger("GoogleMusicWebService");
        }
コード例 #5
0
 public PlaylistsService(
     IDependencyResolverContainer container,
     IRadioWebService radioWebService)
 {
     this.container       = container;
     this.radioWebService = radioWebService;
 }
コード例 #6
0
ファイル: DebugLogWriter.cs プロジェクト: Narinyir/Framework
 /// <summary>
 /// Initializes a new instance of the <see cref="DebugLogWriter"/> class.
 /// </summary>
 /// <param name="container">
 /// The container.
 /// </param>
 public DebugLogWriter(IDependencyResolverContainer container)
 {
     this.container = container;
     if (this.container.IsRegistered<IDebugConsole>())
     {
         this.debugConsole = this.container.Resolve<IDebugConsole>();
     }
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DebugLogWriter"/> class.
 /// </summary>
 /// <param name="container">
 /// The container.
 /// </param>
 public DebugLogWriter(IDependencyResolverContainer container)
 {
     this.container = container;
     if (this.container.IsRegistered <IDebugConsole>())
     {
         this.debugConsole = this.container.Resolve <IDebugConsole>();
     }
 }
コード例 #8
0
 internal void Initialize(
     IDependencyResolverContainer containerObject,
     ILogManager logManager,
     MainFramePresenter presenterObject)
 {
     this.container   = containerObject;
     this.presenter   = presenterObject;
     this.logger      = logManager.CreateLogger("MainFrame");
     this.DataContext = this.presenter;
 }
コード例 #9
0
 internal void InjectMethod(
     IDependencyResolverContainer container,
     IEventAggregator eventAggregator,
     ILogManager logManager,
     IDispatcher dispatcher)
 {
     this.Logger          = logManager.CreateLogger(this.GetType().Name);
     this.Dispatcher      = dispatcher;
     this.Container       = container;
     this.EventAggregator = eventAggregator;
 }
コード例 #10
0
 public PlaylistPageViewPresenter(
     IDependencyResolverContainer container,
     IApplicationResources resources,
     IUserPlaylistsService userPlaylistsService,
     IPlaylistsService playlistsService)
     : base(container)
 {
     this.resources                 = resources;
     this.userPlaylistsService      = userPlaylistsService;
     this.playlistsService          = playlistsService;
     this.RemoveFromPlaylistCommand = new DelegateCommand(this.RemoveFromPlaylist);
 }
コード例 #11
0
        public CurrentSongPublisherService(
            ILogManager logManager,
            ISettingsService settingsService,
            IDependencyResolverContainer container,
            IAlbumArtCacheService albumArtCacheService)
        {
            this.settingsService      = settingsService;
            this.container            = container;
            this.albumArtCacheService = albumArtCacheService;
            this.logger = logManager.CreateLogger("CurrentSongPublisherService");

            this.delayPublishersHoldUp = this.settingsService.GetValue(DelayPublishersSettingsKey, defaultValue: 15000);
        }
コード例 #12
0
 public PlaylistsService(
     IDependencyResolverContainer container,
     IRadioStationsService radioStationsService,
     IUserPlaylistsService userPlaylistsService,
     IApplicationResources applicationResources,
     ISettingsService settingsService)
 {
     this.container            = container;
     this.radioStationsService = radioStationsService;
     this.userPlaylistsService = userPlaylistsService;
     this.applicationResources = applicationResources;
     this.settingsService      = settingsService;
 }
コード例 #13
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DependencyResolverContainer"/> class.
        /// The child container with specific <paramref name="containerContext"/>.
        /// </summary>
        /// <param name="parentContainer">
        /// The parent container.
        /// </param>
        /// <param name="containerContext">
        /// The context.
        /// </param>
        internal DependencyResolverContainer(IDependencyResolverContainer parentContainer, string containerContext)
            : this()
        {
            if (parentContainer == null)
            {
                throw new ArgumentNullException("parentContainer");
            }

            if (containerContext == null)
            {
                throw new ArgumentNullException("containerContext");
            }

            this.parentContainer  = parentContainer;
            this.containerContext = containerContext;
        }
コード例 #14
0
        public PlaylistPageViewPresenterBase(IDependencyResolverContainer container)
        {
            this.playQueueService    = container.Resolve <IPlayQueueService>();
            this.metadataEditService = container.Resolve <ISongsService>();
            this.playlistsService    = container.Resolve <IPlaylistsService>();
            this.resources           = container.Resolve <IApplicationResources>();
            this.cachingService      = container.Resolve <ISongsCachingService>();
            this.stateService        = container.Resolve <IApplicationStateService>();
            this.radioWebService     = container.Resolve <IRadioWebService>();
            this.navigationService   = container.Resolve <INavigationService>();

            this.QueueCommand         = new DelegateCommand(this.Queue, () => this.BindingModel != null && this.BindingModel.SongsBindingModel.SelectedItems.Count > 0);
            this.AddToPlaylistCommand = new DelegateCommand(this.AddToPlaylist, () => this.BindingModel != null && this.BindingModel.SongsBindingModel.SelectedItems.Count > 0);
            this.DownloadCommand      = new DelegateCommand(this.Download, () => this.BindingModel != null && this.BindingModel.SongsBindingModel.SelectedItems.Count > 0);
            this.UnPinCommand         = new DelegateCommand(this.UnPin, () => this.BindingModel != null && this.BindingModel.SongsBindingModel.SelectedItems.Count > 0);
            this.RateSongCommand      = new DelegateCommand(this.RateSong);
            this.StartRadioCommand    = new DelegateCommand(this.StartRadio, () => this.BindingModel != null && this.BindingModel.SongsBindingModel.SelectedItems.Count == 1);
        }
コード例 #15
0
ファイル: ViewBase.cs プロジェクト: dbeattie71/gMusicW
        protected void Initialize(
            IDependencyResolverContainer container,
            ILogManager logManager,
            BindingModelBase presenterBase)
        {
            this.Container   = container;
            this.Presenter   = presenterBase;
            this.Logger      = logManager.CreateLogger(this.GetType().Name);
            this.DataContext = presenterBase;

            var viewPresenterBase = presenterBase as IViewPresenterBase;

            if (viewPresenterBase != null)
            {
                viewPresenterBase.Initialize(this);
            }

            this.OnInitialized();
        }