Пример #1
0
        /// <summary>
        /// The initialization entry point for the page It also hooks into debug provider so that it can update when the profile changes
        /// </summary>
        protected void InitializePropertyPage()
        {
            if (_debugProfileProviderLink == null)
            {
                var debugProfilesBlock = new ActionBlock <ILaunchSettings>(
                    async(profiles) =>
                {
                    if (_firstSnapshotCompleteSource == null)
                    {
                        await ProjectThreadingService.SwitchToUIThread();
                    }
                    InitializeDebugTargetsCore(profiles);
                });

                var profileProvider = GetDebugProfileProvider();
                _debugProfileProviderLink = profileProvider.SourceBlock.LinkTo(
                    debugProfilesBlock,
                    linkOptions: new DataflowLinkOptions {
                    PropagateCompletion = true
                });

                // We need to get the set of UI providers, if any.
                InitializeUIProviders();
            }
        }
Пример #2
0
        private async Task OnLaunchSettingsChanged(ILaunchSettings profiles)
        {
            if (_firstSnapshotCompleteSource == null)
            {
                await ProjectThreadingService.SwitchToUIThread();
            }

            InitializeDebugTargetsCore(profiles);
        }
        /// <summary>
        /// Initializes from the set of debug targets. It also hooks into debug provider so that it can update when the profile changes
        /// </summary>
        protected virtual void InitializeDebugTargets()
        {
            if (_debugProfileProviderLink == null)
            {
                var debugProfilesBlock = new ActionBlock <ILaunchSettings>(
                    async(profiles) =>
                {
                    if (_useTaskFactory)
                    {
                        await ProjectThreadingService.SwitchToUIThread();
                    }
                    InitializeDebugTargetsCore(profiles);
                });

                var profileProvider = GetDebugProfileProvider();
                _debugProfileProviderLink = profileProvider.SourceBlock.LinkTo(
                    debugProfilesBlock,
                    linkOptions: new DataflowLinkOptions {
                    PropagateCompletion = true
                });
            }
        }