示例#1
0
        /// <summary>
        /// Creates new <see cref="Tuple"/> by its field value(s).
        /// </summary>
        /// <typeparam name="T1">Type of the first tuple field.</typeparam>
        /// <typeparam name="T2">Type of the 2nd tuple field.</typeparam>
        /// <param name="descriptor">Tuple descriptor.</param>
        /// <param name="value1">Value of the first tuple field.</param>
        /// <param name="value2">Value of the 2nd tuple field.</param>
        /// <returns>Newly created <see cref="RegularTuple"/> object.</returns>
        public static RegularTuple Create <T1, T2>(TupleDescriptor descriptor, T1 value1, T2 value2)
        {
            RegularTuple tuple = Create(descriptor);

            tuple.SetValue(0, value1);
            tuple.SetValue(1, value2);
            return(tuple);
        }
示例#2
0
        /// <summary>
        /// Creates new <see cref="Tuple"/> by its field value(s).
        /// </summary>
        /// <typeparam name="T1">Type of the first tuple field.</typeparam>
        /// <typeparam name="T2">Type of the 2nd tuple field.</typeparam>
        /// <typeparam name="T3">Type of the 3rd tuple field.</typeparam>
        /// <typeparam name="T4">Type of the 4th tuple field.</typeparam>
        /// <param name="descriptor">Tuple descriptor.</param>
        /// <param name="value1">Value of the first tuple field.</param>
        /// <param name="value2">Value of the 2nd tuple field.</param>
        /// <param name="value3">Value of the 3rd tuple field.</param>
        /// <param name="value4">Value of the 4th tuple field.</param>
        /// <returns>Newly created <see cref="RegularTuple"/> object.</returns>
        public static RegularTuple Create <T1, T2, T3, T4>(TupleDescriptor descriptor, T1 value1, T2 value2, T3 value3, T4 value4)
        {
            RegularTuple tuple = Create(descriptor);

            tuple.SetValue(0, value1);
            tuple.SetValue(1, value2);
            tuple.SetValue(2, value3);
            tuple.SetValue(3, value4);
            return(tuple);
        }
示例#3
0
        /// <summary>
        /// Creates new <see cref="Tuple"/> by its field value(s).
        /// </summary>
        /// <typeparam name="T">Type of the only tuple field.</typeparam>
        /// <param name="descriptor">Tuple descriptor.</param>
        /// <param name="value">Value of the only tuple field.</param>
        /// <returns>Newly created <see cref="RegularTuple"/> object.</returns>
        public static RegularTuple Create <T>(TupleDescriptor descriptor, T value)
        {
            RegularTuple tuple = Create(descriptor);

            tuple.SetValue(0, value);
            return(tuple);
        }