public static Guid GetLanguage(this ISymUnmanagedDocument document) { Guid result = default(Guid); int hr = document.GetLanguage(ref result); ThrowExceptionForHR(hr); return(result); }
public static Guid GetLanguage(this ISymUnmanagedDocument document) { if (document == null) { throw new ArgumentNullException(nameof(document)); } Guid result = default(Guid); ThrowExceptionForHR(document.GetLanguage(ref result)); return(result); }
/// <summary> /// Defines copy of <c>document</c> in new symbols file. /// </summary> /// <param name="document">Document to be copied</param> /// <returns>Instance of <c>ISymUnmanagedDocumentWriter</c>, which is used to write <c>document</c> in symbole file.</returns> public ISymUnmanagedDocumentWriter DefineDocument(ISymUnmanagedDocument document) { if (State != WriterState.Building) { throw new TranslatingException("ISym* interfaces were not initializde. (EnC)"); } string url = document.GetURL(); Guid type = document.GetDocumentType(); Guid language = document.GetLanguage(); Guid langVendor = document.GetLanguageVendor(); IntPtr pUrl = Marshal.StringToCoTaskMemUni(url); try{ return(mWriter.__DefineDocument(pUrl, ref language, ref langVendor, ref type)); } finally { Marshal.FreeCoTaskMem(pUrl); } }
/// <summary> /// Defines copy of <c>document</c> in new symbols file. /// </summary> /// <param name="document">Document to be copied</param> /// <returns>Instance of <c>ISymUnmanagedDocumentWriter</c>, which is used to write <c>document</c> in symbole file.</returns> public ISymUnmanagedDocumentWriter DefineDocument(ISymUnmanagedDocument document) { if(State != WriterState.Building){ throw new TranslatingException("ISym* interfaces were not initializde. (EnC)"); } string url = document.GetURL(); Guid type = document.GetDocumentType(); Guid language = document.GetLanguage(); Guid langVendor = document.GetLanguageVendor(); IntPtr pUrl = Marshal.StringToCoTaskMemUni(url); try{ return mWriter.__DefineDocument(pUrl,ref language,ref langVendor,ref type); } finally { Marshal.FreeCoTaskMem(pUrl); } }