public static string GetBackupPath(string root, string teamId, string channelId, string messageId) { var fullpath = System.IO.Path.Combine(MgTeamChannel.GetBackupPath(root, teamId, channelId), messageId); System.IO.Directory.CreateDirectory(fullpath); return(fullpath); }
public async Task LoadChannel() { var jsonFile = MgTeamChannel.GetBackupChannelFile(_Options.SourcePath, _TeamId, _ChannelId); _Logger.LogTrace($"File: {jsonFile}"); using System.IO.FileStream fs = System.IO.File.OpenRead(jsonFile); _Channel = await JsonSerializer.DeserializeAsync <Channel>(fs); }
public async Task LoadMembers() { var jsonFile = MgTeamChannel.GetBackupChannelMembersFile(_Options.SourcePath, _TeamId, _ChannelId); _Logger.LogTrace($"File: {jsonFile}"); if (System.IO.File.Exists(jsonFile)) { using System.IO.FileStream fs = System.IO.File.OpenRead(jsonFile); _Members = await JsonSerializer.DeserializeAsync <List <AadUserConversationMember> > (fs); } }