Пример #1
0
 public UserProfileDB(string userId, MoycaLogger logger) : base(UserProfileDB.TableName, UserProfileDB.PrimaryPartitionKey, logger)
 {
     this.UserID             = userId;
     this.log                = logger;
     this.Schedule           = MIN_SCHEDULE_INDEX;
     this.teachMode          = MODE.Assess;
     this.scopeAndSequenceDB = new ScopeAndSequenceDB(logger);
 }
Пример #2
0
        async public static Task <WordAttributes> GetWordAttributes(string word, MoycaLogger log)
        {
            Log = log;

            var wordAttributes = new WordAttributes();
            await wordAttributes.GetAttributes(word);

            return(wordAttributes);
        }
Пример #3
0
        public async Task FunctionHandler(DynamoDBEvent dynamoEvent, ILambdaContext context)
        {
            LOGGER.log       = MoycaLogger.GetLogger(context, LogLevel.TRACE);
            scopeAndSequence = new ScopeAndSequenceDB(LOGGER.log);
            dictionary       = new DictionaryDB(LOGGER.log);
            int i;

            for (i = 1057; i < 1058; i++)
            {
                await GetAndSetWords(i);
            }
            LOGGER.log.INFO("Function", "Words in range: " + totalWords);
        }
Пример #4
0
 public DictionaryDB(MoycaLogger logger) : base(DictionaryDB.TableName, DictionaryDB.PrimaryPartitionKey, logger)
 {
     cVC_WF_Index = new CVC_WF_index();
     cVC_V_Index  = new CVC_V_index();
     sW_V_Index   = new SW_V_index();
     bE_V_Index   = new BE_V_index();
     cD_CB_Index  = new CD_CB_index();
     wF_CD_Index  = new WF_CD_index();
     wF_CB_Index  = new WF_CB_index();
     cD_VT_Index  = new CD_VT_index();
     cB_VT_Index  = new CB_VT_index();
     this.InitializeBoolsToFalse();
     this.wordsToRead = new List <string>();
     this.log         = logger;
 }
Пример #5
0
        public async Task <SkillResponse> FunctionHandler(SkillRequest request, ILambdaContext context)
        {
            string requestType = request.Request.Type;

            LOGGER.log = MoycaLogger.GetLogger(context, LogLevel.TRACE);
            AlexaResponse.SetDisplaySupported(request.APLSupported());
            LogSessionStart(request);


            switch (requestType)
            {
            case "LaunchRequest":
                LOGGER.log.DEBUG("Function", "Launch Request");
                response = await new LaunchRequest(request).HandleRequest();
                break;

            case "IntentRequest":
                LOGGER.log.DEBUG("Function", "Intent Request");
                response = await new IntentRequest(request).HandleRequest();
                break;

            case "SessionEndedRequest":
                LOGGER.log.DEBUG("Function", "Session Ended Request");
                response = await new SessionEnded().HandleRequest();
                break;

            case "Connections.Response":
                LOGGER.log.DEBUG("Function", "Connection Response ");
                response = await new Connection(request).HandleRequest();
                break;

            default:
                LOGGER.log.DEBUG("Function", "Default Error Request");
                response = AlexaResponse.Say("Error");
                break;
            }

            return(response);
        }
Пример #6
0
 /// Constructor
 /// @param tableName - The name of the table that will be used to perform all functions of this class </param>
 /// @param primaryKeyName - The name of the primary lookup key for the specified table </param>
 public DatabaseClient(string tableName, string primaryKeyName, MoycaLogger logger)
 {
     this.tableName           = tableName;
     this.log                 = logger;
     this.primaryPartitionKey = primaryKeyName;
 }
Пример #7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="logger">Object used for logging</param>
 public SessionAttributes(MoycaLogger logger)
 {
     this.logger = logger;
 }
Пример #8
0
 public CognitoUserPool(MoycaLogger logger)
 {
     this.log = logger;
 }
Пример #9
0
 public ScopeAndSequenceDB(MoycaLogger logger) : base(ScopeAndSequenceDB.TableName, ScopeAndSequenceDB.PrimaryPartitionKey, logger)
 {
     this.WordsToRead = new List <string>();
     this.log         = logger;
 }