Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Feb 16, 2024
1 parent ce5a66f commit c61558b
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 14 deletions.
6 changes: 4 additions & 2 deletions sourcegeneration/MonologueSourceGenerator/LogGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,15 @@ public void Initialize(IncrementalGeneratorInitializationContext context)

static void ConstructCall(LogData data, StringBuilder builder)
{
if (data.PreComputed is not null) {
if (data.PreComputed is not null)
{

builder.AppendLine($" {data.PreComputed}");
return;
}

var ret = data.Type switch {
var ret = data.Type switch
{
"System.Single" => ("LogFloat", "", ""),
"System.Double" => ("LogDouble", "", ""),
"System.Byte" => ("LogInteger", "", ""),
Expand Down
3 changes: 2 additions & 1 deletion src/thirdparty/Monologue/DataLogSendableBulder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ public void Update()
break;
}
}
foreach(var updateTable in updateTables) {
foreach (var updateTable in updateTables)
{
updateTable();
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/thirdparty/Monologue/DataLogger.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace Monologue;

public sealed class DataLogger {
public sealed class DataLogger
{

}
3 changes: 2 additions & 1 deletion src/thirdparty/Monologue/EvaluateAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ namespace Monologue;

internal static class EvaluateAttributes
{
public static IEnumerable<LogAttribute> From(MemberInfo member) {
public static IEnumerable<LogAttribute> From(MemberInfo member)
{
return member.GetCustomAttributes<LogAttribute>();
}
}
15 changes: 10 additions & 5 deletions src/thirdparty/Monologue/EvaluateField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@

namespace Monologue;

internal class EvaluateField {
private static Func<object> GetSupplier(FieldInfo field, ILogged logged) {
return () => {
internal class EvaluateField
{
private static Func<object> GetSupplier(FieldInfo field, ILogged logged)
{
return () =>
{
return field.GetValue(logged)!;
};
}

private static object? GetField(FieldInfo field, ILogged logged) {
private static object? GetField(FieldInfo field, ILogged logged)
{
return field.GetValue(logged);
}

public static void EvalField(FieldInfo field, ILogged loggable, string rootPath) {
public static void EvalField(FieldInfo field, ILogged loggable, string rootPath)
{
}
}
3 changes: 2 additions & 1 deletion src/thirdparty/Monologue/ILogged.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace Monologue;

public interface ILogged {
public interface ILogged
{
void UpdateMonologue(string path, Monologuer logger);
}
2 changes: 1 addition & 1 deletion src/thirdparty/Monologue/LogLevel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Monologue;
namespace Monologue;

public enum LogLevel
{
Expand Down
3 changes: 2 additions & 1 deletion src/thirdparty/Monologue/LogType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
namespace Monologue;

[Flags]
public enum LogType {
public enum LogType
{
None = 0,
File = 1,
Nt = 2
Expand Down
3 changes: 2 additions & 1 deletion src/thirdparty/Monologue/NTLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace Monologue;

public sealed class NTLogger {
public sealed class NTLogger
{
private readonly NetworkTableInstance table = NetworkTableInstance.Default;


Expand Down

0 comments on commit c61558b

Please sign in to comment.