예제 #1
0
 public TrackEntry(JToken node) : base(node)
 {
     if (node["id"] != null)
     {
         this._Id = ParseInt(node["id"].Value <string>());
     }
     if (node["trackEventType"] != null)
     {
         this._TrackEventType = (TrackEntryEventType)ParseEnum(typeof(TrackEntryEventType), node["trackEventType"].Value <string>());
     }
     if (node["psVersion"] != null)
     {
         this._PsVersion = node["psVersion"].Value <string>();
     }
     if (node["context"] != null)
     {
         this._Context = node["context"].Value <string>();
     }
     if (node["partnerId"] != null)
     {
         this._PartnerId = ParseInt(node["partnerId"].Value <string>());
     }
     if (node["entryId"] != null)
     {
         this._EntryId = node["entryId"].Value <string>();
     }
     if (node["hostName"] != null)
     {
         this._HostName = node["hostName"].Value <string>();
     }
     if (node["userId"] != null)
     {
         this._UserId = node["userId"].Value <string>();
     }
     if (node["changedProperties"] != null)
     {
         this._ChangedProperties = node["changedProperties"].Value <string>();
     }
     if (node["paramStr1"] != null)
     {
         this._ParamStr1 = node["paramStr1"].Value <string>();
     }
     if (node["paramStr2"] != null)
     {
         this._ParamStr2 = node["paramStr2"].Value <string>();
     }
     if (node["paramStr3"] != null)
     {
         this._ParamStr3 = node["paramStr3"].Value <string>();
     }
     if (node["ks"] != null)
     {
         this._Ks = node["ks"].Value <string>();
     }
     if (node["description"] != null)
     {
         this._Description = node["description"].Value <string>();
     }
     if (node["createdAt"] != null)
     {
         this._CreatedAt = ParseInt(node["createdAt"].Value <string>());
     }
     if (node["updatedAt"] != null)
     {
         this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>());
     }
     if (node["userIp"] != null)
     {
         this._UserIp = node["userIp"].Value <string>();
     }
     if (node["sessionId"] != null)
     {
         this._SessionId = ParseInt(node["sessionId"].Value <string>());
     }
 }
        public TrackEntry(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "id":
                    this._Id = ParseInt(propertyNode.InnerText);
                    continue;

                case "trackEventType":
                    this._TrackEventType = (TrackEntryEventType)ParseEnum(typeof(TrackEntryEventType), propertyNode.InnerText);
                    continue;

                case "psVersion":
                    this._PsVersion = propertyNode.InnerText;
                    continue;

                case "context":
                    this._Context = propertyNode.InnerText;
                    continue;

                case "partnerId":
                    this._PartnerId = ParseInt(propertyNode.InnerText);
                    continue;

                case "entryId":
                    this._EntryId = propertyNode.InnerText;
                    continue;

                case "hostName":
                    this._HostName = propertyNode.InnerText;
                    continue;

                case "userId":
                    this._UserId = propertyNode.InnerText;
                    continue;

                case "changedProperties":
                    this._ChangedProperties = propertyNode.InnerText;
                    continue;

                case "paramStr1":
                    this._ParamStr1 = propertyNode.InnerText;
                    continue;

                case "paramStr2":
                    this._ParamStr2 = propertyNode.InnerText;
                    continue;

                case "paramStr3":
                    this._ParamStr3 = propertyNode.InnerText;
                    continue;

                case "ks":
                    this._Ks = propertyNode.InnerText;
                    continue;

                case "description":
                    this._Description = propertyNode.InnerText;
                    continue;

                case "createdAt":
                    this._CreatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAt":
                    this._UpdatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "userIp":
                    this._UserIp = propertyNode.InnerText;
                    continue;
                }
            }
        }