November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Jacob,
There are packages for the API with the ".Site" suffix (e.g. EPiServer.Social.Comments.Site), which amount to little more than an initialization module that will take care of the dependency registration for you.
Alternatively, if you're in a non-Epi app (or if you're a tinkerer), you can use the factory methods available to construct the services:
() => new DefaultCommentServiceFactory().Create()
Using either of these approaches, you won't need to prepare the service's dependencies manually.
Some additional explanation can be found here.
Hi Chris,
Thanks for getting back to me!
I already have the EPiServer.Social.Comments.Site package installed but still seem to have to prepare the dependencies manually!
For instance, if i don't manually register ICommentService I get:
"...No default Instance is registered and cannot be automatically determined for type 'EPiServer.Social.Comments.Core.ICommentService'..."
Interesting -- we'll investigate what's up with that package. Thanks for letting us know.
The second approach should allow you to manually register the service, without needing to handle the entire dependency chain yourself, as a workaround in the meantime.
Looking at this post:
https://world.episerver.com/blogs/Johan-Bjornfot/Dates1/2017/11/episerver-servicelocation-structuremap-2/
I mentions its been tested against CMS, Find, Commerce etc.
Has any work been done on the Community Api? I seem to be running into issues and am having to register dependencies myself, for example:
I'm currently stuck on EPiServer.Social.Common.Rest.IHttpClientFactory and what it implements as I can't used HttpClientFactory as its a static type.