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 DateTime CreationTime { get; set; }
public virtual DateTime LastUpdatedTime { get; set; }
public virtual DateTime? LastSignificantUpdateTime { get; set; }
public virtual DateTime LastCachedTime { get; set; }
@ -44,7 +44,6 @@ namespace Volo.Docs.Documents
protected Document()
{
Contributors = new List<DocumentContributor>();
ExtraProperties = new Dictionary<string, object>();
}
public Document(
@ -65,8 +64,8 @@ namespace Volo.Docs.Documents
DateTime lastCachedTime,
DateTime? lastSignificantUpdateTime = null
)
: base(id)
{
Id = id;
ProjectId = projectId;
Name = Check.NotNullOrWhiteSpace(name, nameof(name));
@ -86,7 +85,6 @@ namespace Volo.Docs.Documents
LastSignificantUpdateTime = lastSignificantUpdateTime;
Contributors = new List<DocumentContributor>();
ExtraProperties = new Dictionary<string, object>();
}
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);
}
}
}
}

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

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

Loading…
Cancel
Save