/// <summary> /// Performs safety checks to ensure that a settings object conforms to various requirements imposed by /// SettingsUtil methods. Run this method as a post-build step to ensure reliability of execution. For an example /// of use, see <see cref="PostBuildChecker.RunPostBuildChecks"/>. This method is available only in DEBUG mode.</summary> /// <typeparam name="TSettings"> /// The type of the settings object, derived from <see cref="SettingsBase"/>, which would be passed to /// SettingsUtil methods at normal run-time.</typeparam> /// <param name="rep"> /// Object to report post-build errors to.</param> public static void PostBuildStep <TSettings>(IPostBuildReporter rep) where TSettings : SettingsBase { SettingsAttribute attr; try { attr = GetAttribute(typeof(TSettings)); } catch (Exception e) { rep.Error(e.Message, "class", typeof(TSettings).Name); return; } switch (attr.Serializer) { case SettingsSerializer.DotNetBinary: break; case SettingsSerializer.ClassifyXml: case SettingsSerializer.ClassifyJson: case SettingsSerializer.ClassifyBinary: Classify.PostBuildStep <TSettings>(rep); break; } }
private static void PostBuildCheck(IPostBuildReporter rep) { Lingo.PostBuildStep <Translation>(rep, Assembly.GetExecutingAssembly()); Classify.PostBuildStep <Settings>(rep); Classify.PostBuildStep <Style>(rep); Classify.PostBuildStep <GameVersionConfig>(rep); }
private static void PostBuildCheck(IPostBuildReporter rep) { Classify.PostBuildStep(typeof(Settings), rep); Classify.PostBuildStep(typeof(Cloud), rep); }
private static void PostBuildCheck(IPostBuildReporter rep) { Classify.PostBuildStep <Settings>(rep); }