private static Type GetPropertyWrapperTypeFor( PropertyTypeNode containerType, PropertyTypeNode propertyType) { var propertyWrapperTypeString = GetPropertyWrapperTypeString(containerType, propertyType); Type wrapperType; if (!PropertyWrapperTypeFromName.TryGetValue(propertyWrapperTypeString, out wrapperType)) { return(null); } if (wrapperType == null) { return(null); } if (PropertyTypeNode.IsEnumerableType(propertyType.Tag)) { return(wrapperType.MakeGenericType( containerType.NativeType, typeof(List <>).MakeGenericType(propertyType.NativeType), propertyType.NativeType)); } return(wrapperType.MakeGenericType(containerType.NativeType, propertyType.NativeType)); }