File tree Expand file tree Collapse file tree
Synapse.Core/Classes/Enums Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,28 @@ public enum SerializationType
77 Yaml ,
88 Xml ,
99 Json ,
10+ Html ,
1011 Unspecified
1112 }
13+
14+ public struct SerializationContentType
15+ {
16+ public const string Yaml = "application/yaml" ;
17+ public const string Xml = "application/xml" ;
18+ public const string Json = "application/json" ;
19+ public const string Html = "text/html" ;
20+ public const string Unspecified = "text/plain" ;
21+
22+ public static string GetContentType ( SerializationType serializationType )
23+ {
24+ switch ( serializationType )
25+ {
26+ case SerializationType . Xml : { return Xml ; }
27+ case SerializationType . Json : { return Json ; }
28+ case SerializationType . Html : { return Html ; }
29+ case SerializationType . Unspecified : { return Unspecified ; }
30+ default : { return Yaml ; }
31+ }
32+ }
33+ }
1234}
You can’t perform that action at this time.
0 commit comments