Skip to content

Commit

Permalink
[1.6.1]SetObject支持ToString
Browse files Browse the repository at this point in the history
  • Loading branch information
LorisYounger committed Apr 29, 2023
1 parent 7880b1f commit 8110feb
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 63 deletions.
2 changes: 1 addition & 1 deletion LinePutScript/Core/LinePutScript.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<ImplicitUsings>disable</ImplicitUsings>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Title>LinePutScript</Title>
Expand Down
3 changes: 1 addition & 2 deletions LinePutScript/Dictionary/Line.cs
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,6 @@ public DateTime this[gdat subName]
get => GetDateTime((string)subName);
set => SetDateTime((string)subName, value);
}
#endregion

#endregion
}
}
118 changes: 60 additions & 58 deletions LinePutScript/Generics/Line.cs

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions LinePutScript/Line.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,22 @@ public Line(string name, string info, string text = "", params Sub[] subs) : bas
/// </summary>
/// <param name="line">其他line</param>
public Line(Line line) : base(line) { }

/// <summary>
/// 克隆一个Line
/// </summary>
/// <returns>相同的Line</returns>
public new object Clone()
{
return new Line(this);
}
/// <summary>
/// 返回一个新List,包含所有Subs
/// </summary>
/// <returns>所有储存的Subs</returns>
public new List<Sub> ToList()
{
return Subs.ToList();
}
}
}
2 changes: 1 addition & 1 deletion LinePutScript/LinePutScript.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LinePutScript</RootNamespace>
<AssemblyName>LinePutScript</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>8.0</LangVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
Expand Down
7 changes: 7 additions & 0 deletions LinePutScript/SetObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,13 @@ public override int GetHashCode()
{
return (int)Sub.GetHashCode(ToString());
}
/// <summary>
/// 转换成文本形式
/// </summary>
public override string ToString()
{
return GetString();
}
}

}
2 changes: 1 addition & 1 deletion LinePutScript/Sub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static string TextReplace(string Reptex)
/// <returns>HashCode</returns>
public static long GetHashCode(string text)
{
using (MD5 md5 = MD5CryptoServiceProvider.Create())
using (MD5 md5 = MD5.Create())
{
return BitConverter.ToInt64(md5.ComputeHash(Encoding.UTF8.GetBytes(text)), 0);
}
Expand Down
Binary file added nuget/LinePutScript.1.6.1.nupkg
Binary file not shown.
Binary file removed packages/BouncyCastle.1.8.3.1/.signature.p7s
Binary file not shown.
Binary file removed packages/Google.Protobuf.3.6.1/.signature.p7s
Binary file not shown.
Binary file removed packages/K4os.Compression.LZ4.1.1.11/.signature.p7s
Binary file not shown.
Binary file not shown.
Binary file removed packages/K4os.Hash.xxHash.1.0.6/.signature.p7s
Binary file not shown.
Binary file removed packages/MySql.Data.8.0.20/.signature.p7s
Binary file not shown.
Binary file removed packages/SSH.NET.2016.1.0/.signature.p7s
Binary file not shown.
Binary file removed packages/System.Buffers.4.5.0/.signature.p7s
Binary file not shown.
Binary file removed packages/System.Memory.4.5.3/.signature.p7s
Binary file not shown.
Binary file not shown.

0 comments on commit 8110feb

Please sign in to comment.