Public Shared Function CreatePayload(mvid As System.Guid, methodIndex As Integer, fileIndex As Integer, ByRef payload As Boolean(), payloadLength As Integer) As Boolean()
If _mvid <> mvid Then
_payloads = New Boolean(100)() {}
_fileIndices = New Integer(100) {}
_mvid = mvid
End If
If System.Threading.Interlocked.CompareExchange(payload, new Boolean(payloadLength - 1) {}, Nothing) Is Nothing Then
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
usingSystem.Reflection.PortableExecutable;
usingSystem.Text;
usingSystem.Xml.Linq;
usingMicrosoft.CodeAnalysis.Collections;
usingMicrosoft.CodeAnalysis.Emit;
usingRoslyn.Test.Utilities;
usingXunit;
namespaceMicrosoft.CodeAnalysis.Test.Utilities
{
/// <summary>
/// Helper to check compilations with test instrumentation.
///
/// Use in three steps:
/// 1. Initialize with expectations about methods, what spans they include and which spans were covered.
/// This is done with calls to Method followed by a call to True or False for each span within a method.
/// 2. Use the ExpectedOutput to check that executing the compilation produces the expected instrumentation data.
/// 3. Use CompleteCheck to check that your expectations about spans were correct.
///
/// If you only do the third step, the test output will provide you with a template of code for the first step.
Public Shared Function CreatePayload(mvid As System.Guid, methodIndex As Integer, fileIndex As Integer, ByRef payload As Boolean(), payloadLength As Integer) As Boolean()
If _mvid <> mvid Then
_payloads = New Boolean(100)() {}
_fileIndices = New Integer(100) {}
_mvid = mvid
End If
If System.Threading.Interlocked.CompareExchange(payload, new Boolean(payloadLength - 1) {}, Nothing) Is Nothing Then