diff options
Diffstat (limited to 'Timeline')
-rw-r--r-- | Timeline/Entities/TimelineEntity.cs | 17 | ||||
-rw-r--r-- | Timeline/Models/Timeline.cs | 18 | ||||
-rw-r--r-- | Timeline/Resources/Services/Exception.Designer.cs | 2 | ||||
-rw-r--r-- | Timeline/Resources/Services/Exception.resx | 2 | ||||
-rw-r--r-- | Timeline/Services/TimelineService.cs | 2 |
5 files changed, 20 insertions, 21 deletions
diff --git a/Timeline/Entities/TimelineEntity.cs b/Timeline/Entities/TimelineEntity.cs index f5e22a54..9cacfcae 100644 --- a/Timeline/Entities/TimelineEntity.cs +++ b/Timeline/Entities/TimelineEntity.cs @@ -2,25 +2,10 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using Timeline.Models;
namespace Timeline.Entities
{
- public enum TimelineVisibility
- {
- /// <summary>
- /// All people including those without accounts.
- /// </summary>
- Public,
- /// <summary>
- /// Only people signed in.
- /// </summary>
- Register,
- /// <summary>
- /// Only member.
- /// </summary>
- Private
- }
-
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "This is entity object.")]
[Table("timelines")]
public class TimelineEntity
diff --git a/Timeline/Models/Timeline.cs b/Timeline/Models/Timeline.cs index 26012878..85fefff5 100644 --- a/Timeline/Models/Timeline.cs +++ b/Timeline/Models/Timeline.cs @@ -1,11 +1,25 @@ using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using Timeline.Entities;
namespace Timeline.Models
{
+ public enum TimelineVisibility
+ {
+ /// <summary>
+ /// All people including those without accounts.
+ /// </summary>
+ Public,
+ /// <summary>
+ /// Only people signed in.
+ /// </summary>
+ Register,
+ /// <summary>
+ /// Only member.
+ /// </summary>
+ Private
+ }
+
public class TimelinePostInfo
{
public long Id { get; set; }
diff --git a/Timeline/Resources/Services/Exception.Designer.cs b/Timeline/Resources/Services/Exception.Designer.cs index 970c306d..1b46f9e9 100644 --- a/Timeline/Resources/Services/Exception.Designer.cs +++ b/Timeline/Resources/Services/Exception.Designer.cs @@ -286,7 +286,7 @@ namespace Timeline.Resources.Services { }
/// <summary>
- /// Looks up a localized string similar to An exception happened when do operation {} on the {} member on timeline..
+ /// Looks up a localized string similar to An exception happened when do operation {0} on the {1} member on timeline..
/// </summary>
internal static string TimelineMemberOperationExceptionDetail {
get {
diff --git a/Timeline/Resources/Services/Exception.resx b/Timeline/Resources/Services/Exception.resx index c8f6676a..1d9c0037 100644 --- a/Timeline/Resources/Services/Exception.resx +++ b/Timeline/Resources/Services/Exception.resx @@ -193,7 +193,7 @@ <value>An exception happened when add or remove member on timeline.</value>
</data>
<data name="TimelineMemberOperationExceptionDetail" xml:space="preserve">
- <value>An exception happened when do operation {} on the {} member on timeline.</value>
+ <value>An exception happened when do operation {0} on the {1} member on timeline.</value>
</data>
<data name="TimelineNameBadFormatException" xml:space="preserve">
<value>Timeline name is of bad format. If this is a personal timeline, it means the username is of bad format and inner exception should be a UsernameBadFormatException.</value>
diff --git a/Timeline/Services/TimelineService.cs b/Timeline/Services/TimelineService.cs index 494beb11..1d199aae 100644 --- a/Timeline/Services/TimelineService.cs +++ b/Timeline/Services/TimelineService.cs @@ -458,7 +458,7 @@ namespace Timeline.Services if (list != null)
{
Dictionary<string, int> result = new Dictionary<string, int>();
- var count = 0;
+ var count = list.Count;
for (var index = 0; index < count; index++)
{
var username = list[index];
|