public static RLResultRes ice_read(Ice.InputStream istr) { var v = new RLResultRes(); v.ice_readMembers(istr); return(v); }
public static void ice_write(Ice.OutputStream ostr, RLResultRes v) { if (v == null) { _nullMarshalValue.ice_writeMembers(ostr); } else { v.ice_writeMembers(ostr); } }
iceD_RegOrLoginReq(IPlayerCo obj, IceInternal.Incoming inS, Ice.Current current) { Ice.ObjectImpl.iceCheckMode(Ice.OperationMode.Normal, current.mode); var istr = inS.startReadParams(); string iceP_account; string iceP_pwd; iceP_account = istr.readString(); iceP_pwd = istr.readString(); inS.endReadParams(); return(inS.setResultTask <RLResultRes>(obj.RegOrLoginReqAsync(iceP_account, iceP_pwd, current), (ostr, ret) => { RLResultRes.ice_write(ostr, ret); })); }
public async override Task <RLResultRes> RegOrLoginReqAsync(string account, string pwd, Ice.Current current = null) { var acctGrain = OrleansClient.GetGrain <IAccountGr>(System.Guid.Empty); //统一的账户管理器 var to = await acctGrain.RegistOrLoginAsync(account, pwd); RLResultRes res = new RLResultRes() { ret = to.ret }; if (to.ret == 0) { res.idcode = to.idcode; var session = current.BindSession(to.idcode, out _); //绑定应用层身份用于推送 session?.Push <string>("__identity__", to.idcode); //设置合法性标识用于验证是否拦截 logger.Debug($"{account} 绑定标识符 {to.idcode}"); } return(res); }
private void _iceI_RegOrLoginReq(string iceP_account, string iceP_pwd, _System.Collections.Generic.Dictionary <string, string> context, bool synchronous, IceInternal.OutgoingAsyncCompletionCallback completed) { var outAsync = getOutgoingAsync <RLResultRes>(completed); outAsync.invoke( _RegOrLoginReq_name, Ice.OperationMode.Normal, Ice.FormatType.DefaultFormat, context, synchronous, write: (Ice.OutputStream ostr) => { ostr.writeString(iceP_account); ostr.writeString(iceP_pwd); }, read: (Ice.InputStream istr) => { RLResultRes ret = null; ret = RLResultRes.ice_read(istr); return(ret); }); }
public override bool Equals(object other) { if (object.ReferenceEquals(this, other)) { return(true); } if (other == null) { return(false); } if (GetType() != other.GetType()) { return(false); } RLResultRes o = (RLResultRes)other; if (!this.ret.Equals(o.ret)) { return(false); } if (this.idcode == null) { if (o.idcode != null) { return(false); } } else { if (!this.idcode.Equals(o.idcode)) { return(false); } } return(true); }