GrpcExtensionsOptions.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace TEAMModelOS.SDK.Module.GrpcServer.Extensions
  5. {
  6. public class GrpcExtensionsOptions
  7. {
  8. private static Lazy<GrpcExtensionsOptions> instance = new Lazy<GrpcExtensionsOptions>(() => new GrpcExtensionsOptions(), true);
  9. public static GrpcExtensionsOptions Instance => instance.Value;
  10. private GrpcExtensionsOptions()
  11. {
  12. }
  13. /// <summary>
  14. /// grpc服务的包名
  15. /// </summary>
  16. public string GlobalPackage { get; set; }
  17. /// <summary>
  18. /// grpc服务的对外服务名
  19. /// </summary>
  20. public string GlobalService { get; set; }
  21. /// <summary>
  22. /// 生成proto文件的c#命名空间
  23. /// </summary>
  24. public string ProtoNameSpace { get; set; }
  25. /// <summary>
  26. /// 是否为基础服务生成proto文件
  27. /// </summary>
  28. public bool GenBaseServiceProtoEnable = false;
  29. /// <summary>
  30. /// proto的message可能的开头的关键字
  31. /// </summary>
  32. public List<string> ProtoMsgStartWithKeywords { get; set; } = new List<string> { "message", "enum" };
  33. public bool GlobalSaveResponseEnable { get; set; } = false;
  34. public List<string> FillPropExcludePrefixs { get; set; } = new List<string> { "Google." };
  35. }
  36. }