Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TrackerData"/> class. 
 /// 
 /// Default values of the TrackerData:
 /// The Guid and HostName are both initialized to string.Empty.
 /// The Status is initialized to TrackerStatus.IDLE.
 /// LastCheckinTime is initialized to -1.
 /// CurrentJob is initialized to JobData.EmptyJob.
 /// MemoryInfo is set to a new TrackerMemoryInfo() instance.
 /// </summary>
 public TrackerData()
 {
     Guid = string.Empty;
     HostName = string.Empty;
     Status = TrackerStatus.IDLE;
     LastCheckinTime = -1;
     CurrentJob = JobData.EmptyJob;
     MemoryInfo = new TrackerMemoryInfo();
 }
Example #2
0
        public static TrackerMemoryInfo DeepCopy(TrackerMemoryInfo rhs)
        {
            if (rhs == null)
            {
                return null;
            }

            TrackerMemoryInfo copy = new TrackerMemoryInfo()
            {
                TotalMemory = rhs.TotalMemory,
                AvailableMemory = rhs.AvailableMemory,
                TotalDiskSpace = rhs.TotalDiskSpace,
                AvailableDiskSpace = new Dictionary<string, long>(rhs.AvailableDiskSpace)
            };

            return copy;
        }