public CoreServices.ServiceRegistry Build() { Args.ThrowIf(_forTypes.Count != _useTypes.Count, "Type count mismatch: for types ({0}) use types({1})", _forTypes.Count, _useTypes.Count); CoreServices.ServiceRegistry reg = new CoreServices.ServiceRegistry(); for (int i = 0; i < _forTypes.Count; i++) { reg.Set(_forTypes[i], _useTypes[i]); } return(reg); }