Ejemplo n.º 1
0
        public override IdCollection GetTemplateItemIds(CallContext context)
        {
#if DEBUG
            var timer = Stopwatch.StartNew();
#endif

            var result  = new IdCollection();
            var headIds = HeadProvider.GetTemplateItemIds(context) ?? new IdCollection();

            var readOnlyIds = ReadOnlyProviders
                              .SelectMany(x => x
                                          .GetTemplateItemIds()?
                                          .Select(ID.Parse) ?? EmptyIds);

            var ids = headIds
                      .Concat(readOnlyIds)
                      .GroupBy(x => x.Guid).Select(x => x.First()) // .Distinct()
                      .ToArray();

            result.Add(ids);

#if DEBUG
            this.Trace(result, timer, context);
#endif

            return(result);
        }