Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Freshmvvm.FreshIOC.Container.Register<ICamera,Camera>();
- public interface ICamera
- {
- void TakePicture();
- }
- [assembly: Xamarin.Forms.Dependency (typeof (CameraImplementation))]
- namespace yourapp
- {
- // CameraImplementation class here
- }
- public override bool FinishedLaunching(UIApplication app, NSDictionary options)
- {
- global::Xamarin.Forms.Forms.Init();
- InitIoc();
- LoadApplication(new App());
- return base.FinishedLaunching(app, options);
- }
- private void InitIoc()
- {
- FreshMvvm.FreshIOC.Container.Register<IFileHelper, FileHelper>();
- }
- public class FileHelper : IFileHelper
- {
- public string GetLocalFilePath(string filename)
- {
- string docFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
- IFileHelper fileHelper = FreshMvvm.FreshIOC.Container.Resolve<IFileHelper>();
- string dbPath = fileHelper.GetLocalFilePath("CoreSQLite.db3");
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement