Inheritance: DocumentSigner
コード例 #1
0
        /// <summary>
        /// Initialize a signer for the specified file name.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns></returns>
        public static DocumentSigner For(string type)
        {
            type = NormalizeExtension(type);
            DocumentSigner result;

            switch (type)
            {
            case "pdf":
                result = new AdobePdfSigner();
                break;

            case "xlsx":
            case "docx":
            case "pptx":
                result = new OfficeOpenXmlSigner();
                break;

            case "xml":
                result = new XmlSigner();
                break;

            default:
                result = null;
                break;
            }
            return(result);
        }
コード例 #2
0
 /// <summary>
 /// Initialize a signer for the specified file name.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 public static DocumentSigner For(string type)
 {
     type = NormalizeExtension(type);
     DocumentSigner result;
     switch(type)
     {
         case "pdf":
             result = new AdobePdfSigner();
             break;
         case "xlsx":
         case "docx":
         case "pptx":
             result = new OfficeOpenXmlSigner();
             break;
         case "xml":
             result = new XmlSigner();
             break;
         default:
             result = null;
             break;
     }
     return result;
 }