public PackageResponse GetPackage(String debuggerSessionId, String packageId) { try { return(new PackageResponse() { Response = mDebugSession.GetPackageXml(packageId) }); } catch (Exception ex) { Logger.Log(System.Diagnostics.TraceEventType.Error, ex.Message); } return(null); }
public static String GetPackageItemDataId(this DebugSession debugSession, String packageName, String itemName) { if (debugSession != null) { XElement packageXml = XElement.Parse(debugSession.GetPackageXml(packageName)); XElement itemXml = packageXml.Descendants(templateDebuggingNamespace + "Item").FirstOrDefault(i => String.Equals(i.Attribute("Name").Value, itemName, StringComparison.OrdinalIgnoreCase)); if (itemXml != null) { return(itemXml.Attribute("ItemDataId").Value); } } return(String.Empty); }