I have class as public static class ConsumerRequestExtensions , this class has method as a
public static IConsumerRequest Get(this IConsumerRequest request),
i want to use that Get method , so i created object of IConsumerRequest and call that Get method by the IConsumerRequest object, but it gives error that explicit conversion exists.
because i am using two Dll's which have same interface, so that i create alias for one dll and access IConsumerRequest interface , but implicitly IConsumerRequest not calling the Get method of ConsumerRequestExtension.
code is here.
OnlineQBO::DevDefined.OAuth.Consumer.IConsumerRequest conReq = oSession.Request();
conReq = conReq.Get();
My dlls are
XeroApi.dll
DevDefined.OAuth.dll
please suggest any solution to avoid explicit calls of dlls
Thank you..
Loading
VulpesPosted May 3, 2014, 8:11 PM
Subject to that, there's nothing to stop you defining Get extension methods for each interface in the same static class. They will both be overloads of that method because their parameter types will be different.