Skip to content
This repository was archived by the owner on Apr 22, 2019. It is now read-only.
This repository was archived by the owner on Apr 22, 2019. It is now read-only.

2 properties are not implemented #2

Description

@ArsenShnurkov

,/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,

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/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions