示例#1
0
        private HessianObject ReadRealObject(HessianObject hessianObject)
        {
            var builder = HessianObject.Builder.New(hessianObject.TypeName);

            foreach (var(k, v) in hessianObject)
            {
                if (v is ClassDef)
                {
                    if (!(ReadValue() is HessianObject rVal))
                    {
                        throw  new HessianException("decode error");
                    }

                    builder.Add(k, ReadRealObject(rVal));
                }
                else if (v is HessianObject vObj)
                {
                    builder.Add(k, ReadRealObject(vObj));
                }
                else
                {
                    builder.Add(k, v);
                }
            }

            return(builder.Create());
        }
示例#2
0
 private Builder(string typeName)
 {
     obj = new HessianObject(typeName);
 }