Browse Source

Fix docs module for extraproperties change.

pull/6114/head
Halil İbrahim Kalkan 6 years ago
parent
commit
4c1313ee75
  1. 10
      modules/docs/src/Volo.Docs.Domain/Volo/Docs/Documents/Document.cs
  2. 19
      modules/docs/src/Volo.Docs.Domain/Volo/Docs/Projects/Project.cs

10
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Documents/Document.cs

@ -32,9 +32,9 @@ namespace Volo.Docs.Documents
public virtual string LocalDirectory { get; set; } public virtual string LocalDirectory { get; set; }
public virtual DateTime CreationTime { get; set; } public virtual DateTime CreationTime { get; set; }
public virtual DateTime LastUpdatedTime { get; set; } public virtual DateTime LastUpdatedTime { get; set; }
public virtual DateTime? LastSignificantUpdateTime { get; set; } public virtual DateTime? LastSignificantUpdateTime { get; set; }
public virtual DateTime LastCachedTime { get; set; } public virtual DateTime LastCachedTime { get; set; }
@ -44,7 +44,6 @@ namespace Volo.Docs.Documents
protected Document() protected Document()
{ {
Contributors = new List<DocumentContributor>(); Contributors = new List<DocumentContributor>();
ExtraProperties = new Dictionary<string, object>();
} }
public Document( public Document(
@ -65,8 +64,8 @@ namespace Volo.Docs.Documents
DateTime lastCachedTime, DateTime lastCachedTime,
DateTime? lastSignificantUpdateTime = null DateTime? lastSignificantUpdateTime = null
) )
: base(id)
{ {
Id = id;
ProjectId = projectId; ProjectId = projectId;
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); Name = Check.NotNullOrWhiteSpace(name, nameof(name));
@ -86,7 +85,6 @@ namespace Volo.Docs.Documents
LastSignificantUpdateTime = lastSignificantUpdateTime; LastSignificantUpdateTime = lastSignificantUpdateTime;
Contributors = new List<DocumentContributor>(); Contributors = new List<DocumentContributor>();
ExtraProperties = new Dictionary<string, object>();
} }
public virtual void AddContributor(string username, string userProfileUrl, string avatarUrl) public virtual void AddContributor(string username, string userProfileUrl, string avatarUrl)
@ -111,4 +109,4 @@ namespace Volo.Docs.Documents
r.Username == username && r.UserProfileUrl == userProfileUrl && r.AvatarUrl == avatarUrl); r.Username == username && r.UserProfileUrl == userProfileUrl && r.AvatarUrl == avatarUrl);
} }
} }
} }

19
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Projects/Project.cs

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Data;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
namespace Volo.Docs.Projects namespace Volo.Docs.Projects
@ -52,21 +51,19 @@ namespace Volo.Docs.Projects
protected Project() protected Project()
{ {
ExtraProperties = new Dictionary<string, object>();
} }
public Project( public Project(
Guid id, Guid id,
[NotNull] string name, [NotNull] string name,
[NotNull] string shortName, [NotNull] string shortName,
[NotNull] string documentStoreType, [NotNull] string documentStoreType,
[NotNull] string format, [NotNull] string format,
[NotNull] string defaultDocumentName = "Index", [NotNull] string defaultDocumentName = "Index",
[NotNull] string navigationDocumentName = "docs-nav.json", [NotNull] string navigationDocumentName = "docs-nav.json",
[NotNull] string parametersDocumentName = "docs-params.json") [NotNull] string parametersDocumentName = "docs-params.json")
: base(id)
{ {
Id = id;
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); Name = Check.NotNullOrWhiteSpace(name, nameof(name));
ShortName = Check.NotNullOrWhiteSpace(shortName, nameof(shortName)); ShortName = Check.NotNullOrWhiteSpace(shortName, nameof(shortName));
DocumentStoreType = Check.NotNullOrWhiteSpace(documentStoreType, nameof(documentStoreType)); DocumentStoreType = Check.NotNullOrWhiteSpace(documentStoreType, nameof(documentStoreType));
@ -75,8 +72,6 @@ namespace Volo.Docs.Projects
NavigationDocumentName = Check.NotNullOrWhiteSpace(navigationDocumentName, nameof(navigationDocumentName)); NavigationDocumentName = Check.NotNullOrWhiteSpace(navigationDocumentName, nameof(navigationDocumentName));
ParametersDocumentName = Check.NotNullOrWhiteSpace(parametersDocumentName, nameof(parametersDocumentName)); ParametersDocumentName = Check.NotNullOrWhiteSpace(parametersDocumentName, nameof(parametersDocumentName));
ExtraProperties = new Dictionary<string, object>();
NormalizeShortName(); NormalizeShortName();
} }
@ -110,4 +105,4 @@ namespace Volo.Docs.Projects
ShortName = ShortName.ToLower(); ShortName = ShortName.ToLower();
} }
} }
} }

Loading…
Cancel
Save