示例#1
0
        /// <summary>
        /// Sets a permutation.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="parameter"></param>
        /// <param name="value"></param>
        public void Set <T>(PermutationParameter <T> parameter, T value)
        {
            if (!EqualityComparer <T> .Default.Equals((T)ObjectValues[parameter.BindingSlot], value))
            {
                PermutationCounter++;
            }

            ObjectValues[parameter.BindingSlot] = value;
        }
示例#2
0
 /// <summary>
 /// Gets a permutation.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="parameter"></param>
 /// <returns></returns>
 public T Get <T>(PermutationParameter <T> parameter)
 {
     return((T)ObjectValues[parameter.BindingSlot]);
 }