コード例 #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");
        }