Exemple #1
0
        public override void Do()
        {
            var module = new ExternalModule(_externalReference, string.Empty);

            _externalModules.Add(module);
            _externalModules.AllModules.Save();
        }
        private void ValidateExternalModules()
        {
            foreach (ExternalModule externalModule in _externalModules.Items)
            {
                if (!_repository.IsItUsed(externalModule))
                {
                    ValidationError error = new ValidationError(
                        externalModule,
                        "The external module is not used",
                        externalModule.ToString(), ErrorLevel.Info);

                    ExternalModule module = externalModule;
                    DelegatedFix   fix    = new DelegatedFix
                    {
                        ShouldBeConfirmed = true,
                        Title             = "Delete external module",
                        DelegatedAction   = () =>
                        {
                            _externalModules.Remove(module);
                            _externalModules.AllModules.Save();
                        }
                    };
                    error.AddFix(fix);
                    ValidationErrors.Add(error);
                }
            }
        }
Exemple #3
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);

            ExternalModule.Register <IConfigurationService, ConfigurationService>();
            LoadApplication(new App());
        }
Exemple #4
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            // Code for starting up the Xamarin Test Cloud Agent
#if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
#endif
            ExternalModule.Register <IConfigurationService, ConfigurationService>();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Exemple #5
0
 public void RegisterExternalModule(ExternalModule externalModule)
 {
     _externalModules.Add(externalModule);
 }