This commit is contained in:
Alexey Golub 2017-07-13 20:34:16 +03:00
parent 7eeea54ee9
commit 16ac87d9ce
2 changed files with 23 additions and 18 deletions

View file

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace DiscordChatExporter.Models
{
public class MessageGroup
{
public MessageGroup(User author, DateTime firstTimeStamp, IEnumerable<Message> messages)
{
Author = author;
FirstTimeStamp = firstTimeStamp;
Messages = messages.ToArray();
}
public User Author { get; }
public DateTime FirstTimeStamp { get; }
public IReadOnlyList<Message> Messages { get; }
}
}

View file

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
@ -11,22 +10,6 @@ namespace DiscordChatExporter.Services
{ {
public class ExportService public class ExportService
{ {
private class MessageGroup
{
public User Author { get; }
public DateTime FirstTimeStamp { get; }
public IReadOnlyList<Message> Messages { get; }
public MessageGroup(User author, DateTime firstTimeStamp, IEnumerable<Message> messages)
{
Author = author;
FirstTimeStamp = firstTimeStamp;
Messages = messages.ToArray();
}
}
private HtmlDocument GetTemplate() private HtmlDocument GetTemplate()
{ {
const string templateName = "DiscordChatExporter.Services.ExportTemplate.html"; const string templateName = "DiscordChatExporter.Services.ExportTemplate.html";