GetMessageUrl() public static méthode

public static GetMessageUrl ( int messageId ) : string
messageId int
Résultat string
Exemple #1
0
 /// <summary>
 /// Хвост (теги &lt;a> и &lt;img>) для локальных ссылок.
 /// </summary>
 /// <param name="provider"></param>
 /// <param name="mid">ID сообщения.</param>
 private static string GetMsgInDbLinkPostfix(
     IServiceProvider provider,
     int mid)
 {
     return(string.Format(_imageFormatPostfix,
                          SiteUrlHelper.GetMessageUrl(mid),
                          GetImageUri(provider, "ExtBrowser", StyleImageType.Small),
                          SR.MsgExtBrowserLinkTitle));
 }
Exemple #2
0
        public string GetNotFoundMessage(int mid)
        {
            const string messageFormat =
                _imageLinkFormat + "&nbsp;<a class='m' href='{0}' title='{1}'>{1}</a>&nbsp;";

            var styleImageManager = _serviceProvider.GetRequiredService <IStyleImageManager>();
            var absentMessage     = string.Format(messageFormat,
                                                  FormatUri(JanusProtocolResourceType.MessageAbsent, mid.ToString()),
                                                  SR.MessageAbsentLoadTitle,
                                                  styleImageManager.GetImageUri("MsgNotInDb", StyleImageType.ConstSize));

            var externalLink = string.Format(_imageLinkFormat,
                                             SiteUrlHelper.GetMessageUrl(mid),
                                             SR.MsgExtBrowserLinkTitle,
                                             styleImageManager.GetImageUri("ExtBrowser", StyleImageType.Small));

            return(string.Format(
                       GetStringTemplate(_templateMessageNotFound),
                       string.Format(SR.MessageNotFound, mid),
                       absentMessage + externalLink));
        }
Exemple #3
0
 public void ExecuteOpenMessageOnRsdn(ICommandContext context, int?messageId)
 {
     context.OpenUrlInBrowser(
         SiteUrlHelper.GetMessageUrl(
             ForumCommandHelper.GetMessageId(context, messageId)));
 }
Exemple #4
0
        public void ExecuteCopyMessageAddress(ICommandContext context, int?messageId)
        {
            var msg = ForumMessageCommandHelper.GetMessage(context, messageId);

            ClipboardHelper.CopyUrl(SiteUrlHelper.GetMessageUrl(msg.ID), msg.Subject);
        }