本文整理汇总了C#中Loader.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Loader.Load方法的具体用法?C# Loader.Load怎么用?C# Loader.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader.Load方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateWorld
IWorld CreateWorld(params string[] args)
{
var loader = new Loader();
loader.AddLevel("Demo", "Level1", () => new DemoCompetitions.Level1());
loader.AddLevel("RoboMovies", "Level1", () => new RMCompetitions.Level1());
return loader.Load(args);
}
示例2: RunTests
//Method: RunTests
//Purpose: tests every method in the Loader class
//Variables: myOptions - Options handle to options to class
public static void RunTests(Options myOptions)
{
myOptions.SetFileName("test1.exe");
Memory myRam = new Memory(myOptions.GetMemSize());
Loader myLoader = new Loader(myOptions, myRam);
Console.WriteLine("testing Loader...");
myLoader.Load();
Console.Write("verifying MD5 hash...");
Debug.Assert(myRam.getMDF() == "3500A8BEF72DFED358B25B61B7602CF1");
Console.WriteLine("success!");
}
示例3: Computer
//Method: Constructor
//Purpose: Sets Computer up for use.
//Variables: toOptions - Options parsed from command line input.
public Computer(Options toOptions)
{
myOptions = toOptions;
myRam = new Memory(myOptions.GetMemSize());
myRam.myComputer = this;
myLoader = new Loader(myOptions, myRam);
myLoader.Load();
myRegisters = new Registers();
myCPU = new CPU(myRam, myRegisters, myLoader.getProgramCounter());
trace = true;
FileStream myFileStream = new FileStream("trace.log", FileMode.Create);
myFileStream.Close();
stepNum = 0;
storedBranchPC = 0;
input = new Queue<char>();
outputQ = new Queue<char>();
}
示例4: CreateWorld
IWorld CreateWorld(params string[] args)
{
var loader = new Loader();
loader.AddLevel("Demo", "Level1", () => new DemoCompetitions.Level1());
loader.AddLevel("RoboMovies", "Level1", () => new RMCompetitions.Level1());
//loader.AddLevel("RepairTheStarship", "Level1", () => new RepairTheStarship.Level1());
////для Насти:
//loader.Levels.Keys.ToArray(); // список всех соревнований
//loader.Levels["Demo"].Keys.ToArray(); //список всех уровней соревнования
//var competitions = loader.Levels["Demo"]["Level1"]();
//competitions.Logic.Bots.Keys.ToArray(); //список всех доступных ботов
//competitions.Logic.ControllersId.ToArray(); //список всех контроллеров (Left/Right в наших соревнованиях)
//// надо создать
//LoadingData data = null;
//SettingsProposal proposal = null;
//// и из этого мы потом сделаем соревнования
return loader.Load(args);
}
示例5: LoadBackground
protected override bool LoadBackground(IDocumentContainer container, SrmDocument document, SrmDocument docCurrent)
{
var loader = new Loader(this, container, document, docCurrent);
loader.Load();
return false;
}
示例6: Load
/// <summary>
/// loads data using the loader
/// </summary>
/// <param name="size"></param>
/// <param name="loader"></param>
public void Load(int size, Loader loader)
{
_size = size;
loader.Initialize(size, _list);
if (size > 0)
{
loader.Load();
}
_list = loader.Finish();
}
示例7: load
/// <summary> * loads data using the loader </summary>
/// * <param name="size"> </param>
/// * <param name="loader"> </param>
/// * <exception cref="Exception"> </exception>
public void load(int size, Loader loader) //throws Exception
{
_size = size;
loader.initialize(size, _list);
if (size > 0)
{
loader.Load();
}
_list = loader.finish();
}