Class SubstituteUtilities
Inheritance
System.Object
SubstituteUtilities
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Terrasoft.TestFramework.dll
Syntax
public static class SubstituteUtilities
Properties
ForegroundThreadScheduler
Declaration
public static TaskScheduler ForegroundThreadScheduler { get; }
Property Value
Type |
Description |
System.Threading.Tasks.TaskScheduler |
|
Methods
CreateAppConnection()
Declaration
public static AppConnection CreateAppConnection()
Returns
CreateBackgroundUserConnection()
Declaration
public static UserConnection CreateBackgroundUserConnection()
Returns
CreateEmptySystemUserConnection()
Declaration
public static SystemUserConnection CreateEmptySystemUserConnection()
Returns
CreateEmptyUserConnection()
Declaration
public static UserConnection CreateEmptyUserConnection()
Returns
CreateEmptyUserConnection(AppConnection)
Declaration
public static UserConnection CreateEmptyUserConnection(AppConnection appConnection)
Parameters
Returns
CreateSystemUserConnection()
Declaration
public static SystemUserConnection CreateSystemUserConnection()
Returns
CreateUserConnection()
Declaration
public static UserConnection CreateUserConnection()
Returns
Declaration
public static ExtraPropertyCollection GetExtraPropertyCollection(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
GetIsSubstituteObject(Object)
Declaration
public static bool GetIsSubstituteObject(this object source)
Parameters
Type |
Name |
Description |
System.Object |
source |
|
Returns
Type |
Description |
System.Boolean |
|
GetSynchronousProcessStartupState()
Declaration
public static bool GetSynchronousProcessStartupState()
Returns
Type |
Description |
System.Boolean |
|
Instead<TInstance, TValue>(TInstance, Func<TInstance, TValue>)
Declaration
public static TValue Instead<TInstance, TValue>(this TInstance source, Func<TInstance, TValue> valueFunc)
where TInstance : class
Parameters
Type |
Name |
Description |
TInstance |
source |
|
System.Func<TInstance, TValue> |
valueFunc |
|
Returns
Type Parameters
Name |
Description |
TInstance |
|
TValue |
|
PrepareDBExecutorForEntitySchemaQueryRun(UserConnection)
Declaration
public static DBExecutor PrepareDBExecutorForEntitySchemaQueryRun(this UserConnection source)
Parameters
Returns
SetAsCurrent(IHttpContextAccessor)
Declaration
public static void SetAsCurrent(this IHttpContextAccessor source)
Parameters
SetupAddonSchemaManager(UserConnection, AddonSchemaManager)
Declaration
public static AddonSchemaManager SetupAddonSchemaManager(this UserConnection source, AddonSchemaManager manager = null)
Parameters
Returns
SetupCanExecuteOperation(DBSecurityEngine, String, Boolean)
Declaration
public static DBSecurityEngine SetupCanExecuteOperation(this DBSecurityEngine source, string code, bool result)
Parameters
Type |
Name |
Description |
DBSecurityEngine |
source |
|
System.String |
code |
|
System.Boolean |
result |
|
Returns
SetupClientUnitSchemaManager(UserConnection, ClientUnitSchemaManager)
Declaration
public static ClientUnitSchemaManager SetupClientUnitSchemaManager(this UserConnection source, ClientUnitSchemaManager manager = null)
Parameters
Returns
SetupConnectionProvider(UserConnection)
Declaration
public static IUserConnectionProvider SetupConnectionProvider(this UserConnection source)
Parameters
Returns
SetupCurrentUser(UserConnection)
Declaration
public static SysUserInfo SetupCurrentUser(this UserConnection source)
Parameters
Returns
SetupCurrentUserMock(Mock<UserConnection>)
Declaration
public static SysUserInfo SetupCurrentUserMock(this Mock<UserConnection> source)
Parameters
Returns
SetupCurrentUserMock(Mock<TestCoreUserConnection>)
Declaration
public static SysUserInfo SetupCurrentUserMock(this Mock<TestCoreUserConnection> source)
Parameters
Returns
SetupDataValueType<TValueType>(DataValueTypeManager)
Setups data value type object.
Declaration
public static DataValueType SetupDataValueType<TValueType>(this DataValueTypeManager source)
where TValueType : DataValueType
Parameters
Returns
Type Parameters
Name |
Description |
TValueType |
Type to process.
|
SetupDBEngine(UserConnection)
Declaration
public static DBEngine SetupDBEngine(this UserConnection source)
Parameters
Returns
SetupDBExecutor(UserConnection, DBExecutor)
Declaration
public static DBExecutor SetupDBExecutor(this UserConnection source, DBExecutor dbExecutor = null)
Parameters
Returns
Declaration
public static DBMetaScript SetupDBMetaScript(this UserConnection source)
Parameters
Returns
SetupDBSecurityEngine(UserConnection, DBSecurityEngine)
Declaration
public static DBSecurityEngine SetupDBSecurityEngine(this UserConnection source, DBSecurityEngine dbSecurityEngine = null)
Parameters
Returns
SetupDcmSchemaManager(UserConnection, DcmSchemaManager)
Declaration
public static DcmSchemaManager SetupDcmSchemaManager(this UserConnection source, DcmSchemaManager manager = null)
Parameters
Returns
SetupEntitySchemaManager(UserConnection)
Declaration
public static EntitySchemaManager SetupEntitySchemaManager(this UserConnection source)
Parameters
Returns
SetupEntitySchemaManager(UserConnection, EntitySchemaManager)
Declaration
public static EntitySchemaManager SetupEntitySchemaManager(this UserConnection source, EntitySchemaManager entitySchemaManager)
Parameters
Returns
SetupExecuteReader(DBExecutor, IDataReader, String, Object[])
Declaration
public static IDataReader SetupExecuteReader(this DBExecutor source, IDataReader dataReader, string sqlText, params object[] parameters)
Parameters
Type |
Name |
Description |
DBExecutor |
source |
|
System.Data.IDataReader |
dataReader |
|
System.String |
sqlText |
|
System.Object[] |
parameters |
|
Returns
Type |
Description |
System.Data.IDataReader |
|
SetupExecuteReader(DBExecutor, Func<IDataReader>, String, Object[])
Declaration
public static void SetupExecuteReader(this DBExecutor source, Func<IDataReader> dataReader, string sqlText, params object[] parameters)
Parameters
Type |
Name |
Description |
DBExecutor |
source |
|
System.Func<System.Data.IDataReader> |
dataReader |
|
System.String |
sqlText |
|
System.Object[] |
parameters |
|
SetupExecuteReader(DBExecutor, String, Object[])
Declaration
public static IDataReader SetupExecuteReader(this DBExecutor source, string sqlText, params object[] parameters)
Parameters
Type |
Name |
Description |
DBExecutor |
source |
|
System.String |
sqlText |
|
System.Object[] |
parameters |
|
Returns
Type |
Description |
System.Data.IDataReader |
|
SetupExecuteScalar<T>(DBExecutor, String, T, Object[])
Declaration
public static void SetupExecuteScalar<T>(this DBExecutor source, string sqlText, T result, params object[] parameters)
Parameters
Type |
Name |
Description |
DBExecutor |
source |
|
System.String |
sqlText |
|
T |
result |
|
System.Object[] |
parameters |
|
Type Parameters
SetupFileDesignModeSection(AppConnection, Boolean)
Declaration
public static void SetupFileDesignModeSection(this AppConnection source, bool isEnabled)
Parameters
Type |
Name |
Description |
AppConnection |
source |
|
System.Boolean |
isEnabled |
|
SetupFileFactory(UserConnection, IFileFactory)
Declaration
public static IFileFactory SetupFileFactory(this UserConnection source, IFileFactory fileFactory = null)
Parameters
Returns
SetupForeignMaintainerPackages(UserConnection)
Declaration
public static Dictionary<Guid, bool> SetupForeignMaintainerPackages(this UserConnection source)
Parameters
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.Guid, System.Boolean> |
|
SetupGetQuerySqlSelect(DBEngine, String)
Declaration
public static DBEngine SetupGetQuerySqlSelect(this DBEngine source, string fromTableName)
Parameters
Type |
Name |
Description |
DBEngine |
source |
|
System.String |
fromTableName |
|
Returns
SetupGetQuerySqlSelect(DBEngine, String, String)
Declaration
public static DBEngine SetupGetQuerySqlSelect(this DBEngine source, string fromTableName, string returnText)
Parameters
Type |
Name |
Description |
DBEngine |
source |
|
System.String |
fromTableName |
|
System.String |
returnText |
|
Returns
SetupHttpContext()
Declaration
public static IDisposable SetupHttpContext()
Returns
Type |
Description |
System.IDisposable |
|
SetupHttpContextAccessor(UserConnection)
Declaration
public static IHttpContextAccessor SetupHttpContextAccessor(UserConnection userConnection = null)
Parameters
Returns
SetupLogger(String, out ILog)
Declaration
public static IDisposable SetupLogger(string loggerName, out ILog log)
Parameters
Type |
Name |
Description |
System.String |
loggerName |
|
Common.Logging.ILog |
log |
|
Returns
Type |
Description |
System.IDisposable |
|
SetupLogger(Type, out ILog)
Declaration
public static IDisposable SetupLogger(Type loggerType, out ILog log)
Parameters
Type |
Name |
Description |
System.Type |
loggerType |
|
Common.Logging.ILog |
log |
|
Returns
Type |
Description |
System.IDisposable |
|
SetupMessageBus(UserConnection)
Declaration
public static IBus SetupMessageBus(this UserConnection source)
Parameters
Returns
Type |
Description |
Creatio.Messaging.MessageBus.IBus |
|
SetupMSSqlDBEngine(UserConnection)
Declaration
public static DBEngine SetupMSSqlDBEngine(this UserConnection source)
Parameters
Returns
SetupProcessEngineDBExecutor(UserConnection)
Declaration
public static DBExecutor SetupProcessEngineDBExecutor(this UserConnection source)
Parameters
Returns
SetupProcessSchemaManager(UserConnection, ProcessSchemaManager)
Declaration
public static ProcessSchemaManager SetupProcessSchemaManager(this UserConnection source, ProcessSchemaManager processSchemaManager = null)
Parameters
Returns
SetupProcessSecurityEngine(UserConnection, IProcessSecurityEngine)
Declaration
public static IProcessSecurityEngine SetupProcessSecurityEngine(this UserConnection source, IProcessSecurityEngine processSecurityEngine = null)
Parameters
Returns
SetupProcessUserTaskSchemaManager(UserConnection, ProcessUserTaskSchemaManager)
Declaration
public static ProcessUserTaskSchemaManager SetupProcessUserTaskSchemaManager(this UserConnection source, ProcessUserTaskSchemaManager manager = null)
Parameters
Returns
SetupResourceManager(UserConnection, Dictionary<String, Dictionary<String, String>>)
Declaration
public static IResourceManager SetupResourceManager(this UserConnection source, Dictionary<string, Dictionary<string, string>> resources = null)
Parameters
Type |
Name |
Description |
UserConnection |
source |
|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.Dictionary<System.String, System.String>> |
resources |
|
Returns
SetupResourceManager(UserConnection, Schema)
Declaration
public static IResourceManager SetupResourceManager(this UserConnection source, Schema schema)
Parameters
Returns
SetupResourceStorage(SysWorkspace, String, String)
Declaration
public static IResourceStorage SetupResourceStorage(this SysWorkspace source, string itemValue = null, string itemName = null)
Parameters
Type |
Name |
Description |
SysWorkspace |
source |
|
System.String |
itemValue |
|
System.String |
itemName |
|
Returns
SetupSchemaManagerProvider(UserConnection)
Declaration
public static SchemaManagerProvider SetupSchemaManagerProvider(this UserConnection source)
Parameters
Returns
SetupSchemaManagerProvider<T>(SchemaManager<T>, AppConnection)
Declaration
public static SchemaManagerProvider SetupSchemaManagerProvider<T>(this SchemaManager<T> source, AppConnection appConnection)
where T : Schema, ISchemaManagerSchema<T>, IManagerItemInstance, ICloneable
Parameters
Returns
Type Parameters
SetupServiceSchemaManager(UserConnection, ServiceSchemaManager)
Declaration
public static ServiceSchemaManager SetupServiceSchemaManager(this UserConnection source, ServiceSchemaManager schemaManager = null)
Parameters
Returns
SetupSettingValue(UserConnection, String, Object)
Declaration
public static void SetupSettingValue(this UserConnection source, string code, object value)
Parameters
Type |
Name |
Description |
UserConnection |
source |
|
System.String |
code |
|
System.Object |
value |
|
SetupSourceCodeSchemaManager(UserConnection, SourceCodeSchemaManager)
Declaration
public static SourceCodeSchemaManager SetupSourceCodeSchemaManager(this UserConnection source, SourceCodeSchemaManager manager = null)
Parameters
Returns
SetupSynchronousProcessStartup(Boolean)
Declaration
public static void SetupSynchronousProcessStartup(bool state)
Parameters
Type |
Name |
Description |
System.Boolean |
state |
|
SetupSysCultures(UserConnection)
Declaration
public static Dictionary<Guid, string> SetupSysCultures(this UserConnection source)
Parameters
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.Guid, System.String> |
|
SetupSysDBSecurityEngine(UserConnection)
Declaration
public static DBSecurityEngine SetupSysDBSecurityEngine(this UserConnection source)
Parameters
Returns
SetupSystemEntitySchemaManager(UserConnection)
Declaration
public static SystemEntitySchemaManager SetupSystemEntitySchemaManager(this UserConnection source)
Parameters
Returns
SetupSystemEntitySchemaManager(UserConnection, SystemEntitySchemaManager)
Declaration
public static SystemEntitySchemaManager SetupSystemEntitySchemaManager(this UserConnection source, SystemEntitySchemaManager systemEntitySchemaManager)
Parameters
Returns
SetupSystemUserConnection(AppConnection, UserConnection)
Declaration
public static UserConnection SetupSystemUserConnection(this AppConnection source, UserConnection userConnection = null)
Parameters
Returns
SetupSystemValueManager(UserConnection)
Declaration
public static SystemValueManager SetupSystemValueManager(this UserConnection source)
Parameters
Returns
SetupSysWorkspace(UserConnection)
Declaration
public static SysWorkspace SetupSysWorkspace(this UserConnection source)
Parameters
Returns
SetupSysWorkspace(UserConnection, Guid)
Declaration
public static SysWorkspace SetupSysWorkspace(this UserConnection source, Guid workspaceId)
Parameters
Returns
SetupTimeZone(SysUserInfo, TimeZoneInfo)
Declaration
public static void SetupTimeZone(this SysUserInfo source, TimeZoneInfo timeZone)
Parameters
Type |
Name |
Description |
SysUserInfo |
source |
|
System.TimeZoneInfo |
timeZone |
|
SetupTypeConverter(UserConnection)
Sets up DbTypeConverter for UserConnection with substitute
Declaration
public static DBTypeConverter SetupTypeConverter(this UserConnection source)
Parameters
Returns