Exemplo n.º 1
0
        //PortableIOC
        private static void Bootstrap()
        {
            // Create the container as usual.
            var container = new PortableIoc();

            // Register your types, for instance:
            //container.Register<IMainViewModel>(ioc => new MainViewModel());

            // Store the container for use by the application.
            App.container = container;

            // Support UI cross thread
            StaticFunctions.BaseContext = System.Threading.SynchronizationContext.Current;

            // Create the AbstractFunctions instance
            EtcUtility.Instance = new PhoneEtcUtility();
        }
Exemplo n.º 2
0
        public void Init()
        {
            IPortableIoC container = new PortableIoc ();
            container.Register<DiskStorage> (c => {
                return new DiskStorage ("../../test_notes/proper_notes") {
                    Logger = new ConsoleLogger ()
                };
            });
            diskStorage = container.Resolve<DiskStorage> ();

            engine = new Engine (diskStorage);
            // get a new note instance
            note = engine.NewNote ();
            note.Title = "Unit Test Note";
            note.Text = "Unit test note by NewNote() method";
            engine.SaveNote (note);
            NOTE_PATH = Path.Combine ("../../test_notes/proper_notes", Utils.GetNoteFileNameFromURI (note));
        }
Exemplo n.º 3
0
 public IPortableIoC DefaultComposition()
 {
     var ioc = new PortableIoc ();
     return ioc;
 }