Git Product home page Git Product logo

handyman's People

Contributors

alilaa avatar azure-pipelines[bot] avatar jonassamuelsson avatar jonassamuelssoncab avatar

Stargazers

 avatar

Watchers

 avatar  avatar

handyman's Issues

add ObjectEx.Coalesce

2.Coalesce(i => i > 1, 8) => 2
2.Coalesce(i => i < 1, 8) => 8
2.Coalesce(i => i > 1, () => 8) => 2
2.Coalesce(i => i < 1, () => 8) => 8
2.Coalesce(i => i > 1, i => i + 1) => 2
2.Coalesce(i => i < 1, i => i + 1) => 3

IEnumerable<T> To...

ToQueue
ToReadOnlyCollection
ToStack
ToConcurrentBag
ToConcurrentDictionary
ToConcurrentQueue
ToConcurrentStack

add multi targeting

support net 4.5.2 & netstandard 1.x

  • dynamics
  • extensions
  • mediator
  • tests
  • uribuilder

IEnumerable<T> default content

IfNull
IfEmpty
IfNullOrEmpty

source enumerable should only be enumerated once
should have 3 overloads

  • params T[]
  • IEnumerable
  • Func<IEnumerable>

add filter/handler toggles

should probably be implemented using attributes
would be nice if there is a consistent way of doing it for both event/request filters/handlers
control by fixed percentage defined on attribute or delegated to some kind of toggle implementation
should provide a way to declare filter/handler to use if toggle is disabled

ComparableEx.IsInRange

  • throw if any arg is null
  • specify how to handle bounds; inclusive, lowerInclusive, upperInclusive, exclusive

add mediator ExperimentAttribute

This would allow for multiple handlers to handle the same request.
One of the handlers is considered/marked as the primary handler.
It is always the response from the primary handler that is returned.

The experiment evaluation should be done using some kind of plugin model

interface IExperimentEvaluator<TRequest, TResponse>
{
   Task Evaluate(Experiment);
}

add UriBuilder

Create new project Handyman.Http.UriBuilder with UriBuilder class.

rearchitect pipeline handlers (filters)

This is a list of the actual work to be done, the reasons for why and how can be found below.

  • rename pipeline handlers to filters
  • use filter contexts
  • use dedicated filter delegates
  • allow ordering of filters
  • enabled per event/request type filer/handler providers via attributes

rename pipeline handlers to filters

Today there are both handlers and pipeline handlers. Filters are a well know concept and provides a clear distinction from handlers.
As part of this the filter method should be renamed from handle to execute.

use filter contexts

The signature of filters takes the event/request, cancellation token and next delegate. Providing more data to filters would be a breaking change as it requires another parameter. A context object would be more future proof as adding new members to the context is backwards compatible.
One downside is that it requires one more allocation but that could be optimized in the case where no filters are to be executed.

use dedicated filter delegates

Using funcs result in a more hard to read api, dedicated filter delegates solves that.

allow ordering of filters

Add IOrderedFilter which can be applied to both event & request filtersthat exposes an int Order property.
Filters should be ordered in ascending order, filters not implementing IOrderedFilter gets a value of 0.

enabled per event/request type filer/handler providers via attributes

Add attribute based providers to enable a more plugin like model.
The request handler provider attribute could look something like

public abstract class RequestHandlerProviderAttribute : Attribute, IRequestHandlerProvider
{
   public abstract IRequestHandler<TRequest, TResponse> GetHandler<TRequest, TResponse>(ServiceProvider serviceProvider) where TRequest : IRequest<TResponse>;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.