Код: Выделить всё
public async Task GetFilesFromSharePoint(string siteId, string driveId, string? itemPath)
{
IDriveItemDeltaCollectionPage? driveItemsDelta = string.IsNullOrWhiteSpace(itemPath)
? await graphServiceClient
.Sites[siteId]
.Drives[driveId]
.Root
.Delta()
.Request()
.GetAsync()
: await graphServiceClient
.Sites[siteId]
.Drives[driveId]
.Root
.ItemWithPath("/" + itemPath)
.Delta()
.Request()
.GetAsync();
return driveItemsDelta.Select(x => new SharePointFileInfoDto
{
Name = x.Name,
Id = x.Id,
LastModifiedUtc = DateTime.SpecifyKind(
x.LastModifiedDateTime!.Value.UtcDateTime,
DateTimeKind.Unspecified),
WebUrl = x.WebUrl
}).ToList();
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... -changes-b
Мобильная версия