mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 06:45:11 +00:00
Make model type inherent to interface
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
namespace SabreTools.Serialization.Interfaces
|
||||
{
|
||||
public interface IWrapper
|
||||
/// <summary>
|
||||
/// Represents a wrapper around a top-level model
|
||||
/// </summary>
|
||||
/// <typeparam name="TModel">Top-level model for the wrapper</typeparam>
|
||||
public interface IWrapper<TModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Get a human-readable description of the wrapper
|
||||
/// </summary>
|
||||
string Description();
|
||||
|
||||
/// <summary>
|
||||
/// Get the backing model
|
||||
/// </summary>
|
||||
TModel GetModel();
|
||||
|
||||
#if !NETFRAMEWORK
|
||||
/// <summary>
|
||||
|
||||
@@ -8,7 +8,7 @@ using SabreTools.Serialization.Interfaces;
|
||||
|
||||
namespace SabreTools.Serialization.Wrappers
|
||||
{
|
||||
public abstract class WrapperBase<T> : IWrapper
|
||||
public abstract class WrapperBase<T> : IWrapper<T>
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
@@ -24,6 +24,9 @@ namespace SabreTools.Serialization.Wrappers
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public T GetModel() => Model;
|
||||
|
||||
/// <summary>
|
||||
/// Internal model
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user