private Hashtable RebuildDict(IAWObject sfsObj) { Hashtable hashtable = new Hashtable(); string[] keys = sfsObj.GetKeys(); for (int i = 0; i < keys.Length; i++) { string key = keys[i]; hashtable[key] = this.UnwrapField(sfsObj.GetData(key)); } return(hashtable); }
private ByteArray Obj2bin(IAWObject obj, ByteArray buffer) { string[] keys = obj.GetKeys(); string[] array = keys; for (int i = 0; i < array.Length; i++) { string text = array[i]; AWDataWrapper data = obj.GetData(text); buffer = this.EncodeSFSObjectKey(buffer, text); buffer = this.EncodeObject(buffer, data.Type, data.Data); } return(buffer); }
private void ConvertSFSObject(IAWArray fieldList, object csObj, Type objType) { for (int i = 0; i < fieldList.Size(); i++) { IAWObject sFSObject = fieldList.GetAWObject(i); string utfString = sFSObject.GetUtfString(DefaultAWDataSerializer.FIELD_NAME_KEY); AWDataWrapper data = sFSObject.GetData(DefaultAWDataSerializer.FIELD_VALUE_KEY); object value = this.UnwrapField(data); FieldInfo field = objType.GetField(utfString, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { field.SetValue(csObj, value); } } }