예제 #1
0
        /// <summary>
        /// Reflection ile test fonksiyonu ismine göre method çağırıyor.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="objs"></param>
        /// <returns></returns>
        private static double InvokeFunctionByName(FunctionNames name, object[] objs)
        {
            MethodInfo method = typeof(TestFunctions).GetMethod(name.ToString());

            if (method != null)
            {
                return((double)method.Invoke(new TestFunctions(), objs));
            }

            return(double.MaxValue);
        }
		private void CheckPermission(string strAppID, FunctionNames funcName, string strFuncMsg)
		{
			ExceptionHelper.FalseThrow<ApplicationException>(
				SecurityCheck.DoesUserHasPermissions(this.LogOnUserInfo.UserGuid, new Guid(strAppID), funcName.ToString(), UserValueType.Guid),
				"没有" + strFuncMsg + "的权限");
		}