-
Notifications
You must be signed in to change notification settings - Fork 2
C# script
Ryan Newington edited this page Apr 12, 2018
·
1 revision
This transform allows you to write a basic C# script to transform values
Parameter name | Description |
---|---|
Script | The c# script |
The transform accepts any input type.
The transform accepts multiple input values which are processed according to the script
The transform return type is determined by the script
The C# transform contains a single function with the signature
public static IList<object> Transform(IList<object> obj)
The transform is expected to process the incoming objects and return a new List containing one or more transformed values.
This very simple example converts all the incoming values to string, and uppercases the values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using Lithnet.Transforms;
using Microsoft.MetadirectoryServices;
public static class CSExtension
{
public static IList<object> Transform(IList<object> obj)
{
List<object> transformedItems = new List<object>();
foreach(object value in obj)
{
transformedItems.Add(value.ToString().ToUpper());
}
return transformedItems;
}
}