Esempio n. 1
0
 public AlterSentToTdmsDatesClient(IEnumerable <string> ids,
                                   TDMSApplication app,
                                   CachedActiveVersions cache,
                                   EnoviaPutHttpClient client)
 {
     Ids    = ids;
     App    = app;
     Cache  = cache;
     Client = client;
 }
        public override void AppendLines()
        {
            AppendLine("Report");
            Append("amount of IDs in Enovia ");
            AppendLine($"{Ecas.Value.Count()}");
            Append("amount of IDs in TDMS ");
            var uniqueCachedIds = new CachedActiveVersions(TdmsContext).Select(i => i.Id)
                                  .Distinct();

            AppendLine(uniqueCachedIds.Count().ToString());
            var uniqueWebIds = Ecas.Value.Select(i => i.Id);
            var WebMinusTdms = uniqueWebIds.Except(uniqueCachedIds);

            if (WebMinusTdms.Any())
            {
                Append("IDs missing from TDMS: ");
                WebMinusTdms.ToList().ForEach(id => AppendLine(id));
            }
        }