protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var assemblies = new Assembly[] { Assembly.Load("CooperDemo.Model"), Assembly.Load("CooperDemo.Repositories"), Assembly.Load("CooperDemo") }; Configuration.Config() .SetResolver(new TinyIoCDependencyResolver()) .RegisterDefaultComponents(assemblies); _logger = DependencyResolver.Resolve <ILoggerFactory>().Create(typeof(MainActivity)); _taskFolderService = DependencyResolver.Resolve <ITaskFolderService>(); SetContentView(Resource.Layout.Main); _listView = FindViewById <ListView>(Resource.Id.list); _listView.SetOnCreateContextMenuListener(this); Button button1 = FindViewById <Button>(Resource.Id.GetAllTaskFoldersButton); button1.Click += (sender, e) => { SendGetAllTaskFoldersRequest(); }; SendLoginRequest(); _logger.InfoFormat("Application '{0}' Started.", "Cooper"); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var assemblies = new Assembly[] { Assembly.Load("CooperDemo.Model"), Assembly.Load("CooperDemo.Repositories"), Assembly.Load("CooperDemo") }; Configuration.Config() .SetResolver(new TinyIoCDependencyResolver()) .RegisterDefaultComponents(assemblies); _logger = DependencyResolver.Resolve<ILoggerFactory>().Create(typeof(MainActivity)); _taskFolderService = DependencyResolver.Resolve<ITaskFolderService>(); SetContentView(Resource.Layout.Main); _listView = FindViewById<ListView>(Resource.Id.list); _listView.SetOnCreateContextMenuListener(this); Button button1 = FindViewById<Button>(Resource.Id.GetAllTaskFoldersButton); button1.Click += (sender, e) => { SendGetAllTaskFoldersRequest(); }; SendLoginRequest(); _logger.InfoFormat("Application '{0}' Started.", "Cooper"); }
public TaskFolderController( ITaskFolderService taskFolderService, ITaskVaultService taskVaultService ) { _taskFolderService = taskFolderService; _taskVaultService = taskVaultService; }
public TaskController(ILoggerFactory factory , IAccountService accountService , ITaskService taskService , ITaskFolderService taskFolderService , IFetchTaskHelper fetchTaskHelper) : base(factory) { this._log = factory.Create(this.GetType()); this._accountService = accountService; this._taskService = taskService; this._taskFolderService = taskFolderService; this._fetchTaskHelper = fetchTaskHelper; }
public PersonalController(ILoggerFactory factory , ITaskService taskService , IPersonalTaskService personalTaskService , ITaskFolderService taskFolderService , IFetchTaskHelper fetchTaskHelper , IAccountService accountService , IAccountConnectionService accountConnectionService) : base(factory , accountService , taskService , taskFolderService , fetchTaskHelper) { this._personalTaskService = personalTaskService; this._accountConnectionService = accountConnectionService; }
public TeamController(ILoggerFactory factory , IAccountService accountService , IAccountConnectionService accountConnectionService , ITaskService taskService , ITaskFolderService taskFolderService , IFetchTaskHelper fetchTaskHelper , Teams.ITeamService teamService , Teams.ITaskService teamTaskService) : base(factory , accountService , taskService , taskFolderService , fetchTaskHelper) { this._accountConnectionService = accountConnectionService; this._teamService = teamService; this._teamTaskService = teamTaskService; }
public void TestFixtureSetUp() { try { CodeSharp.Core.Configuration.ConfigWithEmbeddedXml(null , "application_config" , Assembly.GetExecutingAssembly() , "Cooper.Model.Test.ConfigFiles") .RenderProperties() .Castle(o => this.Resolve(o.Container)); //初始化同步锁 DependencyResolver.Resolve <ILockHelper>().Init <Account>(); DependencyResolver.Resolve <ILockHelper>().Init <GoogleConnection>(); DependencyResolver.Resolve <ILockHelper>().Init <GitHubConnection>(); DependencyResolver.Resolve <ILockHelper>().Init <Member>(); } catch (Exception e) { if (!e.Message.Contains("不可重复初始化配置")) { Console.WriteLine(e.Message); throw e; } } this._log = DependencyResolver.Resolve <ILoggerFactory>().Create(this.GetType()); this._sessionManager = DependencyResolver.Resolve <Castle.Facilities.NHibernateIntegration.ISessionManager>(); this._accountHelper = DependencyResolver.Resolve <IAccountHelper>(); this._accountService = DependencyResolver.Resolve <IAccountService>(); this._accountConnectionService = DependencyResolver.Resolve <IAccountConnectionService>(); this._taskService = DependencyResolver.Resolve <Cooper.Model.Tasks.ITaskService>(); this._taskFolderService = DependencyResolver.Resolve <ITaskFolderService>(); this._addressBookService = DependencyResolver.Resolve <IAddressBookService>(); this._contactGroupService = DependencyResolver.Resolve <IContactGroupService>(); this._contactService = DependencyResolver.Resolve <IContactService>(); this._teamService = DependencyResolver.Resolve <ITeamService>(); this._personalTaskService = DependencyResolver.Resolve <Cooper.Model.Tasks.IPersonalTaskService>(); this._teamTaskService = DependencyResolver.Resolve <Cooper.Model.Teams.ITaskService>(); }
public TeamController(ILoggerFactory factory , IAccountService accountService , IAccountConnectionService accountConnectionService , ITaskService taskService , ITaskFolderService taskFolderService , IFetchTaskHelper fetchTaskHelper , Teams.ITeamService teamService , Teams.ITaskService teamTaskService , UserHelper userHelper) : base(factory , accountService , accountConnectionService , taskService , taskFolderService , fetchTaskHelper , teamService , teamTaskService) { this._userHelper = userHelper; }
public void TestFixtureSetUp() { try { CodeSharp.Core.Configuration.ConfigWithEmbeddedXml(null , "application_config" , Assembly.GetExecutingAssembly() , "Cooper.Model.Test.ConfigFiles") .RenderProperties() .Castle(o => this.Resolve(o.Container)); //初始化同步锁 DependencyResolver.Resolve<ILockHelper>().Init<Account>(); DependencyResolver.Resolve<ILockHelper>().Init<GoogleConnection>(); DependencyResolver.Resolve<ILockHelper>().Init<GitHubConnection>(); DependencyResolver.Resolve<ILockHelper>().Init<Member>(); } catch (Exception e) { if (!e.Message.Contains("不可重复初始化配置")){ Console.WriteLine(e.Message); throw e; } } this._log = DependencyResolver.Resolve<ILoggerFactory>().Create(this.GetType()); this._sessionManager = DependencyResolver.Resolve<Castle.Facilities.NHibernateIntegration.ISessionManager>(); this._accountHelper = DependencyResolver.Resolve<IAccountHelper>(); this._accountService = DependencyResolver.Resolve<IAccountService>(); this._accountConnectionService = DependencyResolver.Resolve<IAccountConnectionService>(); this._taskService = DependencyResolver.Resolve<Cooper.Model.Tasks.ITaskService>(); this._taskFolderService = DependencyResolver.Resolve<ITaskFolderService>(); this._addressBookService = DependencyResolver.Resolve<IAddressBookService>(); this._contactGroupService = DependencyResolver.Resolve<IContactGroupService>(); this._contactService = DependencyResolver.Resolve<IContactService>(); this._teamService = DependencyResolver.Resolve<ITeamService>(); this._personalTaskService = DependencyResolver.Resolve<Cooper.Model.Tasks.IPersonalTaskService>(); this._teamTaskService = DependencyResolver.Resolve<Cooper.Model.Teams.ITaskService>(); }