This project is read-only.

IScriptCommand getPropertyCommand = 
  ScriptCommands.AssignGlobalParameterDic("{GlobalPD}", false, 
    ScriptCommands.AssignValueFunc("{GlobalPD.CreationTime}", () => DateTime.UtcNow, true, 
	ScriptCommands.AssignValueFunc("{GlobalPD.LastAccessTime}", () => DateTime.UtcNow, false, 
	ScriptCommands.Delay(100, 
  ScriptCommands.PrintDebug("CreationTime:  {GlobalPD.CreationTime.Ticks}, LastAccessTime: {GlobalPD.LastAccessTime.Ticks}")))));
  
await ScriptRunner.RunScriptAsync(new ParameterDic() , getPropertyCommand);


IScriptCommand saveCommand = 
  HubScriptCommands.AssignDiskParameterDic("{DiskPD}", "TestApp", "Settings.xml", false, 
    ScriptCommands.AssignValueFunc("{DiskPD.Width}", () => 200, true, 
	ScriptCommands.AssignValueFunc("{DiskPD.Height}", () => 100, false)));

IScriptCommand loadCommand = 
  HubScriptCommands.AssignDiskParameterDic("{DiskPD}", "TestApp", "Settings.xml", false, 
    ScriptCommands.PrintDebug("{DiskPD.Width} x {DiskPD.Height}"));

await ScriptRunner.RunScriptAsync(new ParameterDic() , saveCommand);
await ScriptRunner.RunScriptAsync(new ParameterDic() , loadCommand);



Last edited Oct 18, 2014 at 9:53 AM by lycj, version 1

Comments

No comments yet.