예제 #1
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        ///     Initializes a new instance of the PrimeHolding.Tools.Converter.ConverterContext class.
        /// </summary>
        ///
        /// <param name="converter">    The converter. </param>
        ///////////////////////////////////////////////////////////////////////////////////////////

        public ConverterContext(IConvertStrategy converter)
        {
            this.converter = converter;
        }
예제 #2
0
 /// <summary>
 /// Register a custom strategy. Custom strategies will be considered before built-in strategies.
 /// </summary>
 /// <param name="strategy"></param>
 public static void RegisterStrategy(IConvertStrategy strategy)
 {
     sStrategies.Insert(0, strategy);
 }
예제 #3
0
 //here we use the strategies
 public StrategyContext(IConvertStrategy strategy)
 {
     this.strategy = strategy;
 }