コード例 #1
0
        private static async Task OutputSkillManifest(CodeGeneratorContext context, JsonSerializer json, string directoryFullName)
        {
            var language = context.Language;
            var oldName  = language.InvocationName;

            language.InvocationName = context.Options.InvocationName;
            using (var manifestStream = File.Open(Path.Combine(directoryFullName, "skillManifest.json"), FileMode.Create, FileAccess.Write))
            {
                using (var jsonWriter = new JsonTextWriter(new StreamWriter(manifestStream)))
                {
                    var interactionModel = new SkillInteraction
                    {
                        Language = language
                    };
                    var jobject = new JObject {
                        { "interactionModel", JObject.FromObject(interactionModel) }
                    };
                    json.Serialize(jsonWriter, jobject);
                    await jsonWriter.FlushAsync();
                }
            }

            language.InvocationName = oldName;
        }
コード例 #2
0
 public Task Update(string skillId, string locale, string stage, SkillInteraction interaction)
 {
     return(Client.Update(skillId, stage, locale, interaction));
 }