rebuild file struct
This commit is contained in:
@@ -31,9 +31,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -42,28 +40,7 @@ namespace StgSharp
|
||||
public static unsafe partial class StgSharp
|
||||
{
|
||||
|
||||
static byte[] _currentHash;
|
||||
|
||||
private static bool _inited;
|
||||
internal const int ssdSegmentLength = 16;
|
||||
|
||||
public static byte[] CurrentAssemblyHash
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_currentHash == null)
|
||||
{
|
||||
string route = Assembly.GetExecutingAssembly().Location;
|
||||
string time = DateTime.UtcNow.ToString();
|
||||
using (SHA256 sh = SHA256.Create())
|
||||
{
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(route);
|
||||
_currentHash = sh.ComputeHash(bytes);
|
||||
}
|
||||
}
|
||||
return _currentHash;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Init an instance of OpenGL program,
|
||||
@@ -99,5 +76,5 @@ namespace StgSharp
|
||||
|
||||
}
|
||||
|
||||
}//------------------------end of class------------------------//
|
||||
}
|
||||
}
|
||||
@@ -64,8 +64,6 @@ namespace StgSharp
|
||||
VK
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static partial class StgSharp
|
||||
{
|
||||
|
||||
@@ -85,29 +83,6 @@ namespace StgSharp
|
||||
mainTimeProvider = new StgSharpTime();
|
||||
MainTimeProvider.StartProvidingTime();
|
||||
InternalIO.glfwInit();
|
||||
InternalIO.InternalAppendLog("\n\n\n");
|
||||
InternalIO.InternalWriteLog(
|
||||
$"Program {Assembly.GetEntryAssembly()!.FullName} Started.",
|
||||
LogType.Info);
|
||||
}
|
||||
|
||||
public static void LogError(Exception ex)
|
||||
{
|
||||
InternalIO.InternalWriteLog(ex.Message, LogType.Error);
|
||||
}
|
||||
|
||||
public static void LogWarning(string log)
|
||||
{
|
||||
InternalIO.InternalWriteLog(log, LogType.Warning);
|
||||
}
|
||||
public static void LogWarning(Exception notVerySeriesException)
|
||||
{
|
||||
InternalIO.InternalWriteLog(notVerySeriesException.Message, LogType.Warning);
|
||||
}
|
||||
|
||||
public static void LogInfo(string log)
|
||||
{
|
||||
InternalIO.InternalWriteLog(log, LogType.Info);
|
||||
}
|
||||
|
||||
public static void Mark(bool needConsole)
|
||||
@@ -122,7 +97,6 @@ namespace StgSharp
|
||||
public static void Terminate()
|
||||
{
|
||||
MainTimeProvider.Terminate();
|
||||
InternalIO.glfwTerminate();
|
||||
}
|
||||
|
||||
public static void Track(
|
||||
@@ -155,7 +129,7 @@ namespace StgSharp
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write a log message to log file, and mark the _level of this message.
|
||||
/// Write a log message to log file, and mark the level of this message.
|
||||
/// </summary>
|
||||
/// <param name="message">A string contains information of how current evironment runs.</param>
|
||||
/// <param name="logType">The severity of current message.</param>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Logic;
|
||||
using StgSharpDebug.Logic;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
Reference in New Issue
Block a user