You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
445 B

  1. using System;
  2. namespace DotNetCore.CAP.AmazonSQS
  3. {
  4. internal static class TopicNormalizer
  5. {
  6. public static string NormalizeForAws(this string origin)
  7. {
  8. if (origin.Length > 256)
  9. {
  10. throw new ArgumentOutOfRangeException(nameof(origin) + " character string length must between 1~256!");
  11. }
  12. return origin.Replace(".", "-").Replace(":", "_");
  13. }
  14. }
  15. }