Exemplo n.º 1
0
 public void UpdateFrom(NetworkContent content) {
     Content = new NetworkContentSpec(content, Version);
     ContentId = content.Id;
     Name = content.Name;
     PackageName = content.PackageName;
     Image = content.Image;
     GameId = content.GameId;
     Author = content.Author;
     Path = content.GetPath();
     ContentSlug = content.ContentSlug;
     Version = content.Version;
     UpdatedVersion = content.UpdatedVersion;
 }
Exemplo n.º 2
0
        public override IEnumerable<IContentSpec<Content>> GetRelatedContent(List<IContentSpec<Content>> list = null,
            string constraint = null) {
            if (list == null)
                list = new List<IContentSpec<Content>>();

            if (list.Select(x => x.Content).Contains(this))
                return list;

            var spec = new NetworkContentSpec(this, constraint);
            list.Add(spec);
            foreach (var d in Dependencies)
                d.Content.GetRelatedContent(list, d.Constraint);
            list.RemoveAll(x => x.Content == this);
            list.Add(spec);

            return list;
        }