Exemplo n.º 1
0
        public static IContentLoader <T> CreateFakeFailLoader <T>()
        {
            IContentLoader <T> creation = A.Fake <IContentLoader <T> >();

            A.CallTo(() => creation.LoadAsync(A <string> .Ignored))
            .Returns(Task.FromResult(new WebResponse <T>("This is a simulated fail", 404)));
            return(creation);
        }
Exemplo n.º 2
0
        public static IContentLoader <T> CreateFakeLoader <T>(T content)
        {
            IContentLoader <T> creation = A.Fake <IContentLoader <T> >();

            A.CallTo(() => creation.LoadAsync(A <string> .Ignored))
            .Returns(Task.FromResult(new WebResponse <T>(content, null, 200)));
            return(creation);
        }
Exemplo n.º 3
0
 private void LoadCollectionFromRemote(string url)
 {
     m_loader = new CollectionContentLoader();
     m_loader.LoadCompleted += OnLoadCollectionCompleted;
     m_loader.LoadAsync(new LoadContext()
     {
         Url = url
     });
 }
Exemplo n.º 4
0
 private void LoadCollectionFromRemote(string url)
 {
     m_loader = new CollectionContentLoader();
     m_loader.LoadCompleted += OnLoadCollectionCompleted;
     m_loader.LoadAsync(new LoadContext() { Url = url });
 }