protected override object GenerateParamerte(Type paramType, string value) { Object obj = null; if (typeof(Delegate).IsAssignableFrom(paramType)) { if (paramType == typeof(QuerySysMsgResult)) { obj = new QuerySysMsgResult(OnQuerySysMsgCompleted); } else if (paramType == typeof(CommomOperateResult)) { obj = new CommomOperateResult(SysMsgCommonOpRet); } else if (paramType == typeof(OperateSysMsgExternDelegate)) { obj = new OperateSysMsgExternDelegate(OperateSysMsgExtern); } else if (paramType == typeof(OperateSysMsgDelegate)) { obj = new OperateSysMsgDelegate(OnOperateSysMsgCompleted); } } else { obj = base.GenerateParamerte(paramType, value); } return(obj); }
protected override object GenerateParamerte(Type paramType, string value) { Object obj = null; if (typeof(Delegate).IsAssignableFrom(paramType)) { if (paramType == typeof(QuerySysMsgResult)) { obj = new QuerySysMsgResult(OnQuerySysMsgCompleted); } else if (paramType == typeof(CommomOperateResult)) { obj = new CommomOperateResult(SysMsgCommonOpRet); } else if (paramType == typeof(OperateSysMsgExternDelegate)) { obj = new OperateSysMsgExternDelegate(OperateSysMsgExtern); } else if (paramType == typeof(OperateSysMsgDelegate)) { obj = new OperateSysMsgDelegate(OnOperateSysMsgCompleted); } } else if (typeof(NIMSysMessageContent).IsAssignableFrom(paramType)) { NIMSysMessageContent obj1 = new NIMSysMessageContent(); obj1.Message = value; obj1.ReceiverId = "litianyi"; obj1.MsgType = NIMSysMsgType.kNIMSysMsgTypeCustomP2PMsg; obj = obj1; } else { obj = base.GenerateParamerte(paramType, value); } return(obj); }
public static void QueryUnreadCount(CommomOperateResult cb) { var ptr = NimUtility.DelegateConverter.ConvertToIntPtr(cb); SysMsgNativeMethods.nim_sysmsg_query_unread_count(null, OnQueryUnreadCompleted, ptr); }