ServiceStack.Common
Categories of sql statements.
Unknown
DML statements that alter database state, e.g. INSERT, UPDATE
Statements that return a single record
Statements that iterate over a result set
A callback for ProfiledDbConnection and family
Called when a command starts executing
Called when a reader finishes executing
Called when a reader is done iterating through the data
Called when an error happens during execution of a command
True if the profiler instance is active
Wraps a database connection, allowing sql execution timings to be collected when a session is started.
Returns a new that wraps ,
providing query execution profiling. If profiler is null, no profiling will occur.
Your provider-specific flavor of connection, e.g. SqlConnection, OracleConnection
The currently started or null.
Determines whether the ProfiledDbConnection will dispose the underlying connection.
The underlying, real database connection to your db provider.
The current profiler instance; could be null.
The raw connection this is wrapping
Wrapper for a db provider factory to enable profiling
Every provider factory must have an Instance public field
Allow to re-init the provider factory.
proxy
proxy
proxy
proxy
proxy
proxy
proxy
proxy
proxy
proxy
Return T[0] when enumerable is null, safe to use in enumerations like foreach
Gets the textual description of the enum if it has one. e.g.
enum UserColors
{
[Description("Bright Red")]
BrightRed
}
UserColors.BrightRed.ToDescription();
Creates a Console Logger, that logs all messages to: System.Console
Made public so its testable
Default logger is to Console.WriteLine
Made public so its testable
Initializes a new instance of the class.
Initializes a new instance of the class.
Logs the specified message.
Logs the format.
Logs the specified message.
Creates a Debug Logger, that logs all messages to: System.Diagnostics.Debug
Made public so its testable
Default logger is to System.Diagnostics.Debug.WriteLine
Made public so its testable
Initializes a new instance of the class.
Initializes a new instance of the class.
Logs the specified message.
Logs the format.
Logs the specified message.
Func to get the Strongly-typed field
Required to cast the return ValueType to an object for caching
Func to set the Strongly-typed field
Required to cast the ValueType to an object for caching
Required to cast the ValueType to an object for caching
Func to get the Strongly-typed field
Required to cast the return ValueType to an object for caching
Func to set the Strongly-typed field
Required to cast the ValueType to an object for caching
Required to cast the ValueType to an object for caching
Useful IPAddressExtensions from:
http://blogs.msdn.com/knom/archive/2008/12/31/ip-address-calculations-with-c-subnetmasks-networks.aspx
Gets the ipv4 addresses from all Network Interfaces that have Subnet masks.
Gets the ipv6 addresses from all Network Interfaces.
Common functionality when creating adapters
Executes the specified expression.
The action.
Executes the specified action (for void methods).
The action.
Note: InMemoryLog keeps all logs in memory, so don't use it long running exceptions
Returns a thread-safe InMemoryLog which you can use while *TESTING*
to provide a detailed analysis of your logs.
Creates a Unified Resource Name (URN) with the following formats:
- urn:{TypeName}:{IdFieldValue} e.g. urn:UserSession:1
- urn:{TypeName}:{IdFieldName}:{IdFieldValue} e.g. urn:UserSession:UserId:1
Provide the an option for the callee to block until all commands are executed
Invokes the action provided and returns true if no excpetion was thrown.
Otherwise logs the exception and returns false if an exception was thrown.
The action.
Runs an action for a minimum of runForMs
What to run
Minimum ms to run for
time elapsed in micro seconds
Returns average microseconds an action takes when run for the specified runForMs
What to run
How many times to run for each iteration
Minimum ms to run for