Beispiel #1
0
        public override Object read(object obj1, BInput bin1, long version)
        {
            BInputBin  bin  = ((BInputBin)bin1);
            BBufferBin bbuf = bin.bbuf;
            Dictionary <int, EloixClient.IndexServer.OrgUnitInfo> map = new Dictionary <int, EloixClient.IndexServer.OrgUnitInfo>();

            bin.onObjectCreated(map);
            int n = bbuf.getLength();

            for (int i = 0; i < n; i++)
            {
                int key = bbuf.getInt();
                EloixClient.IndexServer.OrgUnitInfo value = (EloixClient.IndexServer.OrgUnitInfo)bin.readObj(false, null);
                map[key] = value;
            }
            return(map);
        }
        public override Object read(Object obj1, BInput bin1, long version)
        {
            BInputBin  bin  = (BInputBin)bin1;
            BBufferBin bbuf = bin.bbuf;

            // lengths
            int n0 = bbuf.getLength();

            // create array
            OrgUnitInfo[] arr = new EloixClient.IndexServer.OrgUnitInfo[n0];
            bin.onObjectCreated(arr);

            // read
            for (int i0 = 0; i0 < n0; i0++)
            {
                arr[i0] = (EloixClient.IndexServer.OrgUnitInfo)bin.readObj(false, null);
            }

            return(arr);
        }