version update and fixes
This commit is contained in:
parent
563eabb6c4
commit
d7de6ef4c6
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<!--package info-->
|
||||
<PackageId>DTLib.Dtsod</PackageId>
|
||||
<Version>1.0.4</Version>
|
||||
<Version>1.1.0</Version>
|
||||
<Authors>Timerix</Authors>
|
||||
<Description>Definitely not json</Description>
|
||||
<RepositoryType>GIT</RepositoryType>
|
||||
@ -33,7 +33,7 @@
|
||||
<ProjectReference Include="..\DTLib\DTLib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)' != 'Debug' ">
|
||||
<PackageReference Include="DTLib" Version="1.0.4" />
|
||||
<PackageReference Include="DTLib" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--project files-->
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<!--package info-->
|
||||
<PackageId>DTLib.Logging</PackageId>
|
||||
<Version>1.0.8</Version>
|
||||
<Version>1.1.0</Version>
|
||||
<Authors>Timerix</Authors>
|
||||
<Description>Loggers with dependency injection</Description>
|
||||
<RepositoryType>GIT</RepositoryType>
|
||||
@ -30,7 +30,7 @@
|
||||
<ProjectReference Include="..\DTLib.Ben.Demystifier\DTLib.Ben.Demystifier.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)' != 'Debug' ">
|
||||
<PackageReference Include="DTLib" Version="1.0.4" />
|
||||
<PackageReference Include="DTLib" Version="1.1.0" />
|
||||
<PackageReference Include="DTLib.Ben.Demystifier" Version="1.0.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<!--package info-->
|
||||
<PackageId>DTLib.Network</PackageId>
|
||||
<Version>1.0.4</Version>
|
||||
<Version>1.1.0</Version>
|
||||
<Authors>Timerix</Authors>
|
||||
<Description>Some sick network protocols</Description>
|
||||
<RepositoryType>GIT</RepositoryType>
|
||||
@ -32,6 +32,6 @@
|
||||
<ProjectReference Include="..\DTLib.Dtsod\DTLib.Dtsod.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)' != 'Debug' ">
|
||||
<PackageReference Include="DTLib.Dtsod" Version="1.0.4" />
|
||||
<PackageReference Include="DTLib.Dtsod" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -27,10 +27,10 @@
|
||||
<ProjectReference Include="..\DTLib\DTLib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)' != 'Debug' ">
|
||||
<PackageReference Include="DTLib" Version="1.0.5" />
|
||||
<PackageReference Include="DTLib.Dtsod" Version="1.0.4" />
|
||||
<PackageReference Include="DTLib.Network" Version="1.0.4" />
|
||||
<PackageReference Include="DTLib.Logging" Version="1.0.8" />
|
||||
<PackageReference Include="DTLib" Version="1.1.1" />
|
||||
<PackageReference Include="DTLib.Dtsod" Version="1.1.0" />
|
||||
<PackageReference Include="DTLib.Network" Version="1.1.0" />
|
||||
<PackageReference Include="DTLib.Logging" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--project files-->
|
||||
|
||||
@ -30,15 +30,6 @@ public static class Program
|
||||
|
||||
try
|
||||
{
|
||||
IOPath path = "file";
|
||||
IOPath path2 = "dir/"+ path + "_temp";
|
||||
File.Create(path);
|
||||
File.Copy(path, path2, true);
|
||||
System.Console.WriteLine("{0} was copied to {1}.", path, path2);
|
||||
Directory.Copy(path2.ParentDir(), "dir2/c/", true);
|
||||
System.Console.WriteLine($"dir/c/:\n"+Directory.GetAllFiles("dir2\\c").MergeToString("\n\t"));
|
||||
return;
|
||||
|
||||
new LaunchArgumentParser().WithNoExit().ParseAndHandle(args);
|
||||
TestPInvoke.TestAll();
|
||||
TestAutoarr.TestAll();
|
||||
|
||||
12
DTLib.sln
12
DTLib.sln
@ -30,32 +30,44 @@ Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Publish|Any CPU = Publish|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B620E5E9-800F-4B2D-B4A5-062E05DB704F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B620E5E9-800F-4B2D-B4A5-062E05DB704F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B620E5E9-800F-4B2D-B4A5-062E05DB704F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B620E5E9-800F-4B2D-B4A5-062E05DB704F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B620E5E9-800F-4B2D-B4A5-062E05DB704F}.Publish|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B620E5E9-800F-4B2D-B4A5-062E05DB704F}.Publish|Any CPU.Build.0 = Release|Any CPU
|
||||
{72BA37EF-07EC-4D34-966A-20D5E83ADB32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{72BA37EF-07EC-4D34-966A-20D5E83ADB32}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{72BA37EF-07EC-4D34-966A-20D5E83ADB32}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{72BA37EF-07EC-4D34-966A-20D5E83ADB32}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{72BA37EF-07EC-4D34-966A-20D5E83ADB32}.Publish|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ADE425F5-8645-47F0-9AA8-33FA748D36BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ADE425F5-8645-47F0-9AA8-33FA748D36BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ADE425F5-8645-47F0-9AA8-33FA748D36BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ADE425F5-8645-47F0-9AA8-33FA748D36BE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ADE425F5-8645-47F0-9AA8-33FA748D36BE}.Publish|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ADE425F5-8645-47F0-9AA8-33FA748D36BE}.Publish|Any CPU.Build.0 = Release|Any CPU
|
||||
{24B7D0A2-0462-424D-B3F5-29A6655FE472}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{24B7D0A2-0462-424D-B3F5-29A6655FE472}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{24B7D0A2-0462-424D-B3F5-29A6655FE472}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{24B7D0A2-0462-424D-B3F5-29A6655FE472}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{24B7D0A2-0462-424D-B3F5-29A6655FE472}.Publish|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{24B7D0A2-0462-424D-B3F5-29A6655FE472}.Publish|Any CPU.Build.0 = Release|Any CPU
|
||||
{00B76172-32BB-4B72-9891-47FAEF63386C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{00B76172-32BB-4B72-9891-47FAEF63386C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00B76172-32BB-4B72-9891-47FAEF63386C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{00B76172-32BB-4B72-9891-47FAEF63386C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{00B76172-32BB-4B72-9891-47FAEF63386C}.Publish|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{00B76172-32BB-4B72-9891-47FAEF63386C}.Publish|Any CPU.Build.0 = Release|Any CPU
|
||||
{AC7CB524-4D59-42E0-9F96-1C201A92494B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AC7CB524-4D59-42E0-9F96-1C201A92494B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AC7CB524-4D59-42E0-9F96-1C201A92494B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC7CB524-4D59-42E0-9F96-1C201A92494B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AC7CB524-4D59-42E0-9F96-1C201A92494B}.Publish|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC7CB524-4D59-42E0-9F96-1C201A92494B}.Publish|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<!--package info-->
|
||||
<PackageId>DTLib</PackageId>
|
||||
<Version>1.0.5</Version>
|
||||
<Version>1.1.1</Version>
|
||||
<Authors>Timerix</Authors>
|
||||
<Description>Library for all my C# projects</Description>
|
||||
<RepositoryType>GIT</RepositoryType>
|
||||
|
||||
@ -36,7 +36,7 @@ public static class DependencyResolver
|
||||
Path.Concat("runtimes", $"{os}-{arch}"),
|
||||
Path.Concat("runtimes", $"{os}-{arch}", "native")
|
||||
};
|
||||
foreach (string dir in possibleLibDirs)
|
||||
foreach (var dir in possibleLibDirs)
|
||||
if (Directory.Exists(dir))
|
||||
foreach (var file in Directory.GetFiles(dir))
|
||||
{
|
||||
|
||||
@ -93,9 +93,8 @@ public readonly struct IOPath
|
||||
public IOPath Substring(int startIndex, int count) => new(Str.Substring(startIndex, count), true);
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public IOPath Replace(char oldChar, char newChar) => new(Str.Replace(oldChar, newChar), true);
|
||||
[Obsolete("use different replace methods")]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public IOPath Replace(string oldStr, string newStr) => new(Str.Replace(oldStr, newStr), true);
|
||||
public IOPath ReplaceAnywhere(string oldStr, string newStr) => new(Str.Replace(oldStr, newStr), true);
|
||||
|
||||
///<inheritdoc cref="string.IndexOf(char)"/>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@ -103,9 +103,12 @@ public static class Path
|
||||
#endif
|
||||
}
|
||||
|
||||
public static IOPath FileName(this IOPath path)
|
||||
/// returns just dir name or file name with extension
|
||||
public static IOPath LastName(this IOPath path)
|
||||
{
|
||||
int i = path.LastIndexOf(Sep);
|
||||
if (i == path.Length - 1) // ends with separator
|
||||
i = path.LastIndexOf(Sep, i-1);
|
||||
if (i == -1) return path;
|
||||
return path.Substring(i+1);
|
||||
}
|
||||
@ -113,7 +116,7 @@ public static class Path
|
||||
public static IOPath Extension(this IOPath path)
|
||||
{
|
||||
int i = path.LastIndexOf('.');
|
||||
if (i == -1) return FileName(path);
|
||||
if (i == -1) return LastName(path);
|
||||
return path.Substring(i + 1);
|
||||
}
|
||||
|
||||
@ -133,4 +136,12 @@ public static class Path
|
||||
throw new Exception($"path <{path}> doesnt starts with <{baseDir}");
|
||||
return Concat(otherDir, path.Substring(baseDir.Length));
|
||||
}
|
||||
|
||||
public static IOPath RemoveBase(this IOPath path, IOPath baseDir)
|
||||
{
|
||||
|
||||
if (!path.StartsWith(baseDir))
|
||||
throw new Exception($"path <{path}> doesnt starts with <{baseDir}");
|
||||
return path.Substring(baseDir.Length);
|
||||
}
|
||||
}
|
||||
@ -42,7 +42,7 @@ public class Hasher
|
||||
}
|
||||
|
||||
// хеш файла
|
||||
public byte[] HashFile(string filename)
|
||||
public byte[] HashFile(IOPath filename)
|
||||
{
|
||||
using System.IO.FileStream fileStream = File.OpenRead(filename);
|
||||
//var then = DateTime.Now.Hour * 3600 + DateTime.Now.Minute * 60 + DateTime.Now.Second;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user