Exemplo n.º 1
0
        public override bool Equals(object other)
        {
            if (other is TargetChannelConfig config &&
                PublishingInfraVersion == config.PublishingInfraVersion &&
                Id == config.Id &&
                string.Equals(AkaMSChannelName, config.AkaMSChannelName, StringComparison.OrdinalIgnoreCase) &&
                TargetFeeds.Count == config.TargetFeeds.Count &&
                TargetFeeds.Zip(config.TargetFeeds, (l, r) => l.Equals(r)).All(b => b) &&
                IsInternal == config.IsInternal &&
                Flatten == config.Flatten)
            {
                if (FilenamesToExclude is null)
                {
                    return(config.FilenamesToExclude is null);
                }

                if (config.FilenamesToExclude is null)
                {
                    return(false);
                }

                return(FilenamesToExclude.SequenceEqual(config.FilenamesToExclude));
            }

            return(false);
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return
         ($"\n Channel ID: '{Id}' " +
          $"\n Infra-version: '{PublishingInfraVersion}' " +
          $"\n AkaMSChannelName: '{AkaMSChannelName}' " +
          "\n Target Feeds:" +
          $"\n  {string.Join("\n  ", TargetFeeds.Select(f => $"{string.Join(", ", f.ContentTypes)} -> {f.FeedUrl}"))}" +
          $"\n SymbolTargetType: '{SymbolTargetType}' " +
          $"\n IsInternal: '{IsInternal}'" +
          $"\n FilenamesToExclude: \n\t{string.Join("\n\t", FilenamesToExclude)}" +
          $"\n Flatten: '{Flatten}'");
 }