public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(Name != null ? Name.ToStepValue() : "$"); parameters.Add(Version != null ? Version.ToStepValue() : "$"); parameters.Add(Publisher != null ? Publisher.ToStepValue() : "$"); parameters.Add(VersionDate != null ? VersionDate.ToStepValue() : "$"); parameters.Add(Location != null ? Location.ToStepValue() : "$"); parameters.Add(Description != null ? Description.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
/// <summary> /// Populate a documents xmlnode /// </summary> /// <param Name="xd">Xmldocument context</param> /// <param Name="x">The node to fill with data</param> /// <param Name="Deep">If true the documents childrens xmlrepresentation will be appended to the Xmlnode recursive</param> public override void XmlPopulate(XmlDocument xd, ref XmlNode x, bool Deep) { foreach (Property p in getProperties) { if (p != null) { x.AppendChild(p.ToXml(xd)); } } // attributes x.Attributes.Append(addAttribute(xd, "id", Id.ToString())); x.Attributes.Append(addAttribute(xd, "version", System.Version.ToString())); if (Level > 1) { x.Attributes.Append(addAttribute(xd, "parentID", Parent.Id.ToString())); } else { x.Attributes.Append(addAttribute(xd, "parentID", "-1")); } x.Attributes.Append(addAttribute(xd, "level", Level.ToString())); x.Attributes.Append(addAttribute(xd, "writerID", _writer.Id.ToString())); x.Attributes.Append(addAttribute(xd, "creatorID", _creator.Id.ToString())); if (ContentType != null) { x.Attributes.Append(addAttribute(xd, "nodeType", ContentType.Id.ToString())); } x.Attributes.Append(addAttribute(xd, "template", _template.ToString())); x.Attributes.Append(addAttribute(xd, "sortOrder", sortOrder.ToString())); x.Attributes.Append(addAttribute(xd, "createDate", CreateDateTime.ToString("s"))); x.Attributes.Append(addAttribute(xd, "updateDate", VersionDate.ToString("s"))); x.Attributes.Append(addAttribute(xd, "nodeName", Text)); x.Attributes.Append(addAttribute(xd, "urlName", url.FormatUrl(Text.ToLower()))); x.Attributes.Append(addAttribute(xd, "writerName", _writer.Name)); x.Attributes.Append(addAttribute(xd, "creatorName", _creator.Name.ToString())); if (ContentType != null) { x.Attributes.Append(addAttribute(xd, "nodeTypeAlias", ContentType.Alias)); } x.Attributes.Append(addAttribute(xd, "path", Path)); if (Deep) { foreach (Document d in Children) { x.AppendChild(d.ToXml(xd, true)); } } }
protected override void Execute(CodeActivityContext context) { var serviceUrl = ServiceUrl.Get(context); var apiKey = ApiKey.Get(context); var versionDate = VersionDate.Get(context); var authenticator = new IamAuthenticator(apikey: apiKey); var service = new AssistantService(versionDate, authenticator); service.SetServiceUrl(serviceUrl); var assistantId = AssistantId.Get(context); var text = Text.Get(context); // SuggestedIntentの取得 var suggestedIntent = FetchSuggestedIntent(assistantId, text, service); SuggestedIntent.Set(context, suggestedIntent); // Confidenciesの取得 var confidencies = FetchIntentConfidencies(assistantId, text, service); Confidencies.Set(context, confidencies); }