Esempio n. 1
0
 /// <summary>
 /// Encode byte array content to QrCode matrix
 /// </summary>
 /// <exception cref="InputOutOfBoundaryException">
 /// This exception for string content is null, empty or too large</exception>
 public QrCode Encode(IEnumerable <byte> content)
 {
     if (content == null)
     {
         throw new InputOutOfBoundaryException("Input should not be empty or null");
     }
     else
     {
         return(new QrCode(QRCodeEncode.Encode(content, ErrorCorrectionLevel)));
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Encode string content to QrCode matrix
 /// </summary>
 /// <exception cref="InputOutOfBoundaryException">
 /// This exception for string content is null, empty or too large</exception>
 public QrCode Encode(string content)
 {
     if (string.IsNullOrEmpty(content))
     {
         throw new InputOutOfBoundaryException("Input should not be empty or null");
     }
     else
     {
         return(new QrCode(QRCodeEncode.Encode(content, ErrorCorrectionLevel)));
     }
 }