Ejemplo n.º 1
0
        public object GetMember(MemberContext context, string key)
        {
            switch (context.ContextType)
            {
            case MemberContextType.World:
                return(GetWorldMember(context.ResolvedContext as WorldMap, key));

            case MemberContextType.Player:
                return(GetPlayerMember(context.ResolvedContext as Player, key));

            default:
                throw new ArgumentException($"Cannot get non-static member in context '{context.ContextType}'");
            }
        }
Ejemplo n.º 2
0
        public void SetMember(MemberContext context, string key, object value)
        {
            switch (context.ContextType)
            {
            case MemberContextType.World:
                SetWorldMember(context.ResolvedContext as WorldMap, key, value);
                break;

            case MemberContextType.Player:
                SetPlayerMember(context.ResolvedContext as Player, key, value);
                break;

            default:
                throw new ArgumentException($"Cannot set non-static member in context '{context.ContextType}'");
            }
        }
Ejemplo n.º 3
0
 public MemberRoute(MemberContext context, string key)
 {
     Context     = context;
     AccessorKey = key;
 }