Skip to content

Commit

Permalink
Remove sealed and make protected the TypeInspectors
Browse files Browse the repository at this point in the history
Fixes #984
  • Loading branch information
EdwardCooke committed Sep 26, 2024
1 parent d622f05 commit 532f128
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace YamlDotNet.Serialization.TypeInspectors
/// <summary>
/// Wraps another <see cref="ITypeInspector"/> and applies caching.
/// </summary>
public sealed class CachedTypeInspector : TypeInspectorSkeleton
public class CachedTypeInspector : TypeInspectorSkeleton
{
private readonly ITypeInspector innerTypeDescriptor;
private readonly ConcurrentDictionary<Type, List<IPropertyDescriptor>> cache = new ConcurrentDictionary<Type, List<IPropertyDescriptor>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace YamlDotNet.Serialization.TypeInspectors
/// <summary>
/// Aggregates the results from multiple <see cref="ITypeInspector" /> into a single one.
/// </summary>
public sealed class CompositeTypeInspector : TypeInspectorSkeleton
public class CompositeTypeInspector : TypeInspectorSkeleton
{
private readonly IEnumerable<ITypeInspector> typeInspectors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace YamlDotNet.Serialization.TypeInspectors
/// Wraps another <see cref="ITypeInspector"/> and applies a
/// naming convention to the names of the properties.
/// </summary>
public sealed class NamingConventionTypeInspector : TypeInspectorSkeleton
public class NamingConventionTypeInspector : TypeInspectorSkeleton
{
private readonly ITypeInspector innerTypeDescriptor;
private readonly INamingConvention namingConvention;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace YamlDotNet.Serialization.TypeInspectors
/// <summary>
/// Returns the properties of a type that are both readable and writable.
/// </summary>
public sealed class ReadableAndWritablePropertiesTypeInspector : TypeInspectorSkeleton
public class ReadableAndWritablePropertiesTypeInspector : TypeInspectorSkeleton
{
private readonly ITypeInspector innerTypeDescriptor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace YamlDotNet.Serialization.TypeInspectors
/// <summary>
/// Returns the properties and fields of a type that are readable.
/// </summary>
public sealed class ReadableFieldsTypeInspector : ReflectionTypeInspector
public class ReadableFieldsTypeInspector : ReflectionTypeInspector
{
private readonly ITypeResolver typeResolver;

Expand All @@ -46,7 +46,7 @@ public override IEnumerable<IPropertyDescriptor> GetProperties(Type type, object
.Select(p => (IPropertyDescriptor)new ReflectionFieldDescriptor(p, typeResolver));
}

private sealed class ReflectionFieldDescriptor : IPropertyDescriptor
protected class ReflectionFieldDescriptor : IPropertyDescriptor
{
private readonly FieldInfo fieldInfo;
private readonly ITypeResolver typeResolver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace YamlDotNet.Serialization.TypeInspectors
/// <summary>
/// Returns the properties of a type that are readable.
/// </summary>
public sealed class ReadablePropertiesTypeInspector : ReflectionTypeInspector
public class ReadablePropertiesTypeInspector : ReflectionTypeInspector
{
private readonly ITypeResolver typeResolver;
private readonly bool includeNonPublicProperties;
Expand Down Expand Up @@ -60,7 +60,7 @@ public override IEnumerable<IPropertyDescriptor> GetProperties(Type type, object
.Select(p => (IPropertyDescriptor)new ReflectionPropertyDescriptor(p, typeResolver));
}

private sealed class ReflectionPropertyDescriptor : IPropertyDescriptor
protected class ReflectionPropertyDescriptor : IPropertyDescriptor
{
private readonly PropertyInfo propertyInfo;
private readonly ITypeResolver typeResolver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace YamlDotNet.Serialization.TypeInspectors
/// <summary>
/// Returns the properties of a type that are writable.
/// </summary>
public sealed class WritablePropertiesTypeInspector : ReflectionTypeInspector
public class WritablePropertiesTypeInspector : ReflectionTypeInspector
{
private readonly ITypeResolver typeResolver;
private readonly bool includeNonPublicProperties;
Expand Down Expand Up @@ -61,7 +61,7 @@ public override IEnumerable<IPropertyDescriptor> GetProperties(Type type, object
.ToArray();
}

private sealed class ReflectionPropertyDescriptor : IPropertyDescriptor
protected class ReflectionPropertyDescriptor : IPropertyDescriptor
{
private readonly PropertyInfo propertyInfo;
private readonly ITypeResolver typeResolver;
Expand Down

0 comments on commit 532f128

Please sign in to comment.