/////////////////////////////////////////////////////////////////////////////////////////// /// <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; }
/// <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); }
//here we use the strategies public StrategyContext(IConvertStrategy strategy) { this.strategy = strategy; }