コード例 #1
0
        public ViewController(IntPtr handle) : base(handle)
        {
            //Mvb Init
            MvbPlatform.Init();

            //Container
            AppDelegate.Ioc = new Container();

            //Services
            AppDelegate.Ioc.Register <IContactServices, CocoaContactServices>();
            AppDelegate.Ioc.Register <IAvatarServices, CommonAvatarServices>();

            //ModelBinders
            AppDelegate.Ioc.Register <ContactsSummaryModelBinders>(Reuse.Singleton);
            AppDelegate.Ioc.Register <ContactsModelBinders>(Reuse.Singleton);
        }
コード例 #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            MvbPlatform.Init();

            //Init IOC
            Ioc = new Container();

            //Services
            Ioc.Register <IContactServices, WinContactsServices>();
            Ioc.Register <IAvatarServices, CommonAvatarServices>();

            //ModelBinders
            Ioc.Register <ContactsSummaryModelBinders>(Reuse.Singleton);
            Ioc.Register <ContactsModelBinders>(Reuse.Singleton);
        }
コード例 #3
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
            this.Suspending += this.OnSuspending;

            MvbPlatform.Init();

            //Init IOC
            Ioc = new Container();

            //Services
            Ioc.Register <IContactServices, UwpContactsServices>();
            Ioc.Register <IAvatarServices, CommonAvatarServices>();

            //ModelBinders
            Ioc.Register <ContactsSummaryModelBinders>(Reuse.Singleton);
            Ioc.Register <ContactsModelBinders>(Reuse.Singleton);
        }
コード例 #4
0
        public override void OnCreate()
        {
            base.OnCreate();
            this.RegisterActivityLifecycleCallbacks(this);

            MvbPlatform.Init();

            //Init IOC
            Ioc = new Container();

            //Services
            Ioc.Register <IContactServices, DroidContactsServices>();
            Ioc.Register <IAvatarServices, CommonAvatarServices>();

            //ModelBinders
            Ioc.Register <ContactsSummaryModelBinders>(Reuse.Singleton);
            Ioc.Register <ContactsModelBinders>(Reuse.Singleton);
        }
コード例 #5
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            MvbPlatform.Init();

            //Init IOC
            Ioc = new Container();

            //Services
            Ioc.Register <IContactServices, IosContactsServices>();
            Ioc.Register <IAvatarServices, CommonAvatarServices>();

            //ModelBinders
            Ioc.Register <ContactsSummaryModelBinders>(Reuse.Singleton);
            Ioc.Register <ContactsModelBinders>(Reuse.Singleton);

            return(true);
        }