예제 #1
0
 public UnitofWork(ApplicationDbContext dbContext)
 {
     applicationDbContext = dbContext;
     Questions            = new QuestionsRepository(applicationDbContext);
     Tags    = new TagsRepository(applicationDbContext);
     Answers = new AnswersRepository(applicationDbContext);
 }
예제 #2
0
 public UnitOfWork(ApplicationDbContext dbContext, IConfiguration configuration)
 {
     applicationDbContext = dbContext;
     Questions            = new QuestionsRepository(applicationDbContext);
     Tags            = new TagsRepository(applicationDbContext);
     Answers         = new AnswersRepository(applicationDbContext);
     StoredProcedure = new StoredProcedureExecution(applicationDbContext, configuration);
 }
예제 #3
0
 //Constructor
 public SurveyBusiness(IUser userDAL, ISurvey surveyDAL, IQuestion questionDAL, ITextAnswers textAnswerDAL, IOptionChoice optionChoiceDAL, IAnswers answerDAL, IInputType inputTypeDAL)
 {
     this.userDAL         = userDAL;
     this.surveyDAL       = surveyDAL;
     this.questionDAL     = questionDAL;
     this.textAswersDAL   = textAnswerDAL;
     this.optionChoiceDAL = optionChoiceDAL;
     this.answerDAL       = answerDAL;
     this.inputTypeDAL    = inputTypeDAL;
 }
예제 #4
0
        public static void Initialize(this IAnswers answers, Context context)
        {
            if (_initialized)
            {
                return;
            }
            lock (InitializeLock)
            {
                if (_initialized)
                {
                    return;
                }

                Fabric.Instance.Kits.Add(answers);

                _initialized = true;
            }
        }
예제 #5
0
        public static void Initialize(this IAnswers answers, Context context)
        {
            if (_initialized)
            {
                return;
            }
            lock (InitializeLock)
            {
                if (_initialized)
                {
                    return;
                }

                var native = (Bindings.AnswersKit.Answers)answers.ToNative();

                Bindings.FabricSdk.Fabric.With(new Bindings.FabricSdk.Fabric.Builder(context)
                                               .Kits(native)
                                               .Debuggable(Fabric.Instance.Debug)
                                               .Build());

                _initialized = true;
            }
        }
예제 #6
0
 public AnswerClient()
 {
     _baseResponse  = Substitute.For <BaseResponse <Answer> >();
     _answers       = Substitute.For <IAnswers>();
     _answerFilters = Substitute.For <AnswerFilters>();
 }