SIL.FieldWorks.FieldWorks.HandleLinkRequest C# (CSharp) Méthode

HandleLinkRequest() static private méthode

Handles a link request. This handles determining the correct application to start up and for the correct project. This method is thread safe.
static private HandleLinkRequest ( SIL.FieldWorks.Common.FwUtils.FwAppArgs link ) : void
link SIL.FieldWorks.Common.FwUtils.FwAppArgs The link.
Résultat void
		internal static void HandleLinkRequest(FwAppArgs link)
		{
			s_threadHelper.Invoke(() =>
			{
				Debug.Assert(s_projectId != null, "We shouldn't try to handle a link request until an application is started");
				ProjectId linkedProject = new ProjectId(link.DatabaseType, link.Database, link.Server);
				if (IsSharedXmlBackendNeeded(linkedProject))
					linkedProject.Type = FDOBackendProviderType.kSharedXML;
				if (linkedProject.Equals(s_projectId))
					FollowLink(link);
				else if (!TryFindLinkHandler(link))
				{
					// No other FieldWorks process was running that could handle the request, so
					// start a brand new process for the project requested by the link.
					// REVIEW: it might look strange to dispose the return value of OpenProjectWithNewProcess.
					// However, that is a Process that gets started, and it is ok to dispose that
					// right away if we don't work with the process object. It might be better
					// though to change the signature of OpenProjectWithNewProcess to return
					// a boolean (true iff the link was successfully handled).
					using (OpenProjectWithNewProcess(linkedProject, link.AppAbbrev, "-" + FwLinkArgs.kLink, link.ToString()))
					{
					}
				}
			});
		}
FieldWorks