本文整理汇总了C#中DateTimeOffset.ToDateTimeDescending方法的典型用法代码示例。如果您正苦于以下问题:C# DateTimeOffset.ToDateTimeDescending方法的具体用法?C# DateTimeOffset.ToDateTimeDescending怎么用?C# DateTimeOffset.ToDateTimeDescending使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateTimeOffset
的用法示例。
在下文中一共展示了DateTimeOffset.ToDateTimeDescending方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataExportRequest
public DataExportRequest(DateTimeOffset requestTime, DateTimeOffset beginTimeUtc, DateTimeOffset endTimeUtc, string uri, int seriesId, string servUrl)
: base(DataExportRequest.GeneratePartitionKeyFromSeriesMetadata(seriesId), requestTime.ToDateTimeDescending())
{
this.RequestTime = requestTime; this.BeginTimeUtc = beginTimeUtc; this.EndTimeUtc = endTimeUtc; this.Uri = uri; this.ServUrl = servUrl;
}
示例2: CheckIfSeriesExistsInStorage
/// <summary>
/// Gets a record of a particular series request if one exists in the WDC storage cache already (persists all already-downloaded files).
/// </summary>
/// <param name="csa"></param>
/// <param name="seriesId"></param>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
/// <param name="requestTime"></param>
/// <returns></returns>
public async Task<DataExportRequest> CheckIfSeriesExistsInStorage(CloudStorageAccount csa, int seriesId, DateTimeOffset requestTime)
{
CloudTableClient tableClient = csa.CreateCloudTableClient();
CloudTable tbl = tableClient.GetTableReference(DiscoveryStorageTableNames.SeriesDownloads);
string pk = DataExportRequest.GeneratePartitionKeyFromSeriesMetadata(seriesId);
string rk = requestTime.ToDateTimeDescending();
TableQuery<DataExportRequest> qry = new TableQuery<DataExportRequest>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, seriesId.ToString()));
TableQuerySegment<DataExportRequest> result = await tbl.ExecuteQuerySegmentedAsync(qry, null);
return result.Results.FirstOrDefault();
}