I am translating a Vulcan program handling WCF to X#, which was originally translated from C#.
This is part of the working Vulcan code:
PRIVATE servicechannel AS USUAL
SELF:servicechannel := channel:CreateChannel()
On the SELF:servicechannel := channel:CreateChannel() line I get
Error XS0266 Cannot implicitly convert type 'WCFInterfaces.IWebTransferService' to 'Vulcan.__Usual'.
The original C# code looks as follows:
private T servicechannel;
servicechannel = channel.CreateChannel();
Keyword 'SELF' is not valid in a static property, static method, or static field initializer
but I am not sure what I should do with this. I seem to remember Chris has replied me earlier about some issue with 'STATIC' but I can't find it back.
Why are using a USUAL here?
PRIVATE servicechannel as IWebTransferService
PRIVATE servicechannel as OBJECT
I tried the first earlier and got the same error. USUAL was (in Vulcan) after trial& error the way I got it working but here OBJECT helps to get rid of the error, thanks for that.
If it all works as it did in Vulcan (I expect so) I leave the code like that. But it's good to know that X# is so much closer to C# - I think it would have been much easier to convert this C# code to X# than it was to convert it to Vulcan. This WCF code is a bit of a black box for me which makes it more difficult to convert.