当前位置: 首页>>代码示例>>C#>>正文


C# User.GetFullName方法代码示例

本文整理汇总了C#中User.GetFullName方法的典型用法代码示例。如果您正苦于以下问题:C# User.GetFullName方法的具体用法?C# User.GetFullName怎么用?C# User.GetFullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在User的用法示例。


在下文中一共展示了User.GetFullName方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendEventInvitationNotification

        public int SendEventInvitationNotification(User customer, int languageId, int storeId)
        {
            var store = _storeService.GetStoreById(storeId) ?? _storeContext.CurrentStore;

            languageId = EnsureLanguageIsActive(languageId, store.Id);

            var messageTemplate = GetLocalizedActiveMessageTemplate("MobSocial.EventInvitationNotification", store.Id);
            if (messageTemplate == null)
                return 0;

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);

            //tokens
            var tokens = new List<Token>();
            _messageTokenProvider.AddStoreTokens(tokens, store, emailAccount);
            _messageTokenProvider.AddUserTokens(tokens, customer);

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var toEmail = customer.Email;
            var toName = customer.GetFullName().ToTitleCase();

            return SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName);
        }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:25,代码来源:MobSocialMessageService.cs

示例2: SendVotingReminderNotification

        public int SendVotingReminderNotification(User sender, string receiverEmail, string receiverName, VideoBattle videoBattle, int languageId,
            int storeId)
        {
            var store = _storeService.GetStoreById(storeId) ?? _storeContext.CurrentStore;

            languageId = EnsureLanguageIsActive(languageId, store.Id);

            var messageTemplate = GetLocalizedActiveMessageTemplate("MobSocial.SomeoneInvitedYouToVoteNotification", store.Id);
            if (messageTemplate == null)
                return 0;

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);

            //tokens
            var tokens = new List<Token>
            {
                new Token("VideoBattle.Title", videoBattle.Name, true),
                new Token("VideoBattle.Url", string.Format("{0}/VideoBattles/VideoBattle/{1}", store.Url, videoBattle.Id) , true),
                new Token("Inviter.Name", sender.GetFullName() , true)

            };

            _messageTokenProvider.AddStoreTokens(tokens, store, emailAccount);
            _messageTokenProvider.AddUserTokens(tokens, sender);

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var toEmail = receiverEmail;
            var toName = receiverName;

            return SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName);
        }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:33,代码来源:MobSocialMessageService.cs

示例3: SendXDaysToBattleStartNotificationToParticipant

        public int SendXDaysToBattleStartNotificationToParticipant(User receiver, VideoBattle videoBattle, int languageId, int storeId)
        {
            var store = _storeService.GetStoreById(storeId) ?? _storeContext.CurrentStore;

            languageId = EnsureLanguageIsActive(languageId, store.Id);

            var messageTemplate = GetLocalizedActiveMessageTemplate("MobSocial.xDaysToBattleStartNotification", store.Id);
            if (messageTemplate == null)
                return 0;

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);

            //find the remaining days to start of battle
            var timeSpan = (int)Math.Ceiling(videoBattle.VotingStartDate.Subtract(DateTime.UtcNow).TotalDays);
            var formattedString = timeSpan > 1 ? string.Format("in {0} days", timeSpan) : "tomorrow";
            //tokens
            var tokens = new List<Token>
            {
                new Token("Battle.Title", videoBattle.Name, true),
                new Token("Battle.Url", string.Format("{0}/VideoBattle/{1}", store.Url, videoBattle.GetSeName(_workContext.WorkingLanguage.Id, true, false)), true),
                new Token("Battle.StartDaysString", formattedString , true)

            };

            _messageTokenProvider.AddStoreTokens(tokens, store, emailAccount);
            _messageTokenProvider.AddUserTokens(tokens, receiver);

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var toEmail = receiver.Email;
            var toName = receiver.GetFullName().ToTitleCase();

            return SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName);
        }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:35,代码来源:MobSocialMessageService.cs

示例4: SendVideoBattleSignupNotification

        public int SendVideoBattleSignupNotification(User challenger, User challengee, VideoBattle videoBattle, int languageId, int storeId)
        {
            var store = _storeService.GetStoreById(storeId) ?? _storeContext.CurrentStore;

            languageId = EnsureLanguageIsActive(languageId, store.Id);

            var messageTemplate = GetLocalizedActiveMessageTemplate("MobSocial.VideoBattleSignupNotification", store.Id);
            if (messageTemplate == null)
                return 0;

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);

            //tokens
            var tokens = new List<Token>
            {
                new Token("VideoBattle.Title", videoBattle.Name, true),
                new Token("VideoBattle.Url", string.Format("{0}/VideoBattles/VideoBattle/{1}", store.Url, videoBattle.Id) , true),
                new Token("Challenger.Name", challengee.GetFullName() , true)

            };

            _messageTokenProvider.AddStoreTokens(tokens, store, emailAccount);
            _messageTokenProvider.AddUserTokens(tokens, challengee);

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var toEmail = challenger.Email;
            var toName = challenger.GetFullName().ToTitleCase();

            return SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName);
        }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:32,代码来源:MobSocialMessageService.cs

示例5: SendVideoBattleCompleteNotification

        public int SendVideoBattleCompleteNotification(User customer, VideoBattle videoBattle, NotificationRecipientType recipientType, int languageId, int storeId)
        {
            var store = _storeService.GetStoreById(storeId) ?? _storeContext.CurrentStore;

            languageId = EnsureLanguageIsActive(languageId, store.Id);

            var messageTemplate = GetLocalizedActiveMessageTemplate(recipientType == NotificationRecipientType.Participant ? "MobSocial.VideoBattleCompleteNotificationToParticipants" : "MobSocial.VideoBattleCompleteNotificationToVoters", store.Id);
            if (messageTemplate == null)
                return 0;

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);

            //tokens
            var tokens = new List<Token>
            {
                new Token("VideoBattle.Title", videoBattle.Name, true),
                new Token("VideoBattle.Url", string.Format("{0}/VideoBattles/VideoBattle/{1}", store.Url, videoBattle.Id) , true),

            };

            _messageTokenProvider.AddStoreTokens(tokens, store, emailAccount);
            _messageTokenProvider.AddUserTokens(tokens, customer);

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var toEmail = customer.Email;
            var toName = customer.GetFullName().ToTitleCase();

            return SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName);
        }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:31,代码来源:MobSocialMessageService.cs

示例6: SendSponsorshipStatusChangeNotification

        public int SendSponsorshipStatusChangeNotification(User receiver, SponsorshipStatus sponsorshipStatus, VideoBattle videoBattle, int languageId,
            int storeId)
        {
            var store = _storeService.GetStoreById(storeId) ?? _storeContext.CurrentStore;

            languageId = EnsureLanguageIsActive(languageId, store.Id);

            var messageTemplate = GetLocalizedActiveMessageTemplate("MobSocial.SponsorshipStatusChangeNotification", store.Id);
            if (messageTemplate == null)
                return 0;

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);

            //tokens
            var tokens = new List<Token>
            {
                new Token("Battle.Title", videoBattle.Name, true),
                new Token("Battle.Url", string.Format("{0}/VideoBattle/{1}", store.Url, videoBattle.GetSeName(_workContext.WorkingLanguage.Id, true, false)), true),
                new Token("Sponsorship.Status", sponsorshipStatus.ToString() , true)

            };

            _messageTokenProvider.AddStoreTokens(tokens, store, emailAccount);
            _messageTokenProvider.AddUserTokens(tokens, receiver);

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var toEmail = receiver.Email;
            var toName = receiver.GetFullName().ToTitleCase();

            return SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName);
        }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:33,代码来源:MobSocialMessageService.cs

示例7: SendSomeoneChallengedYouForABattleNotification

 public int SendSomeoneChallengedYouForABattleNotification(User challenger, User challengee, VideoBattle videoBattle,
     int languageId, int storeId)
 {
     return SendSomeoneChallengedYouForABattleNotification(challenger, challenger.Email,
         challenger.GetFullName().ToTitleCase(), videoBattle, languageId, storeId);
 }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:6,代码来源:MobSocialMessageService.cs

示例8: SendProductReviewNotification

        public int SendProductReviewNotification(User customer, List<Product> unreviewedProducts, int languageId, int storeId)
        {
            var store = _storeService.GetStoreById(storeId) ?? _storeContext.CurrentStore;

            languageId = EnsureLanguageIsActive(languageId, store.Id);

            var messageTemplate = GetLocalizedActiveMessageTemplate("MobSocial.ProductReviewNotification", store.Id);
            if (messageTemplate == null)
                return 0;

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);

            //tokens
            var tokens = new List<Token>();
            _messageTokenProvider.AddStoreTokens(tokens, store, emailAccount);
            _messageTokenProvider.AddUserTokens(tokens, customer);

            var productUrls = ProductListToHtmlTable(unreviewedProducts, languageId, storeId);

            tokens.Add(new Token("ProductUrls", productUrls));

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var toEmail = customer.Email;
            var toName = customer.GetFullName().ToTitleCase();
            var emailId = SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName);

            return emailId;
        }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:30,代码来源:MobSocialMessageService.cs

示例9: SendPendingFriendRequestNotification

        public int SendPendingFriendRequestNotification(User customer, int friendRequestCount, int languageId, int storeId)
        {
            var store = _storeService.GetStoreById(storeId);
            languageId = EnsureLanguageIsActive(languageId, store.Id);

            var messageTemplate = GetLocalizedActiveMessageTemplate("MobSocial.PendingFriendRequestNotification", store.Id);
            if (messageTemplate == null)
                return 0;

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);

            //tokens
            var tokens = new List<Token>();
            _messageTokenProvider.AddStoreTokens(tokens, store, emailAccount);
            _messageTokenProvider.AddUserTokens(tokens, customer);
            tokens.Add(new Token("FriendRequestCount", friendRequestCount.ToString()));

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var toEmail = customer.Email;
            var toName = customer.GetFullName().ToTitleCase();

            return SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName);
        }
开发者ID:Console-Byte,项目名称:mobsocial,代码行数:25,代码来源:MobSocialMessageService.cs


注:本文中的User.GetFullName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。