示例#1
0
        public static void Enable()
        {
            VerifierSettings.ModifySerialization(settings =>
            {
                settings.AddExtraSettings(serializerSettings =>
                {
                    var converters = serializerSettings.Converters;
                    converters.Add(new MsConnectionConverter());
                    converters.Add(new SysConnectionConverter());
                });
            });

            VerifierSettings.RegisterJsonAppender(_ =>
            {
                if (!SqlRecording.TryFinishRecording(out var entries))
                {
                    return(null);
                }

                return(new("sql", entries !));
            });

            VerifierSettings.RegisterFileConverter <MsConnection>(ToSql);
            VerifierSettings.RegisterFileConverter <SysConnection>(ToSql);
        }
示例#2
0
 public static void Initialize()
 {
     VerifierSettings.RegisterFileConverter <IRenderedFragment>(FragmentToStream.Convert);
     VerifierSettings.ModifySerialization(settings =>
     {
         settings.AddExtraSettings(serializerSettings =>
         {
             var converters = serializerSettings.Converters;
             converters.Add(new RenderedFragmentConverter());
         });
     });
 }
 public static void Enable()
 {
     VerifierSettings.RegisterFileConverter <IApp>(AppToImage);
     VerifierSettings.RegisterFileConverter <ControlData>(AppResultToImage);
 }
示例#4
0
 public static void Enable()
 {
     VerifierSettings.RegisterFileConverter <TypeToDisassemble>(ConvertTypeDefinitionHandle);
     VerifierSettings.RegisterFileConverter <MethodToDisassemble>(ConvertMethodDefinitionHandle);
     VerifierSettings.RegisterFileConverter <PropertyToDisassemble>(ConvertPropertyDefinitionHandle);
 }