コード例 #1
0
ファイル: FullIntegrationTests.cs プロジェクト: oduma/MySynch
 public void DistributorDistreibuteMessage_Ok()
 {
     if (File.Exists(@"C:\MySynch.Dest.Test.Root\File1.xml"))
         File.Delete(@"C:\MySynch.Dest.Test.Root\File1.xml");
     IDistributorMonitorProxy distributorMonitorProxy = new DistributorMonitorClient();
     distributorMonitorProxy.InitiateUsingPort(8765);
     var listOfComponents = distributorMonitorProxy.ListAvailableChannels();
     Assert.IsNotNull(listOfComponents);
     File.Copy(@"Data\File1.xml", @"C:\MySynch.Source.Test.Root\File1.xml", true);
 }
コード例 #2
0
ファイル: ClientHelper.cs プロジェクト: oduma/MySynch
 public void ConnectToADistributor(EventHandler<ProgressChangedEventArgs> progressChanged, int localDistributorPort, out IDistributorMonitorProxy distributorMonitorProxy, out ListAvailableChannelsResponse availableComponents)
 {
     progressChanged(this, new ProgressChangedEventArgs(0, "Connecting to Distributor at port: " + localDistributorPort));
     distributorMonitorProxy = new DistributorMonitorClient();
     distributorMonitorProxy.InitiateUsingPort(localDistributorPort);
     progressChanged(this, new ProgressChangedEventArgs(0, "Connected to Distributor at port: " + localDistributorPort + " checking registrations..."));
     availableComponents = distributorMonitorProxy.ListAvailableChannels();
     progressChanged(this,
                     new ProgressChangedEventArgs(0,
                                                  string.Format(
                                                      "{0} channels registered at the distributor",
                                                      availableComponents.Channels.Count())));
 }
コード例 #3
0
ファイル: FullIntegrationTests.cs プロジェクト: oduma/MySynch
 public void DistributorUpAndAccessible()
 {
     IDistributorMonitorProxy distributorMonitorProxy = new DistributorMonitorClient();
     distributorMonitorProxy.InitiateUsingPort(8765);
     var listAvailableChannels = distributorMonitorProxy.ListAvailableChannels();
     Assert.IsNotNull(listAvailableChannels);
     Assert.AreEqual("SCIENDO-LAPTOP", listAvailableChannels.Name);
     Assert.AreEqual(1, listAvailableChannels.Channels.Count);
     Assert.AreEqual("IPublisher.Remote", listAvailableChannels.Channels[0].PublisherInfo.InstanceName);
     Assert.AreEqual(8765, listAvailableChannels.Channels[0].PublisherInfo.Port);
     Assert.AreEqual(Status.Ok, listAvailableChannels.Channels[0].Status);
     Assert.IsNull(listAvailableChannels.Channels[0].PublisherInfo.CurrentPackage);
     Assert.IsNotNull(listAvailableChannels.Channels[0].SubscriberInfo);
     Assert.AreEqual("ISubscriber.Remote", listAvailableChannels.Channels[0].SubscriberInfo.InstanceName);
     Assert.AreEqual(8765,listAvailableChannels.Channels[0].SubscriberInfo.Port);
     Assert.AreEqual(Status.Ok, listAvailableChannels.Channels[0].SubscriberInfo.Status);
     Assert.AreEqual(@"C:\MySynch.Dest.Test.Root\", listAvailableChannels.Channels[0].SubscriberInfo.RootPath);
     Assert.IsNull(listAvailableChannels.Channels[0].SubscriberInfo.CurrentPackage);
 }
コード例 #4
0
ファイル: Window1.xaml.cs プロジェクト: oduma/MySynch
        public Window1()
        {
            using (LoggingManager.LogMySynchPerformance())
            {
                InitializeComponent();
                try
                {
                    IDistributorMonitorProxy distributorMonitorProxy = new DistributorMonitorClient();
                    distributorMonitorProxy.InitiateUsingPort(8765);

                    this.DataContext = new NotificationDetailsViewModel(distributorMonitorProxy);

                }
                catch (Exception ex)
                {
                    LoggingManager.LogMySynchSystemError(ex);
                    throw;
                }
            }
        }