public static IDispatcher Create(Dispatcher dispatcher) { IDispatcher result = null; #if SILVERLIGHT result = new SilverlightDispatcher(dispatcher); #else result = new WpfDispatcher(dispatcher); #endif return result; }
/// <summary> /// Creates the specified dispatcher. /// </summary> /// <param name="dispatcher">The dispatcher.</param> /// <returns>The correct IDispatcher.</returns> public static IDispatcher Create(Dispatcher dispatcher) { IDispatcher result = null; if (dispatcher != null) { #if SILVERLIGHT result = new SilverlightDispatcher(dispatcher); #else result = new WpfDispatcher(dispatcher); #endif } return(result); }