コード例 #1
0
ファイル: PyVariable.cs プロジェクト: devna13/KodiSharp
 public string CallFunction(
     PythonFunction function,
     string argumentsBody
     )
 {
     return(PythonInterop.EvalToResult(string.Format("{0}.{1}({2})",
                                                     this.PyName, function.Function, argumentsBody
                                                     )).Value);
 }
コード例 #2
0
ファイル: PyVariable.cs プロジェクト: mediabuff/KodiSharp
        public string CallFunction(
            PythonFunction function,
            List <object> arguments  = null,
            EscapeFlags escapeMethod = EscapeFlags.Quotes | EscapeFlags.StripNullItems
            )
        {
            if (arguments == null)
            {
                arguments = new List <object>();
            }

            List <string> textArguments = PythonInterop.EscapeArguments(arguments, escapeMethod);

            return(PythonInterop.EvalToResult(string.Format("{0}.{1}({2})",
                                                            this.PyName, function.Function, string.Join(", ", textArguments)
                                                            )));
        }