Beispiel #1
0
		/// <summary>
		/// Instantiates a new function predicate.
		/// </summary>
		/// <param name="resolutionType">The type of resolution for the function.</param>
		/// <param name="predicate">The predicate value, i.e. the string representation of the function predicate.</param>
		/// <param name="bob">The business object binder to use when evaluating the function, or null.</param>
		/// <param name="name">The name of the function, as it was analyzed by the binder.</param>
		/// <param name="arguments">The array of arguments of the function, as it was analyzed by the binder.</param>
		public Function(FunctionResolutionType resolutionType, string predicate, IBinder bob, string name, params string[] arguments):base(predicate) {
			this.resolutionType = resolutionType;
			this.bob = bob;
			this.name = name;
			this.arguments = arguments;
			
			// precalculate the function signature to use in the binder to evaluate the function
			functionSignature = Parameter.BuildFunctionSignature(name, arguments);
		}
Beispiel #2
0
        /// <summary>
        /// Instantiates a new function predicate.
        /// </summary>
        /// <param name="resolutionType">The type of resolution for the function.</param>
        /// <param name="predicate">The predicate value, i.e. the string representation of the function predicate.</param>
        /// <param name="bob">The business object binder to use when evaluating the function, or null.</param>
        /// <param name="name">The name of the function, as it was analyzed by the binder.</param>
        /// <param name="arguments">The array of arguments of the function, as it was analyzed by the binder.</param>
        public Function(FunctionResolutionType resolutionType, string predicate, IBinder bob, string name, params string[] arguments) : base(predicate)
        {
            this.resolutionType = resolutionType;
            this.bob            = bob;
            this.name           = name;
            this.arguments      = arguments;

            // precalculate the function signature to use in the binder to evaluate the function
            functionSignature = Parameter.BuildFunctionSignature(name, arguments);
        }
Beispiel #3
0
        /// <summary>
        /// Instantiates a new function predicate.
        /// </summary>
        /// <param name="resolutionType">The type of resolution for the function.</param>
        /// <param name="predicate">The predicate value, i.e. the string representation of the function predicate.</param>
        /// <param name="bob">The business object binder to use when evaluating the function, or null.</param>
        /// <param name="name">The name of the function, as it was analyzed by the binder.</param>
        /// <param name="arguments">The array of arguments of the function, as it was analyzed by the binder.</param>
        public Function(FunctionResolutionType resolutionType, string predicate, IBinder bob, string name, params string[] arguments)
            : base(predicate)
        {
            this.resolutionType = resolutionType;
            this.bob = bob;
            this.name = name;
            this.arguments = arguments;

            HashCodeBuilder hcb = new HashCodeBuilder(base.GetHashCode()).Append(resolutionType).Append(bob).Append(name);
            foreach(string argument in arguments) hcb.Append(argument);
            hashCode = hcb.Value;

            // precalculate the function signature to use in the binder to evaluate the function
            functionSignature = Parameter.BuildFunctionSignature(name, arguments);
        }
Beispiel #4
0
        /// <summary>
        /// Instantiates a new function predicate.
        /// </summary>
        /// <param name="resolutionType">The type of resolution for the function.</param>
        /// <param name="predicate">The predicate value, i.e. the string representation of the function predicate.</param>
        /// <param name="bob">The business object binder to use when evaluating the function, or null.</param>
        /// <param name="name">The name of the function, as it was analyzed by the binder.</param>
        /// <param name="arguments">The array of arguments of the function, as it was analyzed by the binder.</param>
        public Function(FunctionResolutionType resolutionType, string predicate, IBinder bob, string name, params string[] arguments) : base(predicate)
        {
            this.resolutionType = resolutionType;
            this.bob            = bob;
            this.name           = name;
            this.arguments      = arguments;

            var hcb = new HashCodeBuilder(base.GetHashCode()).Append(resolutionType).Append(bob).Append(name);

            foreach (var argument in arguments)
            {
                hcb.Append(argument);
            }
            hashCode = hcb.Value;

            // precalculate the function signature to use in the binder to evaluate the function
            functionSignature = Parameter.BuildFunctionSignature(name, arguments);
        }