@@ -13,48 +13,46 @@ public abstract class MessageIntegration
1313 private static readonly string MEGAFONE_GIF = "megafone.gif" ;
1414 private static readonly string LOGO_TYPINGHARD_16X16 = "logo-typinghard-16x16.png" ;
1515
16- protected internal string GetTitle ( )
16+ protected internal static string GetTitle ( )
1717 {
1818 return $ "Nova atualização da plataforma";
1919 }
2020
21- protected internal string GetVersion ( ChangeLog changeLog )
21+ protected internal static string GetVersion ( ChangeLog changeLog )
2222 {
2323 return $ "Versão: { changeLog . Number } ";
2424 }
2525
26- protected internal string GetAnnouncementImageUrl ( )
26+ protected internal static string GetAnnouncementImageUrl ( )
2727 {
2828 return $ "{ CDN_URL } { MEGAFONE_GIF } ";
2929 }
3030
31- protected internal string GetLogoTypingHard16x16Url ( )
31+ protected internal static string GetLogoTypingHard16x16Url ( )
3232 {
3333 return $ "{ CDN_URL } { LOGO_TYPINGHARD_16X16 } ";
3434 }
3535
36- protected internal string GetFileVersion ( )
36+ protected internal static string GetFileVersion ( )
3737 {
3838 System . Reflection . Assembly assembly = System . Reflection . Assembly . GetExecutingAssembly ( ) ;
3939 System . Diagnostics . FileVersionInfo fileVersionInfo = System . Diagnostics . FileVersionInfo . GetVersionInfo ( assembly . Location ) ;
4040 return fileVersionInfo . FileVersion ;
4141 }
4242
43- protected internal string GetNugetVersion ( )
43+ protected internal static string GetNugetVersion ( )
4444 {
4545 return $ "Powered by **Typing Hard** • nuget version { GetFileVersion ( ) } ";
4646 }
4747
48- protected internal HttpResponseMessage Notify ( object body )
48+ protected internal static HttpResponseMessage Notify ( object body )
4949 {
5050 var json = Newtonsoft . Json . JsonConvert . SerializeObject ( body ) ;
5151 var content = new StringContent ( json ,
5252 Encoding . UTF8 ,
5353 MIMETYPE ) ;
54- HttpClient client = new HttpClient ( ) ;
55- return client . PostAsync ( new Uri ( MessageConfig . URL ) ,
56- content ) . Result ;
57-
54+ using HttpClient client = new ( ) ;
55+ return client . PostAsync ( new Uri ( MessageConfig . URL ) , content ) . Result ;
5856 }
5957 }
6058}
0 commit comments