void IBarfTester.Fill(ref object instance, FillArgs args)
            {
                T temp = default(T);

                Fill(ref temp, args);
                instance = temp;
            }
Beispiel #2
0
        public static T Fill <T>(this IBarfTester <T> tester, FillArgs args)
        {
            T result = default(T);

            tester.Fill(ref result, args);
            return(result);
        }
Beispiel #3
0
        public static object Fill(this IBarfTester tester, FillArgs args)
        {
            object result = null;

            tester.Fill(ref result, args);
            return(result);
        }
Beispiel #4
0
 public static void FillRandom <T>(ref T instance, FillArgs args, PartFlags flags, string partName)
 {
     if (flags.IsSet(PartFlags.Dynamic))
     {
         args.RaiseSkippedWarning(partName, "dynamic or polymorphic fields can't be filled");
         instance = default(T);
         return;
     }
     if (args.BeginDeferredFill <T>())
     {
         var tester = BarfSerializers.GetTester <T>(flags);
         tester.Fill(ref instance, args);
         args.EndDeferredFill <T>();
     }
 }
 public void Fill(ref T instance, FillArgs args)
 {
     _fill.Value(ref instance, args);
 }
Beispiel #6
0
 public static void FillRandom <T>(T instance, FillArgs args, PartFlags flags, string partName)
     where T : class
 {
     FillRandom <T>(ref instance, args, flags, partName);
 }