Example #1
0
        public IRatingAdapter GetRatingAdapter(IBaseAdapter adapterToCopyContextFrom)
        {
            IRatingAdapter adapter = new RatingAdapter();

            adapter.SetContextFrom(adapterToCopyContextFrom);

            return(adapter);
        }
Example #2
0
        public IPlayerAdapter GetPlayerAdapter(IBaseAdapter adapterToCopyContextFrom)
        {
            IPlayerAdapter adapter = new PlayerAdapter();

            adapter.SetContextFrom(adapterToCopyContextFrom);

            return(adapter);
        }
Example #3
0
        public IPositionAdapter GetPositionAdapter(IBaseAdapter adapterToCopyContextFrom)
        {
            IPositionAdapter adapter = new PositionAdapter();

            adapter.SetContextFrom(adapterToCopyContextFrom);

            return(adapter);
        }
Example #4
0
        public IChallengeAdapter GetChallengeAdapter(IBaseAdapter adapterToCopyContextFrom)
        {
            IChallengeAdapter adapter = new ChallengeAdapter();

            adapter.SetContextFrom(adapterToCopyContextFrom);

            return(adapter);
        }
Example #5
0
        public ISessionAdapter GetSessionAdapter(IBaseAdapter adapterToCopyContextFrom)
        {
            ISessionAdapter adapter = new SessionAdapter();

            adapter.SetContextFrom(adapterToCopyContextFrom);

            return(adapter);
        }
        /// <summary>
        /// Initializes a new instance <see cref="UITestListener"/>
        /// </summary>
        public UITestListener(IBaseAdapter adapter)
        {
            // Create a new thread handler for the main looper.
            // This handler is used to post code from the background thread
            // back to the UI thread.
            _threadHandler = new Handler(Application.Context.MainLooper);

            _adapter = adapter;
        }
Example #7
0
        /// <summary>
        /// Copies the context from <paramref name="adapter"/> to the current instance. A context is for example a connection for db-adapter or something simmilar.
        /// </summary>
        /// <param name="adapter">The adapter.</param>
        public void SetContextFrom(IBaseAdapter adapter)
        {
            if (adapter == null)
            {
                throw new ArgumentNullException("adapter");
            }

            if (!(adapter is BaseAdapter))
            {
                throw new ArgumentException(string.Format("The provided adapter of type '{0}' does not derive from type '{1}'", adapter.GetType().FullName, typeof(BaseAdapter).FullName));
            }

            BaseAdapter sourceAdapter = (BaseAdapter)adapter;

            ConnectionManager = sourceAdapter.ConnectionManager;
        }
 public TeacherFactory(IBaseAdapter <TeacherModel> adapter) : base(adapter)
 {
 }
Example #9
0
 public void SetAdapter(IBaseAdapter adapter)
 {
     this.listAdapter = adapter;
     adapter.Bind(this);
 }
 public StudentFactory(IBaseAdapter <StudentModel> adapter) : base(adapter)
 {
 }
 public ClassFactory(IBaseAdapter <ClassModel> adapter) : base(adapter)
 {
 }
Example #12
0
 public GitHubAdapter(IBaseAdapter baseAdapter)
 {
     this.baseAdapter = baseAdapter;
 }