コード例 #1
0
ファイル: ArgumentChecks.cs プロジェクト: chenzuo/nquery
		public ArgumentChecks()
		{
			_aDelegate = ExceptionBuilder;
			_aParameterInfo = _aMethodInfo.GetParameters()[0];
			_aFunctionBinding = new ReflectionFunctionBinding(_aMethodInfo, null, false);
		}
コード例 #2
0
ファイル: ExceptionBuilder.cs プロジェクト: chenzuo/nquery
        public static ArgumentException FunctionWithSameNameAndSignatureAlreadyInCollection(string paramName, FunctionBinding functionBinding)
        {
            if (paramName == null)
                throw new ArgumentNullException("paramName");

            if (functionBinding == null)
                throw new ArgumentNullException("functionBinding");

            StringBuilder sb = new StringBuilder();
            sb.Append(functionBinding.Name);
            sb.Append("(");
            FormattingHelpers.FormatTypeList(functionBinding.GetParameterTypes());
            sb.Append(")");

            string signature = sb.ToString();
            string message = String.Format(CultureInfo.CurrentCulture, Resources.FunctionWithSameNameAndSignatureAlreadyInCollection, signature);
            return new ArgumentException(message, paramName);
        }
コード例 #3
0
ファイル: MemberAcceptor.cs プロジェクト: chenzuo/nquery
		public void AcceptFunction(FunctionBinding function)
		{
			AddInvocable(function);
		}
コード例 #4
0
ファイル: ScopeInfoBuilder.cs プロジェクト: chenzuo/nquery
		public void AcceptFunction(FunctionBinding function)
		{
			if (!_scopeInfo.FunctionNames.ContainsKey(function.Name))
				_scopeInfo.FunctionNames.Add(function.Name, null);
		}