Exemple #1
0
 /// <summary>
 /// Retrives JavaScript code to send a Message from the client to the server.
 /// </summary>
 /// <param name="messageGetter">The Method to get the Notification Contents from</param>
 /// <returns>A piece of JavaScript code</returns>
 public IJSPiece SendMessage(IJSPiece messageGetter)
 {
     return
         (SendingFunction.callFunction(
              new JSValue(messageGetter.GetJsCode(SessionData.CurrentSession, CallingContext.Inner))));
 }
Exemple #2
0
 /// <summary>
 /// Creates a notification to execute a javascript piece of code in the client
 /// </summary>
 /// <param name="piece">the script to execute</param>
 /// <returns>the specified notification</returns>
 public static Notification ExecuteScript(IJSPiece piece)
 {
     return(new ExecuteScriptNotification(piece.GetJsCode(SessionData.CurrentSession)));
 }