Beispiel #1
0
        //public NodeImpl()
        //{
        //}


        public void Foreach_ChildNodes(NodeImpl <T1, T2> .DELEGATE_NextNodes delegate_NextNodes)
        {
            bool toBreak = false;

            foreach (KeyValuePair <string, Node <T1, T2> > entry in this.NextNodes)//Foreach
            {
                delegate_NextNodes(entry.Key, entry.Value, ref toBreak);

                if (toBreak)
                {
                    break;
                }
            }
        }
Beispiel #2
0
        public Json_Val ToJsonVal(NodeImpl <T1, T2> node)
        {
            Json_Obj obj = new Json_Obj();

            KyokumenWrapper kWrap = node.Value as KyokumenWrapper;

            if (null != kWrap)
            {
                // TODO: ログが大きくなるので、1行で出力したあとに改行にします。

                Json_Prop prop = new Json_Prop("kyokumen", Util_Sky307.ToJsonVal(kWrap.KyokumenConst));
                obj.Add(prop);
            }
            else
            {
                Debug.Fail("this.Value as KyokumenWrapper じゃなかった。");
            }

            return(obj);
        }