From 52c59d7cd949ee6ccc89fbb25231666e1e589fe2 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 10 Mar 2020 15:46:59 +0800 Subject: Revert namespace name change. --- Timeline/Services/TimelineService.cs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'Timeline/Services/TimelineService.cs') diff --git a/Timeline/Services/TimelineService.cs b/Timeline/Services/TimelineService.cs index 8c1e62d4..1bccb855 100644 --- a/Timeline/Services/TimelineService.cs +++ b/Timeline/Services/TimelineService.cs @@ -6,12 +6,12 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading.Tasks; -using TimelineApp.Entities; -using TimelineApp.Models; -using TimelineApp.Models.Validation; -using static TimelineApp.Resources.Services.TimelineService; +using Timeline.Entities; +using Timeline.Models; +using Timeline.Models.Validation; +using static Timeline.Resources.Services.TimelineService; -namespace TimelineApp.Services +namespace Timeline.Services { public enum TimelineUserRelationshipType { @@ -67,7 +67,7 @@ namespace TimelineApp.Services /// Thrown when is null. /// See remarks of . /// See remarks of . - Task GetTimeline(string name); + Task GetTimeline(string name); /// /// Set the properties of a timeline. @@ -252,7 +252,7 @@ namespace TimelineApp.Services /// /// If user with related user id does not exist, empty list will be returned. /// - Task> GetTimelines(TimelineUserRelationship? relate = null, List? visibility = null); + Task> GetTimelines(TimelineUserRelationship? relate = null, List? visibility = null); /// /// Create a timeline. @@ -264,7 +264,7 @@ namespace TimelineApp.Services /// Thrown when timeline name is invalid. /// Thrown when the timeline already exists. /// Thrown when the owner user does not exist. - Task CreateTimeline(string name, long owner); + Task CreateTimeline(string name, long owner); /// /// Delete a timeline. @@ -334,7 +334,7 @@ namespace TimelineApp.Services /// protected abstract Task FindTimelineId(string name); - public async Task GetTimeline(string name) + public async Task GetTimeline(string name) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -353,7 +353,7 @@ namespace TimelineApp.Services members.Add(await UserService.GetUserById(memberEntity.UserId)); } - return new Timeline + return new Models.Timeline { Name = timelineEntity.Name ?? ("@" + owner.Username), Description = timelineEntity.Description ?? "", @@ -849,7 +849,7 @@ namespace TimelineApp.Services } } - public async Task> GetTimelines(TimelineUserRelationship? relate = null, List? visibility = null) + public async Task> GetTimelines(TimelineUserRelationship? relate = null, List? visibility = null) { List entities; @@ -883,12 +883,12 @@ namespace TimelineApp.Services } } - var result = new List(); + var result = new List(); foreach (var entity in entities) { var owner = await _userService.GetUserById(entity.OwnerId); - var timeline = new Timeline + var timeline = new Models.Timeline { Name = entity.Name ?? ("@" + owner.Username), Description = entity.Description ?? "", @@ -908,7 +908,7 @@ namespace TimelineApp.Services return result; } - public async Task CreateTimeline(string name, long owner) + public async Task CreateTimeline(string name, long owner) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -934,7 +934,7 @@ namespace TimelineApp.Services _database.Timelines.Add(newEntity); await _database.SaveChangesAsync(); - return new Timeline + return new Models.Timeline { Name = name, Description = "", @@ -978,7 +978,7 @@ namespace TimelineApp.Services } } - public Task GetTimeline(string name) + public Task GetTimeline(string name) { var s = BranchName(name, out var realName); return s.GetTimeline(realName); -- cgit v1.2.3