Beispiel #1
0
        public IConfiguration ToIConfiguration()
        {
            var config = new MutableConfiguration("rhino.esb");

            var busConfig = config.CreateChild("bus")
                            .Attribute("endpoint", Endpoint)
                            .Attribute("threadCount", ThreadCount.ToString())
                            .Attribute("numberOfRetries", NumberOfRetries.ToString());

            if (string.IsNullOrEmpty(Name) == false)
            {
                busConfig.Attribute("name", Name);
            }

            if (string.IsNullOrEmpty(LoadBalancerEndpoint) == false)
            {
                busConfig.Attribute("loadBalancerEndpoint", LoadBalancerEndpoint);
            }

            if (string.IsNullOrEmpty(LogEndpoint) == false)
            {
                busConfig.Attribute("logEndpoint", LogEndpoint);
            }

            var messagesConfig = config.CreateChild("messages");

            foreach (var message in Messages)
            {
                messagesConfig.CreateChild("add")
                .Attribute("name", message.Key)
                .Attribute("endpoint", message.Value);
            }

            return(config);
        }
 public override string ToString()
 {
     return(ProcessName + "|" +
            PID.ToString() + "|" +
            UserName + "|" +
            CPUTime + "|" +
            NumBytes.ToString() + "|" +
            HandleCount.ToString() + "|" +
            ThreadCount.ToString() + "|" +
            CommandLineArgs);
 }
 public string[] ToStringArray()
 {
     return(new string[] {
         ProcessShortName,
         PID.ToString(),
         UserName,
         CPUTime,
         new FileSystemHelper(null).BytesToReadableValue(NumBytes),
         HandleCount.ToString(),
         ThreadCount.ToString(),
         ProcessName + " " + CommandLineArgs
     });
 }
Beispiel #4
0
        protected virtual void PopulateBusConfiguration(MutableConfiguration busConfig)
        {
            busConfig
            .Attribute("endpoint", Endpoint)
            .Attribute("threadCount", ThreadCount.ToString())
            .Attribute("numberOfRetries", NumberOfRetries.ToString());

            if (string.IsNullOrEmpty(Name) == false)
            {
                busConfig.Attribute("name", Name);
            }

            if (string.IsNullOrEmpty(LoadBalancerEndpoint) == false)
            {
                busConfig.Attribute("loadBalancerEndpoint", LoadBalancerEndpoint);
            }

            if (string.IsNullOrEmpty(LogEndpoint) == false)
            {
                busConfig.Attribute("logEndpoint", LogEndpoint);
            }
        }
Beispiel #5
0
 public override void WriterAddAttribute(XmlWriter writer)
 {
     writer.WriteAttributeString("ThreadCount", ThreadCount.ToString());
     base.WriterAddAttribute(writer);
 }
 public string[] ForProcessAdvList()
 {
     return(new string[] { ProcessName, PID.ToString(), StartTime.ToShortTimeString(),
                           TotalProcessorTime.Duration().Hours.ToString() + ":" +
                           TotalProcessorTime.Duration().Minutes.ToString() + ":" +
                           TotalProcessorTime.Duration().Seconds.ToString() + "." +
                           TotalProcessorTime.Duration().Milliseconds.ToString()
                           , (WorkingSet64 / 1024) + " K", (PeakWorkingSet64 / 1024) + " K", HandleCount.ToString(), ThreadCount.ToString(), status, user, FileDescription });
 }