public static string get_Text(this API_EtherpadLite etherPad)
        {
            etherPad.ensure_Pad_Exists();
            var result = etherPad.EtherpadLite.GetText(etherPad.CurrentPad);

            if (result.Code == EtherpadReturnCodeEnum.Ok)
            {
                etherPad.LastKnownText = result.Data.Text;
                return(etherPad.LastKnownText);
            }
            "[API_EtherpadLite][get_Text]: {0}".error(result.Message);
            return(null);
        }
        public static API_EtherpadLite set_Text(this API_EtherpadLite etherPad, string text)
        {
            if (etherPad.LastKnownText == text)
            {
                "[API_EtherpadLite][set_Text]: skiping update since the content is the same".info();
            }
            //text = text.fixCRLF();
            etherPad.ensure_Pad_Exists();
            "[API_EtherpadLite][set_Text]: updating pad with text with size: {0}".info(text.size());
            var result = etherPad.EtherpadLite.SetText(etherPad.CurrentPad, text);

            if (result.Code != EtherpadReturnCodeEnum.Ok)
            {
                "[API_EtherpadLite][set_Text]: {0}".error(result.Message);
            }
            else
            {
                etherPad.LastKnownText = text;
            }
            return(etherPad);
        }
 public static API_EtherpadLite ensure_Pad_Exists(this API_EtherpadLite etherPad)
 {
     return(etherPad.ensure_Pad_Exists(etherPad.CurrentPad));
 }
 public static API_EtherpadLite open_Pad(this API_EtherpadLite etherPad, string padName)
 {
     return(etherPad.ensure_Pad_Exists(padName));
 }