public Task CreateShape(string type = "rectangle") { string name = Caller.user["Name"]; var user = _users[name]; var shape = Shape.Create(type); shape.ChangedBy = user; _shapes.TryAdd(shape.ID, shape); return(Clients.shapeAdded(shape)); }
public void CreateShape(string type = "rectangle") { var user = _users[Caller.user["Name"]]; var shape = Shape.Create(type); shape.ChangedBy = user; _shapes.Add(shape); Task task = Clients.shapeAdded(shape); task.Wait(); if (task.Exception != null) { throw task.Exception; } }