Example #1
0
 public SerializableNotificationsListItem ToXMLItem()
 {
     return(new SerializableNotificationsListItem()
     {
         NotificationID = NotificationID,
         Read = Read,
         SenderID = SenderID,
         SentDate = SentDate,
         TypeID = EveNotificationType.GetID(Type)
     });
 }
Example #2
0
        /// <summary>
        /// Constructor from the API.
        /// </summary>
        /// <param name="ccpCharacter">The CCP character.</param>
        /// <param name="src">The source.</param>
        internal EveNotification(CCPCharacter ccpCharacter, EsiNotificationsListItem src)
        {
            string typeCode = src.Type;

            m_ccpCharacter = ccpCharacter;
            NotificationID = src.NotificationID;
            TypeID         = EveNotificationType.GetID(typeCode);
            TypeName       = EveNotificationType.GetName(TypeID);
            m_senderID     = src.SenderID;
            m_title        = string.Empty;
            m_senderName   = (m_senderID == 0L) ? "EVE System" : EveIDToName.GetIDToName(m_senderID);
            SentDate       = src.SentDate;
            Recipient      = new List <string> {
                ccpCharacter.Name
            };
            EVENotificationText = new EveNotificationText(this, TypeID, src.NotificationText);
        }
Example #3
0
        /// <summary>
        /// Constructor from the API.
        /// </summary>
        /// <param name="ccpCharacter">The CCP character.</param>
        /// <param name="src">The source.</param>
        internal EveNotification(CCPCharacter ccpCharacter, EsiNotificationsListItem src)
        {
            m_ccpCharacter = ccpCharacter;

            NotificationID = src.NotificationID;
            TypeID         = EveNotificationType.GetID(src.Type);
            m_senderID     = src.SenderID;
            m_senderName   = (m_senderID == 0L) ? "EVE System" : EveIDToName.GetIDToName(m_senderID);
            SentDate       = src.SentDate;
            Recipient      = new List <string> {
                ccpCharacter.Name
            };
            EVENotificationText = new EveNotificationText(this, new SerializableNotificationTextsListItem
            {
                NotificationID   = 0,
                NotificationText = String.Empty,
            });
        }