Inheritance: IRefresh
Exemplo n.º 1
0
        public void Refresh()
        {
            Timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
            RuntimeInfo.Refresh();
            OSInfo.Refresh();

            DiskInfoList.Clear();
            var drives = DriveInfo.GetDrives().ToList();

            drives.ForEach(drive =>
            {
                if (drive.IsReady)
                {
                    DiskInfoList.Add(new DiskInfo()
                    {
                        Id    = drive.Name,
                        Free  = drive.AvailableFreeSpace / 1024,
                        Total = drive.TotalSize / 1024,
                        Use   = (drive.TotalSize - drive.AvailableFreeSpace) / 1024
                    });
                }
            });
            MemoryInfo.Refresh();
            ThreadInfo.Refresh();
            MessageInfo.Refresh();
            HeartbeatExtensions.ForEach(item => item.Refresh());
        }
Exemplo n.º 2
0
 public NodeStatusInfo(IMessageStatistics statistics)
 {
     RuntimeInfo         = new RuntimeInfo();
     OSInfo              = new OSInfo();
     DiskInfoList        = new List <DiskInfo>();
     MemoryInfo          = new MemoryInfo();
     ThreadInfo          = new ThreadInfo();
     MessageInfo         = new MessageInfo(statistics);
     HeartbeatExtensions = new List <HeartbeatExtention>();
     Timestamp           = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
     ns.Add("", "");
 }
Exemplo n.º 3
0
 public NodeStatusInfo(IMessageStatistics statistics)
 {
     RuntimeInfo = new RuntimeInfo();
     OSInfo = new OSInfo();
     DiskInfoList = new List<DiskInfo>();
     MemoryInfo = new MemoryInfo();
     ThreadInfo = new ThreadInfo();
     MessageInfo = new MessageInfo(statistics);
     HeartbeatExtensions = new List<HeartbeatExtention>();
     Timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
     ns.Add("", "");
 }