From 6eb5db83f7af68963234058756ad6c034cbe3770 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Fri, 6 Apr 2018 21:57:55 +0200 Subject: [PATCH] Finalizations and build --- Docs/SweetLib.IO.md | 405 ++++++ Docs/SweetLib.IO.xml | 189 +++ Docs/SweetLib.md | 1232 +++++++++++++++++ Docs/SweetLib.xml | 538 +++++++ .../Classes/Streaming/StreamManager.cs | 5 +- SweetLib.IO/SweetLib.IO.csproj | 5 +- SweetLib/Classes/Storer/IniFileStorer.cs | 3 +- SweetLib/Classes/Storer/RegistryStorer.cs | 3 +- SweetLib/SweetLib.csproj | 5 +- .../Memory/ArchivableConsoleLogMemory.cs | 6 +- 10 files changed, 2376 insertions(+), 15 deletions(-) create mode 100644 Docs/SweetLib.IO.md create mode 100644 Docs/SweetLib.IO.xml create mode 100644 Docs/SweetLib.md create mode 100644 Docs/SweetLib.xml diff --git a/Docs/SweetLib.IO.md b/Docs/SweetLib.IO.md new file mode 100644 index 0000000..01ff50b --- /dev/null +++ b/Docs/SweetLib.IO.md @@ -0,0 +1,405 @@ + +# Contents [#](#contents 'Go To Here') + +- [IStreamable](#T-SweetLib-IO-Classes-Streaming-IStreamable 'SweetLib.IO.Classes.Streaming.IStreamable') + - [LoadFromStream(stream)](#M-SweetLib-IO-Classes-Streaming-IStreamable-LoadFromStream-System-IO-Stream- 'SweetLib.IO.Classes.Streaming.IStreamable.LoadFromStream(System.IO.Stream)') + - [SaveToStream(stream)](#M-SweetLib-IO-Classes-Streaming-IStreamable-SaveToStream-System-IO-Stream- 'SweetLib.IO.Classes.Streaming.IStreamable.SaveToStream(System.IO.Stream)') +- [StreamException](#T-SweetLib-IO-Classes-Streaming-StreamException 'SweetLib.IO.Classes.Streaming.StreamException') + - [#ctor()](#M-SweetLib-IO-Classes-Streaming-StreamException-#ctor 'SweetLib.IO.Classes.Streaming.StreamException.#ctor') + - [#ctor(message)](#M-SweetLib-IO-Classes-Streaming-StreamException-#ctor-System-String- 'SweetLib.IO.Classes.Streaming.StreamException.#ctor(System.String)') +- [StreamManager](#T-SweetLib-IO-Classes-Streaming-StreamManager 'SweetLib.IO.Classes.Streaming.StreamManager') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-String@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.String@)') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Boolean@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.Boolean@)') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Char@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.Char@)') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Int32@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.Int32@)') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Int64@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.Int64@)') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Single@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.Single@)') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Double@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.Double@)') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-DateTime@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.DateTime@)') + - [LoadFromStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-IO-Stream@- 'SweetLib.IO.Classes.Streaming.StreamManager.LoadFromStream(System.IO.Stream,System.IO.Stream@)') + - [SaveToStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-String- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.String)') + - [SaveToStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Boolean- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.Boolean)') + - [SaveToStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Char- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.Char)') + - [SaveToStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Int32- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.Int32)') + - [SaveToStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Int64- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.Int64)') + - [SaveToStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Single- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.Single)') + - [SaveToStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Double- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.Double)') + - [SaveToStream(stream,value)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-DateTime- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.DateTime)') + - [SaveToStream(stream,value,resetSourceStream)](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-IO-Stream,System-Boolean- 'SweetLib.IO.Classes.Streaming.StreamManager.SaveToStream(System.IO.Stream,System.IO.Stream,System.Boolean)') +- [StreamTypeException](#T-SweetLib-IO-Classes-Streaming-StreamTypeException 'SweetLib.IO.Classes.Streaming.StreamTypeException') + - [#ctor()](#M-SweetLib-IO-Classes-Streaming-StreamTypeException-#ctor 'SweetLib.IO.Classes.Streaming.StreamTypeException.#ctor') + - [#ctor(message)](#M-SweetLib-IO-Classes-Streaming-StreamTypeException-#ctor-System-String- 'SweetLib.IO.Classes.Streaming.StreamTypeException.#ctor(System.String)') + + +# SweetLib.IO [#](#assembly 'Go To Here') [=](#contents 'Back To Contents') + + +## IStreamable [#](#T-SweetLib-IO-Classes-Streaming-IStreamable 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.IO.Classes.Streaming + +##### Summary + +Streamable objects + + +### LoadFromStream(stream) `method` [#](#M-SweetLib-IO-Classes-Streaming-IStreamable-LoadFromStream-System-IO-Stream- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads the object from a given stream. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | Stream from which the object is loaded. | + + +### SaveToStream(stream) `method` [#](#M-SweetLib-IO-Classes-Streaming-IStreamable-SaveToStream-System-IO-Stream- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Saves the current object into a stream. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | Stream in which the current object should be saved. | + + +## StreamException [#](#T-SweetLib-IO-Classes-Streaming-StreamException 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.IO.Classes.Streaming + +##### Summary + +Exception thrown by streaming related operations. + + +### #ctor() `constructor` [#](#M-SweetLib-IO-Classes-Streaming-StreamException-#ctor 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new [StreamException](#T-SweetLib-IO-Classes-Streaming-StreamException 'SweetLib.IO.Classes.Streaming.StreamException'). + +##### Parameters + +This constructor has no parameters. + + +### #ctor(message) `constructor` [#](#M-SweetLib-IO-Classes-Streaming-StreamException-#ctor-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new [StreamException](#T-SweetLib-IO-Classes-Streaming-StreamException 'SweetLib.IO.Classes.Streaming.StreamException'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Exception message. | + + +## StreamManager [#](#T-SweetLib-IO-Classes-Streaming-StreamManager 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.IO.Classes.Streaming + +##### Summary + +[StreamManager](#T-SweetLib-IO-Classes-Streaming-StreamManager 'SweetLib.IO.Classes.Streaming.StreamManager') wraps some useful methods for custom implementations of object streaming. + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-String@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') will be loaded. | +| value | [System.String@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String@ 'System.String@') | Contains the loaded [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') value. | + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Boolean@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') will be loaded. | +| value | [System.Boolean@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean@ 'System.Boolean@') | Contains the loaded [Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') value. | + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Char@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') will be loaded. | +| value | [System.Char@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char@ 'System.Char@') | Contains the loaded [Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') value. | + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Int32@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') will be loaded. | +| value | [System.Int32@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32@ 'System.Int32@') | Contains the loaded [Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') value. | + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Int64@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') will be loaded. | +| value | [System.Int64@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64@ 'System.Int64@') | Contains the loaded [Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') value. | + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Single@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') will be loaded. | +| value | [System.Single@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single@ 'System.Single@') | Contains the loaded [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') value. | + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-Double@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') will be loaded. | +| value | [System.Double@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double@ 'System.Double@') | Contains the loaded [Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') value. | + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-DateTime@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') will be loaded. | +| value | [System.DateTime@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime@ 'System.DateTime@') | Contains the loaded [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') value. | + + +### LoadFromStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-LoadFromStream-System-IO-Stream,System-IO-Stream@- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Loads a [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') from which the [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') will be loaded. | +| value | [System.IO.Stream@](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream@ 'System.IO.Stream@') | Contains the loaded [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') value. | + + +### SaveToStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') will be added. | +| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') value to add. | + + +### SaveToStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Boolean- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') will be added. | +| value | [System.Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') | [Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') value to add. | + + +### SaveToStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Char- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') will be added. | +| value | [System.Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') | [Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') value to add. | + + +### SaveToStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Int32- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') will be added. | +| value | [System.Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') | [Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') value to add. | + + +### SaveToStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Int64- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') will be added. | +| value | [System.Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') | [Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') value to add. | + + +### SaveToStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Single- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') will be added. | +| value | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | [Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') value to add. | + + +### SaveToStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-Double- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') will be added. | +| value | [System.Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') | [Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') value to add. | + + +### SaveToStream(stream,value) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-DateTime- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') will be added. | +| value | [System.DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') | [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') value to add. | + + +### SaveToStream(stream,value,resetSourceStream) `method` [#](#M-SweetLib-IO-Classes-Streaming-StreamManager-SaveToStream-System-IO-Stream,System-IO-Stream,System-Boolean- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to a given [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| stream | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') to which the [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') will be added. | +| value | [System.IO.Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') | [Stream](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.Stream 'System.IO.Stream') value to add. | +| resetSourceStream | [System.Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') | If true, the full given [](#!-value 'value') will be copied, otherwhise the stream will be copied from current position until its end. | + + +## StreamTypeException [#](#T-SweetLib-IO-Classes-Streaming-StreamTypeException 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.IO.Classes.Streaming + +##### Summary + +Exception thrown by streaming related operations. May be thrown if the stream types do not match. + + +### #ctor() `constructor` [#](#M-SweetLib-IO-Classes-Streaming-StreamTypeException-#ctor 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new [StreamTypeException](#T-SweetLib-IO-Classes-Streaming-StreamTypeException 'SweetLib.IO.Classes.Streaming.StreamTypeException'). + +##### Parameters + +This constructor has no parameters. + + +### #ctor(message) `constructor` [#](#M-SweetLib-IO-Classes-Streaming-StreamTypeException-#ctor-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new [StreamTypeException](#T-SweetLib-IO-Classes-Streaming-StreamTypeException 'SweetLib.IO.Classes.Streaming.StreamTypeException'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Exception message. | diff --git a/Docs/SweetLib.IO.xml b/Docs/SweetLib.IO.xml new file mode 100644 index 0000000..564bc2b --- /dev/null +++ b/Docs/SweetLib.IO.xml @@ -0,0 +1,189 @@ + + + + SweetLib.IO + + + + + Streamable objects + + + + + Saves the current object into a stream. + + Stream in which the current object should be saved. + + + + Loads the object from a given stream. + + Stream from which the object is loaded. + + + + Exception thrown by streaming related operations. + + + + + Creates a new . + + + + + Creates a new . + + Exception message. + + + + Exception thrown by streaming related operations. May be thrown if the stream types do not match. + + + + + Creates a new . + + + + + Creates a new . + + Exception message. + + + + wraps some useful methods for custom implementations of object streaming. + + + + + Adds a to a given . + + to which the will be added. + value to add. + + + + Adds a to a given . + + to which the will be added. + value to add. + + + + Adds a to a given . + + to which the will be added. + value to add. + + + + Adds a to a given . + + to which the will be added. + value to add. + + + + Adds a to a given . + + to which the will be added. + value to add. + + + + Adds a to a given . + + to which the will be added. + value to add. + + + + Adds a to a given . + + to which the will be added. + value to add. + + + + Adds a to a given . + + to which the will be added. + value to add. + + + + Adds a to a given . + + to which the will be added. + value to add. + If true, the full given will be copied, otherwhise the stream will be copied from current position until its end. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + + Loads a from a given . + + from which the will be loaded. + Contains the loaded value. + + + diff --git a/Docs/SweetLib.md b/Docs/SweetLib.md new file mode 100644 index 0000000..f0eb97a --- /dev/null +++ b/Docs/SweetLib.md @@ -0,0 +1,1232 @@ + +# Contents [#](#contents 'Go To Here') + +- [BaseTypeExtensions](#T-SweetLib-Utils-Extensions-BaseTypeExtensions 'SweetLib.Utils.Extensions.BaseTypeExtensions') + - [AsBool(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBool-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBool(System.Byte[])') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Int16- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.Int16)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-UInt16- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.UInt16)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Int32- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.Int32)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-UInt32- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.UInt32)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Int64- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.Int64)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-UInt64- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.UInt64)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Single- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.Single)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Double- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.Double)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Boolean- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.Boolean)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-DateTime- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.DateTime)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-String- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.String)') + - [AsBytes(value)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Char- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsBytes(System.Char)') + - [AsChar(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsChar-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsChar(System.Byte[])') + - [AsDateTime(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsDateTime-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsDateTime(System.Byte[])') + - [AsDouble(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsDouble-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsDouble(System.Byte[])') + - [AsInt16(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsInt16-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsInt16(System.Byte[])') + - [AsInt32(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsInt32-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsInt32(System.Byte[])') + - [AsInt64(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsInt64-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsInt64(System.Byte[])') + - [AsSingle(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsSingle-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsSingle(System.Byte[])') + - [AsString(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsString-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsString(System.Byte[])') + - [AsUInt16(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsUInt16-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsUInt16(System.Byte[])') + - [AsUInt32(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsUInt32-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsUInt32(System.Byte[])') + - [AsUInt64(bytes)](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsUInt64-System-Byte[]- 'SweetLib.Utils.Extensions.BaseTypeExtensions.AsUInt64(System.Byte[])') +- [DateTimeExtensions](#T-SweetLib-Utils-Extensions-DateTimeExtensions 'SweetLib.Utils.Extensions.DateTimeExtensions') + - [ToDateTime(timestamp)](#M-SweetLib-Utils-Extensions-DateTimeExtensions-ToDateTime-System-Double- 'SweetLib.Utils.Extensions.DateTimeExtensions.ToDateTime(System.Double)') + - [ToUnixTimeStamp(date)](#M-SweetLib-Utils-Extensions-DateTimeExtensions-ToUnixTimeStamp-System-DateTime- 'SweetLib.Utils.Extensions.DateTimeExtensions.ToUnixTimeStamp(System.DateTime)') +- [ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory') + - [Archive(fullFileName)](#M-SweetLib-Utils-Logger-Memory-ILogMemory-Archive-System-String- 'SweetLib.Utils.Logger.Memory.ILogMemory.Archive(System.String)') + - [Forget(message)](#M-SweetLib-Utils-Logger-Memory-ILogMemory-Forget-SweetLib-Utils-Logger-Message-LogMessage- 'SweetLib.Utils.Logger.Memory.ILogMemory.Forget(SweetLib.Utils.Logger.Message.LogMessage)') + - [Remember(message)](#M-SweetLib-Utils-Logger-Memory-ILogMemory-Remember-SweetLib-Utils-Logger-Message-LogMessage- 'SweetLib.Utils.Logger.Memory.ILogMemory.Remember(SweetLib.Utils.Logger.Message.LogMessage)') +- [IniFileStorer](#T-SweetLib-Classes-Storer-IniFileStorer 'SweetLib.Classes.Storer.IniFileStorer') + - [#ctor(fileName)](#M-SweetLib-Classes-Storer-IniFileStorer-#ctor-System-String- 'SweetLib.Classes.Storer.IniFileStorer.#ctor(System.String)') + - [FileName](#P-SweetLib-Classes-Storer-IniFileStorer-FileName 'SweetLib.Classes.Storer.IniFileStorer.FileName') +- [IStorer](#T-SweetLib-Classes-Storer-IStorer 'SweetLib.Classes.Storer.IStorer') + - [DeleteKey(section,key)](#M-SweetLib-Classes-Storer-IStorer-DeleteKey-System-String,System-String- 'SweetLib.Classes.Storer.IStorer.DeleteKey(System.String,System.String)') + - [DeleteSection(section)](#M-SweetLib-Classes-Storer-IStorer-DeleteSection-System-String- 'SweetLib.Classes.Storer.IStorer.DeleteSection(System.String)') + - [HasKey(section,key)](#M-SweetLib-Classes-Storer-IStorer-HasKey-System-String,System-String- 'SweetLib.Classes.Storer.IStorer.HasKey(System.String,System.String)') + - [ReadBool(section,key,defaultValue)](#M-SweetLib-Classes-Storer-IStorer-ReadBool-System-String,System-String,System-Boolean- 'SweetLib.Classes.Storer.IStorer.ReadBool(System.String,System.String,System.Boolean)') + - [ReadInteger(section,key,defaultValue)](#M-SweetLib-Classes-Storer-IStorer-ReadInteger-System-String,System-String,System-Int32- 'SweetLib.Classes.Storer.IStorer.ReadInteger(System.String,System.String,System.Int32)') + - [ReadString(section,key,defaultValue)](#M-SweetLib-Classes-Storer-IStorer-ReadString-System-String,System-String,System-String- 'SweetLib.Classes.Storer.IStorer.ReadString(System.String,System.String,System.String)') + - [WriteBool(section,key,value)](#M-SweetLib-Classes-Storer-IStorer-WriteBool-System-String,System-String,System-Boolean- 'SweetLib.Classes.Storer.IStorer.WriteBool(System.String,System.String,System.Boolean)') + - [WriteInteger(section,key,value)](#M-SweetLib-Classes-Storer-IStorer-WriteInteger-System-String,System-String,System-Int32- 'SweetLib.Classes.Storer.IStorer.WriteInteger(System.String,System.String,System.Int32)') + - [WriteString(section,key,value)](#M-SweetLib-Classes-Storer-IStorer-WriteString-System-String,System-String,System-String- 'SweetLib.Classes.Storer.IStorer.WriteString(System.String,System.String,System.String)') +- [Logger](#T-SweetLib-Utils-Logger-Logger 'SweetLib.Utils.Logger.Logger') + - [DefaultLogMemory](#P-SweetLib-Utils-Logger-Logger-DefaultLogMemory 'SweetLib.Utils.Logger.Logger.DefaultLogMemory') + - [GlobalLogLevel](#P-SweetLib-Utils-Logger-Logger-GlobalLogLevel 'SweetLib.Utils.Logger.Logger.GlobalLogLevel') + - [Debug(message)](#M-SweetLib-Utils-Logger-Logger-Debug-System-String- 'SweetLib.Utils.Logger.Logger.Debug(System.String)') + - [Error(message)](#M-SweetLib-Utils-Logger-Logger-Error-System-String- 'SweetLib.Utils.Logger.Logger.Error(System.String)') + - [Info(message)](#M-SweetLib-Utils-Logger-Logger-Info-System-String- 'SweetLib.Utils.Logger.Logger.Info(System.String)') + - [Log(logLevel,message)](#M-SweetLib-Utils-Logger-Logger-Log-SweetLib-Utils-Logger-LogLevel,System-String- 'SweetLib.Utils.Logger.Logger.Log(SweetLib.Utils.Logger.LogLevel,System.String)') + - [Log(logLevel,message,logMemory)](#M-SweetLib-Utils-Logger-Logger-Log-SweetLib-Utils-Logger-LogLevel,System-String,SweetLib-Utils-Logger-Memory-ILogMemory- 'SweetLib.Utils.Logger.Logger.Log(SweetLib.Utils.Logger.LogLevel,System.String,SweetLib.Utils.Logger.Memory.ILogMemory)') + - [Log(message,logMemory)](#M-SweetLib-Utils-Logger-Logger-Log-SweetLib-Utils-Logger-Message-LogMessage,SweetLib-Utils-Logger-Memory-ILogMemory- 'SweetLib.Utils.Logger.Logger.Log(SweetLib.Utils.Logger.Message.LogMessage,SweetLib.Utils.Logger.Memory.ILogMemory)') + - [Trace(message)](#M-SweetLib-Utils-Logger-Logger-Trace-System-String- 'SweetLib.Utils.Logger.Logger.Trace(System.String)') + - [Warn(message)](#M-SweetLib-Utils-Logger-Logger-Warn-System-String- 'SweetLib.Utils.Logger.Logger.Warn(System.String)') +- [LogLevel](#T-SweetLib-Utils-Logger-LogLevel 'SweetLib.Utils.Logger.LogLevel') +- [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') + - [#ctor(logLevel,message)](#M-SweetLib-Utils-Logger-Message-LogMessage-#ctor-SweetLib-Utils-Logger-LogLevel,System-String- 'SweetLib.Utils.Logger.Message.LogMessage.#ctor(SweetLib.Utils.Logger.LogLevel,System.String)') + - [#ctor(logLevel,message,logDateTime)](#M-SweetLib-Utils-Logger-Message-LogMessage-#ctor-SweetLib-Utils-Logger-LogLevel,System-String,System-DateTime- 'SweetLib.Utils.Logger.Message.LogMessage.#ctor(SweetLib.Utils.Logger.LogLevel,System.String,System.DateTime)') + - [LogDateTime](#P-SweetLib-Utils-Logger-Message-LogMessage-LogDateTime 'SweetLib.Utils.Logger.Message.LogMessage.LogDateTime') + - [LogLevel](#P-SweetLib-Utils-Logger-Message-LogMessage-LogLevel 'SweetLib.Utils.Logger.Message.LogMessage.LogLevel') + - [Message](#P-SweetLib-Utils-Logger-Message-LogMessage-Message 'SweetLib.Utils.Logger.Message.LogMessage.Message') + - [ToString()](#M-SweetLib-Utils-Logger-Message-LogMessage-ToString 'SweetLib.Utils.Logger.Message.LogMessage.ToString') + - [ToString(format,formatProvider)](#M-SweetLib-Utils-Logger-Message-LogMessage-ToString-System-String,System-IFormatProvider- 'SweetLib.Utils.Logger.Message.LogMessage.ToString(System.String,System.IFormatProvider)') +- [LogMessageFormatter](#T-SweetLib-Utils-Logger-Message-LogMessageFormatter 'SweetLib.Utils.Logger.Message.LogMessageFormatter') + - [FormatterInstance](#P-SweetLib-Utils-Logger-Message-LogMessageFormatter-FormatterInstance 'SweetLib.Utils.Logger.Message.LogMessageFormatter.FormatterInstance') + - [Instance](#P-SweetLib-Utils-Logger-Message-LogMessageFormatter-Instance 'SweetLib.Utils.Logger.Message.LogMessageFormatter.Instance') + - [Format(format,arg,formatProvider)](#M-SweetLib-Utils-Logger-Message-LogMessageFormatter-Format-System-String,System-Object,System-IFormatProvider- 'SweetLib.Utils.Logger.Message.LogMessageFormatter.Format(System.String,System.Object,System.IFormatProvider)') +- [RegistryStorer](#T-SweetLib-Classes-Storer-RegistryStorer 'SweetLib.Classes.Storer.RegistryStorer') + - [#ctor(appName)](#M-SweetLib-Classes-Storer-RegistryStorer-#ctor-System-String- 'SweetLib.Classes.Storer.RegistryStorer.#ctor(System.String)') + - [#ctor(baseRegistryKey,appName)](#M-SweetLib-Classes-Storer-RegistryStorer-#ctor-Microsoft-Win32-RegistryKey,System-String- 'SweetLib.Classes.Storer.RegistryStorer.#ctor(Microsoft.Win32.RegistryKey,System.String)') + - [OperatingRegistryKey](#P-SweetLib-Classes-Storer-RegistryStorer-OperatingRegistryKey 'SweetLib.Classes.Storer.RegistryStorer.OperatingRegistryKey') +- [RegistryStorerException](#T-SweetLib-Classes-Exceptions-RegistryStorerException 'SweetLib.Classes.Exceptions.RegistryStorerException') + - [#ctor()](#M-SweetLib-Classes-Exceptions-RegistryStorerException-#ctor 'SweetLib.Classes.Exceptions.RegistryStorerException.#ctor') + - [#ctor(message)](#M-SweetLib-Classes-Exceptions-RegistryStorerException-#ctor-System-String- 'SweetLib.Classes.Exceptions.RegistryStorerException.#ctor(System.String)') +- [SweetUtils](#T-SweetLib-Utils-SweetUtils 'SweetLib.Utils.SweetUtils') + - [LegalizeFilename(fileName)](#M-SweetLib-Utils-SweetUtils-LegalizeFilename-System-String- 'SweetLib.Utils.SweetUtils.LegalizeFilename(System.String)') + - [LegalizeFilename(fileName,replaceChar)](#M-SweetLib-Utils-SweetUtils-LegalizeFilename-System-String,System-Char- 'SweetLib.Utils.SweetUtils.LegalizeFilename(System.String,System.Char)') + + +# SweetLib [#](#assembly 'Go To Here') [=](#contents 'Back To Contents') + + +## BaseTypeExtensions [#](#T-SweetLib-Utils-Extensions-BaseTypeExtensions 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Utils.Extensions + +##### Summary + +Defines extensions to some general classes. + + +### AsBool(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBool-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Int16- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [Int16](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int16 'System.Int16') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.Int16](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int16 'System.Int16') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-UInt16- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [UInt16](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt16 'System.UInt16') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.UInt16](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt16 'System.UInt16') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Int32- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-UInt32- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [UInt32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt32 'System.UInt32') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.UInt32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt32 'System.UInt32') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Int64- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-UInt64- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [UInt64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt64 'System.UInt64') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.UInt64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt64 'System.UInt64') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Single- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Double- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Boolean- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-DateTime- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') | Value to convert. | + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Value to convert. | + +##### Remarks + +Using [UTF32Encoding](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Text.UTF32Encoding 'System.Text.UTF32Encoding') for converting. + + +### AsBytes(value) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsBytes-System-Char- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') value into a byte array. + +##### Returns + +Byte array representation of the value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | [System.Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') | Value to convert. | + + +### AsChar(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsChar-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsDateTime(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsDateTime-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsDouble(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsDouble-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsInt16(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsInt16-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [Int16](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int16 'System.Int16') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsInt32(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsInt32-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsInt64(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsInt64-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsSingle(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsSingle-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsString(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsString-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + +##### Remarks + +Using [UTF32Encoding](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Text.UTF32Encoding 'System.Text.UTF32Encoding') for converting. + + +### AsUInt16(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsUInt16-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [UInt16](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt16 'System.UInt16') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsUInt32(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsUInt32-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [UInt32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt32 'System.UInt32') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +### AsUInt64(bytes) `method` [#](#M-SweetLib-Utils-Extensions-BaseTypeExtensions-AsUInt64-System-Byte[]- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a byte array into a [UInt64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.UInt64 'System.UInt64') type. + +##### Returns + +Converted value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| bytes | [System.Byte[]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte[] 'System.Byte[]') | Byte array representation to convert. | + + +## DateTimeExtensions [#](#T-SweetLib-Utils-Extensions-DateTimeExtensions 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Utils.Extensions + +##### Summary + +Defines extensions to classes which are related to [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime'). + + +### ToDateTime(timestamp) `method` [#](#M-SweetLib-Utils-Extensions-DateTimeExtensions-ToDateTime-System-Double- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts an Unix timestamp into a [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime'). + +##### Returns + +Converted [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| timestamp | [System.Double](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Double 'System.Double') | Unix timestamp to convert. | + + +### ToUnixTimeStamp(date) `method` [#](#M-SweetLib-Utils-Extensions-DateTimeExtensions-ToUnixTimeStamp-System-DateTime- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Converts a [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') into an Unix timestamp. + +##### Returns + +Converted Unix timestamp. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| date | [System.DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') | [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') to convert into Unix timestamp. | + + +## ILogMemory [#](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Utils.Logger.Memory + +##### Summary + +Interface for a class to store and proceed [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') objects. + + +### Archive(fullFileName) `method` [#](#M-SweetLib-Utils-Logger-Memory-ILogMemory-Archive-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Saves all remembered [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') objects into a persistent file. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| fullFileName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | File name to store the [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') objects. | + + +### Forget(message) `method` [#](#M-SweetLib-Utils-Logger-Memory-ILogMemory-Forget-SweetLib-Utils-Logger-Message-LogMessage- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Removes a [](#!-message 'message') from the [ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [SweetLib.Utils.Logger.Message.LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') | [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') to be removed. | + +##### Remarks + +This might not have any effect depending on the [ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory') implementation. + + +### Remember(message) `method` [#](#M-SweetLib-Utils-Logger-Memory-ILogMemory-Remember-SweetLib-Utils-Logger-Message-LogMessage- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Adds a [](#!-message 'message') into the [ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [SweetLib.Utils.Logger.Message.LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') | [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') to be stored. | + + +## IniFileStorer [#](#T-SweetLib-Classes-Storer-IniFileStorer 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Classes.Storer + +##### Summary + +Implementation of an [IStorer](#T-SweetLib-Classes-Storer-IStorer 'SweetLib.Classes.Storer.IStorer') interface which stores the data inside an ini file. + + +### #ctor(fileName) `constructor` [#](#M-SweetLib-Classes-Storer-IniFileStorer-#ctor-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new instance of [IniFileStorer](#T-SweetLib-Classes-Storer-IniFileStorer 'SweetLib.Classes.Storer.IniFileStorer') with a specified file name. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| fileName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The file name of the ini file. | + + +### FileName `property` [#](#P-SweetLib-Classes-Storer-IniFileStorer-FileName 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Ini file path. + + +## IStorer [#](#T-SweetLib-Classes-Storer-IStorer 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Classes.Storer + +##### Summary + +Interface, which provides several methods to store simple data. + + +### DeleteKey(section,key) `method` [#](#M-SweetLib-Classes-Storer-IStorer-DeleteKey-System-String,System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Deletes a key inside a [](#!-section 'section'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section in which the data is stored. | +| key | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the key to be deleted. | + + +### DeleteSection(section) `method` [#](#M-SweetLib-Classes-Storer-IStorer-DeleteSection-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Deletes a section with all its keys. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section to be deleted. | + + +### HasKey(section,key) `method` [#](#M-SweetLib-Classes-Storer-IStorer-HasKey-System-String,System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Checks, if a key exists inside a section. + +##### Returns + +True, if [](#!-key 'key') is found inside [](#!-section 'section'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section in which the data is stored. | +| key | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the key of the stored data. | + + +### ReadBool(section,key,defaultValue) `method` [#](#M-SweetLib-Classes-Storer-IStorer-ReadBool-System-String,System-String,System-Boolean- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Reads a bool value. + +##### Returns + +Value of the [](#!-key 'key') in [](#!-section 'section'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section in which the data is stored. | +| key | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the key of the stored data. | +| defaultValue | [System.Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') | Default value, if this value does not exist. | + + +### ReadInteger(section,key,defaultValue) `method` [#](#M-SweetLib-Classes-Storer-IStorer-ReadInteger-System-String,System-String,System-Int32- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Reads an integer value. + +##### Returns + +Value of the [](#!-key 'key') in [](#!-section 'section'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section in which the data is stored. | +| key | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the key of the stored data. | +| defaultValue | [System.Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') | Default value, if this value does not exist. | + + +### ReadString(section,key,defaultValue) `method` [#](#M-SweetLib-Classes-Storer-IStorer-ReadString-System-String,System-String,System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Reads a string value. + +##### Returns + +Value of the [](#!-key 'key') in [](#!-section 'section'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section in which the data is stored. | +| key | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the key of the stored data. | +| defaultValue | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Default value, if this value does not exist. | + + +### WriteBool(section,key,value) `method` [#](#M-SweetLib-Classes-Storer-IStorer-WriteBool-System-String,System-String,System-Boolean- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Writes a bool value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section in which the data is stored. | +| key | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the key of the stored data. | +| value | [System.Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') | Value to be stored. | + + +### WriteInteger(section,key,value) `method` [#](#M-SweetLib-Classes-Storer-IStorer-WriteInteger-System-String,System-String,System-Int32- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Writes an integer value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section in which the data is stored. | +| key | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the key of the stored data. | +| value | [System.Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') | Value to be stored. | + + +### WriteString(section,key,value) `method` [#](#M-SweetLib-Classes-Storer-IStorer-WriteString-System-String,System-String,System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Writes a string value. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| section | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the section in which the data is stored. | +| key | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Represents the key of the stored data. | +| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Value to be stored. | + + +## Logger [#](#T-SweetLib-Utils-Logger-Logger 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Utils.Logger + +##### Summary + +Global logger class providing several methods to log events by the application. + +##### Remarks + +As [DefaultLogMemory](#P-SweetLib-Utils-Logger-Logger-DefaultLogMemory 'SweetLib.Utils.Logger.Logger.DefaultLogMemory') a [ArchivableConsoleLogMemory](#T-SweetLib-Utils-Logger-Memory-ArchivableConsoleLogMemory 'SweetLib.Utils.Logger.Memory.ArchivableConsoleLogMemory') will be used. You can change this to any other implementation at any time while runtime. Default log levels are set as bitflags in [GlobalLogLevel](#P-SweetLib-Utils-Logger-Logger-GlobalLogLevel 'SweetLib.Utils.Logger.Logger.GlobalLogLevel'). + + +### DefaultLogMemory `property` [#](#P-SweetLib-Utils-Logger-Logger-DefaultLogMemory 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +The default [ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory') which will be used for any logging action, if no custom [ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory') is set as parameter. + + +### GlobalLogLevel `property` [#](#P-SweetLib-Utils-Logger-Logger-GlobalLogLevel 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +The global log level. Only messages with the set [LogLevel](#T-SweetLib-Utils-Logger-LogLevel 'SweetLib.Utils.Logger.LogLevel') will be procedered. + + +### Debug(message) `method` [#](#M-SweetLib-Utils-Logger-Logger-Debug-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Will log a message with the [Debug](#F-SweetLib-Utils-Logger-LogLevel-Debug 'SweetLib.Utils.Logger.LogLevel.Debug') log level. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Message to log. | + + +### Error(message) `method` [#](#M-SweetLib-Utils-Logger-Logger-Error-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Will log a message with the [Error](#F-SweetLib-Utils-Logger-LogLevel-Error 'SweetLib.Utils.Logger.LogLevel.Error') log level. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Message to log. | + + +### Info(message) `method` [#](#M-SweetLib-Utils-Logger-Logger-Info-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Will log a message with the [Info](#F-SweetLib-Utils-Logger-LogLevel-Info 'SweetLib.Utils.Logger.LogLevel.Info') log level. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Message to log. | + + +### Log(logLevel,message) `method` [#](#M-SweetLib-Utils-Logger-Logger-Log-SweetLib-Utils-Logger-LogLevel,System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Will log a message into the global [DefaultLogMemory](#P-SweetLib-Utils-Logger-Logger-DefaultLogMemory 'SweetLib.Utils.Logger.Logger.DefaultLogMemory'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| logLevel | [SweetLib.Utils.Logger.LogLevel](#T-SweetLib-Utils-Logger-LogLevel 'SweetLib.Utils.Logger.LogLevel') | The log level of this message. | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The message to log. | + + +### Log(logLevel,message,logMemory) `method` [#](#M-SweetLib-Utils-Logger-Logger-Log-SweetLib-Utils-Logger-LogLevel,System-String,SweetLib-Utils-Logger-Memory-ILogMemory- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Will log a message into the provided [](#!-logMemory 'logMemory'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| logLevel | [SweetLib.Utils.Logger.LogLevel](#T-SweetLib-Utils-Logger-LogLevel 'SweetLib.Utils.Logger.LogLevel') | The log level of this message. | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The message to log. | +| logMemory | [SweetLib.Utils.Logger.Memory.ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory') | The [ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory') to store the [](#!-message 'message') into. | + + +### Log(message,logMemory) `method` [#](#M-SweetLib-Utils-Logger-Logger-Log-SweetLib-Utils-Logger-Message-LogMessage,SweetLib-Utils-Logger-Memory-ILogMemory- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Will log a message into the provided [](#!-logMemory 'logMemory'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [SweetLib.Utils.Logger.Message.LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') | A [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') object to store. | +| logMemory | [SweetLib.Utils.Logger.Memory.ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory') | The [ILogMemory](#T-SweetLib-Utils-Logger-Memory-ILogMemory 'SweetLib.Utils.Logger.Memory.ILogMemory') to store the [](#!-message 'message') into. | + +##### Remarks + +In general use cases you should either use one of the [Log](#M-SweetLib-Utils-Logger-Logger-Log-SweetLib-Utils-Logger-LogLevel,System-String- 'SweetLib.Utils.Logger.Logger.Log(SweetLib.Utils.Logger.LogLevel,System.String)') or [Log](#M-SweetLib-Utils-Logger-Logger-Log-SweetLib-Utils-Logger-LogLevel,System-String- 'SweetLib.Utils.Logger.Logger.Log(SweetLib.Utils.Logger.LogLevel,System.String)') methods which will generate a call to this method. + + +### Trace(message) `method` [#](#M-SweetLib-Utils-Logger-Logger-Trace-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Will log a message with the [Trace](#F-SweetLib-Utils-Logger-LogLevel-Trace 'SweetLib.Utils.Logger.LogLevel.Trace') log level. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Message to log. | + + +### Warn(message) `method` [#](#M-SweetLib-Utils-Logger-Logger-Warn-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Will log a message with the [Warn](#F-SweetLib-Utils-Logger-LogLevel-Warn 'SweetLib.Utils.Logger.LogLevel.Warn') log level. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Message to log. | + + +## LogLevel [#](#T-SweetLib-Utils-Logger-LogLevel 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Utils.Logger + +##### Summary + +Enum which contains the several log levels. + + +## LogMessage [#](#T-SweetLib-Utils-Logger-Message-LogMessage 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Utils.Logger.Message + +##### Summary + +[LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') contains all event log data which should be logged in as a single log message. + + +### #ctor(logLevel,message) `constructor` [#](#M-SweetLib-Utils-Logger-Message-LogMessage-#ctor-SweetLib-Utils-Logger-LogLevel,System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') instance. [Now](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime.Now 'System.DateTime.Now') will be the [LogDateTime](#P-SweetLib-Utils-Logger-Message-LogMessage-LogDateTime 'SweetLib.Utils.Logger.Message.LogMessage.LogDateTime'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| logLevel | [SweetLib.Utils.Logger.LogLevel](#T-SweetLib-Utils-Logger-LogLevel 'SweetLib.Utils.Logger.LogLevel') | The log level of this event log. | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The message of this event log. | + + +### #ctor(logLevel,message,logDateTime) `constructor` [#](#M-SweetLib-Utils-Logger-Message-LogMessage-#ctor-SweetLib-Utils-Logger-LogLevel,System-String,System-DateTime- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') instance. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| logLevel | [SweetLib.Utils.Logger.LogLevel](#T-SweetLib-Utils-Logger-LogLevel 'SweetLib.Utils.Logger.LogLevel') | The log level of this event log. | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The message of this event log. | +| logDateTime | [System.DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') | The [DateTime](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.DateTime 'System.DateTime') of this event log. | + + +### LogDateTime `property` [#](#P-SweetLib-Utils-Logger-Message-LogMessage-LogDateTime 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +The date and time of this event log. + + +### LogLevel `property` [#](#P-SweetLib-Utils-Logger-Message-LogMessage-LogLevel 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +The [LogLevel](#P-SweetLib-Utils-Logger-Message-LogMessage-LogLevel 'SweetLib.Utils.Logger.Message.LogMessage.LogLevel') of this event log. + + +### Message `property` [#](#P-SweetLib-Utils-Logger-Message-LogMessage-Message 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +The message of this event log. + + +### ToString() `method` [#](#M-SweetLib-Utils-Logger-Message-LogMessage-ToString 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Generates a formatted [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') of this event log. [DefaultFormatString](#P-SweetLib-Utils-Logger-Message-LogMessageFormatter-DefaultFormatString 'SweetLib.Utils.Logger.Message.LogMessageFormatter.DefaultFormatString') will be used to format this event log. + +##### Returns + +A formated [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') of this event log. + +##### Parameters + +This method has no parameters. + + +### ToString(format,formatProvider) `method` [#](#M-SweetLib-Utils-Logger-Message-LogMessage-ToString-System-String,System-IFormatProvider- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Generates a formatted [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') of this event log with a given format. + +##### Returns + +A formated [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') of this event log. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| format | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The format to be used. See [LogMessageFormatter](#T-SweetLib-Utils-Logger-Message-LogMessageFormatter 'SweetLib.Utils.Logger.Message.LogMessageFormatter') for more format information. | +| formatProvider | [System.IFormatProvider](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IFormatProvider 'System.IFormatProvider') | Optional, an [IFormatProvider](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IFormatProvider 'System.IFormatProvider') interface to be used while formatting if needed. | + + +## LogMessageFormatter [#](#T-SweetLib-Utils-Logger-Message-LogMessageFormatter 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Utils.Logger.Message + +##### Summary + +A [ICustomFormatter](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.ICustomFormatter 'System.ICustomFormatter') which is used to format [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') objects. + +##### Remarks + +This class implements a singleton pattern. + + +### FormatterInstance `property` [#](#P-SweetLib-Utils-Logger-Message-LogMessageFormatter-FormatterInstance 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Accesses the global instance of the [LogMessageFormatter](#T-SweetLib-Utils-Logger-Message-LogMessageFormatter 'SweetLib.Utils.Logger.Message.LogMessageFormatter'). + + +### Instance `property` [#](#P-SweetLib-Utils-Logger-Message-LogMessageFormatter-Instance 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +The default format string which is used to format [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') objects, if no custom format string is provided. + + +### Format(format,arg,formatProvider) `method` [#](#M-SweetLib-Utils-Logger-Message-LogMessageFormatter-Format-System-String,System-Object,System-IFormatProvider- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Formats a [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') object. + +##### Returns + +A formatted [String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') of the [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| format | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The format string. If [](#!-null 'null'), [DefaultFormatString](#P-SweetLib-Utils-Logger-Message-LogMessageFormatter-DefaultFormatString 'SweetLib.Utils.Logger.Message.LogMessageFormatter.DefaultFormatString') will be used. | +| arg | [System.Object](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Object 'System.Object') | The [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') object to be formatted. | +| formatProvider | [System.IFormatProvider](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IFormatProvider 'System.IFormatProvider') | Optional, an [IFormatProvider](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IFormatProvider 'System.IFormatProvider') interface to be used while formatting if needed. | + +##### Remarks + +If [](#!-arg 'arg') is not a [LogMessage](#T-SweetLib-Utils-Logger-Message-LogMessage 'SweetLib.Utils.Logger.Message.LogMessage') object, it will either be returned the formatted string implemented by the type of [](#!-arg 'arg'), if [IFormattable](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IFormattable 'System.IFormattable') is implemented by it, or the [](#!-arg-ToString-- 'arg.ToString()') result." + + +## RegistryStorer [#](#T-SweetLib-Classes-Storer-RegistryStorer 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Classes.Storer + +##### Summary + +Implementation of an [IStorer](#T-SweetLib-Classes-Storer-IStorer 'SweetLib.Classes.Storer.IStorer') interface which stores the data inside the registry. + +##### Remarks + +Sections will be interpreted as subkeys on registry level. + + +### #ctor(appName) `constructor` [#](#M-SweetLib-Classes-Storer-RegistryStorer-#ctor-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new instance of [RegistryStorer](#T-SweetLib-Classes-Storer-RegistryStorer 'SweetLib.Classes.Storer.RegistryStorer') with a specified application name. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| appName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The applications base name. This will be used as name for a sub key inside the software key below the base key. | + +##### Remarks + +This will use current user as the base key. + + +### #ctor(baseRegistryKey,appName) `constructor` [#](#M-SweetLib-Classes-Storer-RegistryStorer-#ctor-Microsoft-Win32-RegistryKey,System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new instance of [RegistryStorer](#T-SweetLib-Classes-Storer-RegistryStorer 'SweetLib.Classes.Storer.RegistryStorer') with a specified application name. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| baseRegistryKey | [Microsoft.Win32.RegistryKey](#T-Microsoft-Win32-RegistryKey 'Microsoft.Win32.RegistryKey') | Provide a key of [Registry](#T-Microsoft-Win32-Registry 'Microsoft.Win32.Registry'), e.G. . | +| appName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The applications base name. This will be used as name for a sub key inside the software key below the base key. | + + +### OperatingRegistryKey `property` [#](#P-SweetLib-Classes-Storer-RegistryStorer-OperatingRegistryKey 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +The base registry key in which will be operated. + + +## RegistryStorerException [#](#T-SweetLib-Classes-Exceptions-RegistryStorerException 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Classes.Exceptions + +##### Summary + +Exception thrown by [RegistryStorer](#T-SweetLib-Classes-Storer-RegistryStorer 'SweetLib.Classes.Storer.RegistryStorer'). + + +### #ctor() `constructor` [#](#M-SweetLib-Classes-Exceptions-RegistryStorerException-#ctor 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new [RegistryStorerException](#T-SweetLib-Classes-Exceptions-RegistryStorerException 'SweetLib.Classes.Exceptions.RegistryStorerException'). + +##### Parameters + +This constructor has no parameters. + + +### #ctor(message) `constructor` [#](#M-SweetLib-Classes-Exceptions-RegistryStorerException-#ctor-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Creates a new [RegistryStorerException](#T-SweetLib-Classes-Exceptions-RegistryStorerException 'SweetLib.Classes.Exceptions.RegistryStorerException'). + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| message | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Exception message. | + + +## SweetUtils [#](#T-SweetLib-Utils-SweetUtils 'Go To Here') [=](#contents 'Back To Contents') + +##### Namespace + +SweetLib.Utils + +##### Summary + +A generic class containing useful methods. + + +### LegalizeFilename(fileName) `method` [#](#M-SweetLib-Utils-SweetUtils-LegalizeFilename-System-String- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Legalizes a file name with the [DefaultFileNameReplaceChar](#P-SweetLib-Utils-SweetUtils-DefaultFileNameReplaceChar 'SweetLib.Utils.SweetUtils.DefaultFileNameReplaceChar') character. + +##### Returns + +Legalized file name. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| fileName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | File name to legalize. | + + +### LegalizeFilename(fileName,replaceChar) `method` [#](#M-SweetLib-Utils-SweetUtils-LegalizeFilename-System-String,System-Char- 'Go To Here') [=](#contents 'Back To Contents') + +##### Summary + +Legalizes a file name by a given replace character. + +##### Returns + +Legalized file name. + +##### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| fileName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | File name to legalize. | +| replaceChar | [System.Char](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Char 'System.Char') | Character to be used as replace character. | diff --git a/Docs/SweetLib.xml b/Docs/SweetLib.xml new file mode 100644 index 0000000..ab6e181 --- /dev/null +++ b/Docs/SweetLib.xml @@ -0,0 +1,538 @@ + + + + SweetLib + + + + + Exception thrown by . + + + + + Creates a new . + + + + + Creates a new . + + Exception message. + + + + Implementation of an interface which stores the data inside an ini file. + + + + + Ini file path. + + + + + Creates a new instance of with a specified file name. + + The file name of the ini file. + + + + Interface, which provides several methods to store simple data. + + + + + Reads a string value. + + Represents the section in which the data is stored. + Represents the key of the stored data. + Default value, if this value does not exist. + Value of the in . + + + + Reads an integer value. + + Represents the section in which the data is stored. + Represents the key of the stored data. + Default value, if this value does not exist. + Value of the in . + + + + Reads a bool value. + + Represents the section in which the data is stored. + Represents the key of the stored data. + Default value, if this value does not exist. + Value of the in . + + + + Checks, if a key exists inside a section. + + Represents the section in which the data is stored. + Represents the key of the stored data. + True, if is found inside . + + + + Writes a string value. + + Represents the section in which the data is stored. + Represents the key of the stored data. + Value to be stored. + + + + Writes an integer value. + + Represents the section in which the data is stored. + Represents the key of the stored data. + Value to be stored. + + + + Writes a bool value. + + Represents the section in which the data is stored. + Represents the key of the stored data. + Value to be stored. + + + + Deletes a key inside a . + + Represents the section in which the data is stored. + Represents the key to be deleted. + + + + Deletes a section with all its keys. + + Represents the section to be deleted. + + + + Implementation of an interface which stores the data inside the registry. + + + Sections will be interpreted as subkeys on registry level. + + + + + The base registry key in which will be operated. + + + + + Creates a new instance of with a specified application name. + + The applications base name. This will be used as name for a sub key inside the software key below the base key. + + This will use current user as the base key. + + + + + Creates a new instance of with a specified application name. + + Provide a key of , e.G. Registry.CurrentUser. + The applications base name. This will be used as name for a sub key inside the software key below the base key. + + + + Defines extensions to some general classes. + + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + Using for converting. + + + + Converts a value into a byte array. + + Value to convert. + Byte array representation of the value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + Using for converting. + + + + Converts a byte array into a type. + + Byte array representation to convert. + Converted value. + + + + Defines extensions to classes which are related to . + + + + + Converts a into an Unix timestamp. + + to convert into Unix timestamp. + Converted Unix timestamp. + + + + Converts an Unix timestamp into a . + + Unix timestamp to convert. + Converted . + + + + Enum which contains the several log levels. + + + + + Global logger class providing several methods to log events by the application. + + + As a will be used. You can change this to any other implementation at any time while runtime. + Default log levels are set as bitflags in . + + + + + The global log level. Only messages with the set will be procedered. + + + + + The default which will be used for any logging action, if no custom is set as parameter. + + + + + Will log a message into the global . + + The log level of this message. + The message to log. + + + + Will log a message into the provided . + + The log level of this message. + /// The message to log. + The to store the into. + + + + Will log a message into the provided . + + A object to store. + The to store the into. + In general use cases you should either use one of the or methods which will generate a call to this method. + + + + Will log a message with the log level. + + Message to log. + + + + Will log a message with the log level. + + Message to log. + + + + Will log a message with the log level. + + Message to log. + + + + Will log a message with the log level. + + Message to log. + + + + Will log a message with the log level. + + Message to log. + + + + Interface for a class to store and proceed objects. + + + + + Adds a into the . + + to be stored. + + + + Removes a from the . + + to be removed. + This might not have any effect depending on the implementation. + + + + Saves all remembered objects into a persistent file. + + File name to store the objects. + + + + contains all event log data which should be logged in as a single log message. + + + + + The of this event log. + + + + + The message of this event log. + + + + + The date and time of this event log. + + + + + Creates a new instance. will be the . + + The log level of this event log. + The message of this event log. + + + + Creates a new instance. + + The log level of this event log. + The message of this event log. + The of this event log. + + + + Generates a formatted of this event log. will be used to format this event log. + + A formated of this event log. + + + + Generates a formatted of this event log with a given format. + + The format to be used. See for more format information. + Optional, an interface to be used while formatting if needed. + A formated of this event log. + + + + A which is used to format objects. + + This class implements a singleton pattern. + + + + Accesses the global instance of the . + + + + + The default format string which is used to format objects, if no custom format string is provided. + + + + + Formats a object. + + The format string. If , will be used. + The object to be formatted. + Optional, an interface to be used while formatting if needed. + A formatted of the . + + If is not a object, it will either be returned the formatted string implemented by the type of , if is implemented by it, or the result." + + + + + A generic class containing useful methods. + + + + + Legalizes a file name with the character. + + File name to legalize. + Legalized file name. + + + + Legalizes a file name by a given replace character. + + File name to legalize. + Character to be used as replace character. + Legalized file name. + + + diff --git a/SweetLib.IO/Classes/Streaming/StreamManager.cs b/SweetLib.IO/Classes/Streaming/StreamManager.cs index 7469482..460d3a8 100644 --- a/SweetLib.IO/Classes/Streaming/StreamManager.cs +++ b/SweetLib.IO/Classes/Streaming/StreamManager.cs @@ -58,9 +58,7 @@ namespace SweetLib.IO.Classes.Streaming private static byte[] LoadFromStream(Stream stream, StreamedObjectType type) { - long length; - - LoadMetaDataFromStream(stream, out StreamedObjectType foundType, out length); + LoadMetaDataFromStream(stream, out StreamedObjectType foundType, out long length); if (foundType != type) throw new StreamTypeException($"Expected {type} but found {foundType} instead."); @@ -156,6 +154,7 @@ namespace SweetLib.IO.Classes.Streaming /// /// to which the will be added. /// value to add. + /// If true, the full given will be copied, otherwhise the stream will be copied from current position until its end. public static void SaveToStream(Stream stream, Stream value, bool resetSourceStream = false) { if (resetSourceStream) diff --git a/SweetLib.IO/SweetLib.IO.csproj b/SweetLib.IO/SweetLib.IO.csproj index f54b8e2..2b90b23 100644 --- a/SweetLib.IO/SweetLib.IO.csproj +++ b/SweetLib.IO/SweetLib.IO.csproj @@ -18,9 +18,10 @@ bin\Release\netstandard1.3\SweetLib.IO.xml - + - + + diff --git a/SweetLib/Classes/Storer/IniFileStorer.cs b/SweetLib/Classes/Storer/IniFileStorer.cs index c0e77ff..fec3ec6 100644 --- a/SweetLib/Classes/Storer/IniFileStorer.cs +++ b/SweetLib/Classes/Storer/IniFileStorer.cs @@ -37,8 +37,7 @@ namespace SweetLib.Classes.Storer public int ReadInteger(string section, string key, int defaultValue = 0) { - int result; - if (!int.TryParse(ReadString(section, key, defaultValue.ToString()), out result)) + if (!int.TryParse(ReadString(section, key, defaultValue.ToString()), out int result)) result = defaultValue; return result; diff --git a/SweetLib/Classes/Storer/RegistryStorer.cs b/SweetLib/Classes/Storer/RegistryStorer.cs index f00dca7..64fc1f2 100644 --- a/SweetLib/Classes/Storer/RegistryStorer.cs +++ b/SweetLib/Classes/Storer/RegistryStorer.cs @@ -47,8 +47,7 @@ namespace SweetLib.Classes.Storer public int ReadInteger(string section, string key, int defaultValue = 0) { - int result; - if (!int.TryParse(ReadString(section, key, defaultValue.ToString()), out result)) + if (!int.TryParse(ReadString(section, key, defaultValue.ToString()), out int result)) result = defaultValue; return result; diff --git a/SweetLib/SweetLib.csproj b/SweetLib/SweetLib.csproj index aab8010..63f0698 100644 --- a/SweetLib/SweetLib.csproj +++ b/SweetLib/SweetLib.csproj @@ -2,11 +2,11 @@ netstandard1.3 - 0.2.0-alpha + 0.2.1-alpha Sweet collection of helpful utils in .Net Serraniel - Copyright © 2017 by Serraniel + Copyright © 2017-2018 by Serraniel https://joinup.ec.europa.eu/page/eupl-text-11-12 https://github.com/Serraniel/SweetLib https://github.com/Serraniel/SweetLib @@ -21,6 +21,7 @@ + diff --git a/SweetLib/Utils/Logger/Memory/ArchivableConsoleLogMemory.cs b/SweetLib/Utils/Logger/Memory/ArchivableConsoleLogMemory.cs index 261a582..9760959 100644 --- a/SweetLib/Utils/Logger/Memory/ArchivableConsoleLogMemory.cs +++ b/SweetLib/Utils/Logger/Memory/ArchivableConsoleLogMemory.cs @@ -60,8 +60,7 @@ namespace SweetLib.Utils.Logger.Memory { while (!LogQueue.IsEmpty) { - LogMessage message; - if (LogQueue.TryDequeue(out message)) + if (LogQueue.TryDequeue(out LogMessage message)) File.AppendAllText(TempFile, message.ToString() + Environment.NewLine); } } @@ -70,8 +69,7 @@ namespace SweetLib.Utils.Logger.Memory { while (!LogQueue.IsEmpty) { - LogMessage message; - if (LogQueue.TryDequeue(out message)) + if (LogQueue.TryDequeue(out LogMessage message)) File.AppendAllText(TempFile, message.ToString() + Environment.NewLine); } }