public static string GetBackupPath(string root, string teamId, string channelId)
        {
            var fullpath = System.IO.Path.Combine(MgTeam.GetBackupPath(root, teamId), channelId.Replace(':', '-').Replace('@', '-'));

            System.IO.Directory.CreateDirectory(fullpath);
            return(fullpath);
        }
示例#2
0
        public async Task LoadMembers()
        {
            var jsonFile = MgTeam.GetBackupTeamMembersFile(_Options.SourcePath, _TeamId);

            _Logger.LogTrace($"File: {jsonFile}");

            using System.IO.FileStream fs = System.IO.File.OpenRead(jsonFile);
            _Members = await JsonSerializer.DeserializeAsync <List <AadUserConversationMember> >(fs);

            _Logger.LogTrace($"Load: {_Team.Id} - {_Team.DisplayName} - {_Members.Count}");
        }
示例#3
0
        public async Task LoadTeam()
        {
            var jsonFile = MgTeam.GetBackupTeamFile(_Options.SourcePath, _TeamId);

            _Logger.LogTrace($"File: {jsonFile}");

            using System.IO.FileStream fs = System.IO.File.OpenRead(jsonFile);

            _Team = await JsonSerializer.DeserializeAsync <Team>(fs);

            _Logger.LogTrace($"Load: {_Team.Id} - {_Team.DisplayName}");
        }