ESRI.ArcGIS.Client.Toolkit.SignInDialog.DoSignIn C# (CSharp) Méthode

DoSignIn() public static méthode

Static challenge method leaveraging the SignInDialog in a child window.
This method manages token credential only. See DoSignInEx for the extended method managing all credential types.
public static DoSignIn ( string url, Exception>.Action callback, IdentityManager generateTokenOptions = null ) : void
url string The URL.
callback Exception>.Action The callback.
generateTokenOptions IdentityManager The generate token options.
Résultat void
		public static void DoSignIn(string url, Action<IdentityManager.Credential, Exception> callback, IdentityManager.GenerateTokenOptions generateTokenOptions = null)
		{
			System.Windows.Threading.Dispatcher d = null;

#if SILVERLIGHT
			// Note that RootVisual is only accessible from UI Thread so Application.Current.RootVisual.Dispatcher crashes
			if (Deployment.Current != null) // should always be the case
				d = Deployment.Current.Dispatcher;
#else
			if (Application.Current != null)
				d = Application.Current.Dispatcher;
#endif

			if (d != null && !d.CheckAccess())
			{
				//Ensure we are showing up the SignInDialog on the UI thread
				d.BeginInvoke((Action) delegate { DoSignInInUIThread(url, callback, generateTokenOptions); });
			}
			else
				DoSignInInUIThread(url, callback, generateTokenOptions);
		}
#pragma warning restore 1574