biztalk - Extension object in XSLT with subclasses -
i have extension object class transcohelper
want call in mappings. tricky part want call methods in several subclasses of class , not methods in main-class.
unfortunately can’t abstract subclasses 1 generic 1 because of method names same several subclases.
i tried following statements without success –
<xsl:value-of select="transco:subclass1.method1()"/>
did accomplish behaviour or impossible? less attractive solution add reference in extension object every subclass , rid of main class i’d avoid if possible…
a dummy version of class looks following -
public class transcohelper { public class subclass1 : transcobase { public static string method1() { return "method1"; } } public class subclass2 : transcobase { public static string method1() { return "method2"; } } }
here's same answer offered on @ msdn:
i don't think work because extensions added instances, as remember.
instances of transcohelper don't automatically contain instances of subclass1 or subclass2.
so, you'd have add extension each individual class you'd need use. or, add methods transcohelper call subclass1/2 static methods.
Comments
Post a Comment