/// <inheritdoc/> public async Task StartSessionAsync(StartSessionMessage message) { if (message == null) { throw new ArgumentNullException(nameof(message)); } var serializedMessage = Newtonsoft.Json.JsonConvert.SerializeObject(message); await PublishMessageAsync(DialogStartSessionMessageQueueName, serializedMessage); }
/// <inheritdoc/> public async Task StartSessionAsync(string text = null, bool canBeEnqueued = true, bool sendIntentNotRecognized = false, string customData = null, string siteId = null, params string[] allowedIntents) { var message = new StartSessionMessage() { SiteId = siteId, CustomData = customData, Initialization = new StartSessionAction() { CanBeEnqueued = canBeEnqueued, SendIntentNotRecognized = sendIntentNotRecognized, FilteredIntents = allowedIntents, Text = text } }; await StartSessionAsync(message); }
/// <summary> /// This callback function is called when the host have sent the cloud anchor ID /// </summary> /// <param name="networkMessage">The network message containing a cloud anchor ID</param> public void ReceivedCloudMessage(NetworkMessage networkMessage) { StartSessionMessage hostMessage = networkMessage.ReadMessage <StartSessionMessage>(); m_CloudAnchorId = hostMessage.cloudId; }
/// <summary> /// If the player joins the server before the cloud anchor was hosted, this callback function is called to tell him when displaying the map is needed /// </summary> /// <param name="networkMessage">An empty network message</param> public void ReceiveStartSession(NetworkMessage networkMessage) { StartSessionMessage hostMessage = networkMessage.ReadMessage <StartSessionMessage>(); ((ClientMapBuilder)mapBuilder).ShowMap(); }