コード例 #1
0
 private bool IsStale(TaskHubInfo currentTaskHubInfo, TaskHubInfo newTaskHubInfo)
 {
     return(!currentTaskHubInfo.TaskHubName.Equals(newTaskHubInfo.TaskHubName, StringComparison.OrdinalIgnoreCase) ||
            !currentTaskHubInfo.PartitionCount.Equals(newTaskHubInfo.PartitionCount));
 }
コード例 #2
0
        Task IPartitionManager.CreateLeaseStore()
        {
            TaskHubInfo hubInfo = new TaskHubInfo(this.settings.TaskHubName, DateTime.UtcNow, this.settings.PartitionCount);

            return(this.leaseManager.CreateLeaseStoreIfNotExistsAsync(hubInfo, checkIfStale: true));
        }