Error trying to use Custom Functoid

Error trying to use Custom Functoid

Post by QnJldHRWU » Fri, 04 Jul 2008 01:34:00


am receiving same error in C# as Ellen Deak posted in a Question with the
same subject as this question, I tried removing the namespace just the same
but had no effect. Below is code. The namespace on my project is
"CHNw.bv.Biztalk.Functoid"
-----------------------------------------------------------------------


public class ISO8601DateConversionSimpleFunctoid : BaseFunctoid
{
public ISO8601DateConversionSimpleFunctoid() : base()
{
//ID for this functoid
this.ID = 6107;

// resource assembly must be ProjectName.ResourceName if
building with VS.Net

SetupResourceAssembly("CHNw.bv.Biztalk.Functoid.CustomFunctoidResources",
Assembly.GetExecutingAssembly());

//Setup the Name, ToolTip, Help Description, and the Bitmap for
this functoid
SetName("IDS_ISO8601DATECONVERSIONSIMPLEFUNCTOID_NAME");
SetTooltip("IDS_ISO8601DATECONVERSIONSIMPLEFUNCTOID_TOOLTIP");

SetDescription("IDS_ISO8601DATECONVERSIONSIMPLEFUNCTOID_DESCRIPTION");
SetBitmap("IDB_ISO8601DATECONVERSIONFUNCTOID_BITMAP");

this.SetMinParams(1);
this.SetMaxParams(1);

//set the function name that needs to be called when this
Functoid is invoked. This means that
//this Functoid assembly need to be present in GAC for its
availability during Test..Map and Runtime.
SetExternalFunctionName(GetType().Assembly.FullName,
"ISO8601DateConversionSimpleFunctoid", "ConvertToISO8601");

//category for this functoid. This functoid goes under the
String Functoid Tab in the
//VS.Net toolbox for functoids.
this.Category = FunctoidCategory.DateTime;
this.OutputConnectionType = ConnectionType.AllExceptRecord;

AddInputConnectionType(ConnectionType.AllExceptRecord); //first
input

}

//this is the function that gets called when the Map is executed
which has this functoid.
public string ConvertToISO8601(string val1)
{
string _UNKNOWN = "Unknown Date Format";
DateTime outty;
String rvalue;
//Console.WriteLine(dt.ToLongDateString());
if (DateTime.TryParse(val1, out outty) == true)
{
rvalue = outty.ToString("s",
System.Globalization.DateTimeFormatInfo.CurrentInfo);
}
else if (DateTime.TryParseExact(val1, "yyyyMMdd",
System.Globalization.DateTimeFormatInfo.CurrentInfo,
System.Globalization.DateTimeStyles.AdjustToUniversal, out outty) == true)
{
rvalue = outty.ToString("s",
System.Globalization.DateTimeFormatInfo.CurrentInfo);
}
else if (DateTime.TryParseExact(val1, "yyyHHddHHmm",
System.Globalization.DateTimeFormatInfo.CurrentInfo,
System.Globalization.DateTimeStyles.AdjustToUniversal, out outty) == true)
{
rvalue = outty.ToString("s",
System.Globalization.DateTimeFormatInfo.CurrentInfo);
}
else if (DateTime.TryParseExact(val1, "yyyyMMddHHmmss",
System.Globalization.DateTimeFormatInfo.CurrentInfo,
System.Globalization.DateTimeStyles.AdjustToUniversal, out outty) == true)
{
rvalue = outty.ToString("s",
System.Globalization.DateTimeFormatInfo.CurrentInfo);
}
else if (
 
 
 

Error trying to use Custom Functoid

Post by QnJldHRWU » Tue, 22 Jul 2008 01:19:00

he error received:
"Value cannot be null.
Parameter name: extension"

--
BrettVP


"BrettVP" wrote: