src/Misc/EFTools/DesignXmlCore/VisualStudio/VSHelpers.cs
/// <summary>
///     returns the IVsTextLines for the given docData object
/// </summary>
/// <param name="docData"></param>
/// <returns></returns>
returns the IVsTextLines for the given docData object
returns the IVsTextLines for the given docData object
internal static IVsTextLines GetVsTextLinesFromDocData(object docData)
        {
            if (docData == null)
            {
                return null;
            }
            var buffer = docData as IVsTextLines;
            if (buffer == null)
            {
                var bp = docData as IVsTextBufferProvider;
                if (bp != null)
                {
                    VSErrorHandler.ThrowOnFailure(bp.GetTextBuffer(out buffer));
                }
            }
            return buffer;
        }
internal static IVsTextLines GetVsTextLinesFromDocData ( object docData ) { if ( docData == null ) { return null ; } var buffer = docData as IVsTextLines ; if ( buffer == null ) { var bp = docData as IVsTextBufferProvider ; if ( bp != null ) { VSErrorHandler . ThrowOnFailure ( bp . GetTextBuffer ( out buffer ) ) ; } } return buffer ; }
returns the IVsTextLines for the given docData object
returns the IVsTextLines for the given docData object
None
docData
object
None