Пример #1
0
        /// <summary>
        /// ͨ���ͻ��˴������ķ���������Ϣ��ȡ�����Ķ�̬������
        /// </summary>
        /// <param name="invokeInfo">The invoke info.</param>
        /// <returns></returns>
        public MethodInfo GetMethod(MethodInvokeInfo invokeInfo)
        {
            if (!methodInvokers.ContainsKey(invokeInfo)) {
                MethodInfo method = invokeInfo.GetGenericMethod();
                if (method == null)
                    throw new ArgumentException(String.Format("�޴˷��ͷ��� \"{0}\" ����", invokeInfo.Name));

                methodInvokers.Add(invokeInfo, method);
            }
            return methodInvokers[invokeInfo];
        }
Пример #2
0
 /// <summary>
 /// ����Զ�̹��̵��ð�
 /// </summary>
 /// <param name="package">The package.</param>
 /// <param name="encryptKey">The encrypt key.</param>
 /// <param name="invokeInfo">The invoke info.</param>
 public static void DecodeInvoke(NetworkInvokePackage package, string encryptKey, out MethodInvokeInfo invokeInfo, out object[] parameters)
 {
     invokeInfo = serializer.Deserialize<MethodInvokeInfo>(SecurityUtility.DESDecrypt((byte[])package.Context[METHOD_INVOKEINFO], encryptKey));
     parameters = serializer.Deserialize<object[]>(SecurityUtility.DESDecrypt((byte[])package.Context[METHOD_PARAMETERS], encryptKey));
 }