Show / Hide Table of Contents

Class Extensions

Useful extension methods

Inheritance
System.Object
Extensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public static class Extensions

Methods

| Improve this Doc View Source

AsBytes(Stream)

Render a System.IO.Stream to a System.Byte array

Declaration
public static byte[] AsBytes(this Stream data)
Parameters
Type Name Description
System.IO.Stream data

System.IO.Stream to render

Returns
Type Description
System.Byte[]

A System.Byte array representing the contents of data

| Improve this Doc View Source

AsString(IHttpResponse)

Returns a string from the HTTP response

Declaration
public static string AsString(this IHttpResponse resp)
Parameters
Type Name Description
IHttpResponse resp

The HTTP response.

Returns
Type Description
System.String

A string from the HTTP response

| Improve this Doc View Source

AsString(Stream)

Render a System.IO.Stream to a System.String

Declaration
public static string AsString(this Stream data)
Parameters
Type Name Description
System.IO.Stream data

System.IO.Stream to render

Returns
Type Description
System.String

A System.String representing the contents of data

| Improve this Doc View Source

AsXml(IHttpResponse)

Creates an System.Xml.Linq.XElement from the data returned by the IHttpResponse

Declaration
public static XElement AsXml(this IHttpResponse resp)
Parameters
Type Name Description
IHttpResponse resp

IHttpResponse returned by the server

Returns
Type Description
System.Xml.Linq.XElement

An System.Xml.Linq.XElement representing the XML from the response

| Improve this Doc View Source

GroupConcat<T>(IEnumerable<T>, String, Func<T, String>)

Concatenate the string representation of a set of values to a single string separated by separator

Declaration
public static string GroupConcat<T>(this IEnumerable<T> values, string separator, Func<T, string> renderer = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> values

Values to concatenate

System.String separator

System.String to use as a separator

System.Func<T, System.String> renderer

Function used to render a value as a string. If not specified, System.Object.ToString() is used

Returns
Type Description
System.String

A single string containing the string representation of each value in values

Type Parameters
Name Description
T
Remarks

This performs a similar function to System.String.Join(System.String,System.Collections.Generic.IEnumerable{System.String}) which is available in .Net 4+

| Improve this Doc View Source

IsNullOrEmpty(SecureToken)

Indicates if a SecureToken is null or empty

Declaration
public static bool IsNullOrEmpty(this SecureToken token)
Parameters
Type Name Description
SecureToken token

The token to check.

Returns
Type Description
System.Boolean

true if token is null or empty (with a Length < 0; otherwise, false.

| Improve this Doc View Source

ToArasId(Guid)

Renders a System.Guid using the default Aras ID format.

Declaration
public static string ToArasId(this Guid guid)
Parameters
Type Name Description
System.Guid guid

System.Guid to render as an ID

Returns
Type Description
System.String

32-character System.String representing the ID

| Improve this Doc View Source

ToArasId(Nullable<Guid>)

Renders a System.Nullable<T> using the default Aras ID format.

Declaration
public static string ToArasId(this Guid? guid)
Parameters
Type Name Description
System.Nullable<System.Guid> guid

System.Nullable<T> to render as an ID

Returns
Type Description
System.String

null is guid does not have a value, otherwise a 32-character System.String representing the ID

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX