BizTalk Server General - Inline C# vs External Assemblies

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > June 2004 > Inline C# vs External Assemblies





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Inline C# vs External Assemblies
JC

2004-06-29, 5:52 pm

Hello,

I am currently working on a BizTalk project that has an external C# assembly to provide some date conversion functions using the System.Globalisation.Calendar class within a map (specifically to return the current week of the year).

The function itself is not particually complicated and I would prefer to include it as inline C# in the map to remove the need for the external assembly. The only issue here is that the System.Globalisation namespace is not supported by this. Does anyone
know:

a) if it is possible to specify System.Globalisation (or any other namespaces) for use in Inline C#.
b) any alternatives to using the Calendar class to return the current week of the year that would be compatible with inline C# (e.g. at time of posting we are in week 27 of this current calendar year).
c) tips and tricks to ensure that deployment of external assemblies go smoothly when updating an existing BizTalk project. I know that the strong naming of assemblies requires the version number to match in the GAC but BizTalk seems to be somewhat temprem
ental when it comes to re-deploying newer versions of files. There have been times when a service restart or a total rebuild of a project have been the only way for biztalk to shake off the behaviour of an 'older' version of an orchestration and external
assembly from its 'memory'.

Regards.
David Downing [MSFT]

2004-06-29, 5:52 pm

You should be able to reference the calendar class in an inline assembly by
fully qualifying the type you are trying to reference. See the following
inline script:

public string MyCulture()
{
return System.Globalization.CultureInfo.CurrentCulture.EnglishName;
}

This generates the following on my computer when the map is tested:

<ns0:Root xmlns:ns0="http://MappingTest.DestinationSchema">
<WeekOfTheYear>English (United States)</WeekOfTheYear>
</ns0:Root>


Dave

--------------------[vbcol=seagreen]
assembly to provide some date conversion functions using the
System.Globalisation.Calendar class within a map (specifically to return
the current week of the year).[vbcol=seagreen]
include it as inline C# in the map to remove the need for the external
assembly. The only issue here is that the System.Globalisation namespace is
not supported by this. Does anyone know:[vbcol=seagreen]
namespaces) for use in Inline C#.[vbcol=seagreen]
week of the year that would be compatible with inline C# (e.g. at time of
posting we are in week 27 of this current calendar year).[vbcol=seagreen]
smoothly when updating an existing BizTalk project. I know that the strong
naming of assemblies requires the version number to match in the GAC but
BizTalk seems to be somewhat tempremental when it comes to re-deploying
newer versions of files. There have been times when a service restart or a
total rebuild of a project have been the only way for biztalk to shake off
the behaviour of an 'older' version of an orchestration and external
assembly from its 'memory'.[vbcol=seagreen]

This posting is provided "AS IS" with no warranties, and confers no rights.

EBusiness Server Team

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com