Show / Hide Table of Contents

Class IOManager

Static Class used to access serialization and deserialization of objects.

Inheritance
System.Object
IOManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: RuriLib
Assembly: RuriLib.dll
Syntax
public static class IOManager

Methods

| Improve this Doc View Source

CloneBlock(BlockBase)

Clones a BlockBase object by serializing and deserializing it.

Declaration
public static BlockBase CloneBlock(BlockBase block)
Parameters
Type Name Description
BlockBase block

The object to clone

Returns
Type Description
BlockBase

The cloned BlockBase object

| Improve this Doc View Source

CloneConfig(Config)

Clones a Config object by serializing and deserializing it.

Declaration
public static Config CloneConfig(Config config)
Parameters
Type Name Description
Config config

The object to clone

Returns
Type Description
Config

The cloned Config object

| Improve this Doc View Source

CloneProxies(List<CProxy>)

Clones a list of proxies by serializing and deserializing it.

Declaration
public static List<CProxy> CloneProxies(List<CProxy> proxies)
Parameters
Type Name Description
System.Collections.Generic.List<CProxy> proxies

The list of proxies to clone

Returns
Type Description
System.Collections.Generic.List<CProxy>

The cloned list of proxies

| Improve this Doc View Source

DeserializeBlock(String)

Deserializes a Block from a JSON string.

Declaration
public static BlockBase DeserializeBlock(string block)
Parameters
Type Name Description
System.String block

The JSON-encoded string with TypeNameHandling on

Returns
Type Description
BlockBase

An instance of BlockBase

| Improve this Doc View Source

DeserializeBlocks(String)

Deserializes a list of blocks from a JSON string.

Declaration
public static List<BlockBase> DeserializeBlocks(string blocks)
Parameters
Type Name Description
System.String blocks

The JSON-encoded string with TypeNameHandling on

Returns
Type Description
System.Collections.Generic.List<BlockBase>

A list of instances of BlockBase

| Improve this Doc View Source

DeserializeConfig(String)

Deserializes a Config object from a loli-formatted string.

Declaration
public static Config DeserializeConfig(string config)
Parameters
Type Name Description
System.String config

The loli-formatted string

Returns
Type Description
Config

An instance of the Config object

| Improve this Doc View Source

DeserializeProxies(String)

Deserializes a list of proxies from a JSON string.

Declaration
public static List<CProxy> DeserializeProxies(string proxies)
Parameters
Type Name Description
System.String proxies

The JSON-encoded list of proxies with TypeNameHandling on

Returns
Type Description
System.Collections.Generic.List<CProxy>

A list of CProxy objects

| Improve this Doc View Source

LoadConfig(String)

Loads a Config object from a .loli file.

Declaration
public static Config LoadConfig(string fileName)
Parameters
Type Name Description
System.String fileName

The config file

Returns
Type Description
Config

A Config object

| Improve this Doc View Source

LoadSettings(String)

Loads the RuriLib settings from a file.

Declaration
public static RLSettingsViewModel LoadSettings(string settingsFile)
Parameters
Type Name Description
System.String settingsFile

The file you want to load from

Returns
Type Description
RLSettingsViewModel

An instance of RLSettingsViewModel

| Improve this Doc View Source

ParseEnvironmentSettings(String)

Parses the EnvironmentSettings from a file.

Declaration
public static EnvironmentSettings ParseEnvironmentSettings(string envFile)
Parameters
Type Name Description
System.String envFile

The .ini file of the settings

Returns
Type Description
EnvironmentSettings

The loaded EnvironmentSettings object

| Improve this Doc View Source

SaveConfig(Config, String)

Saves a Config object to a .loli file.

Declaration
public static bool SaveConfig(Config config, string fileName)
Parameters
Type Name Description
Config config

The viewmodel of the config to save

System.String fileName

The path of the file where the Config will be saved

Returns
Type Description
System.Boolean

Whether the file has been saved successfully

| Improve this Doc View Source

SaveSettings(String, RLSettingsViewModel)

Saves the RuriLib settings to a file.

Declaration
public static void SaveSettings(string settingsFile, RLSettingsViewModel settings)
Parameters
Type Name Description
System.String settingsFile

The file you want to save to

RLSettingsViewModel settings

The RuriLib settings object

| Improve this Doc View Source

SerializeBlock(BlockBase)

Serializes a block to a JSON string.

Declaration
public static string SerializeBlock(BlockBase block)
Parameters
Type Name Description
BlockBase block

The block to serialize

Returns
Type Description
System.String

The JSON-encoded BlockBase object with TypeNameHandling on

| Improve this Doc View Source

SerializeBlocks(List<BlockBase>)

Serializes a list of blocks to a JSON string.

Declaration
public static string SerializeBlocks(List<BlockBase> blocks)
Parameters
Type Name Description
System.Collections.Generic.List<BlockBase> blocks

The list of blocks to serialize

Returns
Type Description
System.String

The JSON-encoded List of BlockBase objects with TypeNameHandling on

| Improve this Doc View Source

SerializeConfig(Config)

Serializes a Config object to the loli-formatted string.

Declaration
public static string SerializeConfig(Config config)
Parameters
Type Name Description
Config config

The Config to serialize

Returns
Type Description
System.String

The loli-formatted string

| Improve this Doc View Source

SerializeProxies(List<CProxy>)

Serializes a list of proxies to a JSON string.

Declaration
public static string SerializeProxies(List<CProxy> proxies)
Parameters
Type Name Description
System.Collections.Generic.List<CProxy> proxies

The list of proxies to serialize

Returns
Type Description
System.String

The JSON-encoded list of CProxy objects with TypeNameHandling on

  • Improve this Doc
  • View Source
Back to top Generated by DocFX