Skip to content

GenericOutput Class

Definition

namespace Sharplog.Outputs

public class GenericOutput : Output

Object
Output
   GenericOutput

Implements: IDictionary<string, object>

Generic output that can generate an output from the Type parameter. Used to parse the settings file. Gets automatically constructed when provided to an OutputContainer.

Constructors

Name
GenericOutput()
GenericOutput(string?, Dictionary<string, object>?, string?, LevelContainer?)

Properties

Name Type GET SET
Format string?
Levels LevelContainer?
Count int
Item[string] object
Keys Dictionary<string, object>.KeyCollection
Values Dictionary<string, object>.ValueCollection
IsReadOnly bool
Type string?

Inherited Methods

Name Modifiers Returns
Write(string, Log) public
Add(KeyValuePair<string, object>) public
Add(string, object) public
Clear() public
Contains(KeyValuePair<string, object>) public bool
ContainsKey(string) public bool
CopyTo(KeyValuePair<string, object>[], int) public
GetEnumerator() public IEnumerator<KeyValuePair<string, object>>
Remove(string) public bool
TryGetValue(string, out object) public bool

Methods

Name Modifiers Returns
ConstructOutput() public Output

Constructors

GenericOutput()

public GenericOutput()
    : this(null, null, null, null)

Initializes a new instance of the GenericOutput class.

GenericOutput(string?, Dictionary<string, object>?, string?, LevelContainer?)

public GenericOutput(
    string? type = null,
    Dictionary<string, object>? parameter = null,
    string? format = null,
    LevelContainer? levels = null)

Initializes a new instance of the GenericOutput class.

Parameter

type string? · null
The type.
parameter Dictionary<string, object>? · null
The parameter dictionary.
format string? · null
The format.
levels LevelContainer? · null
The level settings.

Properties

Type

public string? Type { get; set; }
Type: string?

The type name of the output (found in namespace SharpLog.Outputs).

Methods

ConstructOutput()

public Output ConstructOutput()

Constructs an output from the given type and parameter.

Returns

Type: Output

The constructed output.

Throws

NullReferenceException
Thrown when GenericOutput.Type is null.
ArgumentException
Thrown when GenericOutput.Type class cannot be found.