Created
August 17, 2022 09:03
-
-
Save trnktms/405127667a7b7e3ec93c681b739111e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IRenderingConfigFactory | |
{ | |
IRenderingConfiguration Create<T>(IRenderingConfiguration renderingConfig, T itemSerializer) where T : class, IItemSerializer; | |
} | |
public class RenderingConfigFactory : IRenderingConfigFactory | |
{ | |
public IRenderingConfiguration Create<T>(IRenderingConfiguration renderingConfig, T itemSerializer) where T : class, IItemSerializer | |
{ | |
return new DefaultRenderingConfiguration | |
{ | |
IncludeServerUrlInContextItemMediaUrls = renderingConfig.IncludeServerUrlInContextItemMediaUrls, | |
ItemSerializer = itemSerializer, // Custom item serializer | |
Name = renderingConfig.Name, | |
PlaceholdersResolver = renderingConfig.PlaceholdersResolver, | |
RenderingContentsResolver = renderingConfig.RenderingContentsResolver, | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment