Skip to content

Commit 1377a0a

Browse files
committed
Fix compile error.
1 parent e923d47 commit 1377a0a

9 files changed

Lines changed: 29 additions & 17 deletions

File tree

src/Berrysoft.Data/Graph.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,13 @@ public Graph(IEqualityComparer<T> comparer)
564564
/// <param name="comparer">An instance of <see cref="IEqualityComparer{T}"/>; default when <see langword="null"/>.</param>
565565
public Graph(int vertexCapacity, int arcCapacity, IEqualityComparer<T> comparer)
566566
{
567+
#if NETSTANDARD2_0
568+
_vertexes = new HashSet<T>(comparer);
569+
_arcs = new MultiMap<T, T>(comparer, comparer);
570+
#else
567571
_vertexes = new HashSet<T>(vertexCapacity, comparer);
568572
_arcs = new MultiMap<T, T>(arcCapacity, comparer, comparer);
573+
#endif
569574
}
570575
/// <summary>
571576
/// Initialize an instance of <see cref="Graph{T}"/>.

src/Berrysoft.Html/HtmlAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public HtmlAttribute(string name, string attrvalue)
3838
/// <returns>A string.</returns>
3939
public override string ToString()
4040
{
41-
#if NETCOREAPP || NETSTANDARD
41+
#if NETCOREAPP || NETSTANDARD2_1
4242
if (attrvalue.Contains('\"'))
4343
#else
4444
if (attrvalue.Contains("\""))

src/Berrysoft.Html/HtmlDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private void WriteToStream(StreamWriter writer, HtmlObject obj)
7171
switch (obj)
7272
{
7373
case HtmlNode node:
74-
#if NETCOREAPP || NETSTANDARD
74+
#if NETCOREAPP || NETSTANDARD2_1
7575
writer.Write("<{0} {1}>", node.Name, string.Join(' ', node.Attributes()));
7676
#else
7777
writer.Write("<{0} {1}>", node.Name, string.Join(" ", node.Attributes()));
@@ -109,7 +109,7 @@ private async Task WriteToStreamAsync(StreamWriter writer, HtmlObject obj)
109109
switch (obj)
110110
{
111111
case HtmlNode node:
112-
#if NETCOREAPP || NETSTANDARD
112+
#if NETCOREAPP || NETSTANDARD2_1
113113
await writer.WriteAsync($"<{node.Name} {string.Join(' ', node.Attributes())}>");
114114
#else
115115
await writer.WriteAsync($"<{node.Name} {string.Join(" ", node.Attributes())}>");

src/Berrysoft.Html/HtmlNode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ public override string ToString()
137137
{
138138
if (objs.Count > 0)
139139
{
140-
#if NETCOREAPP || NETSTANDARD
140+
#if NETCOREAPP || NETSTANDARD2_1
141141
return $"<{Name} {string.Join(' ', Attributes())}>{string.Concat(Elements())}</{Name}>";
142142
#else
143143
return $"<{Name} {string.Join(" ", Attributes().Select(attr => attr.ToString()))}>{string.Concat(Elements())}</{Name}>";
144144
#endif
145145
}
146146
else
147147
{
148-
#if NETCOREAPP || NETSTANDARD
148+
#if NETCOREAPP || NETSTANDARD2_1
149149
return $"<{Name} {string.Join(' ', Attributes())} />";
150150
#else
151151
return $"<{Name} {string.Join(" ", Attributes().Select(attr => attr.ToString()))} />";

src/Berrysoft.Html/Markdown/MdElement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static IEnumerable<MdElement> GetElements(string[] lines)
3939
{
4040
yield return new MdCodeElement(lines, ref i);
4141
}
42-
#if NETCOREAPP || NETSTANDARD
42+
#if NETCOREAPP || NETSTANDARD2_1
4343
else if (TableRegex.IsMatch(line) && line.Contains('|'))
4444
#else
4545
else if (TableRegex.IsMatch(line) && line.Contains("|"))

src/Berrysoft.Html/Markdown/MdTableElement.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public override HtmlNode ToHtmlNode()
8686
HtmlNode table = new HtmlNode("table");
8787
HtmlNode tr = new HtmlNode("tr");
8888
table.AddElement(new HtmlNode("thead", tr));
89-
#if NETCOREAPP || NETSTANDARD
89+
#if NETCOREAPP || NETSTANDARD2_1
9090
string[] heads = head.Split('|', StringSplitOptions.RemoveEmptyEntries);
9191
#else
9292
string[] heads = head.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
@@ -109,7 +109,7 @@ public override HtmlNode ToHtmlNode()
109109
table.AddElement(tbody);
110110
foreach (string line in elements)
111111
{
112-
#if NETCOREAPP || NETSTANDARD
112+
#if NETCOREAPP || NETSTANDARD2_1
113113
string[] es = line.Split('|', StringSplitOptions.RemoveEmptyEntries);
114114
#else
115115
string[] es = line.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

src/Berrysoft.Html/Markdown/MdTextAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static IEnumerable<MdToken> GetTextTokens(string text, int offset)
3232
result.AddRange(StrongAnalyzer.GetTokens(text, offset));
3333
result.AddRange(HyperlinkAnalyzer.GetTokens(text, offset));
3434
result.AddRange(ImageAnalyzer.GetTokens(text, offset));
35-
#if NETCOREAPP || NETSTANDARD
35+
#if NETCOREAPP || NETSTANDARD2_1
3636
if (!(text.EndsWith('*') || text.EndsWith('`') || text.EndsWith(')')))
3737
#else
3838
if (!(text.EndsWith("*") || text.EndsWith("`") || text.EndsWith(")")))

src/Berrysoft.Tsinghua.Net/UseregHelper.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,23 @@ public class NetDetail
4949
/// <summary>
5050
/// Initializes a new instance of <see cref="NetDetail"/> class.
5151
/// </summary>
52-
/// <param name="onlineDate">The date logging in.</param>
52+
/// <param name="login">The time logging in.</param>
53+
/// <param name="logout">The time logging out.</param>
5354
/// <param name="flux">The flux has been used.</param>
54-
public NetDetail(DateTime onlineDate, long flux)
55+
public NetDetail(DateTime login, DateTime logout, long flux)
5556
{
56-
OnlineDate = onlineDate;
57+
LoginTime = login;
58+
LogoutTime = logout;
5759
Flux = flux;
5860
}
5961
/// <summary>
60-
/// The date logging in.
62+
/// The time logging in.
6163
/// </summary>
62-
public DateTime OnlineDate { get; }
64+
public DateTime LoginTime { get; }
65+
/// <summary>
66+
/// The time logging out.
67+
/// </summary>
68+
public DateTime LogoutTime { get; }
6369
/// <summary>
6470
/// The flux has been used.
6571
/// </summary>
@@ -194,6 +200,7 @@ from tr in doc.DocumentNode.Element("html").Element("body").Element("table").Ele
194200
select td.FirstChild?.InnerText).ToArray()
195201
select new NetDetail(
196202
DateTime.ParseExact(tds[1], "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),
203+
DateTime.ParseExact(tds[2], "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),
197204
ParseFlux(tds[4])));
198205
if (list.Count <= oldsize) break;
199206
}

target.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
<PropertyGroup>
99
<LangVersion>preview</LangVersion>
10-
<AssemblyVersion>1.1.214.0</AssemblyVersion>
11-
<FileVersion>1.1.214.0</FileVersion>
10+
<AssemblyVersion>1.1.216.0</AssemblyVersion>
11+
<FileVersion>1.1.216.0</FileVersion>
1212
<OutputPath>..\..\bin\$(Configuration)</OutputPath>
1313
</PropertyGroup>
1414

1515
<PropertyGroup>
16-
<Version>1.1.214-preview6</Version>
16+
<Version>1.1.216-rc1</Version>
1717
<Authors>Berrysoft</Authors>
1818
<Copyright>Copyright (c) 2018-2019 Berrysoft</Copyright>
1919
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>

0 commit comments

Comments
 (0)