/// <summary> /// Gets a property from the given output. /// </summary> internal static string GetProperty(this IVsOutput2 output, string name) { if (output == null) { throw new ArgumentNullException("output"); } object pvar; ErrorHandler.ThrowOnFailure(output.get_Property(name, out pvar)); return(pvar as string); }
private static string GetFilenameFromOutput(IVsOutput2 output) { object propVal; int hr; try { hr = output.get_Property("OUTPUTLOC", out propVal); } catch (Exception ex) { hr = Marshal.GetHRForException(ex); propVal = null; } var path = propVal as string; if (ErrorHandler.Succeeded(hr) && !string.IsNullOrEmpty(path)) { return(path); } ErrorHandler.ThrowOnFailure(output.get_DeploySourceURL(out path)); return(new Uri(path).LocalPath); }
private static string GetFilenameFromOutput(IVsOutput2 output) { object propVal; int hr; try { hr = output.get_Property("OUTPUTLOC", out propVal); } catch (Exception ex) { hr = Marshal.GetHRForException(ex); propVal = null; } var path = propVal as string; if (ErrorHandler.Succeeded(hr) && !string.IsNullOrEmpty(path)) { return path; } ErrorHandler.ThrowOnFailure(output.get_DeploySourceURL(out path)); return new Uri(path).LocalPath; }