Example #1
0
        /// <summary>
        /// Returns a key containing one ordinary key segment per given value
        /// except that the last given value becomes a prefix key segment.
        /// </summary>
        /// <param name="values">the values for each key column that will be used to compose the key</param>
        /// <returns>A key containing one ordinary key segment per given value
        /// except that the last given value becomes a prefix key segment.</returns>
        /// <seealso cref="Compose"/>
        /// <seealso cref="ComposeWildcard"/>
        public static Key ComposePrefix(params object[] values)
        {
            Key key = new Key();

            for (int i = 0; i < values.Length - 1; i++)
            {
                key.Add(values[i]);
            }

            key.AddPrefix(values[values.Length - 1]);
            return(key);
        }
Example #2
0
        /// <summary>
        /// Returns a key containing one ordinary key segment per given value
        /// except that the last given value becomes a prefix key segment.
        /// </summary>
        /// <param name="values">the values for each key column that will be used to compose the key</param>
        /// <returns>A key containing one ordinary key segment per given value
        /// except that the last given value becomes a prefix key segment.</returns>
        /// <seealso cref="Compose"/>
        /// <seealso cref="ComposeWildcard"/>
        public static Key ComposePrefix(params object[] values)
        {
            Key key = new Key();
            for (int i = 0; i < values.Length - 1; i++)
            {
                key.Add(values[i]);
            }

            key.AddPrefix(values[values.Length - 1]);
            return key;
        }