/// <summary> /// Gets the <see cref="ProjectionTypeBuilder"/> built for the specified <paramref name="model"/>. /// </summary> public static ProjectionTypeBuilder GetCachedFor(RuntimeTypeModel model) { ProjectionTypeBuilder builder; if (Builders.TryGetValue(model, out builder)) { return(builder); } lock (Builders) { if (Builders.TryGetValue(model, out builder)) { return(builder); } builder = new ProjectionTypeBuilder(model); Builders.Add(model, builder); return(builder); } }
private Type GetTypeReplacingTSource(Type type, MemberInfo[] members) { return(ProjectionTypeBuilder.GetCachedFor(_model) .GetTypeForProjection(type, members)); }