public IModelBinder GetBinder(ModelBinderProviderContext context) { context.ThrowIfNull(nameof(context)); if (typeof(ISitemapItem).IsAssignableFrom(context.Metadata.ModelType)) { return(this); } return(null); }
public IModelBinder GetBinder(ModelBinderProviderContext context) { context.ThrowIfNull(); if (context.Metadata.ModelType == typeof(string)) { return(new TrimModelBinder()); } return(null); }