コード例 #1
0
ファイル: blobsController.cs プロジェクト: Hollemonc/Project2
        public async Task <IActionResult> Edit(int id, [Bind("ID,Title,Body,Timestamp")] blob blob)
        {
            if (id != blob.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(blob);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!blobExists(blob.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(blob));
        }
コード例 #2
0
ファイル: blobsController.cs プロジェクト: Hollemonc/Project2
        public async Task <IActionResult> Create([Bind("ID,Title,Body,Timestamp")] blob blob)
        {
            if (ModelState.IsValid)
            {
                _context.Add(blob);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(blob));
        }
コード例 #3
0
        public void LambdaInvoke()
        {
            #region to-invoke-a-lambda-function-1481659683915

            var response = client.Invoke(new InvokeRequest
            {
                FunctionName   = "MyFunction",
                InvocationType = "Event",
                LogType        = "Tail",
                Qualifier      = "1"
            });

            string  functionError = response.FunctionError;
            string  logResult     = response.LogResult;
            blob    payload       = response.Payload;
            integer statusCode    = response.StatusCode;

            #endregion
        }
コード例 #4
0
        public void PollySynthesizeSpeech()
        {
            #region to-synthesize-speech-1482186064046

            var response = client.SynthesizeSpeech(new SynthesizeSpeechRequest
            {
                LexiconNames = new List <string> {
                    "example"
                },
                OutputFormat = "mp3",
                SampleRate   = "8000",
                Text         = "All Gaul is divided into three parts",
                TextType     = "text",
                VoiceId      = "Joanna"
            });

            blob    audioStream       = response.AudioStream;
            string  contentType       = response.ContentType;
            integer requestCharacters = response.RequestCharacters;

            #endregion
        }
コード例 #5
0
 64 => FindAllQWords(blob, word),