protected override OptionResult Run(GameHitParameters <GameObject> parameters) { IEnumerable <FilePersistenceEx.Item> selection = FilePersistenceEx.GetChoices(Name); if (selection == null) { return(OptionResult.Failure); } Common.StringBuilder builder = new Common.StringBuilder(FilePersistence.sHeader + Common.NewLine + "<Settings>"); foreach (FilePersistenceEx.Item choice in selection) { string text = choice.CreateExportString(); if (!string.IsNullOrEmpty(text)) { builder.Append(text); } } builder.Append(Common.NewLine + "</Settings>"); Common.DebugWriteLog(builder); FilePersistence.ExportToFile(builder.ToString()); return(OptionResult.SuccessRetain); }
protected override OptionResult Run(GameHitParameters <GameObject> parameters) { if (FilePersistence.ExportToFile()) { return(OptionResult.SuccessClose); } else { return(OptionResult.Failure); } }
protected override bool PrivatePerform() { return(FilePersistence.ExportToFile()); }