/// <summary> /// Gets the result of the specified expression asynchronously. /// <para>The expression is returned as <see cref="WAResult"/></para> /// so you can manually go through the pods of the response (to get ANY information you'd like) /// <para>It is encouraged to use this method instead of <see cref="Solve"/></para> /// <remarks>An event is raised upon completion.</remarks> /// </summary> /// <param name="expression">The expression to solve.</param> /// <exception cref="WolframException">Throws in case of any error.</exception> /// <exception cref="ArgumentNullException">Throws if the specified argument is null.</exception> /// <returns>The result</returns> public void GetResultAsync(string expression) { if (string.IsNullOrEmpty(expression)) { throw new ArgumentNullException("expression", "Cannot evaluate a null string."); } var procedure = new RetrieveResultMethod(GetResult); lock (SyncLock) { procedure.BeginInvoke(expression, HandleResultReceived, expression); } }
/// <summary> /// Gets the result of the specified expression asynchronously. /// <para>The expression is returned as <see cref="WAResult"/></para> /// so you can manually go through the pods of the response (to get ANY information you'd like) /// <para>It is encouraged to use this method instead of <see cref="Solve"/></para> /// <remarks>An event is raised upon completion.</remarks> /// </summary> /// <param name="expression">The expression to solve.</param> /// <exception cref="WolframException">Throws in case of any error.</exception> /// <exception cref="ArgumentNullException">Throws if the specified argument is null.</exception> /// <returns>The result</returns> public void GetResultAsync(string expression) { if(expression.IsNullOrEmpty()) throw new ArgumentNullException("expression", sLConsole.GetString("Cannot evaluate a null string.")); var procedure = new RetrieveResultMethod(GetResult); lock(SyncLock) { procedure.BeginInvoke(expression, HandleResultReceived, expression); } }