/// <summary> /// 初始化策略 /// </summary> /// <param name="type"></param> private void InitStrategy(Type type) { //遍历策略缓存 查找符合类型的处理类 foreach (XmlSerializerStrategy strategy in _strategyCache) { if (strategy.IsMatchType(type)) { this._strategy = strategy; break; } } }