public static Message Create(JupyterMessageContent content, Header parentHeader, IReadOnlyList <IReadOnlyList <byte> > identifiers = null, string signature = null) { if (content == null) { throw new ArgumentNullException(nameof(content)); } var messageType = JupyterMessageContent.GetMessageType(content); var session = parentHeader?.Session ?? Guid.NewGuid().ToString(); var message = new Message(Header.Create(messageType, session), parentHeader: parentHeader, content: content, identifiers: identifiers, signature: signature); return(message); }
public static Header Create(Type messageType, string session) { return(Create(JupyterMessageContent.GetMessageType(messageType), session)); }