Posts

Showing posts from April, 2015

Xamarin Studio Key bindings for the Xcode user

I was tired of switching machines using Xamarin Studio and having to reset all my keybindings. Because I'm so used to Xcode keybindings, I did my best to make the same similar key bindings for XS, so here you can grab them, make them your own:

https://github.com/markawil/XamarinStudio-KeyBindings/

Simple C# Dependency Resolver, or the beginning of your own IoC container

It's kind of pointless to write your own IoC container in C# seeing that there'sIt's kind of pointless to write your own IoC container in C# seeing that there's probably a 100 out there at this point. With that said, there are occasions like the project I'm in now where you plan on some point pulling in a popular controller, but you need something basic to register and resolve instances of interfaces throughout the existing code base in the mean time.The idea is this:You have viewModels or controllers that need services, clients, other controllers, whatever.You could just not care about clean code and do this:public class MainViewModel() { private readonly IService _service; private readonly IDataSource _source; public MainViewModel() { _service = new Service(); _source = new Source(service); } void go() { _service.CallAPI(); } } No big deal. But you start doing this in multiple controllers, viewModels, and then…