예제 #1
0
        private void CreateLinkTemplate(int index, string file)
        {
            var record = new LinkRecord
            {
                Id          = $"Link_{index}",
                RedirectUrl = "http://redirect",
            };

            File.WriteAllText(file, _json.SerializeFormat(record));
            _logger.LogInformation($"Create json template {file} for Link");
        }
예제 #2
0
        private void CreateAgentTemplate(int index, string file)
        {
            var record = new AgentRecord
            {
                Id           = $"Agent_{index}",
                State        = AgentState.Running,
                UtcHeartbeat = DateTime.UtcNow,
            };

            File.WriteAllText(file, _json.SerializeFormat(record));
            _logger.LogInformation($"Create json template {file} for Agent");
        }