Namespace Swan
Classes
ByteArrayExtensions
Provides various extension methods for byte arrays and streams.
CompositeHashCode
Provides a way for types that override GetHashCode() to correctly generate a hash code from the actual status of an instance.
CompositeHashCode
must be used ONLY as a helper when implementing
- two instances having the same hash code are actually
interchangeable, i.e. they represent exactly the same object (for instance,
they should not coexist in a
SortedSet ); - GetHashCode() and
Equals(Object) are BOTH overridden, and the
Equals
override either calls to theIEquatable<T>.Equals (recommended) or performs exactly the same equality checks; - only "standard" equality checks are performed, i.e. by means of the
==
operator,IEquatable<T> interfaces, and the Equals(Object) method (for instance, this excludes case-insensitive and/or culture-dependent string comparisons); - the hash code is constructed (via
Using
calls) from the very same fields and / or properties that are checked for equality.
For hashing to work correctly, all fields and/or properties involved in hashing must either
be immutable, or at least not change while an object is referenced in a hashtable.
This does not refer just to System.Collections.Hashtable
; the .NET
Framework makes a fairly extensive use of hashing, for example in
Hashtable
or SortedSet
.
DateExtensions
Provides extension methods for
Definitions
Contains useful constants and definitions.
EnumerableExtensions
This class contains extension methods for types implementing IEnumerable<TSource>
EnumHelper
Provide Enumerations helpers with internal cache.
ExceptionExtensions
Provides extension methods for
Extensions
Extension methods.
FromString
Provides a standard way to convert strings to different types.
FunctionalExtensions
Functional programming extension methods.
IEnumerableExtensions
This class contains extensions methods for IEnumerable
InternalErrorException
The exception that is thrown by methods of the SelfCheck class to signal a condition most probably caused by an internal error in a library or application.
Do not use this class directly; use the methods of the SelfCheck class instead.
NetworkExtensions
Provides various extension methods for networking-related tasks.
ObjectComparer
Represents a quick object comparer using the public properties of an object or the public members in a structure.
Paginator
A utility class to compute paging or batching offsets.
ProcessResult
Represents the text of the standard output and standard error of a process, including its exit code.
ProcessRunner
Provides methods to help create external processes, and efficiently capture the standard error and standard output streams.
PropertyProxyExtensions
Provides functionality to access
ReflectionExtensions
Provides various extension methods for Reflection and Types.
SelfCheck
Provides methods to perform self-checks in library or application code.
SingletonBase<T>
Represents a singleton pattern abstract class.
SmtpExtensions
Extension methods.
StringConversionException
The exception that is thrown when a conversion from a string to a specified type fails.
StringExtensions
String related extension methods.
StructEndiannessAttribute
An attribute used to help conversion structs back and forth into arrays of bytes via extension methods included in this library ToStruct and ToBytes.
SwanRuntime
Provides utility methods to retrieve information about the current application.
TaskExtensions
Provides extension methods for
Terminal
A console terminal helper to create nicer output and receive input from the user. This class is thread-safe :).
Terminal.Settings
Terminal global settings.
ValueTypeExtensions
Provides various extension methods for value types and structs.
ViewModelBase
A base class for implementing models that fire notifications when their properties change. This class is ideal for implementing MVVM driven UIs.
Structs
DateTimeSpan
Represents a struct of DateTimeSpan to compare dates and get in separate fields the amount of time between those dates.
Enums
Endianness
Defines Endianness, big or little.
OperatingSystem
Enumeration of Operating Systems.
TerminalWriters
Defines a set of bitwise standard terminal writers.
Delegates
ProcessRunner.ProcessDataReceivedCallback
Defines a delegate to handle binary data reception from the standard output or standard error streams from a process.