diff --git a/src/Docfx.Build.Common/Reference/OverwriteDocumentReader.cs b/src/Docfx.Build.Common/Reference/OverwriteDocumentReader.cs index 591c6b3a2c2..8389effc0d1 100644 --- a/src/Docfx.Build.Common/Reference/OverwriteDocumentReader.cs +++ b/src/Docfx.Build.Common/Reference/OverwriteDocumentReader.cs @@ -65,7 +65,7 @@ private static T ResolveContent(T item, Func itemBuilder) where T : IOv { YamlUtility.Serialize(sw, item); using var sr = new StringReader(sw.ToString()); - var serializer = new YamlDeserializer(ignoreUnmatched: true); + var serializer = new YamlDeserializer(); var placeholderValueDeserializer = new PlaceholderValueDeserializer(serializer.ValueDeserializer, item.Conceptual); item = serializer.Deserialize(sr, placeholderValueDeserializer); if (placeholderValueDeserializer.ContainPlaceholder) diff --git a/src/Docfx.Common/YamlUtility.cs b/src/Docfx.Common/YamlUtility.cs index d93726e1768..d7490b41c18 100644 --- a/src/Docfx.Common/YamlUtility.cs +++ b/src/Docfx.Common/YamlUtility.cs @@ -12,8 +12,8 @@ namespace Docfx.Common; public static class YamlUtility { - private static readonly ThreadLocal serializer = new(() => new YamlSerializer(SerializationOptions.DisableAliases)); - private static readonly ThreadLocal deserializer = new(() => new YamlDeserializer(ignoreUnmatched: true)); + private static readonly ThreadLocal serializer = new(() => new YamlSerializer()); + private static readonly ThreadLocal deserializer = new(() => new YamlDeserializer()); public static void Serialize(TextWriter writer, object graph) { diff --git a/src/Docfx.YamlSerialization/NodeDeserializers/EmitArrayNodeDeserializer.cs b/src/Docfx.YamlSerialization/NodeDeserializers/EmitArrayNodeDeserializer.cs index 9a134171f11..39b6e09b478 100644 --- a/src/Docfx.YamlSerialization/NodeDeserializers/EmitArrayNodeDeserializer.cs +++ b/src/Docfx.YamlSerialization/NodeDeserializers/EmitArrayNodeDeserializer.cs @@ -10,12 +10,10 @@ namespace Docfx.YamlSerialization.NodeDeserializers; -public class EmitArrayNodeDeserializer : INodeDeserializer +class EmitArrayNodeDeserializer : INodeDeserializer { - private static readonly MethodInfo DeserializeHelperMethod = - typeof(EmitArrayNodeDeserializer).GetMethod(nameof(DeserializeHelper)); - private static readonly ConcurrentDictionary, object>> _funcCache = - new(); + private static readonly MethodInfo DeserializeHelperMethod = typeof(EmitArrayNodeDeserializer).GetMethod(nameof(DeserializeHelper)); + private static readonly ConcurrentDictionary, object>> _funcCache = new(); bool INodeDeserializer.Deserialize(IParser reader, Type expectedType, Func nestedObjectDeserializer, out object value) { diff --git a/src/Docfx.YamlSerialization/NodeDeserializers/EmitGenericCollectionNodeDeserializer.cs b/src/Docfx.YamlSerialization/NodeDeserializers/EmitGenericCollectionNodeDeserializer.cs index 553d3760a2a..55cee92aa1e 100644 --- a/src/Docfx.YamlSerialization/NodeDeserializers/EmitGenericCollectionNodeDeserializer.cs +++ b/src/Docfx.YamlSerialization/NodeDeserializers/EmitGenericCollectionNodeDeserializer.cs @@ -13,7 +13,7 @@ namespace Docfx.YamlSerialization.NodeDeserializers; -public class EmitGenericCollectionNodeDeserializer : INodeDeserializer +class EmitGenericCollectionNodeDeserializer : INodeDeserializer { private static readonly MethodInfo DeserializeHelperMethod = typeof(EmitGenericCollectionNodeDeserializer).GetMethod(nameof(DeserializeHelper)); diff --git a/src/Docfx.YamlSerialization/NodeDeserializers/EmitGenericDictionaryNodeDeserializer.cs b/src/Docfx.YamlSerialization/NodeDeserializers/EmitGenericDictionaryNodeDeserializer.cs index 4e263d10896..fcb1e37c8a3 100644 --- a/src/Docfx.YamlSerialization/NodeDeserializers/EmitGenericDictionaryNodeDeserializer.cs +++ b/src/Docfx.YamlSerialization/NodeDeserializers/EmitGenericDictionaryNodeDeserializer.cs @@ -11,7 +11,7 @@ namespace Docfx.YamlSerialization.NodeDeserializers; -public class EmitGenericDictionaryNodeDeserializer : INodeDeserializer +class EmitGenericDictionaryNodeDeserializer : INodeDeserializer { private static readonly MethodInfo DeserializeHelperMethod = typeof(EmitGenericDictionaryNodeDeserializer).GetMethod(nameof(DeserializeHelper)); diff --git a/src/Docfx.YamlSerialization/NodeDeserializers/ExtensibleObjectNodeDeserializer.cs b/src/Docfx.YamlSerialization/NodeDeserializers/ExtensibleObjectNodeDeserializer.cs index 6929eb01223..fef806b2a01 100644 --- a/src/Docfx.YamlSerialization/NodeDeserializers/ExtensibleObjectNodeDeserializer.cs +++ b/src/Docfx.YamlSerialization/NodeDeserializers/ExtensibleObjectNodeDeserializer.cs @@ -8,7 +8,7 @@ namespace Docfx.YamlSerialization.NodeDeserializers; -public sealed class ExtensibleObjectNodeDeserializer : INodeDeserializer +class ExtensibleObjectNodeDeserializer : INodeDeserializer { private readonly IObjectFactory _objectFactory; private readonly ITypeInspector _typeDescriptor; diff --git a/src/Docfx.YamlSerialization/ObjectDescriptors/BetterObjectDescriptor.cs b/src/Docfx.YamlSerialization/ObjectDescriptors/BetterObjectDescriptor.cs index 0e90f372e8e..1fdb5291bea 100644 --- a/src/Docfx.YamlSerialization/ObjectDescriptors/BetterObjectDescriptor.cs +++ b/src/Docfx.YamlSerialization/ObjectDescriptors/BetterObjectDescriptor.cs @@ -7,7 +7,7 @@ namespace Docfx.YamlSerialization.ObjectDescriptors; -public class BetterObjectDescriptor : IObjectDescriptor +class BetterObjectDescriptor : IObjectDescriptor { public BetterObjectDescriptor(object value, Type type, Type staticType) : this(value, type, staticType, ScalarStyle.Any) diff --git a/src/Docfx.YamlSerialization/ObjectFactories/DefaultEmitObjectFactory.cs b/src/Docfx.YamlSerialization/ObjectFactories/DefaultEmitObjectFactory.cs index 0b6ab897df4..e3862171cbe 100644 --- a/src/Docfx.YamlSerialization/ObjectFactories/DefaultEmitObjectFactory.cs +++ b/src/Docfx.YamlSerialization/ObjectFactories/DefaultEmitObjectFactory.cs @@ -8,7 +8,7 @@ namespace Docfx.YamlSerialization.ObjectFactories; -public class DefaultEmitObjectFactory : ObjectFactoryBase +class DefaultEmitObjectFactory : ObjectFactoryBase { private readonly Dictionary> _cache = new(); private static Type[] EmptyTypes => Type.EmptyTypes; diff --git a/src/Docfx.YamlSerialization/ObjectGraphTraversalStrategies/FullObjectGraphTraversalStrategy.cs b/src/Docfx.YamlSerialization/ObjectGraphTraversalStrategies/FullObjectGraphTraversalStrategy.cs index 02307bc73b1..48e65632928 100644 --- a/src/Docfx.YamlSerialization/ObjectGraphTraversalStrategies/FullObjectGraphTraversalStrategy.cs +++ b/src/Docfx.YamlSerialization/ObjectGraphTraversalStrategies/FullObjectGraphTraversalStrategy.cs @@ -19,7 +19,7 @@ namespace Docfx.YamlSerialization.ObjectGraphTraversalStrategies; /// An implementation of that traverses /// readable properties, collections and dictionaries. /// -public class FullObjectGraphTraversalStrategy : IObjectGraphTraversalStrategy +class FullObjectGraphTraversalStrategy : IObjectGraphTraversalStrategy { private static MethodInfo TraverseGenericDictionaryHelperMethod { get; } = typeof(FullObjectGraphTraversalStrategy).GetMethod(nameof(TraverseGenericDictionaryHelper)); diff --git a/src/Docfx.YamlSerialization/ObjectGraphTraversalStrategies/RoundtripObjectGraphTraversalStrategy.cs b/src/Docfx.YamlSerialization/ObjectGraphTraversalStrategies/RoundtripObjectGraphTraversalStrategy.cs index 3e53a587526..a07c69c15a3 100644 --- a/src/Docfx.YamlSerialization/ObjectGraphTraversalStrategies/RoundtripObjectGraphTraversalStrategy.cs +++ b/src/Docfx.YamlSerialization/ObjectGraphTraversalStrategies/RoundtripObjectGraphTraversalStrategy.cs @@ -14,7 +14,7 @@ namespace Docfx.YamlSerialization.ObjectGraphTraversalStrategies; /// properties that are read/write, collections and dictionaries, while ensuring that /// the graph can be regenerated from the resulting document. /// -public class RoundtripObjectGraphTraversalStrategy : FullObjectGraphTraversalStrategy +class RoundtripObjectGraphTraversalStrategy : FullObjectGraphTraversalStrategy { public RoundtripObjectGraphTraversalStrategy(YamlSerializer serializer, ITypeInspector typeDescriptor, ITypeResolver typeResolver, int maxRecursion) : base(serializer, typeDescriptor, typeResolver, maxRecursion, null) diff --git a/src/Docfx.YamlSerialization/SerializationOptions.cs b/src/Docfx.YamlSerialization/SerializationOptions.cs index 3d9aa21bced..5412ba1442d 100644 --- a/src/Docfx.YamlSerialization/SerializationOptions.cs +++ b/src/Docfx.YamlSerialization/SerializationOptions.cs @@ -5,7 +5,7 @@ namespace Docfx.YamlSerialization; /// Options that control the serialization process. [Flags] -public enum SerializationOptions +enum SerializationOptions { /// Serializes using the default options None = 0, diff --git a/src/Docfx.YamlSerialization/TypeInspectors/EmitTypeInspector.cs b/src/Docfx.YamlSerialization/TypeInspectors/EmitTypeInspector.cs index 1135b02de6e..4b1dc115487 100644 --- a/src/Docfx.YamlSerialization/TypeInspectors/EmitTypeInspector.cs +++ b/src/Docfx.YamlSerialization/TypeInspectors/EmitTypeInspector.cs @@ -11,7 +11,7 @@ namespace Docfx.YamlSerialization.TypeInspectors; -public class EmitTypeInspector : ExtensibleTypeInspectorSkeleton +class EmitTypeInspector : ExtensibleTypeInspectorSkeleton { private static readonly ConcurrentDictionary _cache = new(); private static readonly ConcurrentDictionary> _propertyDescriptorCache = new(); diff --git a/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleNamingConventionTypeInspector.cs b/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleNamingConventionTypeInspector.cs index 8f6a03f2c81..2adde06de40 100644 --- a/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleNamingConventionTypeInspector.cs +++ b/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleNamingConventionTypeInspector.cs @@ -5,7 +5,7 @@ namespace Docfx.YamlSerialization.TypeInspectors; -public sealed class ExtensibleNamingConventionTypeInspector : ExtensibleTypeInspectorSkeleton +class ExtensibleNamingConventionTypeInspector : ExtensibleTypeInspectorSkeleton { private readonly IExtensibleTypeInspector innerTypeDescriptor; private readonly INamingConvention namingConvention; diff --git a/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleReadableAndWritablePropertiesTypeInspector.cs b/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleReadableAndWritablePropertiesTypeInspector.cs index 5ed13063d70..c8ea39dc47b 100644 --- a/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleReadableAndWritablePropertiesTypeInspector.cs +++ b/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleReadableAndWritablePropertiesTypeInspector.cs @@ -5,7 +5,7 @@ namespace Docfx.YamlSerialization.TypeInspectors; -public sealed class ExtensibleReadableAndWritablePropertiesTypeInspector : ExtensibleTypeInspectorSkeleton +class ExtensibleReadableAndWritablePropertiesTypeInspector : ExtensibleTypeInspectorSkeleton { private readonly IExtensibleTypeInspector _innerTypeDescriptor; diff --git a/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleTypeInspectorSkeleton.cs b/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleTypeInspectorSkeleton.cs index 964b1ea8d7e..57ee7444dce 100644 --- a/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleTypeInspectorSkeleton.cs +++ b/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleTypeInspectorSkeleton.cs @@ -7,7 +7,7 @@ namespace Docfx.YamlSerialization.TypeInspectors; -public abstract class ExtensibleTypeInspectorSkeleton : ITypeInspector, IExtensibleTypeInspector +abstract class ExtensibleTypeInspectorSkeleton : ITypeInspector, IExtensibleTypeInspector { public abstract IEnumerable GetProperties(Type type, object container); diff --git a/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleYamlAttributesTypeInspector.cs b/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleYamlAttributesTypeInspector.cs index 23e5a3cd026..21381c8cd85 100644 --- a/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleYamlAttributesTypeInspector.cs +++ b/src/Docfx.YamlSerialization/TypeInspectors/ExtensibleYamlAttributesTypeInspector.cs @@ -5,7 +5,7 @@ namespace Docfx.YamlSerialization.TypeInspectors; /// /// Applies the to another . /// -public sealed class ExtensibleYamlAttributesTypeInspector : ExtensibleTypeInspectorSkeleton +sealed class ExtensibleYamlAttributesTypeInspector : ExtensibleTypeInspectorSkeleton { private readonly IExtensibleTypeInspector innerTypeDescriptor; diff --git a/src/Docfx.YamlSerialization/TypeInspectors/IExtensibleTypeInspector.cs b/src/Docfx.YamlSerialization/TypeInspectors/IExtensibleTypeInspector.cs index 9ce4a40898b..6586841db3e 100644 --- a/src/Docfx.YamlSerialization/TypeInspectors/IExtensibleTypeInspector.cs +++ b/src/Docfx.YamlSerialization/TypeInspectors/IExtensibleTypeInspector.cs @@ -5,7 +5,7 @@ namespace Docfx.YamlSerialization.TypeInspectors; -public interface IExtensibleTypeInspector : ITypeInspector +interface IExtensibleTypeInspector : ITypeInspector { IPropertyDescriptor GetProperty(Type type, object container, string name); } diff --git a/src/Docfx.YamlSerialization/YamlDeserializer.cs b/src/Docfx.YamlSerialization/YamlDeserializer.cs index e95b94c70cb..0473249ea27 100644 --- a/src/Docfx.YamlSerialization/YamlDeserializer.cs +++ b/src/Docfx.YamlSerialization/YamlDeserializer.cs @@ -39,8 +39,8 @@ public sealed class YamlDeserializer private readonly IValueDeserializer _valueDeserializer; private readonly ITypeConverter _reflectionTypeConverter = new ReflectionTypeConverter(); - public IList NodeDeserializers { get; private set; } - public IList TypeResolvers { get; private set; } + internal IList NodeDeserializers { get; private set; } + internal IList TypeResolvers { get; private set; } public IValueDeserializer ValueDeserializer => _valueDeserializer; private sealed class TypeDescriptorProxy : ITypeInspector @@ -58,14 +58,10 @@ public IPropertyDescriptor GetProperty(Type type, object container, string name, } } - public YamlDeserializer( - IObjectFactory objectFactory = null, - INamingConvention namingConvention = null, - bool ignoreUnmatched = false, - bool ignoreNotFoundAnchor = true) + public YamlDeserializer() { - objectFactory ??= new DefaultEmitObjectFactory(); - namingConvention ??= NullNamingConvention.Instance; + var objectFactory = new DefaultEmitObjectFactory(); + var namingConvention = NullNamingConvention.Instance; _typeDescriptor.TypeDescriptor = new ExtensibleYamlAttributesTypeInspector( @@ -96,7 +92,7 @@ public YamlDeserializer( new EmitGenericCollectionNodeDeserializer(objectFactory), new CollectionNodeDeserializer(objectFactory), new EnumerableNodeDeserializer(), - new ExtensibleObjectNodeDeserializer(objectFactory, _typeDescriptor, ignoreUnmatched) + new ExtensibleObjectNodeDeserializer(objectFactory, _typeDescriptor, ignoreUnmatched: true) }; _tagMappings = new Dictionary(PredefinedTagMappings); TypeResolvers = new List @@ -107,24 +103,7 @@ public YamlDeserializer( }; NodeValueDeserializer nodeValueDeserializer = new(NodeDeserializers, TypeResolvers, _reflectionTypeConverter); - if (ignoreNotFoundAnchor) - { - _valueDeserializer = new LooseAliasValueDeserializer(nodeValueDeserializer); - } - else - { - _valueDeserializer = new AliasValueDeserializer(nodeValueDeserializer); - } - } - - public void RegisterTagMapping(string tag, Type type) - { - _tagMappings.Add(tag, type); - } - - public void RegisterTypeConverter(IYamlTypeConverter typeConverter) - { - _converters.Add(typeConverter); + _valueDeserializer = new LooseAliasValueDeserializer(nodeValueDeserializer); } public T Deserialize(TextReader input, IValueDeserializer deserializer = null) @@ -132,33 +111,18 @@ public T Deserialize(TextReader input, IValueDeserializer deserializer = null return (T)Deserialize(input, typeof(T), deserializer); } - public object Deserialize(TextReader input, IValueDeserializer deserializer = null) - { - return Deserialize(input, typeof(object), deserializer); - } - - public object Deserialize(TextReader input, Type type, IValueDeserializer deserializer = null) + private object Deserialize(TextReader input, Type type, IValueDeserializer deserializer = null) { return Deserialize(new Parser(input), type, deserializer); } - public T Deserialize(IParser reader, IValueDeserializer deserializer = null) - { - return (T)Deserialize(reader, typeof(T), deserializer); - } - - public object Deserialize(IParser reader, IValueDeserializer deserializer = null) - { - return Deserialize(reader, typeof(object), deserializer); - } - /// /// Deserializes an object of the specified type. /// /// The where to deserialize the object. /// The static type of the object to deserialize. /// Returns the deserialized object. - public object Deserialize(IParser parser, Type type, IValueDeserializer deserializer = null) + private object Deserialize(IParser parser, Type type, IValueDeserializer deserializer = null) { ArgumentNullException.ThrowIfNull(parser); ArgumentNullException.ThrowIfNull(type); diff --git a/src/Docfx.YamlSerialization/YamlSerializer.cs b/src/Docfx.YamlSerialization/YamlSerializer.cs index f26556ef780..86e90fa1870 100644 --- a/src/Docfx.YamlSerialization/YamlSerializer.cs +++ b/src/Docfx.YamlSerialization/YamlSerializer.cs @@ -20,15 +20,12 @@ namespace Docfx.YamlSerialization; public class YamlSerializer { internal IList Converters { get; set; } - private readonly SerializationOptions _options; - private readonly INamingConvention _namingConvention; + private readonly SerializationOptions _options = SerializationOptions.DisableAliases; + private readonly INamingConvention _namingConvention = NullNamingConvention.Instance; private readonly ITypeResolver _typeResolver; - public YamlSerializer(SerializationOptions options = SerializationOptions.None, INamingConvention namingConvention = null) + public YamlSerializer() { - _options = options; - _namingConvention = namingConvention ?? NullNamingConvention.Instance; - Converters = new List(); foreach (IYamlTypeConverter yamlTypeConverter in YamlTypeConverters.BuiltInConverters) { @@ -47,14 +44,7 @@ private bool IsOptionSet(SerializationOptions option) public void Serialize(TextWriter writer, object graph) { - Serialize(new Emitter(writer), graph); - } - - public void Serialize(IEmitter emitter, object graph) - { - ArgumentNullException.ThrowIfNull(emitter); - - EmitDocument(emitter, new BetterObjectDescriptor(graph, graph != null ? graph.GetType() : typeof(object), typeof(object))); + EmitDocument(new Emitter(writer), new BetterObjectDescriptor(graph, graph != null ? graph.GetType() : typeof(object), typeof(object))); } private void EmitDocument(IEmitter emitter, IObjectDescriptor graph) @@ -96,7 +86,7 @@ private IObjectGraphVisitor CreateEmittingVisitor(IEmitter emitter, IO return emittingVisitor; } - public void SerializeValue(IEmitter emitter, object value, Type type) + private void SerializeValue(IEmitter emitter, object value, Type type) { var graph = type != null ? new BetterObjectDescriptor(value, type, type) diff --git a/test/docfx.Tests/Api.verified.cs b/test/docfx.Tests/Api.verified.cs index 98795a9f179..42440208a40 100644 --- a/test/docfx.Tests/Api.verified.cs +++ b/test/docfx.Tests/Api.verified.cs @@ -4588,134 +4588,15 @@ public ExtensibleMemberAttribute() { } public ExtensibleMemberAttribute(string prefix) { } public string Prefix { get; } } - [System.Flags] - public enum SerializationOptions - { - None = 0, - Roundtrip = 1, - DisableAliases = 2, - EmitDefaults = 4, - JsonCompatible = 8, - DefaultToStaticType = 16, - } public sealed class YamlDeserializer { - public YamlDeserializer(YamlDotNet.Serialization.IObjectFactory objectFactory = null, YamlDotNet.Serialization.INamingConvention namingConvention = null, bool ignoreUnmatched = false, bool ignoreNotFoundAnchor = true) { } - public System.Collections.Generic.IList NodeDeserializers { get; } - public System.Collections.Generic.IList TypeResolvers { get; } + public YamlDeserializer() { } public YamlDotNet.Serialization.IValueDeserializer ValueDeserializer { get; } - public object Deserialize(System.IO.TextReader input, YamlDotNet.Serialization.IValueDeserializer deserializer = null) { } - public object Deserialize(YamlDotNet.Core.IParser reader, YamlDotNet.Serialization.IValueDeserializer deserializer = null) { } - public object Deserialize(System.IO.TextReader input, System.Type type, YamlDotNet.Serialization.IValueDeserializer deserializer = null) { } - public object Deserialize(YamlDotNet.Core.IParser parser, System.Type type, YamlDotNet.Serialization.IValueDeserializer deserializer = null) { } public T Deserialize(System.IO.TextReader input, YamlDotNet.Serialization.IValueDeserializer deserializer = null) { } - public T Deserialize(YamlDotNet.Core.IParser reader, YamlDotNet.Serialization.IValueDeserializer deserializer = null) { } - public void RegisterTagMapping(string tag, System.Type type) { } - public void RegisterTypeConverter(YamlDotNet.Serialization.IYamlTypeConverter typeConverter) { } } public class YamlSerializer { - public YamlSerializer(Docfx.YamlSerialization.SerializationOptions options = 0, YamlDotNet.Serialization.INamingConvention namingConvention = null) { } + public YamlSerializer() { } public void Serialize(System.IO.TextWriter writer, object graph) { } - public void Serialize(YamlDotNet.Core.IEmitter emitter, object graph) { } - public void SerializeValue(YamlDotNet.Core.IEmitter emitter, object value, System.Type type) { } - } -} -namespace Docfx.YamlSerialization.NodeDeserializers -{ - public class EmitArrayNodeDeserializer : YamlDotNet.Serialization.INodeDeserializer - { - public EmitArrayNodeDeserializer() { } - public static TItem[] DeserializeHelper(YamlDotNet.Core.IParser reader, System.Type expectedType, System.Func nestedObjectDeserializer) { } - } - public class EmitGenericCollectionNodeDeserializer : YamlDotNet.Serialization.INodeDeserializer - { - public EmitGenericCollectionNodeDeserializer(YamlDotNet.Serialization.IObjectFactory objectFactory) { } - public static void DeserializeHelper(YamlDotNet.Core.IParser reader, System.Type expectedType, System.Func nestedObjectDeserializer, System.Collections.Generic.ICollection result) { } - } - public class EmitGenericDictionaryNodeDeserializer : YamlDotNet.Serialization.INodeDeserializer - { - public EmitGenericDictionaryNodeDeserializer(YamlDotNet.Serialization.IObjectFactory objectFactory) { } - public static void DeserializeHelper(YamlDotNet.Core.IParser reader, System.Type expectedType, System.Func nestedObjectDeserializer, System.Collections.Generic.IDictionary result) { } - } - public sealed class ExtensibleObjectNodeDeserializer : YamlDotNet.Serialization.INodeDeserializer - { - public ExtensibleObjectNodeDeserializer(YamlDotNet.Serialization.IObjectFactory objectFactory, YamlDotNet.Serialization.ITypeInspector typeDescriptor, bool ignoreUnmatched) { } - } -} -namespace Docfx.YamlSerialization.ObjectDescriptors -{ - public class BetterObjectDescriptor : YamlDotNet.Serialization.IObjectDescriptor - { - public BetterObjectDescriptor(object value, System.Type type, System.Type staticType) { } - public BetterObjectDescriptor(object value, System.Type type, System.Type staticType, YamlDotNet.Core.ScalarStyle scalarStyle) { } - public YamlDotNet.Core.ScalarStyle ScalarStyle { get; } - public System.Type StaticType { get; } - public System.Type Type { get; } - public object Value { get; } - } -} -namespace Docfx.YamlSerialization.ObjectFactories -{ - public class DefaultEmitObjectFactory : YamlDotNet.Serialization.ObjectFactories.ObjectFactoryBase - { - public DefaultEmitObjectFactory() { } - public override object Create(System.Type type) { } - } -} -namespace Docfx.YamlSerialization.ObjectGraphTraversalStrategies -{ - public class FullObjectGraphTraversalStrategy : YamlDotNet.Serialization.IObjectGraphTraversalStrategy - { - public FullObjectGraphTraversalStrategy(Docfx.YamlSerialization.YamlSerializer serializer, YamlDotNet.Serialization.ITypeInspector typeDescriptor, YamlDotNet.Serialization.ITypeResolver typeResolver, int maxRecursion, YamlDotNet.Serialization.INamingConvention namingConvention) { } - protected Docfx.YamlSerialization.YamlSerializer Serializer { get; } - protected virtual void Traverse(YamlDotNet.Serialization.IObjectDescriptor value, YamlDotNet.Serialization.IObjectGraphVisitor visitor, int currentDepth, TContext context) { } - protected virtual void TraverseDictionary(YamlDotNet.Serialization.IObjectDescriptor dictionary, object visitor, int currentDepth, object context) { } - protected virtual void TraverseObject(YamlDotNet.Serialization.IObjectDescriptor value, YamlDotNet.Serialization.IObjectGraphVisitor visitor, int currentDepth, TContext context) { } - protected virtual void TraverseProperties(YamlDotNet.Serialization.IObjectDescriptor value, object visitor, int currentDepth, object context) { } - public static void TraverseGenericDictionaryHelper(Docfx.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy self, System.Collections.Generic.IDictionary dictionary, object visitor, int currentDepth, YamlDotNet.Serialization.INamingConvention namingConvention, object context) { } - } - public class RoundtripObjectGraphTraversalStrategy : Docfx.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy - { - public RoundtripObjectGraphTraversalStrategy(Docfx.YamlSerialization.YamlSerializer serializer, YamlDotNet.Serialization.ITypeInspector typeDescriptor, YamlDotNet.Serialization.ITypeResolver typeResolver, int maxRecursion) { } - protected override void TraverseProperties(YamlDotNet.Serialization.IObjectDescriptor value, object visitor, int currentDepth, object context) { } - } -} -namespace Docfx.YamlSerialization.TypeInspectors -{ - public class EmitTypeInspector : Docfx.YamlSerialization.TypeInspectors.ExtensibleTypeInspectorSkeleton - { - public EmitTypeInspector(YamlDotNet.Serialization.ITypeResolver resolver) { } - public override System.Collections.Generic.IEnumerable GetProperties(System.Type type, object container) { } - public override YamlDotNet.Serialization.IPropertyDescriptor GetProperty(System.Type type, object container, string name) { } - } - public sealed class ExtensibleNamingConventionTypeInspector : Docfx.YamlSerialization.TypeInspectors.ExtensibleTypeInspectorSkeleton - { - public ExtensibleNamingConventionTypeInspector(Docfx.YamlSerialization.TypeInspectors.IExtensibleTypeInspector innerTypeDescriptor, YamlDotNet.Serialization.INamingConvention namingConvention) { } - public override System.Collections.Generic.IEnumerable GetProperties(System.Type type, object container) { } - public override YamlDotNet.Serialization.IPropertyDescriptor GetProperty(System.Type type, object container, string name) { } - } - public sealed class ExtensibleReadableAndWritablePropertiesTypeInspector : Docfx.YamlSerialization.TypeInspectors.ExtensibleTypeInspectorSkeleton - { - public ExtensibleReadableAndWritablePropertiesTypeInspector(Docfx.YamlSerialization.TypeInspectors.IExtensibleTypeInspector innerTypeDescriptor) { } - public override System.Collections.Generic.IEnumerable GetProperties(System.Type type, object container) { } - public override YamlDotNet.Serialization.IPropertyDescriptor GetProperty(System.Type type, object container, string name) { } - } - public abstract class ExtensibleTypeInspectorSkeleton : Docfx.YamlSerialization.TypeInspectors.IExtensibleTypeInspector, YamlDotNet.Serialization.ITypeInspector - { - protected ExtensibleTypeInspectorSkeleton() { } - public abstract System.Collections.Generic.IEnumerable GetProperties(System.Type type, object container); - public virtual YamlDotNet.Serialization.IPropertyDescriptor GetProperty(System.Type type, object container, string name) { } - public YamlDotNet.Serialization.IPropertyDescriptor GetProperty(System.Type type, object container, string name, bool ignoreUnmatched) { } - } - public sealed class ExtensibleYamlAttributesTypeInspector : Docfx.YamlSerialization.TypeInspectors.ExtensibleTypeInspectorSkeleton - { - public ExtensibleYamlAttributesTypeInspector(Docfx.YamlSerialization.TypeInspectors.IExtensibleTypeInspector innerTypeDescriptor) { } - public override System.Collections.Generic.IEnumerable GetProperties(System.Type type, object container) { } - public override YamlDotNet.Serialization.IPropertyDescriptor GetProperty(System.Type type, object container, string name) { } - } - public interface IExtensibleTypeInspector : YamlDotNet.Serialization.ITypeInspector - { - YamlDotNet.Serialization.IPropertyDescriptor GetProperty(System.Type type, object container, string name); } } \ No newline at end of file