在Xcode 10.1中起作用的声明在Xcode 10.2.1中给出错误。错误是:“静态属性'webServiceURL'引用了自身”
public class CompressedJsonBinderProvider : IModelBinderProvider
{
public IModelBinder GetBinder(Type modelType)
{
if(!modelType.IsGenericType)
return null;
var genericType = modelType.GetGenericTypeDefinition();
if(genericType == typeof(CompressedJsonViewModel<>))
return new CompressedJsonModelBinder();
return null;
}
}