예제 #1
0
        /// <summary>
        /// Creates a new state which is based on current state and has given value for given property.
        /// </summary>
        /// <typeparam name="PropertyType">Type of value represented by property.</typeparam>
        /// <param name="property">Property which value will be set.</param>
        /// <param name="value">Value which will be set to the property.</param>
        /// <returns>The new dialog state.</returns>
        private DialogState newStateWithValue <PropertyType>(StateProperty <PropertyType> property, PropertyType value)
        {
            var propertyToValueCopy = new Dictionary <object, object>(_propertyToValue);

            property.SetValue(propertyToValueCopy, value);

            return(new DialogState(propertyToValueCopy));
        }
예제 #2
0
 internal DialogState(HeuristicQAModule qa)
 {
     _propertyToValue = new Dictionary <object, object>();
     _qa.SetValue(_propertyToValue, qa);
 }