/// <summary> /// Initializes a new instance of the <see cref="CustomLoadingDataGame" /> class. /// </summary> public CustomLoadingDataGame() { // Creates a graphics manager. This is mandatory. graphicsDeviceManager = new GraphicsDeviceManager(this); graphicsDeviceManager.PreferredDepthStencilFormat = DepthFormat.None; // In order to support Yaml loading, we need to add the YamlManager yamlManager = new YamlManager(this); GameSystems.Add(yamlManager); // Register that !MyData will map to our local type. // We could have used YamlTagAttribute directly on our MyData type from YamlDotNet library. yamlManager.RegisterTagMapping("MyData", typeof(MyData)); // Setup the relative directory to the executable directory // for loading contents with the ContentManager Content.RootDirectory = "Content"; }
private void WriteInTypeFile(Log log) { switch (this.Type) { case FileAppenderType.JSON: JsonManager.WriteToJsonFile <Log>(Path, Name, log); break; case FileAppenderType.YAML: YamlManager.WriteToYamlFile <Log>(Path, Name, log); break; case FileAppenderType.XML: XmlManager.WriteToXmlFile <Log>(Path, Name, log); break; case FileAppenderType.CSV: CsvManager.WriteToCsvFile <Log>(Path, Name, log); break; case FileAppenderType.BINARY: BinaryManager.WriteToBinaryFile <Log>(Path, Name, log); break; case FileAppenderType.CHARACTER: CharacterManager.WriteToCharacterFile <Log>(Path, Name, log); break; case FileAppenderType.TEXT: default: this.WriteToTxtFile(log); break; } }