示例#1
0
文件: WMap.cs 项目: giosil/NetJsonRpc
        public object[] GetArray(string key, bool notNull = false)
        {
            if (map.ContainsKey(key))
            {
                return(WUtil.ToArray(map[key]));
            }

            if (notNull)
            {
                return(new object[0]);
            }

            return(null);
        }
示例#2
0
        public object[] GetArray(int index, bool notNull = false)
        {
            object value = list[index];

            if(value != null)
            {
                return WUtil.ToArray(value);
            }

            if (notNull)
            {
                return new object[0];
            }

            return null;
        }