Inheritance: NetworkContent, IModContent
        public void ConfirmDependencyConstraints() {
            var mod1 = new ModNetworkContent("@test-mod-1", GameGuids.Arma3);
            var mod2 = new ModNetworkContent("@test-mod-2", GameGuids.Arma3);
            mod1.Dependencies.Add(new NetworkContentSpec(mod2, "1.0.0"));

            mod1.GetRelatedContent().First().Constraint.ShouldEqual("1.0.0");
        }
 public static ModNetworkContent FromSteamId(ulong contentId, Guid gameId) {
     var contentIdStr = contentId.ToString();
     var content = new ModNetworkContent(contentIdStr, gameId) {
         Id = contentId.CreateSteamContentIdGuid()
     };
     content.Publishers.Add(new ContentPublisher(Publisher.Steam, contentIdStr));
     return content;
 }
        public static ModNetworkContent FromSteamId(ulong contentId, Guid gameId)
        {
            var contentIdStr = contentId.ToString();
            var content      = new ModNetworkContent(contentIdStr, gameId)
            {
                Id = contentId.CreateSteamContentIdGuid()
            };

            content.Publishers.Add(new ContentPublisher(Publisher.Steam, contentIdStr));
            return(content);
        }
        public void ConfirmDependencyConstraintsOverride() {
            var mod1 = new ModNetworkContent("@test-mod-1", GameGuids.Arma3);
            var mod2 = new ModNetworkContent("@test-mod-2", GameGuids.Arma3);
            mod1.Dependencies.Add(new NetworkContentSpec(mod2, "1.0.0"));

            var collection = new LocalCollection(GameGuids.Arma3, "Test collection", new[] {
                new ContentSpec(mod1),
                new ContentSpec(mod2, "2.0.0")
            });

            collection.GetRelatedContent().First().Constraint.ShouldEqual("2.0.0");
        }
 public bool IsMatch(ModNetworkContent c)
     => c.Publishers.Any(x => Publishers.Any(p => (p.Id == x.PublisherId) && (p.Type == x.Publisher)))
        || PackageNames.ContainsIgnoreCase(c.PackageName)
        || Ids.Contains(c.Id);