本文整理汇总了C#中DateTimeOffset.DateTimeToEpochMilliseconds方法的典型用法代码示例。如果您正苦于以下问题:C# DateTimeOffset.DateTimeToEpochMilliseconds方法的具体用法?C# DateTimeOffset.DateTimeToEpochMilliseconds怎么用?C# DateTimeOffset.DateTimeToEpochMilliseconds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateTimeOffset
的用法示例。
在下文中一共展示了DateTimeOffset.DateTimeToEpochMilliseconds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FetchPartitionOffsetsAsync
/// <summary>
/// Get list of partitions and the maximum offsets prior to the given time. This functionality
/// depends on the Kafka Broker settings that control log segment file rolling. These settings are log.roll.hours and log.segment.bytes
/// If these are set too high, and new segment files are not created often, this method will tend to return very coarse results.
/// </summary>
/// <param name="topic"></param>
/// <param name="startDateTime"></param>
/// <returns></returns>
public Task<TopicPartitionOffsets> FetchPartitionOffsetsAsync(string topic, DateTimeOffset startDateTime)
{
return FetchPartitionOffsetsImplAsync(topic, startDateTime.DateTimeToEpochMilliseconds());
}