Search Results for

    Show / Hide Table of Contents

    Class ExtensionMethods

    Inheritance
    System.Object
    ExtensionMethods
    Namespace: Monai.Deploy.InformaticsGateway.Common
    Assembly: Monai.Deploy.InformaticsGateway.Common.dll
    Syntax
    public static class ExtensionMethods

    Methods

    | Improve this Doc View Source

    IsCanceledOrFaulted(Task)

    Checks if a given task is faulted or cancelled.

    Declaration
    public static bool IsCanceledOrFaulted(this Task task)
    Parameters
    Type Name Description
    System.Threading.Tasks.Task task

    The task object

    Returns
    Type Description
    System.Boolean

    True if canceled or faulted. False otherwise.

    | Improve this Doc View Source

    IsNullOrEmpty<T>(IEnumerable<T>)

    Extension method for checking a IEnumerable collection is null or empty.

    Declaration
    public static bool IsNullOrEmpty<T>(this IEnumerable<T> enumerable)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> enumerable
    Returns
    Type Description
    System.Boolean

    true if null or empty; false otherwise.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Post<TInput>(ActionBlock<TInput>, TInput, TimeSpan)

    Extension for ActionBlock to delay post of an object to be processed.

    Declaration
    public static async Task<bool> Post<TInput>(this ActionBlock<TInput> actionBlock, TInput input, TimeSpan delay)
    Parameters
    Type Name Description
    System.Threading.Tasks.Dataflow.ActionBlock<TInput> actionBlock

    Instance of ActionBlock

    TInput input

    Object to be posted

    System.TimeSpan delay

    Time to wait before posting

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>
    Type Parameters
    Name Description
    TInput

    Type of object to be post to the actio. block

    | Improve this Doc View Source

    RemoveInvalidPathChars(String)

    Removes characters that cannot be used in file paths.

    Declaration
    public static string RemoveInvalidPathChars(this string input)
    Parameters
    Type Name Description
    System.String input

    string to be scanned

    Returns
    Type Description
    System.String

    input with invalid path characters removed.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022-2023 Project MONAI
    Generated by DocFX