コード例 #1
0
        public void Setup()
        {
            _kayakoApiRequest = new Mock <IKayakoApiRequest>();
            _newsController   = new NewsController(_kayakoApiRequest.Object);

            _responseNewsCategoryCollection = new NewsCategoryCollection
            {
                new NewsCategory(),
                new NewsCategory()
            };

            _responseNewsItemCollection = new NewsItemCollection
            {
                new NewsItem(),
                new NewsItem()
            };

            _responseNewsSubscriberCollection = new NewsSubscriberCollection
            {
                new NewsSubscriber(),
                new NewsSubscriber(),
                new NewsSubscriber()
            };

            _responseNewsItemCommentCollection = new NewsItemCommentCollection
            {
                new NewsItemComment(),
                new NewsItemComment()
            };
        }
コード例 #2
0
ファイル: NewsModule.cs プロジェクト: eslahi/prism
        public void Initialize()
        {
            RegisterViewsAndServices();
            INewsController controller = _container.Resolve <INewsController>();

            controller.Run();
        }
コード例 #3
0
 public NewsPage(INewsController controller)
 {
     InitializeComponent();
     Controller     = controller;
     BindingContext = this;
     Content        = BuildView();
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the KayakoRestApi.KayakoService class.
 /// </summary>
 /// <param name="apiKey">Api Key.</param>
 /// <param name="secretKey">Secret Api Key.</param>
 /// <param name="apiUrl">URL of Kayako REST Api</param>
 /// <param name="requestType">Determines how the request URL is formed</param>
 public KayakoClient(string apiKey, string secretKey, string apiUrl, IWebProxy proxy, ApiRequestType requestType)
 {
     _coreController = new CoreController(apiKey, secretKey, apiUrl, proxy, requestType);
     _customFields   = new CustomFieldController(apiKey, secretKey, apiUrl, proxy, requestType);
     _departments    = new DepartmentController(apiKey, secretKey, apiUrl, proxy, requestType);
     _knowledgebase  = new KnowledgebaseController(apiKey, secretKey, apiUrl, proxy, requestType);
     _news           = new NewsController(apiKey, secretKey, apiUrl, proxy, requestType);
     _staff          = new StaffController(apiKey, secretKey, apiUrl, proxy, requestType);
     _tickets        = new TicketController(apiKey, secretKey, apiUrl, proxy, requestType);
     _troubleshooter = new TroubleshooterController(apiKey, secretKey, apiUrl, proxy, requestType);
     _users          = new UserController(apiKey, secretKey, apiUrl, proxy, requestType);
 }
コード例 #5
0
 public ArticleView(ArticleViewModel viewModel, INewsController newsController)
 {
     InitializeComponent();
     ViewModel      = viewModel;
     NewsController = newsController;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the KayakoRestApi.KayakoService class.
 /// </summary>
 /// <param name="apiKey">Api Key.</param>
 /// <param name="secretKey">Secret Api Key.</param>
 /// <param name="apiUrl">URL of Kayako REST Api</param>
 public KayakoClient(string apiKey, string secretKey, string apiUrl)
 {
     _coreController = new CoreController(apiKey, secretKey, apiUrl, null);
     _customFields = new CustomFieldController(apiKey, secretKey, apiUrl, null);
     _departments = new DepartmentController(apiKey, secretKey, apiUrl, null);
     _knowledgebase = new KnowledgebaseController(apiKey, secretKey, apiUrl, null);
     _news = new NewsController(apiKey, secretKey, apiUrl, null);
     _staff = new StaffController(apiKey, secretKey, apiUrl, null);
     _tickets = new TicketController(apiKey, secretKey, apiUrl, null);
     _troubleshooter = new TroubleshooterController(apiKey, secretKey, apiUrl, null);
     _users = new UserController(apiKey, secretKey, apiUrl, null);
 }
コード例 #7
0
        public void Setup()
        {
            _kayakoApiRequest = new Mock<IKayakoApiRequest>();
            _newsController = new NewsController(_kayakoApiRequest.Object);

            _responseNewsCategoryCollection = new NewsCategoryCollection
                {
                    new NewsCategory(),
                    new NewsCategory()
                };

            _responseNewsItemCollection = new NewsItemCollection
                {
                    new NewsItem(),
                    new NewsItem()
                };

            _responseNewsSubscriberCollection = new NewsSubscriberCollection
                {
                    new NewsSubscriber(),
                    new NewsSubscriber(),
                    new NewsSubscriber()
                };

            _responseNewsItemCommentCollection = new NewsItemCommentCollection
                {
                    new NewsItemComment(),
                    new NewsItemComment()
                };
        }