Crispy Waffle Project

A comprehensive toolkit designed to enhance .NET projects with a variety of functionalities.

Crispy Waffle Logo

This project is proudly maintained by @guibranco GitHub followers.

Source code available at: GitHub GitHub stars.

Currently opened issues: GitHub issues.

Project Status

Build Status Last Commit Tests Coverage Code Smells Lines of Code
Build status GitHub last commit AppVeyor tests (branch) Coverage Code Smells Lines of Code

Features

Crispy Waffle provides a rich set of features to enhance your .NET applications:

Caching

Efficiently cache data to improve performance.

Example Usage:

var cache = new CacheProvider();
cache.Set("key", "value", TimeSpan.FromMinutes(10));
var value = cache.Get<string>("key");

Communication

FTP Client

Manage file transfers using the FTP protocol.

Example Usage:

var ftpClient = new FtpClient("ftp://example.com", "username", "password");
ftpClient.Upload("localFile.txt", "remoteFile.txt");

SMTP Mailer Client

Send emails easily via SMTP.

Example Usage:

var mailer = new SmtpMailer("smtp.example.com", "username", "password");
mailer.Send("to@example.com", "Subject", "Email body");

Conversion Extensions

Simplify data type conversions.

Example Usage:

int number = "123".ToInt();

Events Dispatching

Trigger and manage application events.

Example Usage:

var eventDispatcher = new EventDispatcher();
eventDispatcher.Subscribe<MyEvent>(e => Console.WriteLine(e.Message));
eventDispatcher.Dispatch(new MyEvent("Hello, World!"));

Logging

Capture logs for debugging and monitoring.

Example Usage:

var logger = new Logger();
logger.Log("This is a log message.");

Messaging

Implement messaging patterns for inter-component communication.

Example Usage:

var messageBus = new MessageBus();
messageBus.Publish(new MyMessage("Hello!"));

Scheduled Task Execution

Automate execution of tasks at intervals.

Example Usage:

var scheduler = new TaskScheduler();
scheduler.Schedule(() => Console.WriteLine("Task executed!"), TimeSpan.FromMinutes(1));

Serialization Helpers

Serialize and deserialize data in JSON and XML formats.

Example Usage:

var jsonData = JsonSerializer.Serialize(new { Name = "Crispy Waffle" });
var obj = JsonSerializer.Deserialize<MyClass>(jsonData);

Service Locator

Acts as a Dependency Injection and IoC container.

Example Usage:

var serviceLocator = new ServiceLocator();
serviceLocator.Register<IService, ServiceImpl>();
var service = serviceLocator.Get<IService>();

String Extensions

Enhance string manipulation capabilities.

Example Usage:

string example = "Crispy Waffle";
bool containsWaffle = example.Contains("Waffle");

Examples

Most methods are thoroughly tested, and usage examples can be found in the test project source code. This resource provides practical demonstrations of each feature in action.

Class Diagram

The following class diagram illustrates the architecture and relationships within the Crispy Waffle project: