I wanted to get around the challenge of the internal method and therefore ridicule it. The mocking delegate looks like this:
public Microsoft.Moles.Framework.MolesDelegates.OutOutFunc<string,string,string, byte[]> GetlineStringStringOutStringOut { set; }
Now, in my test, when I try to access this bullied method, for example:
GetlineStringStringOutStringOut = (a,b,c) => {return bytearray};
an error occurs indicating that parameter 2 and 3 should be declared with the out keyword, but when I declare them with the out keyword, it does not compile at all. I read other questions and answers, and it seems this is not possible.
Can a user-defined delegate be provided for this? If yes, please give an example.
EDIT:
I tried to declare my own delegate with the same signature as the laughed delegate
static delegate byte[] MyFunc<String, String, String> (string a, out string b, out string c);
but I'm not sure how this can be called calling the delegate method?
Rahul source share