Create() 공개 정적인 메소드

public static Create ( string type ) : Shape
type string
리턴 Shape
예제 #1
0
        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));
        }
예제 #2
0
        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;
            }
        }