mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-03 01:03:41 -04:00
Initial Commit
This commit is contained in:
@ -1,46 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Observatory.Framework.Files
|
||||
{
|
||||
public static class JournalUtilities
|
||||
{
|
||||
public static string GetEventType(string line)
|
||||
{
|
||||
var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(line));
|
||||
string result = string.Empty;
|
||||
namespace Observatory.Framework.Files.Journal;
|
||||
|
||||
try
|
||||
public static class JournalUtilities
|
||||
{
|
||||
public static string GetEventType(string line)
|
||||
{
|
||||
var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(line));
|
||||
var result = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
while (reader.Read())
|
||||
if (reader.TokenType == JsonTokenType.PropertyName && reader.GetString() == "event")
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.PropertyName && reader.GetString() == "event")
|
||||
{
|
||||
reader.Read();
|
||||
result = reader.GetString();
|
||||
}
|
||||
reader.Read();
|
||||
result = reader.GetString();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
result = "InvalidJson";
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string CleanScanEvent(string line)
|
||||
catch
|
||||
{
|
||||
return line.Replace("\"RotationPeriod\":inf,", "");
|
||||
|
||||
result = "InvalidJson";
|
||||
}
|
||||
|
||||
public const string ObsoleteMessage = "Unused in Elite Dangerous 3.7+, may appear in legacy journal data.";
|
||||
|
||||
public const string UnusedMessage = "Documented by Frontier, but no occurances of this value ever found in real journal data.";
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static string CleanScanEvent(string line)
|
||||
{
|
||||
return line.Replace("\"RotationPeriod\":inf,", "");
|
||||
}
|
||||
|
||||
public const string ObsoleteMessage = "Unused in Elite Dangerous 3.7+, may appear in legacy journal data.";
|
||||
|
||||
public const string UnusedMessage = "Documented by Frontier, but no occurances of this value ever found in real journal data.";
|
||||
|
||||
}
|
Reference in New Issue
Block a user