Skip to content

a very tiny ioc for the xamarin apps and .net standard apps

License

Notifications You must be signed in to change notification settings

charleypeng/XamIoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

XamIoc

a very tiny ioc for the xamarin apps and .net standard apps

Usage

public interface IMessenger
{
  void Send();
}
public class Messenger:IMessenger
{
  public Messenger(string msg)
  {
    ...
  }
  public void Send()
  {
    ...
  }
}

public class App
{
  public App()
  {
    //wire the interface and implementation
    XamIoc.Core.Bind<IMessenger, Messenger>();
    //resolve the interface and passing a parameter
    var msg = XamIoc.Core.Resolve<IMessenger>("Love you");
    msg.Send();
  }
}

About

a very tiny ioc for the xamarin apps and .net standard apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages