/// <summary>
 /// Notifies peer about item exited area.
 /// </summary>
 public override void OnItemExit(Item item)
 {
     base.OnItemExit(item);
     var unsubscribeEvent = new ItemUnsubscribed { ItemId = item.Id, InterestAreaId = this.Id };
     var eventData = new EventData((byte)EventCode.ItemUnsubscribed, unsubscribeEvent);
     this.peer.SendEvent(eventData, new SendParameters { ChannelId = Settings.ItemEventChannel });
 }
        private void WriteJsonEntry(EventData e)
        {
            _writer.WriteStartObject();

            _writer.WritePropertyName("index");

            // Write the batch "index" operation header
            _writer.WriteStartObject();
            // ES index names must be lower case and cannot contain whitespace or any of the following characters \/*?"<>|,
            WriteValue("_index", this.GetIndexName(e.EnqueuedTimeUtc));
            WriteValue("_type", _entryType);

            _writer.WriteEndObject();
            _writer.WriteEndObject();
            _writer.WriteRaw("\n");  //ES requires this \n separator

            var payload = JObject.Parse(Encoding.UTF8.GetString(e.GetBytes()));

            foreach (var property in e.Properties)
            {
                payload.Add("Properties-" + property.Key, new JValue(property.Value));
            }

            _writer.WriteRaw(payload.ToString(Formatting.None));
            
            _writer.WriteRaw("\n");
        }
Beispiel #3
0
        //This method is used to handle the event when it's raised
        void MyEventHandler(Object sender, EventData e)
        {
            // Wait until safe to run
            mut.WaitOne();
            // Write to console
            Console.WriteLine(Name.PadRight(15) + e.stockName.PadRight(15) +
                              e.currentValue.ToString().PadRight(15) +
                              e.numOfChange.ToString());
            // This text is added only once to the file.
            if (!File.Exists(path))
            {
                // Create a file to write to.
                using (StreamWriter sw = File.CreateText(path))
                {
                    //Write the table header to the file
                    sw.WriteLine("Broker".PadRight(15) + "Stock".PadRight(15) +
                                 "Value".PadRight(15) + "Changes".PadRight(15) +
                                 "\r\n");
                }
            }

            // This text is always added, making the file longer over time
            // if it is not deleted.
            using (StreamWriter sw = File.AppendText(path))
            {
                //Write the event data to the file
                sw.WriteLine(Name.PadRight(15) + e.stockName.PadRight(15) +
                              e.currentValue.ToString().PadRight(15) +
                              e.numOfChange.ToString());
            }
            // Release mutex
            mut.ReleaseMutex();
        }
Beispiel #4
0
 public void OnEvent(EventData eData)
 {
     if (eData.eventType == "EQUIPPED_UPDATE") {
         // Update equipped items dictionary
         equippedItems = ClientAPI.ScriptObject.GetComponent<Inventory>().EquippedItems;
     }
 }
 /// <summary>
 /// 类型:方法
 /// 名称:EnterWorldEventArgs
 /// 作者:taixihuase
 /// 作用:用任意角色进入场景所感兴趣的数据构造事件数据
 /// 编写日期:2015/7/22
 /// </summary>
 /// <param name="eventData"></param>
 public WorldEnterEventArgs(EventData eventData)
 {
     Character character = (Character)
         Serialization.Deserialize(eventData.Parameters[(byte) ParameterCode.WorldEnter]);
     AnyCharacter = character;
     MyCharacterPosition = null;
 }
 public void RollbackEvent()
 {
     if (_activeEvent != null)
     {
         _activeEvent = null;
     }
 }
        IList<IEvent> IEventBuilder.Build(string xml)
        {
            IList<IEvent> events = new List<IEvent>();

            if (String.IsNullOrEmpty(xml))
            {
                return events;
            }

            xml = xml.EscapeWhiteSpace();

            //get out quick if no data
            if (REGEX.IsMatch(xml))
            {
                return events;
            }

            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);

            XmlNodeList eventNodes = doc.SelectNodes(String.Format("//{0}", EVENT));

            if (eventNodes != null)
            {
                foreach (XmlNode eventNode in eventNodes)
                {
                    IEvent e = new EventData(eventNode);
                    events.Add(e);
                }
            }

            return events;
        }
Beispiel #8
0
 private void OnBroadcastMessage(ChatPeer peer, EventData @event, SendParameters sendParameters)
 {
     if (peer != this)
     {
         this.SendEvent(@event, sendParameters);
     }
 }
        public async Task SendBatch()
        {
            var msgs = new EventData[] { new EventData(Guid.NewGuid().ToByteArray()), new EventData(Guid.NewGuid().ToByteArray()), new EventData(Guid.NewGuid().ToByteArray()), new EventData(Guid.NewGuid().ToByteArray()) };

            var bq = new HubClient(EventHubClient.CreateFromConnectionString(connection, this.name));
            await bq.Send(msgs);
        }
 public override void OnEvent(EventData eventData) {
     SubCode subcode = ParameterTool.GetParameters<SubCode>(eventData.Parameters, ParameterCode.SubCode, false);
     switch(subcode)
     {
         case SubCode.GetTeam:
             List<Role> list = ParameterTool.GetParameters<List<Role>>(eventData.Parameters, ParameterCode.RoleList);
             int masterRoleID = ParameterTool.GetParameters<int>(eventData.Parameters, ParameterCode.MasterRoleID, false);       
              //组队成功
             if (OnGetTeam != null)
                 OnGetTeam(list, masterRoleID);
             break;
         case SubCode.AsyncPostionAndEularAngler:
             int roleid = ParameterTool.GetParameters<int>(eventData.Parameters, ParameterCode.RoleID,false);
             Vector3 pos = ParameterTool.GetParameters<Vector3Obj>(eventData.Parameters, ParameterCode.Postion).ToVector3();
             Vector3 eularAnglers = ParameterTool.GetParameters<Vector3Obj>(eventData.Parameters, ParameterCode.EulerAnglers).ToVector3();
             if (OnAsyncPostionAndRotation != null)
                 OnAsyncPostionAndRotation(roleid, pos, eularAnglers);
             break;
         case SubCode.AsyncPlayerMoveAnimation:
             int roleid2 = ParameterTool.GetParameters<int>(eventData.Parameters, ParameterCode.RoleID, false);
             PlayerMoveAnimationModel model = ParameterTool.GetParameters<PlayerMoveAnimationModel>(eventData.Parameters, ParameterCode.PlayerMoveAnimationModel);
             if (OnAsyncPlayerMoveAnimation != null)
                 OnAsyncPlayerMoveAnimation(roleid2, model);
             break;
         case SubCode.SyncPlayerAnimation:
             int roleid3 = ParameterTool.GetParameters<int>(eventData.Parameters, ParameterCode.RoleID, false);
             PlayerAnimationModel animationModel = ParameterTool.GetParameters<PlayerAnimationModel>(eventData.Parameters, ParameterCode.PlayerAnimationModel);
             if(OnSyncPlayerAnimation!=null)
             {
                 OnSyncPlayerAnimation(roleid3, animationModel);
             }
             break;
     }
 }
        public void EventDataEqualityTest()
        {
            var dateTimeOffset = DateTimeOffset.Now;

            var left = new EventData
            {
                Name = "name",
                Data = "somedata",
                Ttl = 50,
                PublishedAt = dateTimeOffset,
                DeviceId = "coreid"
            };

            var right = new EventData
            {
                Name = "name",
                Data = "somedata",
                Ttl = 50,
                PublishedAt = dateTimeOffset,
                DeviceId = "coreid"
            };

            Assert.AreEqual(left.GetHashCode(), right.GetHashCode());
            Assert.AreEqual(left, right);
        }
        public void Save(MainViewModel viewModel)
        {
            GestSpaceData space = new GestSpaceData();
            foreach(var tileVm in viewModel.Tiles.Where(t => !t.IsUnused))
            {
                var tile = new TileData();
                space.Tiles.Add(tile);
                if(!tileVm.TakeSuggestedName)
                {
                    tile.ForcedName = tileVm.Description;
                }
                tile.X = (int)tileVm.Position.X;
                tile.Y = (int)tileVm.Position.Y;
                if(tileVm.SelectedPresenterTemplate != null)
                    tile.PresenterTemplate = tileVm.SelectedPresenterTemplate.Description;
                if(tileVm.SelectedGestureTemplate != null)
                    tile.GestureTemplate = tileVm.SelectedGestureTemplate.Name;

                tile.Program = tileVm.FastContext;
                foreach(var evtVm in tileVm.Events)
                {
                    var evt = new EventData();
                    tile.Events.Add(evt);
                    evt.Name = evtVm.Name;
                    if(evtVm.Command != null)
                        evt.Command = evtVm.Command.Script;
                }
            }
            if(viewModel.CurrentTile != null)
            {
                space.LastX = (int)viewModel.CurrentTile.Position.X;
                space.LastY = (int)viewModel.CurrentTile.Position.Y;
            }
            Save(space);
        }
Beispiel #13
0
        static bool sendMessage(string deviceLocation, string dateTime)
        {
            // build a connection string
            string connectionString = String.Format("Endpoint=sb://stardemo.servicebus.windows.net/;SharedAccessKeyName=WebAppWrite;SharedAccessKey", Environment.GetEnvironmentVariable("EventHubKey"));
            string name = "stardemo";

            // set up the event-hub communicator
            EventHubClient myEventHub = EventHubClient.CreateFromConnectionString(connectionString, name);

            // build the message and encode for sending
            string message = String.Format("{location:{0},datetime:{1}}", deviceLocation,dateTime);
            EventData myEventData = new EventData(Encoding.UTF8.GetBytes(message));

            // try and send the message
            bool success = false;
            try
            {
                myEventHub.Send(myEventData);
                success = true; // hooray!
            }
            catch (Exception)
            {
                // that didn't work, now what?
                throw;
            }
            return success;
        }
    public void Run() {
      lock (this.m_instanceLock) {
        EventData data = new EventData();

        this.m_runningThread = Thread.CurrentThread;

        while (!this.m_isShuttingDown) {
          lock (this.m_events) {
            LinkedListNode<EventData> firstItem = this.m_events.First;
            if (firstItem != null) {
              data = firstItem.Value;
              this.m_events.RemoveFirst();
            } else {
              data.Function = null;
              data.Parameters = null;
            }
          }

          if (data.Function == null) {
            this.m_eventsWaiting.WaitOne();
          } else {
            data.Function.DynamicInvoke(data.Parameters);
            if (data.Executed != null) {
              data.Executed.Set();
            }
          }
        }

        this.m_shutdownCompleteEvent.Set();
      }
    }
Beispiel #15
0
    public override void OnEvent(EventData eventData)
    {
        SubCode subcode = ParameterTool.GetSubCode(eventData.Parameters);
        switch (subcode)
        {
            case SubCode.CreateEnemy:
                CreateEnemyModel model = ParameterTool.GetParameter<CreateEnemyModel>(eventData.Parameters,
                    ParameterCode.CreateEnemyModel);
                if (OnCreateEnemy != null)
                {
                    OnCreateEnemy(model);
                }
                break;
            case SubCode.SyncPositionAndRotation:
                EnemyPositionModel model1 = ParameterTool.GetParameter<EnemyPositionModel>(eventData.Parameters,
                    ParameterCode.EnemyPositionModel);
                if (OnSyncEnemyPositionAndRotation != null)
                {
                    OnSyncEnemyPositionAndRotation(model1);
                }
                break;

            case SubCode.SyncAnimation:
                EnemyAnimationModel model2 = ParameterTool.GetParameter<EnemyAnimationModel>(eventData.Parameters,ParameterCode.EnemyAnimationModel);
                if (OnSyncEnemyAnimation != null)
                {
                    OnSyncEnemyAnimation(model2);
                }
                break;
        }
    }
Beispiel #16
0
 private void SendDeviceEventStream(EventHubClient eventHubClient)
 {
     var allEvents = new List<EventData>();
     for (int i = 0; i < DeviceSendingDetails.NumberOfDevices; i++)
     {
         string deviceName = "device" + i;
         var rand = new Random();
         // set up the modifier to enable 
         float modifier = 1.0F;
         if (DeviceSendingDetails.FailureConditions.Any(device => device.FailedDeviceId == i))
         {
             var deviceDetails = DeviceSendingDetails.FailureConditions.First(device => device.FailedDeviceId == i);
             modifier = modifier += deviceDetails.FailedDeviceGradient;
         }
         var deviceValue = rand.Next((int) ((DeviceSendingDetails.TemperatureMin * modifier)*100),
             (int) ((DeviceSendingDetails.TemperatureMax * modifier)*100));
         var deviceData = new DeviceData()
         {
             deviceid = deviceName,
             temperature = (deviceValue/100F),
             timestamp = DateTime.UtcNow
         };
         var jsonDeviceDetail = JsonConvert.SerializeObject(deviceData);
         var encodedPayload = Encoding.UTF8.GetBytes(jsonDeviceDetail);
         var eventData = new EventData(encodedPayload)
         {
             PartitionKey = "devices"
         };
         allEvents.Add(eventData);
     }
     eventHubClient.SendBatch(allEvents);
 }
 public void OnEvent(EventData eData)
 {
     if (eData.eventType == "PLACE_CLAIM_OBJECT") {
         if (GetBuildingState() != WorldBuildingState.PlaceItem)
             return;
         if (!open)
             ToggleOpen();
         OID itemOID = OID.fromString(eData.eventArgs[0]);
         itemBeingPlaced = ClientAPI.ScriptObject.GetComponent<Inventory>().GetInventoryItem(itemOID);
         // Does the item have a ClaimObject effect?
         List<int> effectPositions = itemBeingPlaced.GetEffectPositionsOfTypes("ClaimObject");
         if (effectPositions.Count == 0) {
             itemBeingPlaced = null;
             return;
         } else {
             string prefabName = itemBeingPlaced.itemEffectValues[effectPositions[0]];
             prefabName = prefabName.Remove(0, 17);
             prefabName = prefabName.Remove(prefabName.Length - 7);
             // Create an instance of the game Object
             GameObject prefab = (GameObject)Resources.Load(prefabName);
             GetHitLocation();
             SetCurrentReticle((GameObject)UnityEngine.Object.Instantiate(prefab, hitPoint, Quaternion.identity));
         }
     } else if (eData.eventType == "CLAIM_OBJECT_CLICKED") {
         int objectID = int.Parse(eData.eventArgs[0]);
         if (GetBuildingState() == WorldBuildingState.SelectItem && activeClaim.claimObjects.ContainsKey(objectID)) {
             SetCurrentReticle(activeClaim.claimObjects[objectID]);
         }
     }
 }
 private void EndGameEventTask(EventData eventData)
 {
     if (eventData.Parameters.Count == 3)
     {
         string winnerName = (string)eventData.Parameters[(byte)EndGameBroadcastParameterItem.WinerName];
         int winnerMoney = (int)(Int64)eventData.Parameters[(byte)EndGameBroadcastParameterItem.WinerMoney];
         GameGlobal.playingGame = JsonConvert.DeserializeObject<Game>((string)eventData.Parameters[(byte)EndGameBroadcastParameterItem.GameDataString], new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
         if (OnMonopolyGameUpdate != null)
         {
             OnMonopolyGameUpdate(GameGlobal.playingGame);
         }
         else
         {
             DebugReturn(DebugLevel.Error, "event OnMonopolyGameUpdate is null");
         }
         if (OnEndGame != null)
         {
             OnEndGame(winnerName, winnerMoney);
         }
         else
         {
             DebugReturn(DebugLevel.Error, "event OnEndGame is null");
         }
     }
     else
     {
         DebugReturn(DebugLevel.Error, "EndGameEventTask parameter error");
     }
 }
Beispiel #19
0
 public CommitRequest(string context, string stream, EventData[] events, long expectedVersion)
 {
     ExpectedVersion = expectedVersion;
     Context = context;
     Stream = stream;
     Events = events;
 }
Beispiel #20
0
 public void OnEvent(EventData eData)
 {
     if (eData.eventType == "ERROR_MESSAGE") {
         errorMessage = eData.eventArgs[0];
         stopDisplay = Time.time + 3;
     }
 }
    void OnEvent( EventData e )
    {
        if (enableBodyTracking && e.serviceType == EventBase.ServiceType.ServiceTypeMocap )
        {
            int sourceID = (int)e.sourceId;
            if( !trackedBodies.ContainsKey( sourceID ) )
            {
                CreateBody(sourceID);
            }
        }
        else if (enableSpeechRecognition && e.serviceType == EventBase.ServiceType.ServiceTypeSpeech)
        {
            string speechString = e.getExtraDataString();
            float speechConfidence = e.posx;

            //Debug.Log("Received Speech: '" + speechString + "' at " +speechConfidence+ " confidence" );

            if( speechConfidence >= minimumSpeechConfidence )
            {
                foreach( GameObject voiceListeners in voiceCommandListeners )
                {
                    voiceListeners.SendMessage("OnVoiceCommand", speechString);
                }
            }
        }
    }
        public BufferedFrameData(byte[] frame, int actualFrameLength, EventData lastEventDataInFrame)
            : base(frame, actualFrameLength)
        {
            Guard.ArgumentNotNull(lastEventDataInFrame, "lastEventDataInFrame");

            _lastEventDataInFrame = lastEventDataInFrame;
        }
Beispiel #23
0
        public async Task<bool> SendAsync(object evt)
        {
            try
            {
                var bytes = this._serializer(evt);

                using (var eventData = new EventData(bytes))
                {
                    var stopwatch = Stopwatch.StartNew();

                    await _eventHubSender.SendAsync(eventData).ConfigureAwait(false);
                    stopwatch.Stop();

                    ScenarioSimulatorEventSource.Log.EventSent(stopwatch.ElapsedTicks);

                    return true;
                }
            }
            catch (ServerBusyException e)
            {
                ScenarioSimulatorEventSource.Log.ServiceThrottled(e);
            }
            catch (Exception e)
            {
                ScenarioSimulatorEventSource.Log.UnableToSend(e, evt.ToString());
            }

            return false;
        }
Beispiel #24
0
    public override void OnEventFunc(EventData data)
    {
        var newPos = transform.position;
        var speed = Speed;
        if (!UsePhysics && UseTimeScale)
        {
            Speed *= Time.smoothDeltaTime;
        }

        var addVec = (MoveDir * speed);
        if (!FollowXYZ.x)
        {
            addVec.x = 0;
        }
        if (!FollowXYZ.y)
        {
            addVec.y = 0;
        }
        if (!FollowXYZ.z)
        {
            addVec.z = 0;
        }
        if (!UsePhysics)
        {
            transform.position = transform.position + addVec;
            transform.position = newPos;
        }
        else
        {
            RigidBody.velocity = addVec;
        }
    }
Beispiel #25
0
    public override void OnEventFunc(EventData data)
    {
        var Seq = Action.Sequence(Actions);

        Action.Property(Seq, Mesh.GetProperty(o => o.color), TargetColor, Duration, EasingCurve);
        EditChecks(Seq);
    }
 private unsafe uint EventWrite(ref EventDescriptorInternal eventDescriptor, uint userDataCount, EventData* userData) 
 { 
     if (!m_isClassic)
         return ManifestEtw.EventWrite(m_regHandle, ref eventDescriptor, userDataCount, userData); 
     else
         return ClassicShimEventWrite(ref eventDescriptor, userDataCount, userData);
 }
    public StarCollectorPeer(IRpcProtocol protocol, IPhotonPeer unmanagedPeer)
        : base(protocol, unmanagedPeer)
    {
        #region Assigned ID
        lock (allocateIDLock)
        {
            playerID = lastAssignedID;
            lastAssignedID++;
        }

        //notify player of their ID
        EventData evt = new EventData()
        {
            Code = (byte)AckEventType.AssignPlayerID,
            Parameters = new Dictionary<byte, object>()
            {
                { (byte)Parameter.PlayerID, this.playerID }
            }
        };
        evt.Parameters[(byte)Parameter.PlayerID] = playerID;
        this.SendEvent(evt, new SendParameters());
        #endregion

        #region Join to world
        lock (StarCollectorGame.Instance)
        {
            StarCollectorGame.Instance.PeerJoined(this);
        }
        #endregion
    }
Beispiel #28
0
        void IPhotonPeerListener.OnEvent(EventData @event)
        {
            switch (@event.Code)
            {
                case (byte)EventCode.CounterData:
                    {
                        var name = (string)@event.Parameters[(byte)ParameterCode.CounterName];
                        var values = (float[])@event.Parameters[(byte)ParameterCode.CounterValues];
                        var timestamps = (long[])@event.Parameters[(byte)ParameterCode.CounterTimeStamps];
                        var curve = (LineItem)this.counterGraph.GraphPane.CurveList[name];
                        if (curve == null)
                        {
                            if (!this.startTime.HasValue)
                            {
                                this.startTime = DateTime.FromBinary(timestamps[0]);
                            }

                            Color color = this.colors[0];
                            this.colors.RemoveAt(0);
                            curve = this.counterGraph.GraphPane.AddCurve(name, new RollingPointPairList(90), color, SymbolType.Circle);
                            curve.Symbol.Fill = new Fill(curve.Color);
                            curve.Symbol.Size = 5;
                            curve.Line.IsSmooth = true;

                            //// curve.Line.SmoothTension = 0.5f;
                        }

                        var list = (IPointListEdit)curve.Points;
                        for (int index = 0; index < values.Length; index++)
                        {
                            DateTime time = DateTime.FromBinary(timestamps[index]);
                            TimeSpan diff = time.Subtract(this.startTime.GetValueOrDefault());
                            list.Add(diff.TotalSeconds, values[index]);
                        }

                        this.counterGraph.GraphPane.XAxis.Scale.Min = list[0].X;
                        this.counterGraph.GraphPane.XAxis.Scale.Max = list[list.Count - 1].X;

                        this.counterGraph.AxisChange();
                        this.counterGraph.Invalidate();
                        break;
                    }

                case (byte)EventCode.RadarUpdate:
                    {
                        var itemId = (string)@event.Parameters[(byte)ParameterCode.ItemId];
                        var itemType = (ItemType)(byte)@event.Parameters[(byte)ParameterCode.ItemType];
                        var position = (Vector)@event.Parameters[(byte)ParameterCode.Position];
                        var remove = (bool)@event.Parameters[(byte)ParameterCode.Remove];
                        this.tabPageRadar.OnRadarUpdate(itemId, itemType, position, remove);
                        break;
                    }

                default:
                    {
                        log.ErrorFormat("diagnostics: unexpected event {0}", (EventCode)@event.Code);
                        break;
                    }
            }
        }
 private void createEventButton_Click(object sender, EventArgs e)
 {
     EventData myevent = new EventData(0,
         null,
         Int32.Parse(foreignIdBox.Text),
         eventNameBox.Text,
         _cameras[cameraBox.SelectedIndex].ID,
         _folders[folderBox.SelectedIndex].ID,
         null,
         null,
         null,
         _templates[templateBox.SelectedIndex].ID,
         archiveStatusBox.SelectedItem.ToString(),
         (int) DateTime.Parse(durationBox.Text).TimeOfDay.TotalSeconds,
         broadcastCheckBox.Checked,
         recordCheckBox.Checked,
         autoStartCheckBox.Checked,
         DateTime.Parse(startTimeBox.Text),
         DateTime.Now,
         null,
         null,
         street1Box.Text,
         street2Box.Text,
         cityBox.Text,
         stateBox.Text,
         zipBox.Text,
         eventNameBox.Text,
         DateTime.Parse (startTimeBox.Text),
         DateTime.Now,
         consentAgendaCheckBox.Checked ? 1 : 0);
     EventID = _mediamanager.CreateEvent(myevent);
     this._success = true;
 }
    void OnEvent( EventData e )
    {
        if (enableBodyTracking && e.serviceType == EventBase.ServiceType.ServiceTypeMocap ) {
            int sourceID = (int)e.sourceId;
            if(sourceID > 1000) {
                float[] jointPosition = new float[3];
                e.getExtraDataVector3(0, jointPosition);
                if( !trackedBodies.ContainsKey (sourceID)) {
                    if (patientController.bodyId == -1) {
                        trackedBodies.Add( sourceID, jointPosition[2]);
                    }
                    if (patientController.bodyId != -1  && !SessionManager.GetInstance().isTutorialMode() ) {
                        trackedBodies.Add( sourceID, jointPosition[2]);
                        CreateBody( sourceID );
                    }
                } else {
                    trackedBodies[sourceID] = jointPosition[2];
                }
                if(patientController.bodyId == -1) {
                    UpdatePatientBody();
                }
            }
        } else if (enableSpeechRecognition && e.serviceType == EventBase.ServiceType.ServiceTypeSpeech) {
            string speechString = e.getExtraDataString();
            float speechConfidence = e.posx;

            Debug.Log("Received Speech: '" + speechString + "' at " +speechConfidence+ " confidence" );

            if(speechConfidence > minimumSpeechConfidence) {
                sessionManager.VoiceCommand(speechString);
            }

        }
    }