private static Func <SnoopMainBaseWindow> GetInstanceCreator(SnoopStartTarget startTarget) { switch (startTarget) { case SnoopStartTarget.SnoopUI: return(() => new SnoopUI()); case SnoopStartTarget.Zoomer: return(() => new Zoomer()); default: throw new ArgumentOutOfRangeException(nameof(startTarget), startTarget, null); } }
private static TransientSettingsData CreateTransientSettingsData(SnoopStartTarget startTarget, IntPtr targetWindowHandle) { var settings = Settings.Default; return(new TransientSettingsData { StartTarget = startTarget, TargetWindowHandle = targetWindowHandle.ToInt64(), MultipleAppDomainMode = settings.MultipleAppDomainMode, MultipleDispatcherMode = settings.MultipleDispatcherMode, SetWindowOwner = settings.SetOwnerWindow }); }
private static Func <InspectorWindow> GetInstanceCreator(SnoopStartTarget startTarget) { return(() => new InspectorWindow()); }