Skip to content

The same is repeated until the data reaches the final destination resulting.

License

Notifications You must be signed in to change notification settings

mstfzdmr/completion-bond

Repository files navigation

completion-bond

The same is repeated until the data reaches the final destination resulting.

Install-Package completion.bond.core

Example usage:

public class Product
{
    public Guid Id { get; set; }
    public string ProductName { get; set; }
    public int Quantity { get; set; }
    public bool IsSale { get; set; }
}

public interface IProductService
{
    bool InsertProduct(Product product);
}

public class ProductService : IProductService
{
    public bool InsertProduct(Product product)
    {
        //sequence of operations 
        return true;
    }
}

private void ExecutableMethod(Product product)
{
    _productService.InsertProduct(product);
}

var result = _productService.InsertProduct(product);
if (!result)
{
    //enqueue - keep trying 
    new Action<Product>(ExecutableMethod).Invoke(product);
    var productQueue = new Generator<Product>(ExecutableMethod);
    productQueue.Create(product);
}

About

The same is repeated until the data reaches the final destination resulting.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages