本文整理汇总了C#中Area.GetAlterations方法的典型用法代码示例。如果您正苦于以下问题:C# Area.GetAlterations方法的具体用法?C# Area.GetAlterations怎么用?C# Area.GetAlterations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area.GetAlterations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunInternal
//.........这里部分代码省略.........
{
var diffResult = Utilities.DiffTool.Diff(tmp, x.Name + "-base", Workspace.GetLocalCanonicalName(x.VersionControlRecord), x.Name, ws.Directives.ExternalDiff, nonblocking);
if (diffResult != null)
{
lock (diffProcesses)
{
diffProcesses.Add(diffResult);
}
}
});
if (nonblocking)
tasks.Add(t);
else
t.Wait();
}
else
{
try
{
RunInternalDiff(tmp, System.IO.Path.Combine(Workspace.RootDirectory.FullName, Workspace.GetLocalCanonicalName(x.VersionControlRecord)));
}
finally
{
System.IO.File.Delete(tmp);
}
}
}
}
else
Printer.PrintMessage("File: #b#{0}## is not in other version.", x.CanonicalName);
}
}
else
{
List<KeyValuePair<string, Objects.Record>> updates = ws.GetAlterations(version)
.Where(x => x.Type == Objects.AlterationType.Update)
.Select(x => ws.GetRecord(x.NewRecord.Value))
.Select(x => new KeyValuePair<string, Objects.Record>(x.CanonicalName, x)).ToList();
foreach (var pair in Filter(updates))
{
Objects.Record rec = pair.Value;
string tmpVersion = Utilities.DiffTool.GetTempFilename();
if (!Workspace.ExportRecord(rec.CanonicalName, version, tmpVersion))
continue;
string tmpParent = Utilities.DiffTool.GetTempFilename();
if (!Workspace.ExportRecord(rec.CanonicalName, parent, tmpParent))
{
System.IO.File.Delete(tmpVersion);
continue;
}
Printer.PrintMessage("Displaying changes for file: #b#{0}", rec.CanonicalName);
if (localOptions.External)
{
tempFiles.Add(tmpVersion);
tempFiles.Add(tmpParent);
bool nonblocking = Workspace.Directives.NonBlockingDiff.HasValue && Workspace.Directives.NonBlockingDiff.Value;
var t = Utilities.LimitedTaskDispatcher.Factory.StartNew(() =>
{
var diffResult = Utilities.DiffTool.Diff(tmpParent, rec.Name + "-" + parent.ShortName, tmpVersion, rec.Name + "-" + version.ShortName, ws.Directives.ExternalDiff, nonblocking);
if (diffResult != null)
{
lock (diffProcesses)
{
diffProcesses.Add(diffResult);
}
}
});
if (nonblocking)
tasks.Add(t);
else
t.Wait();
}
else
{
try
{
RunInternalDiff(tmpParent, tmpVersion);
}
finally
{
System.IO.File.Delete(tmpVersion);
System.IO.File.Delete(tmpParent);
}
}
}
}
}
}
finally
{
Task.WaitAll(tasks.ToArray());
foreach (var x in diffProcesses)
x.WaitForExit();
foreach (var x in tempFiles)
System.IO.File.Delete(x);
}
return true;
}