1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //----------------------------------------------------------------
5 namespace System.Activities.Presentation
8 using System.Activities.Debugger.Symbol;
9 using System.Activities.Presentation.Debug;
10 using System.Activities.Presentation.Model;
11 using System.Activities.Presentation.Xaml;
15 public partial class WorkflowDesigner
17 public IDesignerDebugView DebugManagerView
21 return this.DebuggerService;
25 DebuggerService DebuggerService
29 if (this.debuggerService == null)
31 this.debuggerService = new DebuggerService(this.context);
32 this.context.Services.Publish<IDesignerDebugView>(this.debuggerService);
34 return this.debuggerService;
38 ModelSearchServiceImpl ModelSearchService
44 internal ObjectToSourceLocationMapping ObjectToSourceLocationMapping
48 if (this.objectToSourceLocationMapping == null)
50 this.objectToSourceLocationMapping = new ObjectToSourceLocationMapping(this.ModelSearchService);
52 return this.objectToSourceLocationMapping;
56 // Get the attached workflow symbol and remove it from the root.
57 WorkflowSymbol GetAttachedWorkflowSymbol()
59 object rootInstance = this.GetRootInstance();
60 WorkflowSymbol wfSymbol = null;
62 if (rootInstance != null)
64 Activity documentRootElement = GetRootWorkflowElement(rootInstance);
65 if (documentRootElement != null)
68 if (AttachablePropertyServices.TryGetProperty<string>(documentRootElement, DebugSymbol.SymbolName, out symbolString))
72 wfSymbol = WorkflowSymbol.Decode(symbolString);
73 // Change the name to the currently loaded file.
74 wfSymbol.FileName = this.Context.Items.GetValue<WorkflowFileItem>().LoadedFile;
85 AttachablePropertyServices.RemoveProperty(documentRootElement, DebugSymbol.SymbolName);