Basic Utilities assembly, which is used by almost any other assembly in the Delta Engine. It contains the very useful Log class, the Assert class (see below, for unit testing) and the generic Cache class. There are also all the needed Datatypes and Helpers defined in this assembly, see Delta.Utilities.Datatypes and Delta.Utilities.Helpers. It also contains the basic Profiler functionality, which is mostly used at the Scenes level in the Delta.Scenes.Profiling namespace.
For unit testing always use the Delta.Utilities.Assert class, which is used in all dynamic unit tests and many functional tests, static tests however often do not need Assert.
This allows you to write tests and use Assert methods like you might know from xUnit, NUnit and other testing frameworks.
Please use a private Tests class for all your tests (both static and dynamic ones), like in the example on:
http://DeltaEngine.net/About/CodingStyle
For unit testing always use the Delta.Utilities.Assert class, which is used in all dynamic unit tests and many functional tests, static tests however often do not need Assert.
This allows you to write tests and use Assert methods like you might know from xUnit, NUnit and other testing frameworks.
Please use a private Tests class for all your tests (both static and dynamic ones), like in the example on:
http://DeltaEngine.net/About/CodingStyle
Classes
Class | Description | |
---|---|---|
BinaryDataExtensions |
Allows to easily save and recreate binary data objects with the full type names like other
Serializers, but way faster (100x). Before reconstructing types load all needed assemblies.
View code on GitHub | |
BinaryDataExtensions NotEnoughDataLeftInStream | ||
ConsoleCommandAttribute |
Must be used when a method should be visible and executable from the Console.
View code on GitHub | |
ConsoleLogger |
Very simple logger just spaming out all log events into the console. Used by default.
View code on GitHub | |
FixedRandom |
Mostly used for testing, but also for deterministic values always returning the same sequence.
View code on GitHub | |
FixedRandom FixedValueOutOfRange | ||
GlobalTime |
Provides total run time and delta time for the current frame in seconds. Only used for
profiling, debugging and fps display. All game logic uses Time.Delta, Time.CheckEvery, etc.
View code on GitHub | |
Logger |
Allows any problem or issue to be logged via messages or exceptions, usually used by the
MockLogger for tests and ConsoleLogger, TextFileLogger and NetworkLogger in apps.
View code on GitHub | |
Logger LoggerWasAlreadyAttached | ||
ProcessRunner |
Starts a command line process with given argument and optional timeout. Supports events or
can be used synchronously with checking Error or Output afterwards. Exceptions are thrown
when things go bad (ExitCode not 0 or process times out).
View code on GitHub | |
ProcessRunner ErrorOutputHasTimedOutException | ||
ProcessRunner ProcessHasTimedOutException | ||
ProcessRunner ProcessTerminatedWithError | ||
ProcessRunner StandardOutputHasTimedOutException | ||
PseudoRandom |
Default implementation of Randomizer, returns quick random integers and floats (faster than
System.Random). See http://www.codeproject.com/Articles/25172/Simple-Random-Number-Generation
which is based on: http://www.bobwheeler.com/statistics/Password/MarsagliaPost.txt
View code on GitHub | |
Randomizer |
The definition for all random number generators.
View code on GitHub | |
SaveSafely |
If a class is labeled with this attribute, when instances are saved and loaded, if the class
structure has subsequently changed, other classes within the same save will still load
correctly. Using this attribute adds 4 bytes to the amount of data saved per instance.
View code on GitHub | |
Settings |
Keeps a bunch of settings like the resolution, which are used when the application starts up.
View code on GitHub | |
StopwatchTime |
Provides ticks for the Time class via the System.Diagnostics.Stopwatch class. This class is
usually the fallback if nothing else has been registered for Time.Current.
View code on GitHub |
Interfaces
Interface | Description | |
---|---|---|
Window |
Window form the application is running in. In Windows this is done with Windows Forms or WPF.
View code on GitHub |
Enumerations
Enumeration | Description | |
---|---|---|
BlendMode |
Blending mode to be used for drawing. Usually in Opaque mode or Normal transparency.
View code on GitHub | |
Logger MessageType | ||
Orientation |
Indicates the current orientation of the screen.
View code on GitHub | |
ProfilingMode |
Combination of profiling modes that can be turned on via Settings. Normally all modes are off.
Implementation can be found in the DeltaEngine.Profiling namespace.
View code on GitHub |