Using the IChannelActionPolicy to build a ChannelReconnectOnTimeoutPolicy - castle-windsor

I'm trying to recreate the sample provided on the castle windsor wiki about channel action policies (found here: http://docs.castleproject.org/Windsor.WCF-Facility-Channel-Action-Policy.ashx ) but i can't seem to find IChannelActionPolicy interface in the Castle.Facilities.WcfIntegration namespace anywhere.
I've installed the wcf facility via Nuget.
What am i doing wrong here?

The documentation is outdated in this regard. Have a look at IWcfPolicy interface and its implementors

Related

Library class doesn't know of ConfigureWebHostDefaults extension method

I'm building a suite of REST micro-services using .Net Core 3.0 Preview 6. All these services will have the same start up logic. So, I'm trying to place all the code in a .Net Standard library.
The goal is to have the IHostBuilder:CreateHostBuilder method, as well as the Startup:Configure and Startup:ConfigureServices class and methods in the library. The library will also contain error handling logic, customized http response messages, etc.
However, I can't seem to find the correct package that contains the ConfigureWebHostDefaults method. I tried adding the Microsoft.AspNetCore package 2.2.0, but that didn't resolve the issue.
I added the Microsoft.Extensions.Hosting (3.0.0-preview-6) package, that also doesn't resolve the issue.
Is what I'm attempting even possible?
Thanks
-marc
I resolved it, not the best way, but it works. I decided to make the library targeted specifically for .NET Core 3.0. So, I changed the targetframework in the project file. That change automatically resolved my other issue.
Import the Microsoft.AspNetCore package, and use WebHost.CreateDefaultBuilder() instead. According to the code it is built from, both CreateDefaultBuilder() and ConfigureWebHostDefaults() call the same internal method: ConfigureWebDefaults().
The only downside of this is that the returned host will be an IWebHost instead of an IHost.

'Application' doesn't exist in System.Windows namespace (in library project)

I'm working on .net standard 2.0 library project for my solution.
It have to include this method:
public Task ShutdownAsync()
{
Application.Current.Shutdown();
}
Problem is it gives me an error:
The name 'Application' does not exist in the current context
It also doesn't exist in System.Windows.
As answers to similar questions suggests I tried to add reference to PresentationFramework. But it isn't on the list.
Looks like it have something to do with the fact I'm doing it in a library project targeted at .net standard 2.0.
Is here any way to add proper reference to this project?
.Net standard 2.0 was the problem.
This class is platform-specific so I should target .Net Platform instead.

What Angular Providers do and how to use it?

I'm new with Angular. I follow a tutorial from this link, and i tried to do/add something that doesn't part of that tutorial. I added a providers :[EmployeeService] line to employee-list.component.ts and empployee.component.ts inside #component, and it returns error that said TypeError: Cannot read property 'push' of undefined. So realize that adding providers :[EmployeeService] to some components are unnecessary. I read about Dependency Injection from this link but i do not really get what i wanted to know. So can anyone give me a simple explanation how/when/where to use/put providers and how that error happens?
Thank you very much in advance.
providers array tells Angular what services it should instantiate. You can define it on two places:
component
module
When you use providers in component the service will be available to that and all it's children.
When you use it in module the service will be available for all pipes, directives, components and services in given module.
But you can define it in both if you want - in that case Angular will create two instances of the same service.
For beginning provide your services on the module level.

IMvxServiceProducer and IMvxServiceConsumer missing from latest NuGet

I'm using the latest NuGet packages for MvvmCross CrossCore, Hot Tuna, Location and Picture Plug ins, but I can't seem to find in the object browser the IMvxServiceProducer and IMvxServiceConsumer classes that are used in many examples. Doing a search for RegisterServiceInstance, I found Cirrious.CrossCore.IoC.MvxIoCExtensions. Did the two interfaces go away in place of something simpler?
Those interfaces were used in many v1 and vNext samples, but in v3 they have all been replaced with Mvx.Resolve<T> service location, or with cleaner constructor injection.
All the examples in https://github.com/slodge/MvvmCross-Tutorials/ and in the N+1 videos have been updated to use the newer APIs.
For a full explanation of v3's service location and IoC see: Instantiation of ViewModels and Service classes

MVC4, SimpleMembershipProvider, MySql and FluentNhibernate

I am trying to use SimpleMembership with MySql and I cant get it to work.
I downloaded the latest devart connector for MySql and followed the instructions on
http://www.devart.com/dotconnect/mysql/articles/extendedmembership-tutorial.html
The problem is that the WebSecurity class provided by devart, only has the InitializeDatabaseConnection method but it misses the rest of the methods WebMatrix.WebData has. (i.e UserExists(), CreateAccount(), etc )
Does anyone knows any implementation of WebSecurity alternative to WebMatrix.WebData?
We have implemented the InitializeDatabaseConnection method in the Devart.Common.Web.WebSecurity class because there was no way to override the corresponding method of the WebMatrix.WebData.WebSecurity class.
Other methods of the WebMatrix.WebData.WebSecurity class are supported in our implementation and can be used with Devart's SimpleMembership provider.