当前位置: 首页>>代码示例>>C#>>正文


C# INakoFuncCallInfo类代码示例

本文整理汇总了C#中INakoFuncCallInfo的典型用法代码示例。如果您正苦于以下问题:C# INakoFuncCallInfo类的具体用法?C# INakoFuncCallInfo怎么用?C# INakoFuncCallInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


INakoFuncCallInfo类属于命名空间,在下文中一共展示了INakoFuncCallInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: _append

 private object _append(INakoFuncCallInfo info)
 {
     object ary = info.StackPop(); // 参照渡しなので変数への参照が得られる
     object s   = info.StackPop();
     if (!(ary is NakoVariable))
     {
         throw new NakoPluginRuntimeException("『追加』の引数がvariableではありません");
     }
     NakoVariable ary_link = (NakoVariable)ary;
     if (ary_link.Body is NakoVarArray)
     {
         NakoVarArray arr = (NakoVarArray)ary_link.Body;
         NakoVariable new_item = new NakoVariable();
         new_item.SetBodyAutoType(s);
         arr.Add(new_item);
     }else if(ary_link.Body is string && (string)ary_link.Body==""){
         NakoVarArray arr = new NakoVarArray();
         NakoVariable new_item = new NakoVariable();
         new_item.SetBodyAutoType(s);
         arr.Add(new_item);
         ary_link.SetBody(arr,NakoVarType.Array);
     }
     // 結果をセット
     return null;
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:25,代码来源:NakoPluginArray.cs

示例2: _abort

 // Define Method
 public object _abort(INakoFuncCallInfo info)
 {
     string s = info.StackPopAsString();
     foreach(System.Diagnostics.Process p in System.Diagnostics.Process.GetProcessesByName(s)){
         p.Kill();
     }
     return null;
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:9,代码来源:NakoPluginProcess.cs

示例3: _decode

 public object _decode(INakoFuncCallInfo info)
 {
     string s = info.StackPopAsString();
     var json = fastJSON.JSON.Instance.Parse(s);
     NakoVarArray a = ArrayToNakoVarArray(json);
     return a;
     //            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
     //            object json = serializer.Deserialize<object>(s);
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:9,代码来源:NakoPluginJSON.cs

示例4: _eval

 // Define Method
 public Object _eval(INakoFuncCallInfo info)
 {
     string s = info.StackPopAsString();
     NakoCompiler compiler = new NakoCompiler();
     compiler.DirectSource = s;
     NakoInterpreter runner = new NakoInterpreter(compiler.Codes);
     runner.Run();
     Console.WriteLine("EVALLOG=" + runner.PrintLog);
     return runner.globalVar.GetValue(0);
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:11,代码来源:NakoPluginEval.cs

示例5: _ps

 public object _ps(INakoFuncCallInfo info)
 {
     NakoVarArray result = new NakoVarArray();
     foreach(System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses()){
         try{
         result.SetValue(result.Count,p.ProcessName);
         }catch(Exception e){
         }
     }
     return result;
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:11,代码来源:NakoPluginProcess.cs

示例6: _encode

        //Dictionary<string,object> objects = new Dictionary<string, object>();
        public object _encode(INakoFuncCallInfo info)
        {
            object v = info.StackPop();
            if(v is NakoVarArray){
                NakoVarArray arr = (NakoVarArray)v;
                object objects = NakoVarArrayToArray(arr);
                return fastJSON.JSON.Instance.ToJSON(objects);
            //                JavaScriptSerializer serializer = new JavaScriptSerializer();
            //                string s = serializer.Serialize(objects);

            }
            return null;
        }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:14,代码来源:NakoPluginJSON.cs

示例7: _close

 public object _close(INakoFuncCallInfo info)
 {
     object c = info.StackPop();
     if(!(c is NpgsqlConnection)){
         throw new NakoPluginArgmentException("connection not found");
     }
     NpgsqlConnection con = (NpgsqlConnection)c;
     con.Close();
     return null;
     /*            if(!(c is ADODB.Connection)){
         throw new NakoPluginArgmentException("connection not found");
     }
     ADODB.Connection con = (ADODB.Connection)c;
     con.Close();
     return null;*/
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:16,代码来源:NakoPluginPgsql.cs

示例8: _directoryDialog

        public Object _directoryDialog(INakoFuncCallInfo info)
        {
            string s = info.StackPopAsString();

            FolderBrowserDialog fbd = new FolderBrowserDialog();

            //RootFolderには特殊フォルダしか指定できないのでとりあえずSelectedPathで代用
            fbd.SelectedPath = s;
            //ダイアログを表示する
            if (fbd.ShowDialog() == DialogResult.OK)
            {
                //OKボタンがクリックされたとき
                return fbd.SelectedPath;
            }
            return null;
        }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:16,代码来源:NakoPluginDialog.cs

示例9: _close

 public object _close(INakoFuncCallInfo info)
 {
     object stream = info.StackPop();
     if(stream is FileStream){
         FileStream filestream = (FileStream)stream;
         filestream.Close();
         filestream.Dispose();
     }
     else if(stream is StreamReader){
         StreamReader filestream = (StreamReader)stream;
         filestream.Close();
         filestream.Dispose();
     }
     else if(stream is StreamWriter){
         StreamWriter filestream = (StreamWriter)stream;
         filestream.Close();
         filestream.Dispose();
     }
     return null;
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:20,代码来源:NakoPluginStream.cs

示例10: _sample_addEx

 public Object _sample_addEx(INakoFuncCallInfo info)
 {
     Object ar = info.StackPop();
     Object b = info.StackPop();
     if (!(ar is NakoVariable))
     {
         throw new ApplicationException("『接続!』の引数が変数ではありません");
     }
     Object a = ((NakoVariable)ar).Body;
     Object c;
     if (a is string && b is string)
     {
         c = (string)a + (string)b;
     }
     else
     {
         c = null;
     }
     // 結果をセット
     ((NakoVariable)ar).SetBodyAutoType(c);
     return (c);
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:22,代码来源:NakoPluginSample.cs

示例11: _zeroFill

 /// <summary>
 /// ゼロ埋め
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 private object _zeroFill(INakoFuncCallInfo info)
 {
     long s = info.StackPopAsInt();
     string l = info.StackPopAsInt().ToString();
     return String.Format(@"{0:D"+l+"}",s);
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:11,代码来源:NakoPluginString.cs

示例12: _trim

 /// <summary>
 /// トリム
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 private object _trim(INakoFuncCallInfo info)
 {
     string s = info.StackPopAsString();
     return s.Trim();
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:10,代码来源:NakoPluginString.cs

示例13: _strpos

 private object _strpos(INakoFuncCallInfo info)
 {
     string s = info.StackPopAsString();
     string ss = info.StackPopAsString();
     int i = s.IndexOf(ss);
     return (i + 1); // 1からはじまるので
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:7,代码来源:NakoPluginString.cs

示例14: _right

 /// <summary>
 /// 右から部分文字列を返す
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 private object _right(INakoFuncCallInfo info)
 {
     string s = info.StackPopAsString();
     int len = (int)info.StackPopAsInt();
     return s.Substring(s.Length-len);
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:11,代码来源:NakoPluginString.cs

示例15: _replace

 /// <summary>
 /// 置換
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 private object _replace(INakoFuncCallInfo info)
 {
     string s = info.StackPopAsString();
     string search = info.StackPopAsString();
     string replace = info.StackPopAsString();
     return s.Replace(search,replace);
 }
开发者ID:wnoguchi,项目名称:nadesiko2,代码行数:12,代码来源:NakoPluginString.cs


注:本文中的INakoFuncCallInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。