jonassamuelsson / handyman Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
AddOrUpdate(key, item)
AddOrUpdate(key, () => item)
throw if any arg is null
handle reversed lower & upper
as part of this make mediator.publish
return a single task that completes when all handlers has completed
Should have support for
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
ToQueue
ToReadOnlyCollection
ToStack
ToConcurrentBag
ToConcurrentDictionary
ToConcurrentQueue
ToConcurrentStack
support net 4.5.2 & netstandard 1.x
This would allow for multiple handlers to handle the same request and return when any of them succeeds.
IfNull
IfEmpty
IfNullOrEmpty
source enumerable should only be enumerated once
should have 3 overloads
replace the providers with pipeline builders
all cutomization should be done using attributes
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
allows multiple request handlers to handle the same request
return result once any handler completes
use EventHandler & RequestHandler
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);
}
Applies to
Create new project Handyman.Http.UriBuilder with UriBuilder class.
like ComparableExtensions but with ability to provide CultureInfo & CompareOptions
This is a list of the actual work to be done, the reasons for why and how can be found below.
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.
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.
Using funcs result in a more hard to read api, dedicated filter delegates solves that.
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
.
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>;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.