protected override async Task OnActivateAsync() { String nodeType = this.ActorService.Context.NodeContext.NodeType; //VisualObject newObject = VisualObject.CreateRandom(this.Id.ToString()); VisualObject newObject = VisualObject.CreateOnNodeType(this.Id.ToString(), nodeType); ActorEventSource.Current.ActorMessage(this, "StateCheck {0}", (await this.StateManager.ContainsStateAsync(StatePropertyName)).ToString()); VisualObject result = await this.StateManager.GetOrAddStateAsync <VisualObject>(StatePropertyName, newObject); this.jsonString = result.ToJson(); // ACTOR MOVEMENT REFRESH this.updateTimer = this.RegisterTimer(this.MoveObject, null, TimeSpan.FromMilliseconds(10), TimeSpan.FromMilliseconds(10)); return; }