You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.
,/src/Oocx.ACME.IIS/IISChallengeProvider.cs(29,29): Error CS1061: Type 'object' does not contain a definition for 'Applications' and no extension method 'Applications' of type 'object' could be found. Are you missing an assembly reference? (CS1061) (Oocx.ACME.IIS)
./src/Oocx.ACME.IIS/IISChallengeProvider.cs(24,24): Error CS1061: Type 'object' does not contain a definition for 'VirtualDirectories' and no extension method 'VirtualDirectories' of type 'object' could be found. Are you missing an assembly reference? (CS1061) (Oocx.ACME.IIS)
A workaround currently exists in C# for interfaces
we can change the return type to a more specific type, but for class overrides instead of interface implementations.
you can create methods that behave the same as covariant interface methods using explicit implementations:
public interface IA { object Method();}public class B : IA { public string Method() { /* ... */ } object IA.Method() { return Method(); }}// when using these classes:IA a = new B();B b = new B();object ao = a.Method();string bo = b.Method(); https://www.simple-talk.com/blogs/implementing-method-override-covariance-on-c-part-2/
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
,/src/Oocx.ACME.IIS/IISChallengeProvider.cs(29,29): Error CS1061: Type 'object' does not contain a definition for 'Applications' and no extension method 'Applications' of type 'object' could be found. Are you missing an assembly reference? (CS1061) (Oocx.ACME.IIS)
./src/Oocx.ACME.IIS/IISChallengeProvider.cs(24,24): Error CS1061: Type 'object' does not contain a definition for 'VirtualDirectories' and no extension method 'VirtualDirectories' of type 'object' could be found. Are you missing an assembly reference? (CS1061) (Oocx.ACME.IIS)
UPD: hm, actually they are implemented - Site.Applications, Application.VirtualDirectories, strange...
UPD2: collection returns 'object' when indexed by string:
public object this[string attributeName]
this is why it gives these errors.
co-variant return types,
The text was updated successfully, but these errors were encountered: