public LongC xor(LongC param1) { uint _loc2_ = internalHigh ^ param1.internalHigh; uint _loc3_ = low ^ param1.low; return(new LongC(_loc3_, _loc2_)); }
/* * public String toString(uint param1= 10) * { * uint _loc4_ = 0; * if(param1 < 2 || param1 > 36) * { * throw new ArgumentException(); * } * if(this.high == 0) * { * return Convert.ToString(low, (int)param1);// low.ToString(param1); * } * List<uint> _loc2_ = new List<uint>(); * LongC _loc3_ = new LongC(low,this.high); * do * { * _loc4_ = _loc3_.div(param1); * if(_loc4_ < 10) * { * _loc2_.Add(_loc4_ + CHAR_CODE_0); * } * else * { * _loc2_.Add(_loc4_ - 10 + CHAR_CODE_A); * } * } * while(_loc3_.high != 0); * * return Convert.ToString(_loc3_.low, (int)param1) + String.fromCharCode.apply(String,_loc2_.Reverse()); * } */ public LongC and(LongC param1) { uint _loc2_ = internalHigh & param1.internalHigh; uint _loc3_ = low & param1.low; return(new LongC(_loc3_, _loc2_)); }
public static LongC sub(LongC param1, LongC param2) { uint _loc3_ = 0; uint _loc4_ = 0; if (compare(param1, param2) == -1) { return(new LongC(0, 0)); } if (param1.low < param2.low) { if (param1.high > 0) { _loc3_ = uint.MaxValue - param2.low + 1 + param1.low; _loc4_ = 1; } else { _loc3_ = param1.low - param2.low; } } else { _loc3_ = param1.low - param2.low; } uint _loc5_ = param1.high - param2.high - _loc4_; return(new LongC(_loc3_, _loc5_)); }
//public final function set high(param1:uint) : void //{ // internalHigh = param1; //} //public final function get high() : uint //{ // return internalHigh; //} public Boolean equal(LongC param1) { if (param1 != null) { return(param1.high == this.high && param1.low == low); } return(false); }
public static LongC parselong(String param1, uint param2 = 0) { uint _loc5_ = 0; if (param1.Substring(0, 1) == "-") { return(fromNumber(float.Parse(param1))); } uint _loc3_ = 0; if (param2 == 0) { //这里是正则 if(param1.search(/^0x/) == 0) if (true) { param2 = 16; _loc3_ = 2; } else { param2 = 10; } } if (param2 < 2 || param2 > 36) { throw new ArgumentException(); } param1 = param1.ToLower(); LongC _loc4_ = new LongC(); while (_loc3_ < param1.Length) { string str = param1.Substring((int)_loc3_, 1); _loc5_ = uint.Parse(str); if (_loc5_ >= CHAR_CODE_0 && _loc5_ <= CHAR_CODE_9) { _loc5_ = _loc5_ - CHAR_CODE_0; } else if (_loc5_ >= CHAR_CODE_A && _loc5_ <= CHAR_CODE_Z) { _loc5_ = _loc5_ - CHAR_CODE_A; _loc5_ = _loc5_ + 10; } else { throw new ArgumentException(); } if (_loc5_ >= param2) { throw new ArgumentException(); } _loc4_.mul(param2); _loc4_.add(_loc5_); _loc3_++; } return(_loc4_); }
public static Boolean isZero(LongC param1) { if (param1 == null) { return(true); } if (param1.equal(LongC.fromNumber(0))) { return(true); } return(false); }
public static LongC add(LongC param1, LongC param2) { uint _loc3_ = 0; uint _loc4_ = uint.MaxValue - param1.low + 1; int _loc5_ = 0; if (param1.low == 0 || param2.low == 0 || _loc4_ > param2.low) { _loc3_ = param1.low + param2.low; } else { _loc3_ = param2.low - _loc4_; _loc5_ = 1; } uint _loc6_ = param1.high + param2.high + (uint)_loc5_; return(new LongC(_loc3_, _loc6_)); }
public static int compare(LongC param1, LongC param2)// : int { if (param1.high > param2.high) { return(1); } if (param1.high < param2.high) { return(-1); } if (param1.low > param2.low) { return(1); } if (param1.low < param2.low) { return(-1); } return(0); }
public static LongC readRawVarint64(byte[] param1, int curpos, ref int endpos) { int _loc4_ = 0; LongC _loc5_ = null; int _loc2_ = 0; LongC _loc3_ = new LongC(); while (_loc2_ < 64) { _loc4_ = param1[curpos++]; _loc5_ = new LongC((uint)(_loc4_ & 127), 0); _loc5_ = _loc5_.shiftLeft((uint)_loc2_); _loc3_ = _loc3_.or(_loc5_); if ((_loc4_ & 128) == 0) { endpos = curpos; return(_loc3_); } endpos = curpos; _loc2_ = _loc2_ + 7; } return(_loc3_); }
public List <T2> readObjList <T1, T2>() { if (_pos == 0) { _pos = 8; } int _loc2_ = readShort();//ReadShort(_barr, _pos); int _loc1_ = 0; //int endpos = _pos + 2; List <T2> thelst = new List <T2>(); while (_loc1_ < _loc2_ && this._pos < this._barr.Length) { #region xxx if (typeof(T1) == typeof(LongC)) { LongC _itemId = readLong(); T2 tt = (T2)Convert.ChangeType(_itemId, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(Int32) || typeof(T1) == typeof(int)) { int _itemId = readInt(); T2 tt = (T2)Convert.ChangeType(_itemId, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(string)) { string _itemId = readString(); T2 tt = (T2)Convert.ChangeType(_itemId, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(byte) || typeof(T1) == typeof(Byte)) { int val = readByte(); T2 tt = (T2)Convert.ChangeType(val, typeof(T2)); thelst.Add(tt);// } else if (typeof(T1) == typeof(SoulfactInfo)) { SoulfactInfo bb = new SoulfactInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(BuffPara)) { BuffPara bb = new BuffPara(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(Position)) { Position bb = new Position(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(MailSummaryInfo)) { MailSummaryInfo bb = new MailSummaryInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(AttackResultInfos)) { AttackResultInfos bb = new AttackResultInfos(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(GoodsAttribute)) { GoodsAttribute bb = new GoodsAttribute(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt); } else if (typeof(T1) == typeof(Slot)) { Slot bb = new Slot(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//GemInfo } else if (typeof(T1) == typeof(GemInfo)) { GemInfo bb = new GemInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//GoodsInfoRes } else if (typeof(T1) == typeof(GoodsInfoRes)) { GoodsInfoRes bb = new GoodsInfoRes(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//BossEventInfo } else if (typeof(T1) == typeof(BossEventInfo)) { BossEventInfo bb = new BossEventInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//BossEventInfo } else if (typeof(T1) == typeof(PandoraEventInfo)) { PandoraEventInfo bb = new PandoraEventInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//ZoneTeamInfo } else if (typeof(T1) == typeof(ZoneTeamInfo)) { ZoneTeamInfo bb = new ZoneTeamInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//CharacterInfo } else if (typeof(T1) == typeof(CharacterInfo)) { CharacterInfo bb = new CharacterInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//SkillLevelInfo } else if (typeof(T1) == typeof(SkillLevelInfo)) { SkillLevelInfo bb = new SkillLevelInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//CSSkillInfo } else if (typeof(T1) == typeof(CSSkillInfo)) { CSSkillInfo bb = new CSSkillInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//PokemonInfo } else if (typeof(T1) == typeof(PokemonInfo)) { PokemonInfo bb = new PokemonInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//ActivityItemInfo } else if (typeof(T1) == typeof(ActivityItemInfo)) { ActivityItemInfo bb = new ActivityItemInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//CSMonsterInfo } else if (typeof(T1) == typeof(CSMonsterInfo)) { CSMonsterInfo bb = new CSMonsterInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//DropGoodsInfo } else if (typeof(T1) == typeof(DropGoodsInfo)) { DropGoodsInfo bb = new DropGoodsInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//HorseSkillBean } else if (typeof(T1) == typeof(HorseSkillBean)) { HorseSkillBean bb = new HorseSkillBean(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//CSPlayerInfo } else if (typeof(T1) == typeof(CSPlayerInfo)) { CSPlayerInfo bb = new CSPlayerInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//PetInfo } else if (typeof(T1) == typeof(PetInfo)) { PetInfo bb = new PetInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//NpcInfo } else if (typeof(T1) == typeof(NpcInfo)) { NpcInfo bb = new NpcInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//EffectInfo } else if (typeof(T1) == typeof(EffectInfo)) { EffectInfo bb = new EffectInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//SummonPetInfo } else if (typeof(T1) == typeof(SummonPetInfo)) { SummonPetInfo bb = new SummonPetInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//CSBuffInfo } else if (typeof(T1) == typeof(CSBuffInfo)) { CSBuffInfo bb = new CSBuffInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//CSHorseSkillInfo } else if (typeof(T1) == typeof(CSHorseSkillInfo)) { CSHorseSkillInfo bb = new CSHorseSkillInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//EquipInfo } else if (typeof(T1) == typeof(EquipInfo)) { EquipInfo bb = new EquipInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//EquipAttribute } else if (typeof(T1) == typeof(EquipAttribute)) { EquipAttribute bb = new EquipAttribute(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//CSHorseInfo } else if (typeof(T1) == typeof(CSHorseInfo)) { CSHorseInfo bb = new CSHorseInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//UseInfoBean } else if (typeof(T1) == typeof(UseInfoBean)) { UseInfoBean bb = new UseInfoBean(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);//CosmicGateBean } else if (typeof(T1) == typeof(CosmicGateBean)) { CosmicGateBean bb = new CosmicGateBean(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; T2 tt = (T2)Convert.ChangeType(bb, typeof(T2)); thelst.Add(tt);// } else { ConsoleLog.Instance.writeInformationLog("readobjlist Class can't be read=" + typeof(T1).ToString()); } #endregion _loc1_++; } //_pos = endpos; return(thelst); }
public LongC readLong() { LongC val = readRawVarint64(_barr, _pos, ref _pos); return(val); }
public T readBean <T>() where T : new() { T tt; if (typeof(T) == typeof(LongC)) { LongC _itemId = readLong(); tt = (T)Convert.ChangeType(_itemId, typeof(T)); } else if (typeof(T) == typeof(string)) { string _itemId = readString(); tt = (T)Convert.ChangeType(_itemId, typeof(T)); } else if (typeof(T) == typeof(byte)) { int val = readByte(); tt = (T)Convert.ChangeType(val, typeof(T)); } else if (typeof(T) == typeof(BuffPara)) { BuffPara bb = new BuffPara(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(MailSummaryInfo)) { MailSummaryInfo bb = new MailSummaryInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(AttackResultInfos)) { AttackResultInfos bb = new AttackResultInfos(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(GoodsAttribute)) { GoodsAttribute bb = new GoodsAttribute(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(Slot)) { Slot bb = new Slot(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(GemInfo)) { GemInfo bb = new GemInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(GoodsInfoRes)) { GoodsInfoRes bb = new GoodsInfoRes(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(BossEventInfo)) { BossEventInfo bb = new BossEventInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(PandoraEventInfo)) { PandoraEventInfo bb = new PandoraEventInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(ZoneTeamInfo)) { ZoneTeamInfo bb = new ZoneTeamInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(CharacterInfo)) { CharacterInfo bb = new CharacterInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(SkillLevelInfo)) { SkillLevelInfo bb = new SkillLevelInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(CSSkillInfo)) { CSSkillInfo bb = new CSSkillInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(PokemonInfo)) { PokemonInfo bb = new PokemonInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(ActivityItemInfo)) { ActivityItemInfo bb = new ActivityItemInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(CSMonsterInfo)) { CSMonsterInfo bb = new CSMonsterInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(DropGoodsInfo)) { DropGoodsInfo bb = new DropGoodsInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(HorseSkillBean)) { HorseSkillBean bb = new HorseSkillBean(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(CSPlayerInfo)) { CSPlayerInfo bb = new CSPlayerInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(PetInfo)) { PetInfo bb = new PetInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(NpcInfo)) { NpcInfo bb = new NpcInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(EffectInfo)) { EffectInfo bb = new EffectInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(SummonPetInfo)) { SummonPetInfo bb = new SummonPetInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(CSBuffInfo)) { CSBuffInfo bb = new CSBuffInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(CSHorseSkillInfo)) { CSHorseSkillInfo bb = new CSHorseSkillInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(EquipInfo)) { EquipInfo bb = new EquipInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(EquipAttribute)) { EquipAttribute bb = new EquipAttribute(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(CSHorseInfo)) { CSHorseInfo bb = new CSHorseInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(UseInfoBean)) { UseInfoBean bb = new UseInfoBean(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(CosmicGateBean)) { CosmicGateBean bb = new CosmicGateBean(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(ItemInfo)) { ItemInfo bb = new ItemInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T)); } else if (typeof(T) == typeof(Position)) { Position bb = new Position(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T));// } else if (typeof(T) == typeof(SoulfactInfo)) { SoulfactInfo bb = new SoulfactInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T));//DetailActivityInfo } else if (typeof(T) == typeof(DetailActivityInfo)) { DetailActivityInfo bb = new DetailActivityInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T));//MainTaskInfo } else if (typeof(T) == typeof(ImageDescrypt.Entity.MainTaskInfo)) { ImageDescrypt.Entity.MainTaskInfo bb = new ImageDescrypt.Entity.MainTaskInfo(); bb._barr = this._barr; bb._pos = this._pos; bb.reading(); this._pos = bb._pos; tt = (T)Convert.ChangeType(bb, typeof(T));// } else { tt = default(T); ConsoleLog.Instance.writeInformationLog("Class can't be read=" + typeof(T).ToString()); } /* * Type type = Type.GetType(className); * T ib = type.Assembly.CreateInstance(className) as T; */ //T tt = new T(); //Bean _loc2_ = (Bean)Convert.ChangeType(tt, typeof(Bean)); //_loc2_._barr = this._barr; //_loc2_._pos = this._pos; //_loc2_.reading(); //this._pos = _loc2_._pos; return((T)Convert.ChangeType(tt, typeof(T))); }