本文整理汇总了C#中Transaction.CreateStep方法的典型用法代码示例。如果您正苦于以下问题:C# Transaction.CreateStep方法的具体用法?C# Transaction.CreateStep怎么用?C# Transaction.CreateStep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transaction
的用法示例。
在下文中一共展示了Transaction.CreateStep方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Do
public override CommandResult Do(IExecutionContext context, Transaction transaction)
{
if (transaction != null)
{
SingleFileStep step = transaction.CreateStep<SingleFileStep>(this);
string absoluteDestFilePath = context.GetStringFrom(DestFilePath);
step.Init(context, absoluteDestFilePath);
}
Do(context);
return CommandResult.Next;
}
示例2: Do
public override CommandResult Do(IExecutionContext context, Transaction transaction)
{
if (transaction != null)
{
SingleFileStep step = transaction.CreateStep<SingleFileStep>(this);
bool absoluteAllUsers = context.GetBoolFrom(AllUsers);
string absoluteShortcutName = context.GetStringFrom(ShortcutName);
string linkPathName = GetLinkPathName(absoluteShortcutName, absoluteAllUsers, Place);
step.Init(context, linkPathName);
}
Do(context);
return CommandResult.Next;
}
示例3: Do
public override CommandResult Do(IExecutionContext context, Transaction transaction)
{
context.Log.AddLogInformation("Вход в SQLCreateBackup.Do(ExecutionContext,Transaction)");
string absoluteBackupFilePath = context.GetStringFrom(BackupFilePath);
context.Log.AddLogInformation("BackupFilePath = '" + absoluteBackupFilePath + "'");
SingleFileStep step = null;
if (transaction != null)
{
step = transaction.CreateStep<SingleFileStep>(this);
context.Log.AddLogInformation("Шаг транзакции типа SingleFileStep создан");
step.Init(context, absoluteBackupFilePath);
context.Log.AddLogInformation("Шаг транзакции типа SingleFileStep настроен");
}
Do(context);
context.Log.AddLogInformation("Выход из SQLCreateBackup.Do(ExecutionContext,Transaction)");
return CommandResult.Next;
}
示例4: Do
public override CommandResult Do(IExecutionContext context, Transaction transaction)
{
context.Log.AddLogInformation("Вход в SQLRestoreBackup.Do(ExecutionContext,Transaction)");
FileSetStep step = null;
if (transaction != null)
{
step = transaction.CreateStep<FileSetStep>(this);
context.Log.AddLogInformation("Шаг транзакции типа SingleFileStep создан");
List<string> files = new List<string>();
_commandGuid = Guid.NewGuid().ToString("N");
_cmd = CreateMainCommand(context, _commandGuid);
step.Init(context, files);
context.Log.AddLogInformation("Шаг транзакции типа SingleFileStep настроен");
}
Do(context);
context.Log.AddLogInformation("Выход из SQLRestoreBackup.Do(ExecutionContext,Transaction)");
return CommandResult.Next;
}