Available Namespaces
Libraries and classes available to use in Frends Processes.
Using namespaces and classes in Frends has some limitations when compared to full .NET development environment. Here's a list of libraries, classes and namespaces that are available in Frends.
Available common namespaces to use
Assets in following namespaces are directly available in Frends C# expressions without need to write the complete namespace:
System
System.Net
System.Security
System.Xml
System.Xml.Linq
System.Data
System.Threading.Tasks
System.Dynamic
System.Linq
System.Collections.Generic
System.Reflection
Newtonsoft.Json
Newtonsoft.Json.Linq
In addition, functions from the following namespaces are available to use when complete namespace of the function is written:
Microsoft.CodeAnalysis
Microsoft.CSharp
Finally, all the functions from mscorlib (Multilanguage Standard Object Runtime Library) are also available when complete namespace of the function is written. These include at least:
Microsoft.Reflection
Microsoft.Runtime.Hosting
Microsoft.Win32
Microsoft.Win32.SafeHandles
System
System.Collections
System.Collections.Concurrent
System.Collections.Generic
System.Collections.ObjectModel
System.Configuration.Assemblies
System.Deployment.Internal
System.Deployment.Internal.Isolation
System.Deployment.Internal.Isolation.Manifest
System.Diagnostics
System.Diagnostics.CodeAnalysis
System.Diagnostics.Contracts
System.Diagnostics.Contracts.Internal
System.Diagnostics.SymbolStore
System.Diagnostics.Tracing
System.Diagnostics.Tracing.Internal
System.Globalization
System.IO
System.IO.IsolatedStorage
System.Numerics.Hashing
System.Reflection
System.Reflection.Emit
System.Resources
System.Runtime
System.Runtime.CompilerServices
System.Runtime.ConstrainedExecution
System.Runtime.DesignerServices
System.Runtime.ExceptionServices
System.Runtime.Hosting
System.Runtime.InteropServices
System.Runtime.InteropServices.ComTypes
System.Runtime.InteropServices.Expando
System.Runtime.InteropServices.TCEAdapterGen
System.Runtime.InteropServices.WindowsRuntime
System.Runtime.Remoting
System.Runtime.Remoting.Activation
System.Runtime.Remoting.Channels
System.Runtime.Remoting.Contexts
System.Runtime.Remoting.Lifetime
System.Runtime.Remoting.Messaging
System.Runtime.Remoting.Metadata
System.Runtime.Remoting.Metadata.W3cXsd2001
System.Runtime.Remoting.Proxies
System.Runtime.Remoting.Services
System.Runtime.Serialization
System.Runtime.Serialization.Formatters
System.Runtime.Serialization.Formatters.Binary
System.Runtime.Versioning
System.Security
System.Security.AccessControl
System.Security.Claims
System.Security.Cryptography
System.Security.Cryptography.X509Certificates
System.Security.Permissions
System.Security.Policy
System.Security.Principal
System.Security.Util
System.StubHelpers
System.Text
System.Threading
System.Threading.NetCore
System.Threading.Tasks
Windows.Foundation.Diagnostics
Custom Tasks may use other libraries and namespaces as well, these limitations apply only to the C# code written in Frends Process Editor.
Frends namespaces
Each Task added to Frends includes a set of classes that can be used to work with those Tasks. For example, HTTP Request Task in Frends expects to receive headers through using an array of Frends.HTTP.Request.Definitions.Header
objects, which the UI generally converts into a list of text fields.
It's also possible to dynamically generate a list of headers for our Task, by creating the array of those objects in a Code Task.
Here's an example of how that would be done:
{
var headerList = new List<Frends.HTTP.Request.Definitions.Header>();
headerList.Add(new Frends.HTTP.Request.Definitions.Header {
Name = "Content-type",
Value = "application/json"
});
return headerList.ToArray();
}
Resulting variable could then be used in the expression for the headers for a HTTP Request Task.
You can find out what objects each Task expects to receive by checking the tooltips for each field in the Task parameters, or by heading over to the documentation for the Task. If the information is still missing, all the source codes are available in the GitHub repository for Frends Tasks, which will definitely show what data type is expected.
Last updated
Was this helpful?