Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy methods (override or add) do not support parameters #8

Closed
IFYates opened this issue Mar 31, 2021 · 1 comment
Closed

Proxy methods (override or add) do not support parameters #8

IFYates opened this issue Mar 31, 2021 · 1 comment
Milestone

Comments

@IFYates
Copy link
Owner

IFYates commented Mar 31, 2021

Describe the bug
Adding a proxy methods (override or add) with any parameters after the instance will fail to shim.

Reproducible Example

public class TestClass {
    ...
}

public interface IShim {
    [ShimProxy(typeof(ProxyLogic))] // Add or Override gives same result
    string Method(string arg);
}

public class ProxyLogic {
    public string Method(IShim inst, string arg) {
        return $"[{arg}]";
    }
}

var shim = new TestClass().Shim<IShim>(); // Currently throws exception
var res = shim.Method("test");

Expected behaviour
res should be [test]

Actual behaviour
Exception is thrown.

@IFYates
Copy link
Owner Author

IFYates commented Mar 31, 2021

Closed by #9

@IFYates IFYates closed this as completed Mar 31, 2021
@IFYates IFYates added the done label Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant