Binding to ExpandoObject. PropertyChanged not working

They didn’t add a default mechanism for binding to dynamic objects and instead added a new interface ICustomTypeProvider. And that interface wasn’t added to an ExpandoObject either, but with expando you should be able to use the indexer binding since it is an IDictionary<string, object> that implements INotifyPropertyChanged. <TextBlock Text=”{Binding [Foo]}”/>

Can VB.NET be forced to initialize instance variables BEFORE invoking the base type constructor?

If you have virtual members that are going to be invoked during construction (against best advice, but we’ve already agreed on that), then you need to move your initialization into a separate method, that can protect itself against multiple calls (i.e. if init has already happened, return immediately). That method will then be invoked by … Read more

How can I cancel Task.WhenAll?

Use TaskCompletionSource<T> to create a task for some asynchronous condition that does not already have an asynchronous API. Use CancellationToken.Register to hook the modern CancellationToken-based cancellation system into another cancellation system. Your solution just needs to combine these two. I have a CancellationToken.AsTask() extension method in my AsyncEx library, but you can write your own … Read more

what is major difference between dotnet publish and dotnet pack

dotnet pack – Produces a NuGet package of your code. That is the key difference – this will enable to publish to http://nuget.org, or to a nuget server that can be pulled down by other developers, or even for use with Octopus Deploy. dotnet publish – Produces a .NET framework-dependent or self-contained application. Keyword is … Read more

BlockingCollection(T) performance

There are a couple of potential possibilities, here. First, BlockingCollection<T> in the Reactive Extensions is a backport, and not exactly the same as the .NET 4 final version. I wouldn’t be surprised if the performance of this backport differs from .NET 4 RTM (though I haven’t profiled this collection, specifically). Much of the TPL performs … Read more

.NET Deserializing JSON to multiple types [duplicate]

I think it’s likely you’ll need to deserialize the Json then construct the objects from there. Deserializing directly to Cat or Dog won’t be possible as the deserializer won’t know how to construct these objects specifically. Edit: borrowing heavily from Deserializing heterogenous JSON array into covariant List<> using JSON.NET Something like this would work: interface … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)