Reputation: 1162
I have the following class in F# that inherits Microsoft.AspNet.Identity.IIdentityValidator interface:
type MyValidation() =
inherit IIdentityValidator<string> with
member x.ValidateAsync (value:string) : Task<IdentityResult> =
.....
I am getting this error:
This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'.
Why and how do I fix it?
Upvotes: 2
Views: 435
Reputation: 17929
The keyword inherit
is just for derived classes. You need to use interface
:
type MyValidation() =
interface IIdentityValidator<string> with
member x.ValidateAsync (value:string) : Task<IdentityResult> =
...
Upvotes: 5