mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Cleanup TypeSerializer Logger warnings (#5966)
This commit is contained in:
@@ -45,8 +45,11 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Pro
|
||||
IDependencyCollection dependencies, SerializationHookContext hookCtx, ISerializationContext? context = null,
|
||||
ISerializationManager.InstantiationDelegate<PrototypeFlags<T>>? instanceProvider = null)
|
||||
{
|
||||
if(instanceProvider != null)
|
||||
Logger.Warning($"Provided value to a Read-call for a {nameof(PrototypeFlags<T>)}. Ignoring...");
|
||||
if (instanceProvider != null)
|
||||
{
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning($"Provided value to a Read-call for a {nameof(PrototypeFlags<T>)}. Ignoring...");
|
||||
}
|
||||
|
||||
var flags = new List<string>(node.Sequence.Count);
|
||||
|
||||
@@ -78,8 +81,11 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Pro
|
||||
IDependencyCollection dependencies, SerializationHookContext hookCtx, ISerializationContext? context = null,
|
||||
ISerializationManager.InstantiationDelegate<PrototypeFlags<T>>? instanceProvider = null)
|
||||
{
|
||||
if(instanceProvider != null)
|
||||
Logger.Warning($"Provided value to a Read-call for a {nameof(PrototypeFlags<T>)}. Ignoring...");
|
||||
if (instanceProvider != null)
|
||||
{
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning($"Provided value to a Read-call for a {nameof(PrototypeFlags<T>)}. Ignoring...");
|
||||
}
|
||||
|
||||
return new PrototypeFlags<T>(node.Value);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,8 @@ public sealed class DictionarySerializer<TKey, TValue> :
|
||||
{
|
||||
if (instanceProvider != null)
|
||||
{
|
||||
Logger.Warning(
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning(
|
||||
$"Provided value to a Read-call for a {nameof(FrozenDictionary<TKey, TValue>)}. Ignoring...");
|
||||
}
|
||||
|
||||
@@ -180,7 +181,8 @@ public sealed class DictionarySerializer<TKey, TValue> :
|
||||
{
|
||||
if (instanceProvider != null)
|
||||
{
|
||||
Logger.Warning(
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning(
|
||||
$"Provided value to a Read-call for a {nameof(IReadOnlyDictionary<TKey, TValue>)}. Ignoring...");
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,10 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations.Generic
|
||||
SerializationHookContext hookCtx, ISerializationContext? context = null, ISerializationManager.InstantiationDelegate<FrozenSet<T>>? instanceProvider = null)
|
||||
{
|
||||
if (instanceProvider != null)
|
||||
Logger.Warning($"Provided value to a Read-call for a {nameof(FrozenSet<T>)}. Ignoring...");
|
||||
{
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning($"Provided value to a Read-call for a {nameof(FrozenSet<T>)}. Ignoring...");
|
||||
}
|
||||
|
||||
var array = new T[node.Sequence.Count];
|
||||
var i = 0;
|
||||
@@ -65,7 +68,10 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations.Generic
|
||||
ISerializationManager.InstantiationDelegate<ImmutableHashSet<T>>? instanceProvider)
|
||||
{
|
||||
if (instanceProvider != null)
|
||||
Logger.Warning($"Provided value to a Read-call for a {nameof(ImmutableHashSet<T>)}. Ignoring...");
|
||||
{
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning($"Provided value to a Read-call for a {nameof(ImmutableHashSet<T>)}. Ignoring...");
|
||||
}
|
||||
var set = ImmutableHashSet.CreateBuilder<T>();
|
||||
|
||||
foreach (var dataNode in node.Sequence)
|
||||
|
||||
@@ -127,8 +127,11 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations.Generic
|
||||
SerializationHookContext hookCtx, ISerializationContext? context,
|
||||
ISerializationManager.InstantiationDelegate<IReadOnlyList<T>>? instanceProvider)
|
||||
{
|
||||
if(instanceProvider != null)
|
||||
Logger.Warning($"Provided value to a Read-call for a {nameof(IReadOnlySet<T>)}. Ignoring...");
|
||||
if (instanceProvider != null)
|
||||
{
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning($"Provided value to a Read-call for a {nameof(IReadOnlySet<T>)}. Ignoring...");
|
||||
}
|
||||
|
||||
var list = new List<T>();
|
||||
|
||||
@@ -146,8 +149,11 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations.Generic
|
||||
SerializationHookContext hookCtx, ISerializationContext? context,
|
||||
ISerializationManager.InstantiationDelegate<IReadOnlyCollection<T>>? instanceProvider)
|
||||
{
|
||||
if(instanceProvider != null)
|
||||
Logger.Warning($"Provided value to a Read-call for a {nameof(IReadOnlyCollection<T>)}. Ignoring...");
|
||||
if (instanceProvider != null)
|
||||
{
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning($"Provided value to a Read-call for a {nameof(IReadOnlyCollection<T>)}. Ignoring...");
|
||||
}
|
||||
|
||||
var list = new List<T>();
|
||||
|
||||
@@ -165,8 +171,11 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations.Generic
|
||||
SerializationHookContext hookCtx, ISerializationContext? context,
|
||||
ISerializationManager.InstantiationDelegate<ImmutableList<T>>? instanceProvider)
|
||||
{
|
||||
if(instanceProvider != null)
|
||||
Logger.Warning($"Provided value to a Read-call for a {nameof(ImmutableList<T>)}. Ignoring...");
|
||||
if (instanceProvider != null)
|
||||
{
|
||||
var sawmill = dependencies.Resolve<ILogManager>().GetSawmill("szr");
|
||||
sawmill.Warning($"Provided value to a Read-call for a {nameof(ImmutableList<T>)}. Ignoring...");
|
||||
}
|
||||
|
||||
var list = ImmutableList.CreateBuilder<T>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user