Exemplo n.º 1
0
        public static ViewportCommand Get(ViewportCommands.Id id)
        {
            if (Enum.IsDefined(typeof(ViewportCommands.Id), id))
            {
                if (Commands.TryGetValue(id, out var value))
                {
                    return(value);
                }

                return(new ViewportCommand(id));
            }

            return(null);
        }
Exemplo n.º 2
0
 private ViewportCommand(ViewportCommands.Id id)
 {
     this.Id      = id;
     Commands[id] = this;
 }