コード例 #1
0
 public static ITypeConfiguration <T> RegisterContentComposition <T>(this ITypeConfiguration <T> @this,
                                                                     ISerializerComposer composer)
 => @this.Register().Serializer().Composer().Using(composer);
コード例 #2
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 an
 /// <see cref="ISerializerComposer"/> that performs the alteration on the created serializer.
 /// </summary>
 /// <typeparam name="T">The type that the serializer processes.</typeparam>
 /// <param name="this">The type configuration to configure.</param>
 /// <param name="composer">The composer that is used to alter the serializer upon creation.</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,
                                                                     ISerializerComposer composer)
 => @this.Root.With <RegisteredCompositionExtension>()
 .Apply(Support <T> .Metadata, composer)
 .Return(@this);
コード例 #3
0
ファイル: SerializerComposer.cs プロジェクト: wtf3505/home
 public SerializerComposer(ISerializerComposer <T> composer) : this(composer.Get)
 {
 }