示例#1
0
        private void TestAdvancedProxyImplementation()
        {
            try
            {
                Type result = TypeService.BuildProxyImplementation(typeof(IPerformanceMonitorService));

                DummyCommunicationService dummyCommService = new DummyCommunicationService();

                var constructorParams = new object[2];
                constructorParams[0] = dummyCommService;

                IPerformanceMonitorService instance = (IPerformanceMonitorService)Activator.CreateInstance(result, constructorParams);

                TimeSpan      timeSpan = new TimeSpan(23532534);
                List <string> testColl = new List <string>();
                testColl.Add("item 1");
                string testOutput;
                instance.SubscribeCpuUsageNotification(timeSpan, out testOutput, testColl);
            }
            catch (Exception ex)
            {
                // because of buggy unit test environment
                throw;
            }
        }
 public PerformanceMonitorWorkerService(
         IPerformanceMonitorService performanceMonitorService,
         IPerformanceMonitorDataService performanceMonitorDataService,
         IPerformanceCounterService performanceCounterService,
         INotifier notifier
     )
 {
     _performanceMonitorService = performanceMonitorService;
     _performanceMonitorDataService = performanceMonitorDataService;
     _performanceCounterService = performanceCounterService;
     _notifier = notifier;
 }
 public PerformanceMonitorWorkerService(
     IPerformanceMonitorService performanceMonitorService,
     IPerformanceMonitorDataService performanceMonitorDataService,
     IPerformanceCounterService performanceCounterService,
     INotifier notifier
     )
 {
     _performanceMonitorService     = performanceMonitorService;
     _performanceMonitorDataService = performanceMonitorDataService;
     _performanceCounterService     = performanceCounterService;
     _notifier = notifier;
 }
 public PerformanceMonitorHeartBeat(IPerformanceMonitorWorkerService performanceMonitorWorkerService, IPerformanceMonitorService performanceMonitorService, IPerformanceMonitorDataService performanceMonitorDataService)
 {
     _performanceMonitorWorkerService = performanceMonitorWorkerService;
     _performanceMonitorService       = performanceMonitorService;
     _performanceMonitorDataService   = performanceMonitorDataService;
 }
 public PerformanceMonitorHeartBeat(IPerformanceMonitorWorkerService performanceMonitorWorkerService,IPerformanceMonitorService performanceMonitorService, IPerformanceMonitorDataService performanceMonitorDataService)
 {
     _performanceMonitorWorkerService = performanceMonitorWorkerService;
     _performanceMonitorService = performanceMonitorService;
     _performanceMonitorDataService = performanceMonitorDataService;
 }