예제 #1
0
        private void SetMessageBox()
        {
            Func <object, object> ShowMsg = delegate(object o) {
                var txt = o.ToString();
                MessageBox.Show(txt);
                return(o);
            };

            Global.SetVariable("表示", SuffixFunc.Create <Func <object, object> >(ShowMsg, "を"));
        }
예제 #2
0
        private void SetConstractor()
        {
            Func <object, object> create = type => {
                if ((type is Type) == false)
                {
                    return(null);
                }
                var cInfo = ((Type)type).GetConstructor(new Type[0]);
                if (cInfo == null)
                {
                    return(null);
                }
                return(cInfo.Invoke(new object[0]));
            };

            Global.SetVariable("作成", SuffixFunc.Create(create, "を"));
        }