public string GetContentTemplate(ISignatureFormat format)
        {
            string path = GetPath(format, true);

            try
            {
                return(File.ReadAllText(path));
            }
            catch (Exception)
            {
                return(null);
            }
        }
        private void WriteContent(string content, ISignatureFormat format, bool isTemplate)
        {
            string path = GetPath(format, isTemplate);

            if (format == ISignatureFormat.HTML)
            {
                // [KOE-70] If the html file does not have a BOM, it sometimes gives encoding errors.
                File.WriteAllText(path, content, new UTF8Encoding(true));
            }
            else
            {
                File.WriteAllText(path, content);
            }
        }
        private string GetPath(ISignatureFormat format, bool template)
        {
            // Determine suffix
            string suffix = "txt";

            switch (format)
            {
            case ISignatureFormat.HTML: suffix = "htm"; break;
            }

            if (template)
            {
                suffix += ".template";
            }

            return(GetPath(_name, suffix));
        }
 public void SetContentTemplate(string content, ISignatureFormat format)
 {
     WriteContent(content, format, true);
 }
 public void SetContent(string content, ISignatureFormat format)
 {
     WriteContent(content, format, false);
 }