|
-
Mar 26th, 2014, 05:13 AM
#1
"Concretising" generics - for WPF service
(Looking for thoughts...)
So - when you create a WCF service with a [ServiceContract()] and [DataContract()] you can't use open generics - which I do understand why.
However - anyone have any ideas about how I could specify a small set of types and have the generics turned into concrete implementations in the service ? (Probably looking at codegen??)
i.e. if I have a function like Add(Of TParam)(Byval lhs As TParam, ByVal rhs As TParam) As TParam I'd like it to generate:-
AddInteger(Byval lhs As Integer, Byval rhs As Integer) As Integer
AddDouble(Byval lhs As Double, Byval rhs As Double) As Double
(etc.)
Last edited by Merrion; Mar 26th, 2014 at 12:10 PM.
Reason: I meant WCF *doh*
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|