Пример #1
0
 public Enumerator(BssMapObjMarshalReader <TKey, TValue> bssReader)
 {
     bssmapReader = bssReader;
     bssaStack    = new BssmapAnalysisStack(bssmapReader.Paras.MapHead.MaxDepth);
     count        = bssmapReader.Paras.MapHead.ElementCount;
     state        = AutomateState.ReadBranch;
     pos          = 0;
     Current      = default;
 }
Пример #2
0
        public static BssMapObjMarshalReader <TKey, TValue> Create(ref BssomReader reader, ref BssomDeserializeContext context, bool isOnlyReadFieldOffset = false)
        {
            BssMapObjMarshalReader <TKey, TValue> apr = new BssMapObjMarshalReader <TKey, TValue>();

            apr._reader  = reader;
            apr._context = context;
            apr.Paras    = BssMapHeadPackInfo.Create(ref reader);
            if (!isOnlyReadFieldOffset)
            {
                apr.ValueFormatter = context.Option.FormatterResolver.GetFormatterWithVerify <TValue>();
            }

            return(apr);
        }