コード例 #1
0
        public static String queryTeam(String tTeamName, Int32 tTeamId, String serviceName)
        {
            String     message  = String.Format("{0}DRC|QUERY-TEAM|{1}|{2}|{3}INF|{4}|{5}|{6}|{3}{7}{3}", HL7SpecialChars.BOM, Configs.teamName, Configs.teamID, HL7SpecialChars.EOS, tTeamName, tTeamId, serviceName, HL7SpecialChars.EOM);
            RegistryIO reg      = new RegistryIO(Configs.registryPort, Configs.registryIP);
            String     response = reg.SendMessage(message);

            return(response);
        }
コード例 #2
0
        public static String unregisterTeam()
        {
            String     message  = String.Format("{0}DRC|UNREG-TEAM|{1}|{2}{3}{4}{3}", HL7SpecialChars.BOM, Configs.teamName, Configs.teamID, HL7SpecialChars.EOS, HL7SpecialChars.EOM);
            RegistryIO reg      = new RegistryIO(Configs.registryPort, Configs.registryIP);
            String     response = reg.SendMessage(message);

            return(response);
        }
コード例 #3
0
        // public static String teamName = String.Empty;
        //  public static Int32 teamID = 0;
        //  public static IPAddress registryIP = null;
        //  public static Int32 registryPort = 0;

        public static String registerTeam()
        {
            String     message  = String.Format("{0}DRC|REG-TEAM|||{1}INF|{3}|||{1}{2}{1}", HL7SpecialChars.BOM, HL7SpecialChars.EOS, HL7SpecialChars.EOM, Configs.teamName);
            RegistryIO reg      = new RegistryIO(Configs.registryPort, Configs.registryIP);
            String     response = reg.SendMessage(message);

            return(response);
        }
コード例 #4
0
ファイル: MainWindowViewModel.cs プロジェクト: windygu/Magpie
        private void SkipThisVersionCommandHandler(object obj)
        {
            _logger.Log("Skip this version command invoked");
            _analyticsLogger.LogSkipThisVersion();
            var registryIO = new RegistryIO();

            registryIO.WriteToRegistry(MagicStrings.SKIP_VERSION_KEY, _remoteVersion);
        }
コード例 #5
0
ファイル: MainWindowViewModel.cs プロジェクト: windygu/Magpie
        private void RemindMeLaterCommandHandler(object obj)
        {
            _logger.Log("Remind me later command invoked");
            _analyticsLogger.LogRemindMeLater();
            var registryIO = new RegistryIO();

            registryIO.WriteToRegistry(MagicStrings.LAST_CHECK_DATE, DateTime.Now.ToString(CultureInfo.InvariantCulture));
        }
コード例 #6
0
        public static String publishService(ServiceData data)
        {
            StringBuilder message = new StringBuilder();

            message.AppendFormat("{0}DRC|PUB-SERVICE|{1}|{2}|{3}", HL7SpecialChars.BOM, Configs.teamName, Configs.teamID, HL7SpecialChars.EOS);
            message.AppendFormat("SRV|{0}|{1}|{2}|{3}|{4}|{5}|{6}", data.tagName, data.serviceName, data.securityLevel, data.arguments.Count(), data.responses.Count(), data.description, HL7SpecialChars.EOS);

            for (int i = 0; i < data.arguments.Count(); i++)
            {
                message.AppendFormat("{0}{1}", data.arguments[i].getArgument(i + 1), HL7SpecialChars.EOS);
            }
            for (int i = 0; i < data.responses.Count(); i++)
            {
                message.AppendFormat("{0}{1}", data.responses[i].getArgument(i + 1), HL7SpecialChars.EOS);
            }
            message.AppendFormat("MCH|{0}|{1}|{2}{3}{2}", Configs.serviceIP.ToString(), Configs.servicePort, HL7SpecialChars.EOS, HL7SpecialChars.EOM, HL7SpecialChars.EOS);

            RegistryIO reg      = new RegistryIO(Configs.registryPort, Configs.registryIP);
            String     response = reg.SendMessage(message.ToString());

            return(response);
        }
コード例 #7
0
ファイル: UpdateDeciderTest.cs プロジェクト: randianb/Magpie
 public void TestInitialize()
 {
     AssemblyInjector.Inject();
     _registryIO = Substitute.For <RegistryIO>();
     _sut        = new UpdateDecider(Substitute.For <IDebuggingInfoLogger>(), _registryIO);
 }