String split in extension

String split in extension

  
Hi guys, i wanna create a extension with C# to split string with String.Split(new[] {",."},StringSplitOptions.None ). i can compile successfully in VS, but failed in Integration Studio. After checked in MSDN, this function is a feature of .Net framework 2.0, i think outsystems should support this. If i comment out the highlight part, it can be compiled successfully. Is a bug in outsystems or outsystems can not support this? Can any one explain this? Thanks a lot.
It should compile without any issues.
but it depends how you setup integration studio..

J. wrote:
It should compile without any issues.
but it depends how you setup integration studio..
 Hi J,
Here is my configuration for integration studio, Is there something wrong? I can compile other extensions successfully except the one i created. Thanks a lot.
 
and the source itself?

this builds fine by me:

using System;
using System.Collections;
using System.Data;
using OutSystems.HubEdition.RuntimePlatform;
using OutSystems.RuntimePublic.Db;
 
namespace OutSystems.NssExtension {
 
public class CssExtension: IssExtension {
 
/// <summary>
/// 
/// </summary>
/// <param name="ssStringToSplit"></param>
/// <param name="ssDelimiters"></param>
public void MssStringSplit(string ssStringToSplit, string ssDelimiters) {
// TODO: Write implementation for action
            string[] arrayResult = ssStringToSplit.Split(new[] { ssDelimiters }, StringSplitOptions.None);
} // MssStringSplit
} // CssExtension
} // OutSystems.NssExtension
 
J. wrote:
and the source itself?

this builds fine by me:

using System;
using System.Collections;
using System.Data;
using OutSystems.HubEdition.RuntimePlatform;
using OutSystems.RuntimePublic.Db;
 
namespace OutSystems.NssExtension {
 
public class CssExtension: IssExtension {
 
/// <summary>
/// 
/// </summary>
/// <param name="ssStringToSplit"></param>
/// <param name="ssDelimiters"></param>
public void MssStringSplit(string ssStringToSplit, string ssDelimiters) {
// TODO: Write implementation for action
            string[] arrayResult = ssStringToSplit.Split(new[] { ssDelimiters }, StringSplitOptions.None);
} // MssStringSplit
} // CssExtension
} // OutSystems.NssExtension
 
 the source is almost the same as yours, and my integration studio version is 8.0.1.50, i am not sure is this the cause. Can you show me your configuration? Thanks a l ot.
 
same, just a different visual studio.

J. wrote:
same, just a different visual studio.
 
 ummm....i have tried vs 2008, vs 2010, but still got errors. Thanks you very much.
 
If you can provide the xif we could help a bit more
J. wrote:
If you can provide the xif we could help a bit more
 
 Sorry for late reply. Attachment is my xif. Please help to check. Thanks a lot.
Sadly, no problem here.

Before we go deeper.  there is an Text.xif where you can split strings also.



J. wrote:
Sadly, no problem here.

Before we go deeper.  there is an Text.xif where you can split strings also.


 
 
 Yep, you are right. But i wanna to split string with string delimiter, not a char. Because if someone key the delimiter in his input, this will cause error. So i wanna to use two chars or three chars, and when i use the split function in Text.xif, i will get a wrong string array. For example, the string is "a,.b,.c", then i will get "a"," "," ","b"," "," ","c".
make sure .net framework is correctly installed on the server btw.


J. wrote:
make sure .net framework is correctly installed on the server btw.

 
 OK, i will check this, thanks a lot. BTW, when we compile the code, we use local compile or server compile, if we use local, what is the compile tool configed in options used for?
 
Zhuang Merliny wrote:
J. wrote:
make sure .net framework is correctly installed on the server btw.

 
 OK, i will check this, thanks a lot. BTW, when we compile the code, we use local compile or server compile, if we use local, what is the compile tool configed in options used for?
 
 Hi J,

May i know Integration Studio version you used, the Visual Studio version? Can you show me the option screenshot of you Integration Studio? Thanks a lot.
 
I use v9 and vs2013


Can you open the Text.xif and publish it again?

J. wrote:
I use v9 and vs2013


Can you open the Text.xif and publish it again?
 
 
 Yep , i can publish it. I have finished the testing, only V9 can compile successfully. V8 will still fail with .Net Framework installed on server. Thank you very much.