コード例 #1
0
 public static void Encode <T1, T2, T3>(ref SliceWriter writer, [NotNull] IOrderedTypeCodec <T1> codec1, T1 value1, [NotNull] IOrderedTypeCodec <T2> codec2, T2 value2, [NotNull] IOrderedTypeCodec <T3> codec3, T3 value3)
 {
     Contract.Assert(codec1 != null && codec2 != null && codec3 != null);
     codec1.EncodeOrderedSelfTerm(ref writer, value1);
     codec2.EncodeOrderedSelfTerm(ref writer, value2);
     codec3.EncodeOrderedSelfTerm(ref writer, value3);
 }
コード例 #2
0
 public override void WriteKeyPartsTo(ref SliceWriter writer, int count, ref (T1, T2) items)
 {
     Contract.Requires(count > 0);
     if (count >= 1)
     {
         m_codec1.EncodeOrderedSelfTerm(ref writer, items.Item1);
     }
     if (count >= 2)
     {
         m_codec2.EncodeOrderedSelfTerm(ref writer, items.Item2);
     }
 }
コード例 #3
0
                public override Slice EncodeComposite(FdbTuple <T1, T2> items, int count)
                {
                    Contract.Requires(count > 0);

                    var writer = SliceWriter.Empty;

                    if (count >= 1)
                    {
                        m_codec1.EncodeOrderedSelfTerm(ref writer, items.Item1);
                    }
                    if (count >= 2)
                    {
                        m_codec2.EncodeOrderedSelfTerm(ref writer, items.Item2);
                    }
                    return(writer.ToSlice());
                }
コード例 #4
0
 public static void Partial <T1>(ref SliceWriter writer, IOrderedTypeCodec <T1> codec1, T1 value1)
 {
     Contract.Assert(codec1 != null);
     codec1.EncodeOrderedSelfTerm(ref writer, value1);
 }