private bool TryGetScope(IVsWindowFrame vsWindowFrame, __VSFPROPID propId, out string scope) { scope = default(string); Guid guid; return(ErrorHandler.Succeeded(vsWindowFrame.GetGuidProperty((int)propId, out guid)) && this.scopeDefinitions.TryGetValue(guid, out scope)); }
private void SetGuid(__VSFPROPID propId, Guid value) { if (_frame == null) { throw new InvalidOperationException(); } Marshal.ThrowExceptionForHR((_frame.SetGuidProperty((int)propId, ref value))); }
public static bool GetIUnknownProperty(this IVsWindowFrame windowFrame, __VSFPROPID propid, out object result) { result = null; if (windowFrame != null) { windowFrame.GetProperty((int)propid, out result); } return(result != null); }
private Guid GetGuid(__VSFPROPID id) { Guid gResult; if (VSErr.Succeeded(Frame.GetGuidProperty((int)id, out gResult))) { return(gResult); } else { return(Guid.Empty); } }
private Guid GetGuid(__VSFPROPID __VSFPROPID) { if (_frame == null) { throw new InvalidOperationException(); } Guid value; Marshal.ThrowExceptionForHR((_frame.GetGuidProperty((int)__VSFPROPID, out value))); return(value); }
private Guid GetGuid(__VSFPROPID id) { ThreadHelper.ThrowIfNotOnUIThread(); Guid gResult; if (VSErr.Succeeded(Frame.GetGuidProperty((int)id, out gResult))) { return(gResult); } else { return(Guid.Empty); } }
/// <summary> /// Gets a window frame property. /// </summary> /// <param name="provider">A service provider.</param> /// <param name="propertyId">A property id.</param> /// <returns>A window frame property.</returns> private static ModelingDocView GetWindowFrameProperty(IServiceProvider provider, __VSFPROPID propertyId) { IVsMonitorSelection selection = (IVsMonitorSelection)provider.GetService(typeof(IVsMonitorSelection)); if (selection != null) { object frameObject; selection.GetCurrentElementValue(2, out frameObject); IVsWindowFrame windowFrame = frameObject as IVsWindowFrame; if (windowFrame != null) { object propertyValue; windowFrame.GetProperty((int)propertyId, out propertyValue); return propertyValue as ModelingDocView; } } return null; }
private void SetGuid(__VSFPROPID propId, Guid value) { if (_frame == null) throw new InvalidOperationException(); Marshal.ThrowExceptionForHR((_frame.SetGuidProperty((int)propId, ref value))); }
private Guid GetGuid(__VSFPROPID __VSFPROPID) { if (_frame == null) throw new InvalidOperationException(); Guid value; Marshal.ThrowExceptionForHR((_frame.GetGuidProperty((int)__VSFPROPID, out value))); return value; }
private void SetGuid(__VSFPROPID id, Guid value) { Marshal.ThrowExceptionForHR(Frame.SetGuidProperty((int)id, ref value)); }
private static ModelingDocView GetWindowFrameProperty(IServiceProvider provider, __VSFPROPID propertyId) { IVsMonitorSelection selection = (IVsMonitorSelection)provider.GetService(typeof(IVsMonitorSelection)); if (selection != null) { object frameObject; selection.GetCurrentElementValue(2, out frameObject); IVsWindowFrame windowFrame = frameObject as IVsWindowFrame; if (windowFrame != null) { object propertyValue; windowFrame.GetProperty((int)propertyId, out propertyValue); return(propertyValue as ModelingDocView); } } return(null); }
private void SetGuid(__VSFPROPID id, Guid value) { ThreadHelper.ThrowIfNotOnUIThread(); Marshal.ThrowExceptionForHR(Frame.SetGuidProperty((int)id, ref value)); }