C# Class VSTOContrib.Core.Extensions.CommonExtensions

Common extensions that are not Office specific, but are used by the library
Show file Open project: metamorph-inc/meta-core

Public Methods

Method Description
CallWithTimeout ( this action, int timeoutMilliseconds ) : void

Calls the action with a timeout.

StartProcess ( this processStartInfo, DataReceivedEventHandler outputDataRecieved ) : int

Starts the process, and reads all output from the process

ToFullStackTrace ( this ex ) : string

Gets the full stack trace, including inner exceptions.

ToFullStackTrace ( this ex, int count ) : string

Gets the full stack trace, including inner exceptions up to a specified level

ToMessageStack ( this ex ) : string

Gets all messages (including inner exceptions) from the exception

Method Details

CallWithTimeout() public static method

Calls the action with a timeout.
If timeout occurs
public static CallWithTimeout ( this action, int timeoutMilliseconds ) : void
action this The action.
timeoutMilliseconds int The timeout milliseconds.
return void

StartProcess() public static method

Starts the process, and reads all output from the process
public static StartProcess ( this processStartInfo, DataReceivedEventHandler outputDataRecieved ) : int
processStartInfo this The process start info.
outputDataRecieved DataReceivedEventHandler The output data recieved.
return int

ToFullStackTrace() public static method

Gets the full stack trace, including inner exceptions.
public static ToFullStackTrace ( this ex ) : string
ex this The ex.
return string

ToFullStackTrace() public static method

Gets the full stack trace, including inner exceptions up to a specified level
public static ToFullStackTrace ( this ex, int count ) : string
ex this The ex.
count int The count.
return string

ToMessageStack() public static method

Gets all messages (including inner exceptions) from the exception
public static ToMessageStack ( this ex ) : string
ex this The ex.
return string