private bool IsStale(TaskHubInfo currentTaskHubInfo, TaskHubInfo newTaskHubInfo) { return(!currentTaskHubInfo.TaskHubName.Equals(newTaskHubInfo.TaskHubName, StringComparison.OrdinalIgnoreCase) || !currentTaskHubInfo.PartitionCount.Equals(newTaskHubInfo.PartitionCount)); }
Task IPartitionManager.CreateLeaseStore() { TaskHubInfo hubInfo = new TaskHubInfo(this.settings.TaskHubName, DateTime.UtcNow, this.settings.PartitionCount); return(this.leaseManager.CreateLeaseStoreIfNotExistsAsync(hubInfo, checkIfStale: true)); }