public bool AnnounceServiceUrl(string serviceUrl, string contractFullName, int contractMajorVersion, string infrastructureScopeName, int initialLoadMetric, DateTime timestampUtc, string legitimationHash) { DiscoveryCacheEntry entry = this.PickCacheEntry(contractFullName, contractMajorVersion, infrastructureScopeName, true); //invalidate the cache to force a reload (because we dont know the sort-order) entry.LastUpdateUtc = DateTime.MinValue; //just for the case that the reload fails -> append as last entry (but only if available when load >=0) if (initialLoadMetric >= 0 && !entry.UrlEntries.Contains(serviceUrl)) { entry.UrlEntries = entry.UrlEntries.Union(new string[] { serviceUrl }).ToArray(); } this.SaveCacheEntryFailSafe(entry); return(_PrimaryRegistry.AnnounceServiceUrl(serviceUrl, contractFullName, contractMajorVersion, infrastructureScopeName, initialLoadMetric, timestampUtc, legitimationHash)); }