Esempio n. 1
0
 public static EpisodeStateFactory GetInstance(IServiceContext serviceContext)
 {
     if (s_Instance == null)
     {
         s_Instance = new EpisodeStateFactory(serviceContext);
     }
     return(s_Instance);
 }
Esempio n. 2
0
 public Episode(IServiceContext serviceContext, string podcastFileName, Uri uri)
     : base(serviceContext)
 {
     Uri               = uri;
     PodcastFileName   = podcastFileName;
     m_DownloadService = serviceContext.GetService <IDownloadService>();
     m_StateMachine    = new SimpleStateMachine <Episode, EpisodeEvent>(serviceContext, this, 0);
     m_StateMachine.InitState(EpisodeStateFactory.GetInstance(serviceContext).GetState <EpisodeStateUnknown>(), true);
     m_StateMachine.StartPumpEvents();
 }