Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: utilize EventStream.Instance for DI example #387

Merged
merged 1 commit into from
Feb 8, 2018
Merged

fix: utilize EventStream.Instance for DI example #387

merged 1 commit into from
Feb 8, 2018

Conversation

masteryee
Copy link
Contributor

No description provided.

@@ -9,7 +8,6 @@ public static class ServiceCollectionExtensions
public static void AddProtoActor(this IServiceCollection services, Action<ActorPropsRegistry> registerAction = null)
{
services.AddSingleton<IActorFactory, ActorFactory>();
services.TryAdd(ServiceDescriptor.Singleton(typeof(EventStream<>), typeof(EventStream<>)));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DI framework can't resolve EventStream<> as a dependency because there is no public constructor, so removing this line since it has no impact.

@adamhathcock
Copy link
Member

I wish EventStream was injected and not static @rogeralsing :)

@adamhathcock adamhathcock merged commit 0a7f75a into asynkron:dev Feb 8, 2018
@rogeralsing
Copy link
Contributor

Injected into what?

@adamhathcock
Copy link
Member

Well, I just mean that EventStream objects could be created and used. The global one isn't required.

I'm probably just misusing/misunderstanding the purpose of EventStream which is why I wrote my DI example that way.

@tomliversidge
Copy link
Contributor

Relates to this too #141

rogeralsing pushed a commit that referenced this pull request Sep 22, 2018
* Update build.cake

* implement stopping when max number of restarts exceeds allowed number in a period of time

* Removed _applySnapshot callback after persisting a snapshot.

* address issue (TryDequeue return True but get null result)

alexandrnikitin/MPMCQueue.NET#2

* No need to count messages

* Fix 2 csproj files causing Visual Studio for Mac not load bug.

* fix: utilize EventStream.Instance for DI example (#387)

* added ActorPropsRegistry.RegisterProps(Type, Func<Props, Props> (#378)

* Implement Forward.

* Fix csprojs.

* Reverse back RavenDB.

* Add ContextState.Stopped.

* Allow InvokeSystemMessageAsync in any state.

* Temp fix appveyor.yml cake version.

* .

* Send EndpointWatcher/EndpointWriter Stop message in Actor.

* Report error if receive user message after Actor already stooped.

* Fix test codes.

* Add StopAsync/Poison/PoisonAsync

* .

* Update dependencies

* Fix test codes.

* Update dependency for example/RemoteActivate.

* renamed RootContext => ActorClient. To be constitent with the class name.

* ActorClient.RequestAsync and example

* Moved Tell & Request from IContext to ISenderContext

* Mutable MessageEnvelope

* ISenderContext Message mutable

* static readonly mutable EmptyHeaders was really dangerous. Made it a new instance for each call.

* middlewares messages manipulation example

* Big Breaking Change

* tell -> send
* move send to extension
* revert mutating messages
* copyrights
* bugfix in actorcontext
* RootContext
* removed pid request
* cleanup router tests
* clean up tests
* cleanup
* more clean up
* even more
* immutable message headers
* better receive middleware
* looping spawn benchmark
* use props in actorcontext
* remove 1.5
* globaljson

* bugfix in rootcontext

* move Actor.Spawn to Context.Spawn

* Move props creating funcs from Actor to Props

* Code cleanup

* WIP : Single remote instance cluster- do not merge (#408)

* SingleRemoteInstanceProvider draft

* Should work but don't :-|

* working SingleRemoteInstanceProvider

* trimed csproj

* Docs

* formatting

* context proxy

* decorator context

* decorators works

* root context decorator

* fix IContext

* RootContext.With*

* WIP : OpenTracing support - do not merge (#406)

* OpenTracing first blood

* WithOpenTracingSenderTest

* oups

* OpenTracingReceiverMiddlewareTests

* jaeger working now ! (should I have read the manual sooner !)

* log messages

* ProtoTags targetPID & senderPID

* OpenTracing complex interactions example

* trying to play with decorator

* OpenTracing improvements with decorators

* fix non compiling tests

* remove globaljson

* Opentracing improvements (#412)

* OpenTracing first blood

* WithOpenTracingSenderTest

* oups

* OpenTracingReceiverMiddlewareTests

* jaeger working now ! (should I have read the manual sooner !)

* log messages

* ProtoTags targetPID & senderPID

* OpenTracing complex interactions example

* trying to play with decorator

* OpenTracing improvements with decorators

* OpenTracing improvements

* moved Proto.OpenTracing.Tests to "test" solution folder

* tried to have OpenTracing receive in ContextDecorator but failed

* OpenTracing back on tracks with middlewares

* unit tests unbroked and improved

* ensure decorator.Receive is called

* fix context decorator for actors without receive middleware

* finally receive decorator is working fine, but only triggered when at least one receive middleware (#414)

* Chainable context decorators (#417)

* Life cycle events : write deadletters, just in case

* OpenTracing commented code out

* Chainable context decorators

* Fixed issue with namespaces with deeper nesting (#419)

* Bump to 0.2.0

* Copy GuardianStrategy when copy Props.

* targeting netstandard2.0 and net452
rogeralsing added a commit that referenced this pull request Mar 6, 2020
* Release 0.2.0 (#421)

* Update build.cake

* implement stopping when max number of restarts exceeds allowed number in a period of time

* Removed _applySnapshot callback after persisting a snapshot.

* address issue (TryDequeue return True but get null result)

alexandrnikitin/MPMCQueue.NET#2

* No need to count messages

* Fix 2 csproj files causing Visual Studio for Mac not load bug.

* fix: utilize EventStream.Instance for DI example (#387)

* added ActorPropsRegistry.RegisterProps(Type, Func<Props, Props> (#378)

* Implement Forward.

* Fix csprojs.

* Reverse back RavenDB.

* Add ContextState.Stopped.

* Allow InvokeSystemMessageAsync in any state.

* Temp fix appveyor.yml cake version.

* .

* Send EndpointWatcher/EndpointWriter Stop message in Actor.

* Report error if receive user message after Actor already stooped.

* Fix test codes.

* Add StopAsync/Poison/PoisonAsync

* .

* Update dependencies

* Fix test codes.

* Update dependency for example/RemoteActivate.

* renamed RootContext => ActorClient. To be constitent with the class name.

* ActorClient.RequestAsync and example

* Moved Tell & Request from IContext to ISenderContext

* Mutable MessageEnvelope

* ISenderContext Message mutable

* static readonly mutable EmptyHeaders was really dangerous. Made it a new instance for each call.

* middlewares messages manipulation example

* Big Breaking Change

* tell -> send
* move send to extension
* revert mutating messages
* copyrights
* bugfix in actorcontext
* RootContext
* removed pid request
* cleanup router tests
* clean up tests
* cleanup
* more clean up
* even more
* immutable message headers
* better receive middleware
* looping spawn benchmark
* use props in actorcontext
* remove 1.5
* globaljson

* bugfix in rootcontext

* move Actor.Spawn to Context.Spawn

* Move props creating funcs from Actor to Props

* Code cleanup

* WIP : Single remote instance cluster- do not merge (#408)

* SingleRemoteInstanceProvider draft

* Should work but don't :-|

* working SingleRemoteInstanceProvider

* trimed csproj

* Docs

* formatting

* context proxy

* decorator context

* decorators works

* root context decorator

* fix IContext

* RootContext.With*

* WIP : OpenTracing support - do not merge (#406)

* OpenTracing first blood

* WithOpenTracingSenderTest

* oups

* OpenTracingReceiverMiddlewareTests

* jaeger working now ! (should I have read the manual sooner !)

* log messages

* ProtoTags targetPID & senderPID

* OpenTracing complex interactions example

* trying to play with decorator

* OpenTracing improvements with decorators

* fix non compiling tests

* remove globaljson

* Opentracing improvements (#412)

* OpenTracing first blood

* WithOpenTracingSenderTest

* oups

* OpenTracingReceiverMiddlewareTests

* jaeger working now ! (should I have read the manual sooner !)

* log messages

* ProtoTags targetPID & senderPID

* OpenTracing complex interactions example

* trying to play with decorator

* OpenTracing improvements with decorators

* OpenTracing improvements

* moved Proto.OpenTracing.Tests to "test" solution folder

* tried to have OpenTracing receive in ContextDecorator but failed

* OpenTracing back on tracks with middlewares

* unit tests unbroked and improved

* ensure decorator.Receive is called

* fix context decorator for actors without receive middleware

* finally receive decorator is working fine, but only triggered when at least one receive middleware (#414)

* Chainable context decorators (#417)

* Life cycle events : write deadletters, just in case

* OpenTracing commented code out

* Chainable context decorators

* Fixed issue with namespaces with deeper nesting (#419)

* Bump to 0.2.0

* Copy GuardianStrategy when copy Props.

* targeting netstandard2.0 and net452

* Upgrading code, packages, a bit of cleanup

* Merge, cleaning up mongo and logs

* Update Appveyor image

* Fixing the remote manager

* Fix target framework

* Fixes #403 (I hope)

Co-authored-by: Roger Johansson <rogeralsing@gmail.com>
Co-authored-by: Christian Palmstierna <christian.palmstierna@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants