示例#1
0
        private ContentPublisher CalculatePublisher(IHaveSourcePaths game)
        {
            if (!Publishers.Any())
            {
                throw new NotSupportedException("No supported Publishers found for: " + Id);
            }
            if (Publishers.HasPublisher(Publisher.withSIX))
            {
                return(Publishers.GetPublisher(Publisher.withSIX));
            }

            return(Publishers.HasPublisher(Publisher.Steam) &&
                   ((Game.SteamHelper.SteamFound && game.SteamDirectories.IsValid) || (Publishers.Count == 1))
                ? Publishers.GetPublisher(Publisher.Steam)
                : Publishers.First(x => x.Publisher != Publisher.Steam));
        }
示例#2
0
 public IAbsoluteDirectoryPath GetSourceDirectory(IHaveSourcePaths game)
 => game.ContentPaths.Path.GetChildDirectoryWithName(PackageName);
示例#3
0
 public ContentPublisher GetSource(IHaveSourcePaths game) => _source.Value;
        private ContentPublisher CalculatePublisher(IHaveSourcePaths game) {
            if (!Publishers.Any())
                throw new NotSupportedException("No supported Publishers found for: " + Id);
            if (Publishers.HasPublisher(Publisher.withSIX))
                return Publishers.GetPublisher(Publisher.withSIX);

            return Publishers.HasPublisher(Publisher.Steam) &&
                   ((Game.SteamHelper.SteamFound && game.SteamDirectories.IsValid) || (Publishers.Count == 1))
                ? Publishers.GetPublisher(Publisher.Steam)
                : Publishers.First(x => x.Publisher != Publisher.Steam);
        }
 private IAbsoluteDirectoryPath GetSourceRoot(IHaveSourcePaths game)
     => GetSource(game).Publisher == Publisher.Steam
         ? game.SteamDirectories.Workshop.ContentPath
         : game.ContentPaths.Path;
 public override ContentPublisher GetSource(IHaveSourcePaths game)
     => _publisher ?? (_publisher = CalculatePublisher(game));
 public override IAbsoluteDirectoryPath GetSourceDirectory(IHaveSourcePaths game)
     => GetSourceRoot(game).GetChildDirectoryWithName(GetSource(game).PublisherId);
示例#8
0
 public override IAbsoluteDirectoryPath GetSourceDirectory(IHaveSourcePaths game)
 => GetSourceRoot(game).GetChildDirectoryWithName(GetSource(game).PublisherId);
示例#9
0
 private IAbsoluteDirectoryPath GetSourceRoot(IHaveSourcePaths game)
 => GetSource(game).Publisher == Publisher.Steam
         ? game.SteamDirectories.Workshop.ContentPath
         : game.ContentPaths.Path;
示例#10
0
 public override ContentPublisher GetSource(IHaveSourcePaths game)
 => _publisher ?? (_publisher = CalculatePublisher(game));
示例#11
0
 public IAbsoluteDirectoryPath GetSourceDirectory(IHaveSourcePaths game)
     => game.ContentPaths.Path.GetChildDirectoryWithName(PackageName);
示例#12
0
 public ContentPublisher GetSource(IHaveSourcePaths game) => _source.Value;