Exemplo n.º 1
0
        public string ToLogString()
        {
            if (SessionHostHeartbeatMap?.Count > 10)
            {
                string maintenanceSchedule  = MaintenanceSchedule?.ToJsonString() ?? string.Empty;
                string networkConfiguration = NetworkConfiguration?.ToJsonString() ?? string.Empty;
                string sessionHostSummary   = SessionHostHeartbeatMap.Values.GroupBy(x => x.CurrentGameState).ToDictionary(y => y.Key, y => y.Count()).ToJsonString();
                return
                    ($"VmState: {VmState}, AssignmentId: {AssignmentId ?? string.Empty}, AgentProcessGuid : {AgentProcessGuid}, SequenceNumber {SequenceNumber}, MaintenanceSchedule : {maintenanceSchedule}, IsUnassignable: {IsUnassignable ?? false}, NetworkConfiguration: {networkConfiguration}, SessionHostSummary: {sessionHostSummary}, VmMonitoringOutput: {VmMonitoringOutputId}");
            }

            return(this.ToJsonString());
        }