// // IStringConverterFactory.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.PacketSerializer.Converters.Special; /// /// Converts special types such as enums or lists. /// public interface IStringConverterFactory { /// /// Whether this type converter should handle the given type. /// /// The type to handle. /// Whether the type should be handled. public bool ShouldHandle(Type type); /// /// Create converter for the given type. /// /// The type to create converter for. /// The type converter or an error. public Result CreateTypeSerializer(Type type); /// /// Create generic converter for the given type. /// /// The type to create converter for. /// The type converter or an error. public Result> CreateTypeSerializer(); }