コード例 #1
0
 public void Dispose()
 {
     if (assistant != null)
     {
         assistant.Dispose();
         assistant = null;
     }
 }
コード例 #2
0
        public MainWindowViewModel()
        {
            RegisterMessages();
            this.assistant = new BetfairService();
            this.assistant.ReadApplicationKey();

            this.AccountView = new SessionLoginViewModel(assistant);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="EventSelectorViewModel"/> class.
        /// </summary>
        /// <param name="service"></param>
        public MarketSelectorViewModel(BetfairService service)
        {
            this.service = service;

            var events = this.service.GetEventTypes();

            this.eventTypes = new EventTypeCollection(events.OrderBy(e => e.Name).ToList(), this.service);

            this.CurrentSelection = this.eventTypes;
        }
 public SessionLoginViewModel(BetfairService assistant)
 {
     this.assistant = assistant;
 }