Ejemplo n.º 1
0
        public static async Task FillControlCollectionForSearch <T, R>(
            this ControlCollection controlCollection,
            IList <T> entities,
            R entityControlView,
            CancellationToken token)
            where T : class, IEntity
            where R : IEntityControlView <T>
        {
            if (await controlCollection.СollectionEqualityTest(entities, token))
            {
                return;
            }

            var controls = await entities.CreateControlCollectionAsync(entityControlView, token);

            controlCollection.Clear();

            controlCollection.AddRange(controls);
        }