public static IEnumerable <int> GetValuesByModule(this LeadScoreConditionType type, int module)
 {
     return(typeof(LeadScoreConditionType).GetFields(BindingFlags.Public | BindingFlags.Static)
            .Where(m =>
     {
         var x = (MessageModuleAttribute)m.GetCustomAttributes(typeof(MessageModuleAttribute), false).FirstOrDefault();
         return x.Modules.Contains(module) ? true : false;
     }).Select(m =>
     {
         return (int)(LeadScoreConditionType)m.GetValue(null);
     }));
 }
示例#2
0
        /// <summary>
        /// Add to topic(web page view)
        /// </summary>
        /// <param name="trackingDomain"></param>
        /// <param name="webVisitId"></param>
        /// <param name="contactId"></param>
        /// <param name="accountId"></param>
        /// <param name="visitType"></param>
        void addToTopic(int duration, int webVisitId, int contactId, int accountId, LeadScoreConditionType visitType, string webPage)
        {
            var message = new TrackMessage()
            {
                EntityId  = webVisitId,
                AccountId = accountId,
                ContactId = contactId,
                LeadScoreConditionType = (byte)visitType,
                LinkedEntityId         = duration,
                ConditionValue         = webPage,
            };

            messageService.SendMessages(new Messaging.Messages.SendMessagesRequest()
            {
                Message = message
            });
        }