private WorkflowSymbol GetWorkflowSymbol(string fileName, object deserializedObject, Dictionary <object, SourceLocation> sourceLocations) { if (deserializedObject != null) { Activity deserializedRootElement = GetRootWorkflowElement(deserializedObject); if (deserializedRootElement != null) { try { deserializedRootElement = GetRootElementForSymbol(deserializedObject, deserializedRootElement); return(new WorkflowSymbol { FileName = fileName, Symbols = SourceLocationProvider.GetSymbols(deserializedRootElement, sourceLocations) }); } catch (Exception ex) { if (SharedFx.IsFatal(ex)) { throw; } // This happens when the workflow is invalid so GetSymbols fails. // ---- exception here. } } } return(null); }