private void AddResultSetMappingDefinitions(HbmMapping mappingSchema) { var binder = new ResultSetMappingBinder(Mappings); foreach (HbmResultSet resultSetSchema in mappingSchema.ResultSets) { // Do not inline this variable or the anonymous method will not work correctly. HbmResultSet tempResultSetSchema = resultSetSchema; mappings.AddSecondPass(delegate { ResultSetMappingDefinition definition = binder.Create(tempResultSetSchema); mappings.AddResultSetMapping(definition); }); } }
public ResultSetMappingDefinition Create(HbmResultSet resultSetSchema) { return(Create(resultSetSchema.name, resultSetSchema.Items)); }