Cześć
Mam z parsowany pakiet ( protobuf) który chce powinienem dodać do listy. Nie zabradzo mogę sobie z tym poradzić

Kopiuj
[ProtoContract(UseProtoMembersOnly = true)]
    public class ThanksToUserNotificationMessage
    {
        [ProtoMember(1, IsRequired = true)]
        public Int64 uin { get; set; }

        [ProtoMember(2, IsRequired = true)]
        public string uin_name { get; set; }

        [ProtoMember(3, IsRequired = true)]
        public ThanksType thanks_type { get; set; }

        [ProtoMember(4, IsRequired = true)]
        public Int32 time { get; set; }
    }

Tu go parsuje

Kopiuj
private void ParseThanksToUserNotificationMessage()
        {
            _log.MessageInDebug();

            var message = GetReceivedMessageAsProtoBufStruct<ThanksToUserNotificationMessage>();

            ProtoBufManagerInstance.OnThanksToUserNotification_PackageReceived(message.uin, message.uin_name, message.thanks_type, message.time);
        } 

NotificationModel

Kopiuj
public class NotificationModel
    {
        public string Title { get; set; }
    }

tu chce go dodać

Kopiuj
public ObservableCollection<NotificationModel> NotificationList { get; private set; } = new ObservableCollection<NotificationModel>();