public Tag(JToken node) : base(node)
 {
     if (node["id"] != null)
     {
         this._Id = ParseInt(node["id"].Value <string>());
     }
     if (node["tag"] != null)
     {
         this._Tag = node["tag"].Value <string>();
     }
     if (node["taggedObjectType"] != null)
     {
         this._TaggedObjectType = (TaggedObjectType)StringEnum.Parse(typeof(TaggedObjectType), node["taggedObjectType"].Value <string>());
     }
     if (node["partnerId"] != null)
     {
         this._PartnerId = ParseInt(node["partnerId"].Value <string>());
     }
     if (node["instanceCount"] != null)
     {
         this._InstanceCount = ParseInt(node["instanceCount"].Value <string>());
     }
     if (node["createdAt"] != null)
     {
         this._CreatedAt = ParseInt(node["createdAt"].Value <string>());
     }
     if (node["updatedAt"] != null)
     {
         this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>());
     }
 }
        public TagFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "objectTypeEqual":
                    this._ObjectTypeEqual = (TaggedObjectType)StringEnum.Parse(typeof(TaggedObjectType), propertyNode.InnerText);
                    continue;

                case "tagEqual":
                    this._TagEqual = propertyNode.InnerText;
                    continue;

                case "tagStartsWith":
                    this._TagStartsWith = propertyNode.InnerText;
                    continue;

                case "instanceCountEqual":
                    this._InstanceCountEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "instanceCountIn":
                    this._InstanceCountIn = ParseInt(propertyNode.InnerText);
                    continue;
                }
            }
        }
        static void Postfix(ItemRegistry __instance, Dictionary <TaggedObjectType, List <ITaggedItem> > ___itemsByType)
        {
            Array values = Enum.GetValues(typeof(MCTaggedObjectType));

            for (int i = 0; i < values.Length; i++)
            {
                TaggedObjectType key = (TaggedObjectType)values.GetValue(i);
                ___itemsByType[key] = new List <ITaggedItem>();
            }
        }
 public TagFilter(JToken node) : base(node)
 {
     if (node["objectTypeEqual"] != null)
     {
         this._ObjectTypeEqual = (TaggedObjectType)StringEnum.Parse(typeof(TaggedObjectType), node["objectTypeEqual"].Value <string>());
     }
     if (node["tagEqual"] != null)
     {
         this._TagEqual = node["tagEqual"].Value <string>();
     }
     if (node["tagStartsWith"] != null)
     {
         this._TagStartsWith = node["tagStartsWith"].Value <string>();
     }
     if (node["instanceCountEqual"] != null)
     {
         this._InstanceCountEqual = ParseInt(node["instanceCountEqual"].Value <string>());
     }
     if (node["instanceCountIn"] != null)
     {
         this._InstanceCountIn = ParseInt(node["instanceCountIn"].Value <string>());
     }
 }
        public Tag(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "id":
                    this._Id = ParseInt(propertyNode.InnerText);
                    continue;

                case "tag":
                    this._Tag = propertyNode.InnerText;
                    continue;

                case "taggedObjectType":
                    this._TaggedObjectType = (TaggedObjectType)StringEnum.Parse(typeof(TaggedObjectType), propertyNode.InnerText);
                    continue;

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

                case "instanceCount":
                    this._InstanceCount = ParseInt(propertyNode.InnerText);
                    continue;

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

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