Пример #1
0
 /// <summary>
 /// Used to alter a serializer whenever one is created for a specific type.  This allows the scenario of decorating
 /// a serializer to override or monitor serialization and/or deserialization.  This override accepts a generalized
 /// serializer delegate.
 /// </summary>
 /// <typeparam name="T">The type that the serializer processes.</typeparam>
 /// <param name="this">The type configuration to configure.</param>
 /// <param name="compose">The delegate used to alterate the created serializer.</param>
 /// <returns>The configured type configuration.</returns>
 /// <seealso href="https://github.com/ExtendedXmlSerializer/home/issues/264#issuecomment-531491807"/>
 public static ITypeConfiguration <T> RegisterContentComposition <T>(this ITypeConfiguration <T> @this,
                                                                     Func <ISerializer, ISerializer> compose)
 => @this.RegisterContentComposition(new SerializerComposer(compose));