AnimChng
API Reference
>
AnimChng
| SoapAction | n/a |
| Input Name | AnimChng |
| Output Name | AnimChngResponse |
| Input Namespace | n/a |
| Group Name | Xperience |
| Container | XP_MsgBus.xsd |
this.messageBus.Subscribe(this.OnAnimate, SubscriptionThreadOption.UIThread);
private void OnAnimate(IMessageContext context)
{
if (this.MessageError(context))
{
return;
}
var animate = context.DeserializeMessage();
var state = animate.AnimState != null ? animate.AnimState.Value : "null";
this.UpdateListbox("Animate message was received!");
this.UpdateListbox("Animation State: " + state);
}
private bool MessageError(
IMessageContext context)
{
var result = false;
if (context != null
&& !context.IsValid())
{
var sb = new StringBuilder();
sb.AppendLine();
sb.AppendLine("MESSAGE ERRORS");
sb.Append(Helper.CollectionErrors(context.MessageErrors));
sb.AppendLine($"Message Action: {context.Action}");
sb.AppendLine($"Serialized message: {context.SerializedMessage}");
sb.AppendLine($"Message Source: {context.Source}");
this.UpdateListbox(sb.ToString(), false, true);
result = true;
}
else if (string.IsNullOrEmpty(context?.SerializedMessage))
{
this.UpdateListbox("The RESPONSE MESSAGE IS NULL OR MISSING THE SERIALIZED MESSAGE");
}
return result;
}
Did this page help you?
Why was this page helpful?
Why wasn't this page helpful?
Thank you for your feedback!
Last updated Mon Dec 9 2024