private void Preprocess(PathingCategory rootPathingCategory) { // Assign ParentCategory if (this.TryGetAggregatedAttributeValue(PackConstImpl.XML_KNOWNATTRIBUTE_TYPE, out string categoryNamespace)) { this.ParentPathingCategory = rootPathingCategory.GetOrAddCategoryFromNamespace(categoryNamespace); this.ExplicitAttributes.AddOrUpdateAttribute(new DynamicAttribute(PackConstImpl.XML_KNOWNATTRIBUTE_TYPE, () => this.ParentPathingCategory.Namespace)); } // Assign MapId if (this.TryGetAggregatedAttributeValue(PackConstImpl.XML_KNOWNATTRIBUTE_MAPID, out string mapId)) { InvariantParseUtil.TryParseInt(mapId, out _mapId); } }
private Trail(IPackResourceManager resourceManager, AttributeCollection explicitAttributes, PathingCategory rootPathingCategory) : base(resourceManager, PointOfInterestType.Trail, explicitAttributes, rootPathingCategory) /* NOOP */ }
public PointOfInterest(IPackResourceManager resourceManager, PointOfInterestType type, AttributeCollection explicitAttributes, PathingCategory rootPathingCategory) { this.ResourceManager = resourceManager; this.Type = type; this.ExplicitAttributes = explicitAttributes; Preprocess(rootPathingCategory); }