Esempio n. 1
0
        public static Header Create <T>(string session)
            where T : JupyterMessageContent
        {
            var messageType = JupyterMessageContent.GetMessageType(typeof(T));

            return(Create(messageType, session));
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public static Header Create(Type messageType, string session)
 {
     return(Create(JupyterMessageContent.GetMessageType(messageType), session));
 }