public BuildCommand(
     [NotNull] ILogger logger,
     [NotNull] IMessageLogger messageLogger,
     [NotNull] CancellationTokenSource cancellationTokenSource,
     [NotNull] IFileSystem fileSystem,
     [NotNull] IPathService pathService,
     [NotNull] IBuildOptions options,
     [NotNull] IConfigurationExplorer configurationExplorer,
     [NotNull] IFactory <IGraph <IArtifact, Dependency>, IEnumerable <Template> > buildGraphFactory,
     [NotNull] IFactory <IEnumerable <IGraph <IArtifact, Dependency> >, IGraph <IArtifact, Dependency> > buildGraphsFactory,
     [NotNull] IFactory <string, IGraph <IArtifact, Dependency> > graphNameFactory,
     [NotNull] IBuildPathProvider buildPathProvider,
     [NotNull] IContextFactory contextFactory,
     [NotNull] IStreamService streamService,
     [NotNull] IDockerClient dockerClient)
 {
     _logger                  = logger ?? throw new ArgumentNullException(nameof(logger));
     _messageLogger           = messageLogger ?? throw new ArgumentNullException(nameof(messageLogger));
     _cancellationTokenSource = cancellationTokenSource ?? throw new ArgumentNullException(nameof(cancellationTokenSource));
     _fileSystem              = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
     _pathService             = pathService ?? throw new ArgumentNullException(nameof(pathService));
     _options                 = options ?? throw new ArgumentNullException(nameof(options));
     _configurationExplorer   = configurationExplorer ?? throw new ArgumentNullException(nameof(configurationExplorer));
     _buildGraphFactory       = buildGraphFactory ?? throw new ArgumentNullException(nameof(buildGraphFactory));
     _buildGraphsFactory      = buildGraphsFactory ?? throw new ArgumentNullException(nameof(buildGraphsFactory));
     _graphNameFactory        = graphNameFactory ?? throw new ArgumentNullException(nameof(graphNameFactory));
     _buildPathProvider       = buildPathProvider ?? throw new ArgumentNullException(nameof(buildPathProvider));
     _contextFactory          = contextFactory ?? throw new ArgumentNullException(nameof(contextFactory));
     _streamService           = streamService ?? throw new ArgumentNullException(nameof(streamService));
     _dockerClient            = dockerClient ?? throw new ArgumentNullException(nameof(dockerClient));
 }
 private void button_Click(object sender, RoutedEventArgs e)
 {
     if (textBox.Text.Trim() != "" && comboBox1.Text.Trim() != "")
     {
         textBox1.Text += comboBox.SelectedItem.ToString() + "\n";
         fileList.Add(comboBox.SelectedItem.ToString());
         textBox1.Text += comboBox1.SelectedItem.ToString() + "\n";
         channel        = CreateServiceChannel("http://localhost:9002/StreamService");
         Console.Write("\n File Streaming Without Queue------>Requirement #6\n");
         hrt.Start();
         uploadFile(comboBox.Text.ToString());
         uploadFile(comboBox1.Text.ToString());
         hrt.Stop();
         channel = CreateServiceChannel("http://localhost:9093/StreamService");
         Console.Write("\n File Streaming Without Queue------>Requirement #6\n");
         hrt.Start();
         uploadFile(comboBox.Text.ToString());
         uploadFile(comboBox1.Text.ToString());
         hrt.Stop();
     }
     else
     {
         MessageBox.Show("Please provide test Author name and files to test.");
         return;
     }
 }
        void ClientUploadFile(string filename)
        {
            hrt.Start();
            string fqname = System.IO.Path.Combine(ToSendPath, filename);

            using (var inputStream = new FileStream(fqname, FileMode.Open))
            {
                FileTransferMessage msg = new FileTransferMessage();
                msg.filename       = filename;
                msg.transferStream = inputStream;
                fileProxy          = CreateClientFileServiceChannel("http://localhost:8000/StreamService");
                int i = 3;
                while (i > 0)
                {
                    try
                    {
                        fileProxy.upLoadFile(msg);
                        break;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine("\nfileupload exception: {0}", ex.Message);
                        i--;
                        Thread.Sleep(500);
                    }
                }
            }
            hrt.Stop();
            Console.WriteLine("\n  Uploaded file \"{0}\" in {1} microsec.", filename, hrt.ElapsedMicroseconds);
            listBox2.Items.Insert(0, "uploaded file " + filename + " in " + hrt.ElapsedMicroseconds + " microsec");
        }
예제 #4
0
 public ApplicationManager(
     MyNoSqlTcpClient noSqlTcpClient,
     IMyNoSqlServerDataReader <PriceEntity> pricesReader,
     IMyNoSqlServerDataReader <TickerEntity> tickerReader,
     IMyNoSqlServerDataReader <OrderbookEntity> orderbookReader,
     IMyNoSqlServerDataReader <BalanceEntity> balanceReader,
     IMyNoSqlServerDataReader <OrderEntity> orderReader,
     IMyNoSqlServerDataReader <TradeEntity> tradeReader,
     IStreamService <PriceUpdate> priceStraem,
     IStreamService <TickerUpdate> tickerStream,
     IStreamService <Orderbook> orderbookStream,
     IStreamService <BalanceUpdate> balanceStream,
     IStreamService <OrderUpdate> orderStream,
     IStreamService <TradeUpdate> tradeStream,
     IMapper mapper
     )
 {
     _noSqlTcpClient  = noSqlTcpClient;
     _pricesReader    = pricesReader;
     _tickerReader    = tickerReader;
     _orderbookReader = orderbookReader;
     _balanceReader   = balanceReader;
     _orderReader     = orderReader;
     _tradeReader     = tradeReader;
     _priceStraem     = priceStraem;
     _tickerStream    = tickerStream;
     _orderbookStream = orderbookStream;
     _balanceStream   = balanceStream;
     _orderStream     = orderStream;
     _tradeStream     = tradeStream;
     _mapper          = mapper;
 }
 public void SendFiles()
 {
     try
     {
         fileChannelCreated = 1;
         //string destPath = "..\\..\\..\\Repository\\RepositoryStorage";
         //string srcPath1 = "..\\..\\..\\TestDriver\\TestDriver.dll";
         int        BlockSize = 1024;
         byte[]     block;
         HiResTimer hrt = new HiResTimer();
         block   = new byte[BlockSize];
         channel = CreateServiceChannel("http://localhost:8000/StreamService");
         hrt.Start();
         if (sel == 1)
         {
             UploadFile("TestDriver.dll");
             UploadFile("TestCode.dll");
         }
         else if (sel == 2)
         {
             UploadFile("TestDriver2.dll");
             UploadFile("TestCode2.dll");
         }
     }
     catch (Exception e)
     {
         Console.WriteLine("In Client 2" + e.Message);
     }
     //hrt = new HRTimer.HiResTimer();
 }
예제 #6
0
 public HrService(
     IStudentService studentService, IResumeService resumeService, IUserInfoService userInfoService,
     IStreamService streamService, ISummaryService summaryService,
     ISkillService skillService, IForeignLanguageService languageService, IEducationService educationService,
     ICourseService courseService, ICertificateService certificateService, IExamService examService,
     IWorkExperienceService workExperienceService, IPortfolioService portfolioService, IMilitaryStatusService militaryStatusService,
     IRecommendationService recommendationService, IAdditionalInfoService additionalInfoService
     )
 {
     _userInfoService       = userInfoService;
     _studentService        = studentService;
     _resumeService         = resumeService;
     _streamService         = streamService;
     _summaryService        = summaryService;
     _skillService          = skillService;
     _languageService       = languageService;
     _educationService      = educationService;
     _courseService         = courseService;
     _certificateService    = certificateService;
     _examService           = examService;
     _workExperienceService = workExperienceService;
     _portfolioService      = portfolioService;
     _militaryStatusService = militaryStatusService;
     _additionalInfoService = additionalInfoService;
     _recommendationService = recommendationService;
 }
예제 #7
0
 public void Register()
 {
     lock (base.SyncRoot)
     {
         if (!this._isRegistered)
         {
             IStreamFilenameGenerator generator = ObjectFactory.CreateInstance(this._appConfig.StreamFilenameGenerator.Type) as IStreamFilenameGenerator;
             base.AddService(typeof(IStreamFilenameGenerator), generator, false);
             generator.Start(this._appConfig.StreamFilenameGenerator);
             ISharedObjectService service = ObjectFactory.CreateInstance(this._appConfig.SharedObjectServiceConfiguration.Type) as ISharedObjectService;
             base.AddService(typeof(ISharedObjectService), service, false);
             service.Start(this._appConfig.SharedObjectServiceConfiguration);
             IProviderService service2 = ObjectFactory.CreateInstance(this._appConfig.ProviderServiceConfiguration.Type) as IProviderService;
             base.AddService(typeof(IProviderService), service2, false);
             service2.Start(this._appConfig.ProviderServiceConfiguration);
             IConsumerService service3 = ObjectFactory.CreateInstance(this._appConfig.ConsumerServiceConfiguration.Type) as IConsumerService;
             base.AddService(typeof(IConsumerService), service3, false);
             service3.Start(this._appConfig.ConsumerServiceConfiguration);
             IStreamService service4 = ObjectFactory.CreateInstance(this._appConfig.StreamService.Type) as IStreamService;
             base.AddService(typeof(IStreamService), service4, false);
             service4.Start(this._appConfig.StreamService);
             if (this._appConfig.SharedObjectSecurityService.Type != null)
             {
                 ISharedObjectSecurityService service5 = ObjectFactory.CreateInstance(this._appConfig.SharedObjectSecurityService.Type) as ISharedObjectSecurityService;
                 base.AddService(typeof(ISharedObjectSecurityService), service5, false);
                 service5.Start(this._appConfig.SharedObjectSecurityService);
             }
             base.Init();
             base._keepOnDisconnect = true;
             this._isRegistered     = true;
         }
     }
 }
        private async Task RunService(IStreamService svc, SocketConnection conn, IPEndPoint localEP, DnsEndPoint remoteEP, string method, string?password, byte[]?key)
        {
            var s5tcp = new PipePair();

            var raw = await svc.Handle(conn);

            ShadowsocksClient s5c;

            if (!string.IsNullOrEmpty(password))
            {
                s5c = new ShadowsocksClient(method, password);
            }
            else if (key != null)
            {
                s5c = new ShadowsocksClient(method, key);
            }
            else
            {
                throw new ArgumentException("Either a password or a key must be provided.");
            }
            var tpc = new TcpPipeClient();
            var t2  = tpc.Connect(remoteEP, s5tcp.DownSide, null);
            var t1  = s5c.Connect(localEP, raw, s5tcp.UpSide);
            await Task.WhenAll(t1, t2);
        }
예제 #9
0
        /*
         * Creates a leaf part, implying no MimePart children.
         */
        static MimePart CreateLeafPart(
            string mainType,
            string subType,
            Node messageNode,
            IStreamService streamService,
            IRootResolver rootResolver)
        {
            // Retrieving [content] node.
            var contentNode = messageNode.Children.FirstOrDefault(x => x.Name == "content" || x.Name == "filename") ??
                              throw new HyperlambdaException("No [content] or [filename] provided for your entity");

            var result = new MimePart(ContentType.Parse(mainType + "/" + subType));

            DecorateEntityHeaders(result, messageNode);

            switch (contentNode.Name)
            {
            case "content":
                CreateContentObjectFromObject(contentNode, result);
                break;

            case "filename":
                CreateContentObjectFromFilename(contentNode, result, streamService, rootResolver);
                break;
            }
            return(result);
        }
예제 #10
0
        /*
         * Creates ContentObject from filename.
         */
        static void CreateContentObjectFromFilename(
            Node contentNode,
            MimePart part,
            IStreamService streamService,
            IRootResolver rootResolver)
        {
            var filename = contentNode.GetEx <string>() ?? throw new HyperlambdaException("No [filename] value provided");

            // Checking if explicit encoding was supplied.
            ContentEncoding encoding     = ContentEncoding.Default;
            var             encodingNode = contentNode.Children.FirstOrDefault(x => x.Name == "Content-Encoding");

            if (encodingNode != null)
            {
                encoding = (ContentEncoding)Enum.Parse(typeof(ContentEncoding), encodingNode.GetEx <string>(), true);
            }

            // Checking if explicit disposition was specified.
            if (part.ContentDisposition == null)
            {
                // Defaulting Content-Disposition to; "attachment; filename=whatever.xyz"
                part.ContentDisposition = new ContentDisposition("attachment")
                {
                    FileName = Path.GetFileName(filename)
                };
            }
            part.Content = new MimeContent(
                streamService.OpenFile(
                    rootResolver.AbsolutePath(filename.TrimStart('/'))),
                encoding);
        }
        private void QueryButton_Click(object sender, RoutedEventArgs e)
        {
            if (fileChannelCreated == 0)
            {
                channel = CreateServiceChannel("http://localhost:8000/StreamService");
            }
            //listBox1.Items.Clear();
            //listBox2.Items.Clear();
            string localPort = LocalPortTextBox.Text;

            endPoint = "http://localhost:" + localPort + "/ICommunicator";
            Messages repoMsg      = MakeRepoMessage("Varun Krishna", endPoint, endPoint, "First Test");
            string   repoEndPoint = Comm <Client_1> .makeEndPoint("http://localhost", 8082);

            repoMsg    = repoMsg.copy();
            repoMsg.to = repoEndPoint;
            Console.WriteLine("\n------------------------Requirement 10 - Line 404 Client_1.xaml.cs---------------");
            Console.WriteLine("Querying repository using WCF");
            comm.sndr.PostMessage(repoMsg);
            try
            {
                listBox1.Items.Insert(0, repoMsg);
                if (listBox1.Items.Count > MaxMsgCount)
                {
                    listBox1.Items.RemoveAt(listBox1.Items.Count - 1);
                }
            }
            catch (Exception ex)
            {
                Window temp = new Window();
                temp.Content = ex.Message;
                temp.Height  = 100;
                temp.Width   = 500;
            }
        }
        public MainViewModel(IEnumerable <IInputStream> streams, IEnumerable <ITextProcessor> processors, ILogService logger, IStreamService streamer, IOutputService outputHandler, IDialogService dialogHandler)
        {
            // fields and properties
            Streams                          = new ObservableCollection <IInputStream>(streams);
            Processors                       = new ObservableCollection <ITextProcessor>(processors);
            OrderByTextItemList              = new string[] { manualOrderingDescription, "TimeStamp", "Text" };
            StreamedItems                    = new ObservableCollection <TextItemViewModel>();
            StreamedItemsView                = new ListCollectionView(StreamedItems);
            outputService                    = outputHandler as OutputService;
            dialogService                    = dialogHandler;
            logService                       = logger;
            streamService                    = streamer;
            OrderByTextItem                  = OrderByTextItemList.FirstOrDefault();
            SelectedStream                   = Streams.FirstOrDefault();
            SelectedProcessor                = Processors.FirstOrDefault();
            StreamedItems.CollectionChanged += (s, e) => updateOutput();

            #region initialize services internal functions

            // set up the logger for binding
            IObservableLogger loggerWithEntries = null;
            if (logService != null && (loggerWithEntries = logService as IObservableLogger) != null)
            {
                LogEntries = new ListCollectionView(loggerWithEntries.Entries);
                loggerWithEntries.Entries.CollectionChanged += (s, e) => refreshLogCounters();
                refreshLogCounters();
            }

            // set the callback for the stream service
            (streamService as StreamService).ReceiveStreamText = streamedText =>
            {
                StreamedItems.Add(new TextItemViewModel(streamedText, outputService));
                CommandManager.InvalidateRequerySuggested();

                // NOTE:  updateOutput is called on the CollectionChanged event of StreamedItems
            };

            // set up output service
            outputService.RefreshAction = updateOutput;

            #endregion

            // commands
            StartCommand       = CreateCommand(startCommand_Execute, startCommand_CanExecute);
            StopCommand        = CreateCommand(stopCommand_Execute, stopCommand_CanExecute);
            SelectAllCommand   = CreateCommand(selectAllCommand_Execute, selectAllCommand_CanExecute);
            DeselectAllCommand = CreateCommand(deselectAllCommand_Execute, deselectAllCommand_CanExecute);
            DeleteCommand      = CreateCommand(deleteCommand_Execute, deleteCommand_CanExecute);
            MoveUpCommand      = CreateCommand(moveUpCommand_Execute, moveUpCommand_CanExecute);
            MoveDownCommand    = CreateCommand(moveDownCommand_Execute, moveDownCommand_CanExecute);
            CopyOutputCommand  = CreateCommand(copyOutputCommand_Execute, copyOutputCommand_CanExecute);
            HelpCommand        = CreateCommand(helpCommand_Execute);

            // enable the control used to select an input stream
            IsIdle        = true;
            loadCompleted = true;
            updateOutput();
            refreshStreamStateLabel();
        }
예제 #13
0
        public override void OnStart()
        {
            base.OnStart();

            _streamService = GetService <IStreamService>();

            Log.Write("MediaGateway started on address: " + NetworkAddressHelper.GetLocalIP());
        }
        public override void OnStart()
        {
            base.OnStart();

            _streamService = GetService<IStreamService>();

            Log.Write("MediaGateway started on address: " +NetworkAddressHelper.GetLocalIP());
        }
예제 #15
0
 public MyClient(IClient client, IStreamService streamService, Camera currentCamera)
 {
     this.client        = client;
     this.streamService = streamService;
     Connector          = new MediaConnector();
     _forwarder         = new VideoForwarder();
     _camera            = currentCamera;
 }
예제 #16
0
 public MyClient(IClient client, IStreamService streamService, Camera currentCamera)
 {
     this.client = client;
     this.streamService = streamService;
     Connector = new MediaConnector();
     _forwarder = new VideoForwarder();
     _camera = currentCamera;
 }
예제 #17
0
 public HomeController(IUserInfoService userInfoService, IStudentService studentService, IResumeService resumeService,
                       IStreamService streamService)
 {
     _userInfoService = userInfoService;
     _studentService  = studentService;
     _resumeService   = resumeService;
     _streamService   = streamService;
 }
예제 #18
0
 public APIController(
     IUserService userService, IStreamService streamService,
     IMapper mapper)
 {
     _userService   = userService;
     _streamService = streamService;
     _mapper        = mapper;
 }
예제 #19
0
 public FileService(
     IFileReader fileReader,
     IFileWriter fileWriter,
     IStreamService streamService)
 {
     _fileReader    = fileReader;
     _fileWriter    = fileWriter;
     _streamService = streamService;
 }
예제 #20
0
 public GalleryController(
     IImageService imageService,
     IStreamService streamService,
     IUserService userService)
 {
     this._imageService  = imageService;
     this._streamService = streamService;
     this._userService   = userService;
 }
예제 #21
0
 public ProfilePictureModel(
     UserManager <User> userManager,
     IStreamService streamService,
     IImageService imageService)
 {
     this._userManager   = userManager;
     this._imageService  = imageService;
     this._streamService = streamService;
 }
예제 #22
0
        public void CurrentFollowerCountHandlesMultipleServices(IStreamService jeffStreams, IStreamService otherStreamService)
        {
            // arrange

            // act
            var sut = new Fritz.StreamTools.Services.StreamService(new[] { jeffStreams, otherStreamService });
            var sum = sut.CurrentFollowerCount;

            // assert
            Assert.Equal(jeffStreams.CurrentFollowerCount + otherStreamService.CurrentFollowerCount, sum);
        }
예제 #23
0
        public void CurrentFollowerCountHandlesOneService(IStreamService jeffStreams)
        {
            // arrange

            // act
            var sut = new Fritz.StreamTools.Services.StreamService(new[] { jeffStreams });
            var sum = sut.CurrentFollowerCount;

            // assert
            Assert.Equal(jeffStreams.CurrentFollowerCount, sum);
        }
        public DashboardViewModel(INavigation navigation, Type page)
        {
            UserModel user = Utils.DeserializeFromJson <UserModel>(Application.Current.Properties["UserData"].ToString());

            _pageService      = new PageService();
            _navigation       = navigation;
            _page             = page;
            _documentsService = new DocumentsService(user);
            _streamservice    = new StreamService(user);
            _zipService       = new ZipService();
            Device.BeginInvokeOnMainThread(async() => DocsModel = await GetDocsAsync());
        }
        public void ShouldCountSeparately(IStreamService jeffStreams, IStreamService otherStreamService)
        {
            // arrange

            // act
            var sut   = new Fritz.StreamTools.Services.StreamService(new[] { jeffStreams, otherStreamService });
            var count = sut.ViewerCountByService.ToList();

            // assert
            Assert.Equal(2, count.Count());
            Assert.Equal(jeffStreams.CurrentViewerCount, count.First(c => c.service == jeffStreams.Name).count);
            Assert.Equal(otherStreamService.CurrentViewerCount, count.First(c => c.service == otherStreamService.Name).count);
        }
예제 #26
0
 public ContextFactory(
     [NotNull] IOptions options,
     [NotNull] ILogger logger,
     [NotNull] IPathService pathService,
     [NotNull] IFileSystem fileSystem,
     [NotNull] IStreamService streamService)
 {
     _options       = options ?? throw new ArgumentNullException(nameof(options));
     _logger        = logger ?? throw new ArgumentNullException(nameof(logger));
     _pathService   = pathService ?? throw new ArgumentNullException(nameof(pathService));
     _fileSystem    = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
     _streamService = streamService ?? throw new ArgumentNullException(nameof(streamService));
 }
예제 #27
0
        void loadDependencies()
        {
            // resolve services
            logService = Container.GetExportedValue<ILogService>();
            streamService = Container.GetExportedValue<IStreamService>();
            outputService = Container.GetExportedValue<IOutputService>();
            dialogService = Container.GetExportedValue<IDialogService>();

            // resolve the plugins service instance from the current assembly, which will in turn resolve the plugins automatically from the plugins folder
            pluginsService = Container.GetExportedValue<PluginsService>();
            pluginsService.InitializeStreams();
            pluginsService.InitializeProcessors();
        }
예제 #28
0
 public HrManagerController(
     IHrManagerService hrManagerService,
     IStudentService studentService,
     IStreamService streamService,
     IUserInfoService userInfoService,
     UserManager <ApplicationUser> userManager
     )
 {
     _hrManagerService = hrManagerService;
     _studentService   = studentService;
     _streamService    = streamService;
     _userInfoService  = userInfoService;
     _userManager      = userManager;
 }
        public ViewerDocumentViewModel(INavigation navigation)
        {
            UserModel user = Utils.DeserializeFromJson <UserModel>(Application.Current.Properties["UserData"].ToString());

            _pageService      = new PageService();
            _navigation       = navigation;
            _streamservice    = new StreamService(user);
            _documentsService = new DocumentsService(user);



            IsLoading          = true;
            SelectAllIsToggled = false;
        }
 public void Initialize()
 {
     _streamService  = new StreamService();
     _listFakeString = new List <string>
     {
         "{}",
         "{{{}}}",
         "{{},{}}",
         "{{{},{},{{}}}}",
         "{<a>,<a>,<a>,<a>}",
         "{{<ab>},{<ab>},{<ab>},{<ab>}}",
         "{{<!!>},{<!!>},{<!!>},{<!!>}}",
         "{{<a!>},{<a!>},{<a!>},{<ab>}}",
     };
 }
예제 #31
0
        public QueueHub(IHttpClientProvider httpClientProvider, IIncommingTweetQueue incommingTweetQueue, IConfiguration configuration,
                        IRuntimeStatsService runtimeStatsService, IStreamService streamService, IStreamReaderHandler streamReaderHandler)
        {
            _httpClientProvider  = httpClientProvider;
            _incommingTweetQueue = incommingTweetQueue;
            _runtimeStatsService = runtimeStatsService;
            _streamService       = streamService;
            _streamReaderHandler = streamReaderHandler;

            _twitterConfiguration = new TwitterConfiguration()
            {
                BaseUrl         = configuration.GetValue <string>(Constants.TwitterBaseUrlName).ToString(),
                OAuthToken      = configuration.GetValue <string>(Constants.TwitterOAuthTokenName).ToString(),
                SampleStreamUrl = configuration.GetValue <string>(Constants.TwitterSampleStreamUrlName).ToString()
            };
        }
예제 #32
0
        /*
         * Creates a multipart of some sort.
         */
        static Multipart CreateMultipart(
            ISignaler signaler,
            string subType,
            Node messageNode,
            IStreamService streamService,
            IRootResolver rootResolver)
        {
            var result = new Multipart(subType);

            DecorateEntityHeaders(result, messageNode);

            foreach (var idxPart in messageNode.Children.Where(x => x.Name == "entity"))
            {
                result.Add(Create(signaler, idxPart, streamService, rootResolver));
            }
            return(result);
        }
예제 #33
0
 public HomeController(IStreamService streamService)
 {
     this.streamService = streamService;
 }