Closed thinkbeforecoding closed 4 years ago
At first, I fix the method attributes just a IL generation... but it caused a problem at design time (the compiler was complaining that the method was sealed !). So I moved the attribute fix inside the ProvidedMethod, and it works.
I also avoid to set Sealed on the type when it's an Interface.
@thinkbeforecoding can we merge #213 here and ensure that test works now?
Ah yes, that would be neat
I updated the PR with tests from #213
There seem to be some issues with abstract classes. But it shouldn't be difficult to fix
Yes ! It's passing now. I simply force abstract attribute on methods that have no method impl.
@thinkbeforecoding, thank you for tackling this! Great work!
Is there anything more to do to get it merged ? 😄
The creation of the interface was working, but there was still some problems with with implementing it on a class with DefineMethodOverride.. Especially:
With this version I have a working from scratch WsdlProvider sdk. It parses the Wsdl using System.Xml.Linq and produces all data types, the interface with System.ServiceModel attributes, and the client class that derives from ClientBase<'t> where 't is the service interface, same way the original WsdlTp does, but here without using svcutil and the C# compiler. It is faster and less hacky.
The WsdlProvider is there: https://github.com/thinkbeforecoding/FSharp.Data.WsdlProvider 😀
Looks like conflicts need to be resolved here?
This is because #332 already contains all these changes. It should be ok to just close this one
This is a fix for interfaces generation for Generative provider. #211
The code instanciated the ILMethodBuilder before checking whether the method is abstract, which does produce an non empty VAR for the method. The TypeAttributes where not automatically correctly set for interfaces. MethodAttributes where not automatically set for interface or abstract classes.