v9 Metastorm List to generic List<T>
hi
Is there any simple way to cast/convert Metastorm List type (containing KeyValuePair<string, string>) to .net generic List<KeyValuePair<string, string>> type?
I'm trying to make extension methods for ProcessContext.UserInput fields to get values by column name, not by index. Unfortunatelly i even don't know if UserInput contains KeyValuePair types or it is just simple array:
public static string Find(this IList list, string columnName)
{
var l = (List<KeyValuePair<string,string>>)list.KeyValuePairList();
KeyValuePair<string, string> found = l.FindLast(f => f.Value == columnName);
if(!string.IsNullOrEmpty(found.Key))
return found.Key;
else
return string.Empty;
}
Comments
-
I dont know if this will help you, but it solved my problems of the metastorm "List" not having the methods I need which are available on the System "List".
Basically once you add LINQ to the script (using System.Linq;), a lot of the default C# List methods open up.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 155 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 9 XM Fax
- Follow Categories