NPeanutButter | |
NAsync | |
NInterfaces | |
CIContinuation | Provides a continuation point for another task with no result |
CIContinuation< T > | Provides a continuation point for another task with a result |
CIFluentTaskRunnerContinuation< T > | Provides fluent continuation syntax |
CITaskRunner | Provides a wrapper around task running |
CContinuation< T > | /> |
CFluentTaskRunnerContinuation< T > | |
CTaskExtensions | Convenience extensions |
CTaskRunner | |
NDuckTyping | |
NAutoConversion | |
CConverterExtensions | Provides "generic" object-in, object-out conversion extension method Convert(other) for IConverter implementations |
CConverterLocator | Locates converters for converting values from one type to another |
CIConverter | Base interface for converters of all types |
CIConverter< T1, T2 > | Implement this interface for two type to provide auto-discovered converters to be used when fuzzy-duck-typing |
NComparers | |
CMethodInfoContainer | Class which holds two lookups of method information: one accurate and one approximate |
NExceptions | |
CBackingFieldForPropertyNotFoundException | Exception which is thrown when a type does not contain the expected backing field |
CMethodNotFoundException | Exception thrown when a forced ducked type does not implement a method that it is expected to implement |
CParameterCountMismatchException | Exception thrown when a ducked type has a different number of parameters for a ducked method than the ducked interface expects |
CPropertyNotFoundException | Exception thrown when an expected property was not found on a ducked type |
CReadOnlyPropertyException | Exception thrown when the ducked property is read-only but the interface to duck to expects a read/write property |
CUnDuckableException | The master exception thrown when a type is not duckable and exceptions have been enabled |
CUnresolveableParameterOrderMismatchException | Exception thrown when fuzzy ducking is enabled but the duck library cannot resolve the order of parameters to pass into the underlying type, usually because there are repeated types amongst the arguments (ie, two integers or similar) |
CWriteOnlyPropertyException | Exception thrown when a ducking operation expects a read/write property but the object being ducked implements a write-only property |
NExtensions | |
CConversionExtensions | Provides an extension method on object to attempt to convert to any other type supported by any existing (or located) converters. If you need a special conversion to happen then implement IConverter<T1, T2> to convert between T1 and T2. Common .net type conversion from strings is already supported (based on culture-invariant conversions, eg "1.23" -> 1.23M) |
CCustomAttributeHelperExtensions | Contains an extension method to craete a CustomAttributeBuilder out of CustomAttributeData, largely based on code at: http://stackoverflow.com/questions/2365470/using-reflection-emit-to-copy-a-custom-attribute-to-another-method (apparently, this is how AutoFac does it!) |
CDuckTypingCollectionExtensions | Provides ducking extensions for collections |
CDuckTypingDictionaryExtensions | Provides duck-typing extension methods around dictionary objects |
CDuckTypingExtensionSharedMethods | Provides a set of extension methods to enable duck-typing |
CDuckTypingNameValueCollectionExtensions | Provides duck-typing around NameValueCollections |
CDuckTypingObjectExtensions | Provides a set of extension methods to enable duck-typing |
CFuzzyDictionaryExtensions | Provides extensions for dealing with dictionaries in a "fuzzy" manner |
CMergingExtensions | Provides extension method for merging multiple objects behind a required interface |
NShimming | |
CDictionaryShimSham | Provides the required shimming to duck a dictionary object to an interface |
CIPropertyInfoFetcher | Interface to implement for a utility to fetch properties on a type or object |
CIsADuckAttribute | Attribute added to all types created by the TypeMaker, usually consumed during efforts to duck-type |
CIShimSham | Interface to implement for shimming ducked-types. Used for the backing field within the ducked type. Could potentially be used as a starting point for new ways to duck |
CITypeMaker | Interface implemented by the TypeMaker |
CPropertyInfoContainer | Provides a container for two property info lookups: one accurate and one approximate |
CShimSham | Shim to wrap objects for ducking |
CShimShamBase | Base class for common shim functionality |
CTypeMaker | Utility class to create types on the fly which implement provided interfaces, when possible |
CCreate | Static class to create instances of automatically generated types implementing the provided interfaces |
NEasyArgs | |
NAttributes | |
CAllowDefaultFromEnvironment | Sets the default value for a parsed argument |
CAllowDefaultsFromEnvironment | Allows defaults for all options on the options object to be overridden from environment variables |
CCopyrightAttribute | Adds more information to the help screen, as a footer |
CDefaultAttribute | Sets the default value for a parsed argument |
CDescriptionAttribute | Sets the description for a parsed argument or the header help text for the group of parsed arguments |
CDisableGeneratedShortNameAttribute | Disables automatic short-name generation for a switch |
CExistingFileAttribute | Verify that the provided path is an existing file |
CExistingFolderAttribute | Verify that the provided path is an existing file |
CIgnoreAttribute | Decorate properties with this to make EasyArgs ignore them eg if you have some configuration that could come from the CLI on an object where other config is loaded, eg, from an ini file |
CLongNameAttribute | Explicitly sets the long name for a parsed argument If you had an option property like "RemoteServer", the default long name would be "remote-server", which could be reached on the cli via "--remote-server". Override this here |
CMaxAttribute | Decorate a property with this to specify a minimum value for the property |
CMinAttribute | Decorate a property with this to specify a minimum value for the property |
CMoreInfoAttribute | Adds more information to the help screen, as a footer |
CNumericAttribute | Attribute specifying a required numeric value |
CObjectAttribute | Stores an arbitrary object |
CRequiredAttribute | Marks an option as required |
CShortNameAttribute | Explicitly sets the short name for a parsed argument If you had an option property like "RemoteServer", the default long name would be "r", which could be reached on the cli via "-r" or "-R", depending on if another property starting with "r" was found before RemoteServer. Override this here |
CStringAttribute | Stores an arbitrary string |
CCommandlineArgument | Describes a command line argument |
CConflictsWithAttribute | Marks this argument as conflicting with another argument by property name (key) |
CExitCodes | Exit codes used when exiting early |
CParserExtensions | Provides the extension methods to parse commandline arguments |
CParserOptions | Provides options for the parser |
NFileSystem | |
CIFileSystem | Provides a wrapper around a tree within a filesystem |
CLocalFileSystem | |
CPathNotFoundException | Thrown when a provided path is not found |
NINI | |
CBestEffortLineParser | Provides the best-effort line parsing strategy - inherit from this to guide behavior, eg to set a custom comment delimiter or custom escaping of values, bearing in mind that doing so will probably make your ini file unreadable by other tooling |
CIINIFile | Contract provided by the PeanutButter INI parser |
CILineParser | Represents a line parser for parsing a data line into: |
CINIFile | |
CIParsedLine | Represents a parsed data line |
NJObjectExtensions | |
CJObjectExtensions | Provides an easy extension method to convert JObjects to nested Dictionary<string, object> instances |
NMVC | |
CAutoInclude | |
CIncludeDirectory | |
CIScriptBundle | |
CIStyleBundle | |
CScriptBundleFacade | |
CStyleBundleFacade | |
NNetUtils | |
CWebDownloader | |
NRandomGenerators | |
CCannotGetAnotherDifferentRandomValueException< T > | Exception thrown when the method GetAnother is unable to find another random value different from the exclusion value specified |
CDateRange | Holds a date range |
CEnumerableExtensions | Provides extensions for generic IEnumerable collections |
CGenericBuilder< TBuilder, TEntity > | Base class for builders to produce instance of objects with a fluent builder-like syntax. Also includes utilities like randomizing property values |
CGenericBuilderBase | Abstract base class for housing shared logic between all builders and allowing a base, unconstructable class to use to reference a collection of builders |
CGenericBuilderInstanceCreationException | Exception thrown then the default method for constructing entities within a GenericBuilder fails, normally because the entity being built has no parameterless constructor |
CGenericBuilderLocator | Locator class which attempts to find suitable builders on demand |
CIGenericBuilder | The most basic interface to implement for GenericBuilder instances |
CNaturalData | Provides modifiable sources of "natural" data |
CNoRandomize | Specifies one or more properties, by name, to ignore when attempting .WithRandomProps on an entity |
CObjectExtensions | Provides the .Randomize extension for objects |
CRandomizerAttribute | Base class to use when wishing to guide randomization on a builder via attributes |
CRandomValueGen | Class which provides a number of static methods to produce random values. Suggestion: make use of "using static" to bring these methods into your class as if they were local members, ie: using static PeanutButter.RandomGenerators.RandomValueGen; |
CDefaultRanges | Exposes the default range values used within RandomValueGen when the ranges are omitted by calling code |
CRequireNonZero | Requires that the named property is randomized to a non-zero value |
CRequireNonZeroId | Requires that the field named "Id" be non-zero |
CRequireUnique | Abstract class to require uniqueness on a property or field by name |
CRequireUnique< T > | Require unique values for named properties (don't forget the type!) |
CRequireUniqueId | Require a unique Id on the generated entity |
CRestrict | Restricts the possible values for a property to the provided list |
CUnableToCreateDynamicBuilderException | Exception thrown when the PeanutButter runtime is unable to automatically generate a required builder for a type. Happens most often if the type is inaccessible to the PeanutButter runtime. If the type to be built is internal, it is recommended to make internals visible to PeanutButter.RandomGenerators; otherwise the builder cannot be generated and the consuming code will need to provide a builder which, if it is public, will be discovered and used instead of attempting to generate a builder |
CUniqueRandomValueGenerator | Base class for UniqueRandomValueGenerator<T> |
CUniqueRandomValueGenerator< T > | Generates unique random values per instance |
NServiceShell | |
CIServiceCommandlineOptions | Commandline options for services which are implemented via ServiceShell |
CISimpleLogger | Describes the contract for a very simple logging service |
CServiceCommandlineOptions | |
CServiceUnconfiguredException | Thrown when a service was not completely configured |
CShell | |
CVersionInfo | Provides basic version information |
CShellTestFailureException | Thrown when a test run for the shell didn't go as planned |
NSimpleHTTPServer | |
NTestability | |
CHttpServerAssertionException | |
CHttpServerExtensions | |
CHttpConstants | Provides some constants which are useful in an http context |
CHeaders | Common HTTP headers |
CMethods | Common HTTP Methods |
CMimeTypes | Common MIME types |
CStatuses | Common HTTP status titles |
CHttpMethodsExtensions | Provides extension methods for HttpMethods enum values |
CHttpProcessor | Processor for HTTP requests on top of the generic TCP processor |
CHttpServer | Provides the simple HTTP server you may use ad-hoc |
CHttpServerBase | Provides the abstract base HTTP Server |
CHttpServerFactory | |
CIHttpServer | Provides a simple way to run an in-memory http server situations like testing or where a small, very simple http server might be useful |
CIHttpServerBase | Describes the base functionality in a simple http-server |
CIHttpServerFactory | Describes a factory for your http server usage: |
CRequestLogItem | Log item for requests |
CStreamExtensions | Provides some extensions for the stream object provided into a HttpServer handler function |
CTcpClientExtensions | Provides the ReadLine extension for a TcpClient |
CTcpIoWrapper | Wraps a TcpClient for easier IO |
CTcpServerProcessor | Abstract TCP processor |
NSimpleTcpServer | |
CIProcessor | Interface to be implemented by a service which processes requests |
CITrackingDisposable | An IDisposable animal with a Disposed property one can interrogate to find out if the item has been disposed |
CPortUnavailableException | Exception thrown when the requested port for the simple server is not available for binding |
CTcpServer | Provides the base TCP server upon which more complex TCP-based servers can be built |
CUnableToFindAvailablePortException | Thrown when no port could be found to bind to |
NTempDb | |
NLocalDb | |
CILocalDbFactory | Interface to implement when your TempDB implementation needs to create a temporary database |
CLocalDbFactory | LocalDb implmentation if ILocalDbFactory |
CLocalDbInstanceEnumerator | Helper class to find all instances of running LocalDb services |
CTempDBLocalDb | |
CUnableToFindLocalDbUtilityException | Thrown when unable to find a LocalDb instance |
NMySql | |
NBase | |
CDefaults | |
CEnvironmentVariables | |
CMySqlConfigGenerator | Generates MySql configuration from TempDbMySqlServerSettings |
CMySqlWindowsServiceFinder | Utility to try to find the path to the MySQL service binary on Windows |
CProcessStartFailureException | |
CSettingAttribute | Decorates a TitleCase setting with the correct name for the setting within an ini file |
CTempDBMySqlBase< T > | MySql flavor of TempDb |
CMySqlVersionInfo | |
CTempDbMySqlServerSettings | Settings for starting up a TempDbMySql instance |
CTempDbOptions | Options which define how to start up mysqld |
CTempDbMySqlServerSettingsBuilder | |
CTryAnotherPortException | |
CUnableToInitializeMySqlException | |
NConnector | |
CMySqlPoolStatsFetcher | Fetches stats from the MySqlConnector pool using reflection |
CTempDBMySql | Provides the TempDB implementation for MySql, using MySql.Data as the connector library |
NData | |
CMySqlPoolStatsFetcher | Fetches MySql connection pool stats via reflection from non-public types and fields as the MySql driver doesn't report any actually useful stats to WMI, making this document not all that useful for MySql (even when adjusting counter names): https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/performance-counters |
CPoolStats | Provides pool stats for MySql.Data Connection Pools via reflection |
CTempDBMySql | Provides the TempDB implementation for MySql, using MySql.Data as the connector library |
NRunner | |
CInteractiveShell | |
COptions | |
CProgram | |
CShowSupportedEngines | |
CTempDbFactory | |
NSqlCe | |
CTempDBSqlCe | |
NSqlite | |
CTempDBSqlite | |
CFatalTempDbInitializationException | |
CITempDB | |
CTempDB< TDatabaseConnection > | |
CTempDbDisposedEventArgs | |
CTempDbHints | |
CTempDbTracker | |
NTempRedis | |
CIRedisDownloader | Attempts to download the Microsoft-built redis server 3.2.100 from https://github.com/microsoftarchive/redis/releases/tag/win-3.2.100 which is adequate for testing on a windows machine |
CITempRedis | Provides a temporary, disposable Redis instance levering off of a locally installed redis-server installation or binary within the path |
CITempRedisFactory | Describes a TempRedis leasing factory |
CMicrosoftRedisDownloader | |
CRedisExecutableFinder | Attempts to find a redis-server executable for TempRedis |
CTempRedis | |
CTempRedisFactory | |
CTempRedisOptions | Options for construction of a TempRedis instance |
NTestUtils | |
NAspNetCore | |
NBuilders | |
CActionContextBuilder | Builds ActionContexts |
CActionExecutedContextBuilder | Builds an ActionExecutedContext |
CActionExecutingContextBuilder | Constructs an ActionExecutingContext |
CAuthorizationFilterContextBuilder | Easier start for building an AuthorizationContext via AuthorizationContextBuilder.ForController<TController>() |
CAuthorizationFilterContextBuilder< TController > | Builds AuthorizationFilterContexts |
CBuilder< TBuilder, TSubject > | Provides the base builder for AspNetCore fakes |
CControllerActionDescriptorBuilder | Builds ControllerActionDescriptor instances |
CControllerBuilder | Starts off a builder for your ApiController (controller inheriting from ControllerBase only) |
CControllerBuilder< TController > | Builds your |
CControllerContextBuilder | Builds a controller context |
CFakeModelBindingContext | Provides a faked implementation of ModelBindingContext |
CFormBuilder | Alias to FormBuilder, to keep naming in line with QueryCollectionBuilder |
CFormFileBuilder | Builds a form file |
CHeaderDictionaryBuilder | Constructs a header dictionary |
CHttpContextBuilder | Builds an HttpContext |
CHttpRequestBuilder | Builds an http request |
CHttpRequestExtensions | Simplify some routines around HttpRequests |
CHttpResponseBuilder | Builds a fake http response |
CModelBindingContextBuilder | Builds a ModelBindingContext for testing |
CModelMetadataBuilder | Builds ModelMetadata |
CModelMetadataBuilder< TModel > | Builds ModelMetadata |
COptionsAccessor | Implementation of IOptions<MvcOptions> to be used for generating ViewDataDictionaries, or whatever else you might like (: |
CQueryBuilder | Alias to QueryCollectionBuilder |
CQueryCollectionBuilder | Builds query collections |
CRandomizableBuilder< TBuilder, TSubject > | A builder which is also capable of making randomized subjects |
CRequestCookieCollectionBuilder | Builds a fake request cookie collection |
CRouteDataBuilder | Builds RouteData |
CStringMapDerivativeBuilder< TBuilder, TInterface, TConcrete > | Provides a base builder for fake collections derived off of StringValueMap |
CViewDataDictionaryBuilder | Build a ViewDataDictionary |
CWebSocketBuilder | Builds a fake web socket |
CWebSocketManagerBuilder | Builds a fake websocket manager |
NFakes | |
CFakeActionExecutedContext | Provides an ActionExecutedContext where the controller can be late-set |
CFakeActionExecutingContext | Provides an ActionExecutingContext implementation where the controller can be late-set |
CFakeCompositeMetadataDetailsProvider | Provides a fake ICompositeMetadataDetailsProvider |
CFakeConnectionInfo | Provides a fake connection |
CFakeCookie | Implements a fake cookie holder |
CFakeFeatureCollection | Implements a fake feature collection |
CFakeFormCollection | Implements a fake form collection |
CFakeFormFile | Implements a fake form file |
CFakeFormFileCollection | Provides a fake form file collection |
CFakeHeaderDictionary | Provides a fake http header dictionary |
CFakeHttpContext | Provides a fake http context |
CFakeHttpRequest | Implements a fake http request |
CFakeHttpRequestFeature | Provides a faked implementation of IHttpRequestFeature |
CFakeHttpResponse | Provides a fake http response |
CFakeHttpResponseFeature | Provides a faked IHttpResponseFeature |
CFakeJsonResultExecutor | |
CFakeModelMetadata | Faked model metadata |
CFakeObjectResultExecutor | Provides a faked implementation for rendering ObjectResult values |
CFakePropertyFilterProvider | Provides a fake property filter which filters nothing |
CFakeQueryCollection | Provides a fake query collection |
CFakeRequestCookieCollection | Provides a fake cookie collection |
CFakeResponseCookies | Provides a fake response cookies service |
CFakeSession | Provides a fake session |
CFakeTempDataDictionaryFactory | |
CFakeTempDataProvider | |
CFakeViewResultExecutor | Actually rendering a view is going to be tricky, and probably unnecessary. For testing purposes, the caller needs to be able to assert the view name and the provided data. This fake renderer will execute to arrive at: |
CFakeWebSocket | Provides a fake websocket |
CFakeWebSocketManager | Provides a fake websocket manager |
CICanBeIndexedBy< in T > | Describes a type which has |
CIFake | Used to identify fakes, primarily by the .As<TFake> extension method |
CIFakeModelMetadata | Interface for dealing with the backing properties of the FakeModelMetadata |
CIMinimalServiceProvider | Provides a minimal implementation of IServiceProvider |
CMinimalServiceProvider | Provides a very minimal service provider |
CServiceProviderImplementationRequiredException | Thrown when unable to cast up to the required fake |
CStringMap | Provides a collection of string maps |
CStringValueMap | Provides a string-to-stringvalue map |
CStringValueMapChangedEventArgs | Raised when a StringValueMap changes |
NUtils | |
CDefaultMvcOptions | Provides a null-implementation for IOptions<MvcOptions> |
CDefaultObjectModelValidator | Provides a no-op implementation of IObjectModelValidator |
CDefaultOptions< T > | |
CDefaultOptionsWithFactory< T > | |
CFeatureIsObsoleteException | Thrown when attempting to use an obsolete feature |
CFormDecoder | Attempts to decode a form from an http request body |
CFormFileExtensions | Provides some convenience extensions for form files |
CIFormDecoder | Decodes a form |
CIFormEncoder | Encodes a form |
CMultiPartBodyEncoder | Encodes a multi-part form |
CNullBodyEncoder | Null-pattern: simply produces a new stream |
CRequestDelegateTestArena | Sets up the useful bits for testing an asp.net middleware class - use this to easily set up the context and next parameters for InvokeAsync |
CRequestDelegateTestArenaBuilder | Builds a RequestDelegateTestArena, which makes testing middleware a lot easier |
CUrlEncodedBodyEncoder | Encodes a form with url-encoding |
CActionResultExtensions | Provides extensions for action results |
CCookieNotFoundException | Thrown when querying cookie information by cookie name, when that cookie is not found on the hosting request or response |
CHttpHeaderExtensions | Provides extensions for the IHeaderDictionary properties on HttpRequest and HttpResponse |
CHttpRequestExtensions | Provides convenience HttpRequestExtensions |
CHttpResponseExtensions | Provides extensions for asp.net HttpResponse objects |
CInvalidImplementationException< TExpected > | Thrown when unable to cast an abstract type to the faked implementation |
CInvalidSameSiteValueException | Thrown when an invalid value for SameSite is found on a cookie header |
NAsync | |
CImmediateTaskRunnerBuilder | |
NGeneric | |
CConstructorTestUtils | Provides static utilities to test constructors |
CDateTimeAssert | Provides assertions against DateTime values |
CDecimalExtensions | Provides extensions for decimal values which make testing easier |
CEnumerableExtensions | Extensions for IEnumerables |
CPropertyAssert | Provides a wrapper around DeepEqualityTester and NUnit for property assertions |
CSubstituteExtensions | Provides extensions for substitutes to facilitate easier interrogation of the call history, eg when you want to pull an argument for an invocation to test against |
CCallWrapper | Wraps an NSubstitute ICall |
CTypeExtensions | Provides extension methods on Type objects |
NTinyEventAggregator | |
CEventAggregator | |
CEventBase | Base class for events |
CEventBase< TPayload > | |
CIEventAggregator | Provides a simple event aggregator |
CSubscription< TPayload > | Represents a subscription for a specific event and payload |
CSubscriptionsChangedEventArgs | Event args when a subscription is changed |
CSubscriptionToken | A token which identifies a subscription |
NUtils | |
NDictionaries | |
CCaseWarpingDictionaryWrapper< TValue > | Provides a read/write-through shim for another dictionary with the desired case sensitivity access |
CDefaultDictionary< TKey, TValue > | Provides a Dictionary class which returns default values for unknown keys (like Python's defaultdict) |
CDictionaryWrappingConnectionStringSettingCollection | Provides a convenient IDictionary wrapper for ConnectionStringCollections |
CDictionaryWrappingConnectionStringSettingCollection< TValue > | Provides a mechanism for wrapping read-write access to a ConnectionStringSettingsCollection in the IDictionary<string, string> interface to simplify shimming other types |
CDictionaryWrappingNameValueCollection | Provides a convenient IDictionary wrapper for NameValueCollections |
CDictionaryWrappingNameValueCollection< TValue > | Wraps a NameValueCollection in an IDictionary interface |
CDictionaryWrappingObject | Wraps an object in a dictionary interface |
CIWrapper | Defines an object which is wrapping another object and can be unwrapped with the provided methods |
CMergeDictionary< TKey, TValue > | Provides a mechanism to merge multiple dictionaries into one Source dictionaries |
CRedirectingDictionary< TValue > | Provides a wrapping read-write layer around another dictionary effectively allowing transparent rename of the keys |
CTransformingDictionary< TKey, TValue > | Provides access to an underlying dictionary with the keys held intact and the values passed through a transform |
CValidatingDictionary< TKey, TValue > | Provides a dictionary implementation which allows for a validation action for keys, values and pairs |
CAssemblyExtensions | Provides extension methods for Assemblies |
CAsync | Provides methods to run async code synchronously and safely http://stackoverflow.com/questions/5095183/how-would-i-run-an-async-taskt-method-synchronously |
CAsyncExtensionsForIEnumerables | Useful extensions for IEnumerable<T> collections, with async in mind |
CAttributeWalkStep | Emitted at every stage of walking attributes per type in the ancestry tree |
CAutoBarrier | Provides an auto-signaller around a barrier: when this is disposed, it will SignalAndWait on the barrier, meaning you don't need to put required barrier unlocks in a finally clause |
CAutoDeleter | Provides a mechanism to autmatically delete one or more files using the IDisposable pattern. Use this when you'd like to clean up some temporary files after an operation completes without having to worry about exception handling, etc. Files which cannot be deleted (eg: locked for reading / writing) will be left behind. No exceptions are thrown. Files which have been removed in the interim do not cause any exceptions |
CAutoDisposer | Provides a mechanism to dispose of other disposables when it is disposed. This allows for flattening out nested using() blocks with an outer AutoDisposer which takes care of disposing registered items (in reverse order) when it is disposed |
CAutoLocker | Class to use the using() {} pattern to take care of locking / unlocking one of: |
CAutoResetter | Provides a mechanism to run code on construction and disposal, irrespective of exception handling Use this, for example, to set up and tear down state required for a test – your constructionAction is called immediately upon construction and the using() pattern guarantees that your disposalAction is called at disposal, even if your test fails |
CAutoResetter< T > | Provides a mechanism to run code on construction and disposal, irrespective of exception handling Use this, for example, to set up and tear down state required for a test – your constructionAction is called immediately upon construction and the using() pattern guarantees that your disposalAction is called at disposal, even if your test fails. This is the variant of AutoResetter where: |
CAutoResettingFile | Facilitates easily reverting a file to a prior state via the IDisposable pattern |
CAutoTempEnvironmentVariable | Provides a scoped, temporary environment variable |
CAutoTempFile | Provides a mechanism to create, read and write a temporary file which is automatically removed at disposal time |
CAutoTempFolder | Provides a mechanism for creating a temporary folder which is automatically deleted upon disposal |
CAutoWorkFolder | Performs work within the provided working folder and then skips out of there. Probably not a good idea to use whilst performing parallel processing as it changes the entire CWD for the current process! |
CBenchmark | Provides a static Time method which times running the provided action the specified number of times |
CBooleanExtensions | Provides extensions for boolean values |
CBuilder< TBuilder, TEntity > | Provides a base class with simple builder functionality |
CByteArrayExtensions | Provides some extensions useful for byte arrays |
CCannotZipNullException | Thrown when an attempt is made to strict-zip null and anything else |
CCircularList< T > | Represents a list which circles back on itself such that enumerating over it produces an unending series. EG: if it was created with the numbers [ 1, 2, 3 ], then enumeration would yield [ 1, 2, 3, 1, 2, 3, 1 ... ] For all operations except enumeration and indexing, the collection will behave as an infinitely repeating series. For obvious reasons, CopyTo will copy the internal, limited collection |
CCommandline | Provides a wrapper around handling a commandline properly |
CConcurrentCollectionExtensions | Provides some common functionality for concurrent collections |
CConsoleSteps | Provides factory methods for basic console steps |
CDateTimeExtensions | Provides some useful extension methods for DateTime values |
CDateTimeParser | |
CDecimalDecorator | Provides a relatively "safe" interchange between decimal and string notations for numbers, inspecting the input string to try to make the best decision based on the contents of the string instead of just relying on the current thread culture (which causes issues when communicating between machines with different ideas of what constitutes "correct" decimal notation a prime example being transport of decimals from Javascript into a ZA .net culture – but there are others) |
CDeepEqualityTester | Provides a mechanism to test deep-equality of two objects with an optional list of properties to ignore by name. Deep equality testing bypasses reference-checking of container objects and compares primitive propertyt values. Use this to test whether or not two objects essentially contain the same data. More conveniently, use the following extension methods: |
CDefaultBackoffStrategy | Default backoff strategy for retries: linear, 100ms per attempt |
CDictionaryExtensions | Provides extensions to convert from non-generic IDictionary to a generic one |
CDisposableWrapper | Provides an eventing wrapper around another disposable item, raising events before and after disposal and on disposal error |
CDisposableWrapperErrorEventArgs | The event args raised when the disposable .Dispose chucks an error |
CDisposableWrapperEventArgs | The event arguments raised with every DisposableWrapper event |
CElementNotFoundException | Thrown when a Find<T>() call finds no elements |
CEnumerableWrapper | Wraps an object which would be an acceptable enumerable in a foreach (due to .NET compile-time duck-typing) into an actual IEnumerator |
CEnumerableWrapper< T > | Provides the typed EnumerableWrapper |
CEnumeratorWrapper< T > | Wraps an object which would be an acceptable enumerator in a foreach (due to .NET compile-time duck-typing) into an actual IEnumerator |
CEnv | Provides easy access to environment variables with fallback |
CExpressionUtil | Utility class to assist with dealing with expressions |
CExtensionsForIEnumerables | Useful extensions for IEnumerable<T> collections |
CDuplicateResult< TKey, TItem > | DTO for conveying results from the more complex FindDuplicates variant which includes a key discriminator |
CFilePathResolver | |
CFind | Finds files |
CFlagExtensions | Provides extensions to help with common enum operations |
CFluencyExtensions | Add fluency anywhere - as if all things were buildable! |
CIAutoTempFolder | Describes the contract for an auto-deleting temporary folder |
CIBackoffStrategy | Describes a service which backs off (ie, waits) according to the retry attempt number |
CIBuilder< TBuilder, TEntity > | Most basic interface to implement to be considered a builder |
CICircularList< T > | Defines the Circular List, which should behave a lot like an IList<T> except that enumerating it (when there are any values) will be an infinite task, running through all the values over and over |
CIDateTimeParser | Versatile DateTime parser |
CIEnumerableWrapper | Used to describe a wrapper |
CIFilePathResolver | Provides a service to resolve path files, including with globbing |
CILazyWithContext< TValue > | Provides a mechanism for lazy evaluation with a provider context |
CInvalidEnvironmentVariableValue | |
CIParallelWorker | Describes a parallel worker for actions |
CIParallelWorker< T > | Describes a parallel worker for functions returning values |
CIPool< T > | Describes a pooling service for the underlying type T |
CIPoolItem< T > | Represents a pooled item of type T |
CIProcessIO | Wraps process IO (stdout, stderr) into an easy-to-access disposable source |
CIPropertyOrField | Represents a property or a field on an object |
CIRateLimiter | Provides a mechanism for rate-limiting calls to blocks of code. Calls made within limits are executed, those which exceed limits are dropped |
CIRollingWindow< T > | Provides a rolling window of data to the given size Disposing the RollingWindow immediately releases all references to items within the inner collection and renders the instance unusable from then on |
CISingleItemCache< T > | SingleItemCache provides a light, fast, caching wrapper around a function to generate a value with a provided TTL |
CISlidingWindow< T > | Provides an easy mechanism for a sliding window of data This collection is not thread-safe - you should add your own thread-safety as appropriate |
CISlidingWindowItem< out T > | Describes a sliding window item |
CITextStatusSteps | Describes the contract for textural feedback around running activities |
CIUnstartedProcessIO | Provides the contract for an unstarted ProcessIO, as would be obtained from ProcessIO.In(workingDir) |
CIWorker | Describes a worker |
CKeyValueCollectionExtensions | Provides extension methods on KeyValuePairCollections |
CLazyWithContext< TContext, TValue > | |
CListExtensions | Provides methods on lists as one might expect from JavaScript |
CMaxAttemptsRetryContext | Provides a wrapping context around retried code |
CMedianExtensions | Provides .Median() extension methods for numeric collections |
CMemberNotFoundException | Exception thrown when a property cannot be found by name |
CMetadataExtensions | Provides extension methods to set and retrieve metadata on any object. Under the hood, these methods use a ConditionalWeakTable to store your metadata, so the metadata is garbage-collected when your managed objects are garbage-collected |
CMIMEType | Kept to maintain legacy code |
CMimeTypes | Provides a mechanism for guessing the MIME type of a file by its extension. Of course, this isn't perfect - magic bytes are probably more reliable - but also more effort. This code is largely copied from https://github.com/samuelneff/MimeTypeMap/blob/master/MimeTypeMap.cs The code in this file is licensed under the |
CMockStoreExtensions | Provides basic extensions for using a mocked store against any object, levering off of PeanutButter's metadata logic |
CMostRecentlyUsedList< T > | Holds a list of most-recently-used items, up to the provided capacity. New items displace the older ones, and re-adding the same item will reposition that item at the top of the list |
CNoPooledItemAvailableException | Thrown when no item could be resolved from the pool with a pure Take |
CNotFoundException | Thrown when the caller expects to eject a message from a non-empty collection but no match was found |
CObjectExtensions | Provides a set of convenience extensions on everything |
CParallelWorker | Encapsulates some work which must be run in parallel |
CParallelWorker< T > | Encapsulates some work which must be run in parallel |
CPlatform | Platform abstractions |
CPool< T > | Provides a generic pooling mechanism using the Disposable pattern |
CPoolItem< T > | |
CPortFinder | Utility class to find open ports for binding to |
CProcessFailedToStartException | Thrown when ProcessIO is unable to start the requested application |
CProcessIO | |
CUnstartedProcessIO | Represents an unstarted process-io instance |
CPropertyOrField | Provides a single storage / representation for a Property or a Field |
CPyLike | Provides a Python-like Range method |
CQueueExtensions | Provides some useful extensions for Queues |
CRandomNumber | Singleton wrapper around Random.Next to reduce the chances of clashing |
CRateLimiter | |
CRetriesExceededException | Thrown when max retries are exceeded |
CRetry | Retries operations up to a specific number of times |
CRetryExtensions | Provides common functionality to retry logic with configurable delay |
CRollingWindow< T > | |
CRun | Provides convenience wrapper functions to run small bits of work in parallel threads, not tasks. No async/await, no Tasks (unless you want to return them and await them yourself). No TPL. No handbrakes. No magic context. No guarantees, except that your work will be executed. May make the host machine very tired |
CRunningAverage | Provides a convenience class to keep a running average of values without storing the values in memory |
CRuntime | Used to determine what runtime we're currently running on |
CSafeWalk | Utility class to provide the ability to enumerate files without throwing exceptions on access errors |
CSingleDebuggerBlock | Provides a mechanism to make debugging an application a little easier: using the disposable pattern, surround a block of code with the scope for this item's disposal and you'll get: |
CSingleItemCache< T > | SingleItemCache provides a light, fast, caching wrapper around a function to generate a value with a provided TTL |
CSkipStringifyAttribute | Signals to the .Stringify() extension that this property or field should be ignored in the output |
CSlidingWindow< T > | |
CSlidingWindowEstimatedTimeRemainingExtensions | Provides convenience functions to predict an estimated time remaining based on a remaining item count |
CSlidingWindowRateExtensions | Provides convenience extensions for sliding windows |
CSteps | Provides a mechanism to surround an action with a pre-action and post-action |
CStreamExtensions | Provides utility extensions on Stream objects |
CStringExtensions | Provides utility extensions for strings |
CStringifier | Provides convenience functions to get reasonable string representations of objects and collections |
CSuppressedTextStatusSteps | Provide a mechanism to swap out noisy steps for fully-suppressed ones, esp from testing |
CTaskExtensions | Extension methods for tasks Suggest: Use Async.RunSync, which does more cleverness |
CTextStatusSteps | Provides an easy mechanism for steps of a process with status feedback, ie "starting X..." / {does X} / {"completed" / "failed"} |
CTimeBasedRetryContext | Provides a wrapping context around retried code |
CTimeSpanExtensions | Adds methods similar to those found on DateTime to TimeSpan |
CTypeEqualityTester | Tests shape equality between two types (YMMV) |
CTypeExtensions | Helper extensions for Types |
CTypeFinder | Find loaded types by name |
CUnevenZipException | Thrown when an attempt is made to zip two collections of uneven size |
CUnevenZipException< T1, T2 > | Thrown when an attempt is made to zip two collections of uneven size. Also includes references to the two collections |
CUriExtensions | Provides extensions for Uri objects and url strings |
CWebObjectExtensions | Provides some more object extensions, for webby usages |
CWorker | Base class for parallel workers |
CWorkResult | Stores the exception (or none) from a single piece of work |
CWorkResult< T > | |
CWorkResultExtensions | Provides convenience extensions for work results |
NWindowsServiceManagement | |
NExceptions | |
CServiceOperationException | Thrown when a requested service operation (eg start, stop) cannot be completed |
CWindowsServiceUtilException | The base class from which exceptions in PeanutButter.WindowsServiceManagement are derived, if you're looking to catch all service-related exceptions |
CIServiceControlInterface | Provides a mechanism for controlling windows services |
CIWindowsServiceUtil | The Windows Service Utility contract |
CNativeWindowsServiceUtil | The legacy, native WindowsServiceUtil which uses the win32api to provide service management |
CServiceControlException | Thrown when a service control request (eg start/stop/pause/continue) cannot be completed |
CServiceControlInterface | |
CWindowsServiceUtil | The cross-environment WindowsServiceUtil, backed by commands to sc.exe |
NXmlUtils | |
CXElementExtensions | Adds some convenience extensions to XElement and XDocument instances |
CSkipOnGenerationAttribute | Properties decorated with this are not considered when generating arguments from an options object |