repo_name
stringclasses 6
values | pr_number
int64 512
78.9k
| pr_title
stringlengths 3
144
| pr_description
stringlengths 0
30.3k
| author
stringlengths 2
21
| date_created
timestamp[ns, tz=UTC] | date_merged
timestamp[ns, tz=UTC] | previous_commit
stringlengths 40
40
| pr_commit
stringlengths 40
40
| query
stringlengths 17
30.4k
| filepath
stringlengths 9
210
| before_content
stringlengths 0
112M
| after_content
stringlengths 0
112M
| label
int64 -1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoConstructor.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Globalization;
namespace System.Reflection.TypeLoading
{
/// <summary>
/// Base class for all ConstructorInfo objects created by a MetadataLoadContext.
/// </summary>
internal abstract partial class RoConstructor : LeveledConstructorInfo, IRoMethodBase
{
protected RoConstructor() { }
public abstract override bool Equals(object? obj);
public abstract override int GetHashCode();
public sealed override Type DeclaringType => GetRoDeclaringType();
internal abstract RoType GetRoDeclaringType();
public sealed override Type ReflectedType => DeclaringType;
public sealed override string Name => _lazyName ?? (_lazyName = ComputeName());
protected abstract string ComputeName();
private volatile string? _lazyName;
public sealed override Module Module => GetRoModule();
internal abstract RoModule GetRoModule();
public abstract override int MetadataToken { get; }
public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other) => this.HasSameMetadataDefinitionAsCore(other);
public abstract override IEnumerable<CustomAttributeData> CustomAttributes { get; }
public sealed override IList<CustomAttributeData> GetCustomAttributesData() => CustomAttributes.ToReadOnlyCollection();
public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
public sealed override bool IsConstructedGenericMethod => false;
public sealed override bool IsGenericMethodDefinition => false;
public sealed override bool IsGenericMethod => false;
public sealed override MethodAttributes Attributes => (_lazyMethodAttributes == MethodAttributesSentinel) ? (_lazyMethodAttributes = ComputeAttributes()) : _lazyMethodAttributes;
protected abstract MethodAttributes ComputeAttributes();
private const MethodAttributes MethodAttributesSentinel = (MethodAttributes)(-1);
private volatile MethodAttributes _lazyMethodAttributes = MethodAttributesSentinel;
public sealed override CallingConventions CallingConvention => (_lazyCallingConventions == CallingConventionsSentinel) ? (_lazyCallingConventions = ComputeCallingConvention()) : _lazyCallingConventions;
protected abstract CallingConventions ComputeCallingConvention();
private const CallingConventions CallingConventionsSentinel = (CallingConventions)(-1);
private volatile CallingConventions _lazyCallingConventions = CallingConventionsSentinel;
public sealed override MethodImplAttributes MethodImplementationFlags => (_lazyMethodImplAttributes == MethodImplAttributesSentinel) ? (_lazyMethodImplAttributes = ComputeMethodImplementationFlags()) : _lazyMethodImplAttributes;
protected abstract MethodImplAttributes ComputeMethodImplementationFlags();
private const MethodImplAttributes MethodImplAttributesSentinel = (MethodImplAttributes)(-1);
private volatile MethodImplAttributes _lazyMethodImplAttributes = MethodImplAttributesSentinel;
public sealed override MethodImplAttributes GetMethodImplementationFlags() => MethodImplementationFlags;
public abstract override MethodBody? GetMethodBody();
public sealed override bool ContainsGenericParameters => GetRoDeclaringType().ContainsGenericParameters;
public sealed override ParameterInfo[] GetParameters() => GetParametersNoCopy().CloneArray<ParameterInfo>();
internal RoParameter[] GetParametersNoCopy() => MethodSig.Parameters;
private MethodSig<RoParameter> MethodSig => _lazyMethodSig ?? (_lazyMethodSig = ComputeMethodSig());
protected abstract MethodSig<RoParameter> ComputeMethodSig();
private volatile MethodSig<RoParameter>? _lazyMethodSig;
private MethodSig<RoType> CustomModifiers => _lazyCustomModifiers ?? (_lazyCustomModifiers = ComputeCustomModifiers());
protected abstract MethodSig<RoType> ComputeCustomModifiers();
private volatile MethodSig<RoType>? _lazyCustomModifiers;
public sealed override string ToString() => Loader.GetDisposedString() ?? this.ToString(ComputeMethodSigStrings());
protected abstract MethodSig<string> ComputeMethodSigStrings();
// No trust environment to apply these to.
public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity);
public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity);
public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity);
// Not valid in a ReflectionOnly context
public sealed override object Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke);
public sealed override object Invoke(BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke);
public sealed override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
MethodBase IRoMethodBase.MethodBase => this;
public MetadataLoadContext Loader => GetRoModule().Loader;
public abstract TypeContext TypeContext { get; }
Type[] IRoMethodBase.GetCustomModifiers(int position, bool isRequired) => CustomModifiers[position].ExtractCustomModifiers(isRequired);
string IRoMethodBase.GetMethodSigString(int position) => ComputeMethodSigStrings()[position];
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Globalization;
namespace System.Reflection.TypeLoading
{
/// <summary>
/// Base class for all ConstructorInfo objects created by a MetadataLoadContext.
/// </summary>
internal abstract partial class RoConstructor : LeveledConstructorInfo, IRoMethodBase
{
protected RoConstructor() { }
public abstract override bool Equals(object? obj);
public abstract override int GetHashCode();
public sealed override Type DeclaringType => GetRoDeclaringType();
internal abstract RoType GetRoDeclaringType();
public sealed override Type ReflectedType => DeclaringType;
public sealed override string Name => _lazyName ?? (_lazyName = ComputeName());
protected abstract string ComputeName();
private volatile string? _lazyName;
public sealed override Module Module => GetRoModule();
internal abstract RoModule GetRoModule();
public abstract override int MetadataToken { get; }
public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other) => this.HasSameMetadataDefinitionAsCore(other);
public abstract override IEnumerable<CustomAttributeData> CustomAttributes { get; }
public sealed override IList<CustomAttributeData> GetCustomAttributesData() => CustomAttributes.ToReadOnlyCollection();
public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
public sealed override bool IsConstructedGenericMethod => false;
public sealed override bool IsGenericMethodDefinition => false;
public sealed override bool IsGenericMethod => false;
public sealed override MethodAttributes Attributes => (_lazyMethodAttributes == MethodAttributesSentinel) ? (_lazyMethodAttributes = ComputeAttributes()) : _lazyMethodAttributes;
protected abstract MethodAttributes ComputeAttributes();
private const MethodAttributes MethodAttributesSentinel = (MethodAttributes)(-1);
private volatile MethodAttributes _lazyMethodAttributes = MethodAttributesSentinel;
public sealed override CallingConventions CallingConvention => (_lazyCallingConventions == CallingConventionsSentinel) ? (_lazyCallingConventions = ComputeCallingConvention()) : _lazyCallingConventions;
protected abstract CallingConventions ComputeCallingConvention();
private const CallingConventions CallingConventionsSentinel = (CallingConventions)(-1);
private volatile CallingConventions _lazyCallingConventions = CallingConventionsSentinel;
public sealed override MethodImplAttributes MethodImplementationFlags => (_lazyMethodImplAttributes == MethodImplAttributesSentinel) ? (_lazyMethodImplAttributes = ComputeMethodImplementationFlags()) : _lazyMethodImplAttributes;
protected abstract MethodImplAttributes ComputeMethodImplementationFlags();
private const MethodImplAttributes MethodImplAttributesSentinel = (MethodImplAttributes)(-1);
private volatile MethodImplAttributes _lazyMethodImplAttributes = MethodImplAttributesSentinel;
public sealed override MethodImplAttributes GetMethodImplementationFlags() => MethodImplementationFlags;
public abstract override MethodBody? GetMethodBody();
public sealed override bool ContainsGenericParameters => GetRoDeclaringType().ContainsGenericParameters;
public sealed override ParameterInfo[] GetParameters() => GetParametersNoCopy().CloneArray<ParameterInfo>();
internal RoParameter[] GetParametersNoCopy() => MethodSig.Parameters;
private MethodSig<RoParameter> MethodSig => _lazyMethodSig ?? (_lazyMethodSig = ComputeMethodSig());
protected abstract MethodSig<RoParameter> ComputeMethodSig();
private volatile MethodSig<RoParameter>? _lazyMethodSig;
private MethodSig<RoType> CustomModifiers => _lazyCustomModifiers ?? (_lazyCustomModifiers = ComputeCustomModifiers());
protected abstract MethodSig<RoType> ComputeCustomModifiers();
private volatile MethodSig<RoType>? _lazyCustomModifiers;
public sealed override string ToString() => Loader.GetDisposedString() ?? this.ToString(ComputeMethodSigStrings());
protected abstract MethodSig<string> ComputeMethodSigStrings();
// No trust environment to apply these to.
public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity);
public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity);
public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity);
// Not valid in a ReflectionOnly context
public sealed override object Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke);
public sealed override object Invoke(BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke);
public sealed override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
MethodBase IRoMethodBase.MethodBase => this;
public MetadataLoadContext Loader => GetRoModule().Loader;
public abstract TypeContext TypeContext { get; }
Type[] IRoMethodBase.GetCustomModifiers(int position, bool isRequired) => CustomModifiers[position].ExtractCustomModifiers(isRequired);
string IRoMethodBase.GetMethodSigString(int position) => ComputeMethodSigStrings()[position];
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_r.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>False</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="throwwithhandlerscatchingbase.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\eh_common.csproj" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>False</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="throwwithhandlerscatchingbase.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\eh_common.csproj" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Private.Xml/tests/XmlSchema/TestFiles/TestData/schema1.xsd
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="schema1.xsd"
attributeFormDefault="unqualified"
blockDefault="#all"
elementFormDefault="qualified"
finalDefault="extension"
id = "s1"
targetNamespace="schema1.xsd"
version="1.0"
>
<xsd:element name="foo" type="xsd:string"/>
<xsd:annotation/>
</xsd:schema>
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="schema1.xsd"
attributeFormDefault="unqualified"
blockDefault="#all"
elementFormDefault="qualified"
finalDefault="extension"
id = "s1"
targetNamespace="schema1.xsd"
version="1.0"
>
<xsd:element name="foo" type="xsd:string"/>
<xsd:annotation/>
</xsd:schema>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.IO.FileSystem/tests/Directory/GetLogicalDrives.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Linq;
using System.Runtime.InteropServices;
using Xunit;
namespace System.IO.Tests
{
public class Directory_GetLogicalDrives
{
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Valid drive strings on Unix
public void GetsValidDriveStrings_Unix()
{
string[] drives = Directory.GetLogicalDrives();
Assert.NotEmpty(drives);
Assert.All(drives, d => Assert.NotNull(d));
Assert.Contains(drives, d => d == "/");
}
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Valid drive strings on Windows
public void GetsValidDriveStrings_Windows()
{
string[] drives = Directory.GetLogicalDrives();
Assert.NotEmpty(drives);
Assert.All(drives, d => Assert.Matches(@"^[A-Z]:\\$", d));
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Linq;
using System.Runtime.InteropServices;
using Xunit;
namespace System.IO.Tests
{
public class Directory_GetLogicalDrives
{
[Fact]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Valid drive strings on Unix
public void GetsValidDriveStrings_Unix()
{
string[] drives = Directory.GetLogicalDrives();
Assert.NotEmpty(drives);
Assert.All(drives, d => Assert.NotNull(d));
Assert.Contains(drives, d => d == "/");
}
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Valid drive strings on Windows
public void GetsValidDriveStrings_Windows()
{
string[] drives = Directory.GetLogicalDrives();
Assert.NotEmpty(drives);
Assert.All(drives, d => Assert.Matches(@"^[A-Z]:\\$", d));
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/DfaMatchingState.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Net;
namespace System.Text.RegularExpressions.Symbolic
{
/// <summary>Captures a state of a DFA explored during matching.</summary>
internal sealed class DfaMatchingState<T> where T : notnull
{
internal DfaMatchingState(SymbolicRegexNode<T> node, uint prevCharKind)
{
Node = node;
PrevCharKind = prevCharKind;
}
internal SymbolicRegexNode<T> Node { get; }
internal uint PrevCharKind { get; }
internal int Id { get; set; }
internal bool IsInitialState { get; set; }
/// <summary>This is a deadend state</summary>
internal bool IsDeadend => Node.IsNothing;
/// <summary>The node must be nullable here</summary>
internal int FixedLength
{
get
{
if (Node._kind == SymbolicRegexNodeKind.FixedLengthMarker)
{
return Node._lower;
}
if (Node._kind == SymbolicRegexNodeKind.Or)
{
Debug.Assert(Node._alts is not null);
return Node._alts._maximumLength;
}
return -1;
}
}
/// <summary>If true then the state is a dead-end, rejects all inputs.</summary>
internal bool IsNothing => Node.IsNothing;
/// <summary>If true then state starts with a ^ or $ or \A or \z or \Z</summary>
internal bool StartsWithLineAnchor => Node._info.StartsWithLineAnchor;
/// <summary>
/// Translates a minterm predicate to a character kind, which is a general categorization of characters used
/// for cheaply deciding the nullability of anchors.
/// </summary>
/// <remarks>
/// A False predicate is handled as a special case to indicate the very last \n.
/// </remarks>
/// <param name="minterm">the minterm to translate</param>
/// <returns>the character kind of the minterm</returns>
private uint GetNextCharKind(ref T minterm)
{
ICharAlgebra<T> alg = Node._builder._solver;
T wordLetterPredicate = Node._builder._wordLetterPredicateForAnchors;
T newLinePredicate = Node._builder._newLinePredicate;
// minterm == solver.False is used to represent the very last \n
uint nextCharKind = CharKind.General;
if (alg.False.Equals(minterm))
{
nextCharKind = CharKind.NewLineS;
minterm = newLinePredicate;
}
else if (newLinePredicate.Equals(minterm))
{
// If the previous state was the start state, mark this as the very FIRST \n.
// Essentially, this looks the same as the very last \n and is used to nullify
// rev(\Z) in the conext of a reversed automaton.
nextCharKind = PrevCharKind == CharKind.BeginningEnd ?
CharKind.NewLineS :
CharKind.Newline;
}
else if (alg.IsSatisfiable(alg.And(wordLetterPredicate, minterm)))
{
nextCharKind = CharKind.WordLetter;
}
return nextCharKind;
}
/// <summary>
/// Compute the target state for the given input minterm.
/// If <paramref name="minterm"/> is False this means that this is \n and it is the last character of the input.
/// </summary>
/// <param name="minterm">minterm corresponding to some input character or False corresponding to last \n</param>
internal DfaMatchingState<T> Next(T minterm)
{
uint nextCharKind = GetNextCharKind(ref minterm);
// Combined character context
uint context = CharKind.Context(PrevCharKind, nextCharKind);
// Compute the derivative of the node for the given context
SymbolicRegexNode<T> derivative = Node.CreateDerivative(minterm, context);
// nextCharKind will be the PrevCharKind of the target state
// use an existing state instead if one exists already
// otherwise create a new new id for it
return Node._builder.CreateState(derivative, nextCharKind, capturing: false);
}
/// <summary>
/// Compute a set of transitions for the given minterm.
/// </summary>
/// <param name="minterm">minterm corresponding to some input character or False corresponding to last \n</param>
/// <returns>an enumeration of the transitions as pairs of the target state and a list of effects to be applied</returns>
internal List<(DfaMatchingState<T> State, DerivativeEffect[] Effects)> NfaNextWithEffects(T minterm)
{
uint nextCharKind = GetNextCharKind(ref minterm);
// Combined character context
uint context = CharKind.Context(PrevCharKind, nextCharKind);
// Compute the transitions for the given context
List<(SymbolicRegexNode<T>, DerivativeEffect[])> nodesAndEffects = Node.CreateNfaDerivativeWithEffects(minterm, context);
var list = new List<(DfaMatchingState<T> State, DerivativeEffect[] Effects)>();
foreach ((SymbolicRegexNode<T> node, DerivativeEffect[]? effects) in nodesAndEffects)
{
// nextCharKind will be the PrevCharKind of the target state
// use an existing state instead if one exists already
// otherwise create a new new id for it
list.Add((Node._builder.CreateState(node, nextCharKind, capturing: true), effects));
}
return list;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal bool IsNullable(uint nextCharKind)
{
Debug.Assert(nextCharKind is 0 or CharKind.BeginningEnd or CharKind.Newline or CharKind.WordLetter or CharKind.NewLineS);
uint context = CharKind.Context(PrevCharKind, nextCharKind);
return Node.IsNullableFor(context);
}
public override bool Equals(object? obj) =>
obj is DfaMatchingState<T> s && PrevCharKind == s.PrevCharKind && Node.Equals(s.Node);
public override int GetHashCode() => (PrevCharKind, Node).GetHashCode();
public override string ToString() =>
PrevCharKind == 0 ? Node.ToString() :
$"({CharKind.DescribePrev(PrevCharKind)},{Node})";
#if DEBUG
internal string DgmlView
{
get
{
string info = CharKind.DescribePrev(PrevCharKind);
if (info != string.Empty)
{
info = $"Previous: {info} ";
}
string deriv = WebUtility.HtmlEncode(Node.ToString());
if (deriv == string.Empty)
{
deriv = "()";
}
return $"{info}{deriv}";
}
}
#endif
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Net;
namespace System.Text.RegularExpressions.Symbolic
{
/// <summary>Captures a state of a DFA explored during matching.</summary>
internal sealed class DfaMatchingState<T> where T : notnull
{
internal DfaMatchingState(SymbolicRegexNode<T> node, uint prevCharKind)
{
Node = node;
PrevCharKind = prevCharKind;
}
internal SymbolicRegexNode<T> Node { get; }
internal uint PrevCharKind { get; }
internal int Id { get; set; }
internal bool IsInitialState { get; set; }
/// <summary>This is a deadend state</summary>
internal bool IsDeadend => Node.IsNothing;
/// <summary>The node must be nullable here</summary>
internal int FixedLength
{
get
{
if (Node._kind == SymbolicRegexNodeKind.FixedLengthMarker)
{
return Node._lower;
}
if (Node._kind == SymbolicRegexNodeKind.Or)
{
Debug.Assert(Node._alts is not null);
return Node._alts._maximumLength;
}
return -1;
}
}
/// <summary>If true then the state is a dead-end, rejects all inputs.</summary>
internal bool IsNothing => Node.IsNothing;
/// <summary>If true then state starts with a ^ or $ or \A or \z or \Z</summary>
internal bool StartsWithLineAnchor => Node._info.StartsWithLineAnchor;
/// <summary>
/// Translates a minterm predicate to a character kind, which is a general categorization of characters used
/// for cheaply deciding the nullability of anchors.
/// </summary>
/// <remarks>
/// A False predicate is handled as a special case to indicate the very last \n.
/// </remarks>
/// <param name="minterm">the minterm to translate</param>
/// <returns>the character kind of the minterm</returns>
private uint GetNextCharKind(ref T minterm)
{
ICharAlgebra<T> alg = Node._builder._solver;
T wordLetterPredicate = Node._builder._wordLetterPredicateForAnchors;
T newLinePredicate = Node._builder._newLinePredicate;
// minterm == solver.False is used to represent the very last \n
uint nextCharKind = CharKind.General;
if (alg.False.Equals(minterm))
{
nextCharKind = CharKind.NewLineS;
minterm = newLinePredicate;
}
else if (newLinePredicate.Equals(minterm))
{
// If the previous state was the start state, mark this as the very FIRST \n.
// Essentially, this looks the same as the very last \n and is used to nullify
// rev(\Z) in the conext of a reversed automaton.
nextCharKind = PrevCharKind == CharKind.BeginningEnd ?
CharKind.NewLineS :
CharKind.Newline;
}
else if (alg.IsSatisfiable(alg.And(wordLetterPredicate, minterm)))
{
nextCharKind = CharKind.WordLetter;
}
return nextCharKind;
}
/// <summary>
/// Compute the target state for the given input minterm.
/// If <paramref name="minterm"/> is False this means that this is \n and it is the last character of the input.
/// </summary>
/// <param name="minterm">minterm corresponding to some input character or False corresponding to last \n</param>
internal DfaMatchingState<T> Next(T minterm)
{
uint nextCharKind = GetNextCharKind(ref minterm);
// Combined character context
uint context = CharKind.Context(PrevCharKind, nextCharKind);
// Compute the derivative of the node for the given context
SymbolicRegexNode<T> derivative = Node.CreateDerivative(minterm, context);
// nextCharKind will be the PrevCharKind of the target state
// use an existing state instead if one exists already
// otherwise create a new new id for it
return Node._builder.CreateState(derivative, nextCharKind, capturing: false);
}
/// <summary>
/// Compute a set of transitions for the given minterm.
/// </summary>
/// <param name="minterm">minterm corresponding to some input character or False corresponding to last \n</param>
/// <returns>an enumeration of the transitions as pairs of the target state and a list of effects to be applied</returns>
internal List<(DfaMatchingState<T> State, DerivativeEffect[] Effects)> NfaNextWithEffects(T minterm)
{
uint nextCharKind = GetNextCharKind(ref minterm);
// Combined character context
uint context = CharKind.Context(PrevCharKind, nextCharKind);
// Compute the transitions for the given context
List<(SymbolicRegexNode<T>, DerivativeEffect[])> nodesAndEffects = Node.CreateNfaDerivativeWithEffects(minterm, context);
var list = new List<(DfaMatchingState<T> State, DerivativeEffect[] Effects)>();
foreach ((SymbolicRegexNode<T> node, DerivativeEffect[]? effects) in nodesAndEffects)
{
// nextCharKind will be the PrevCharKind of the target state
// use an existing state instead if one exists already
// otherwise create a new new id for it
list.Add((Node._builder.CreateState(node, nextCharKind, capturing: true), effects));
}
return list;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal bool IsNullable(uint nextCharKind)
{
Debug.Assert(nextCharKind is 0 or CharKind.BeginningEnd or CharKind.Newline or CharKind.WordLetter or CharKind.NewLineS);
uint context = CharKind.Context(PrevCharKind, nextCharKind);
return Node.IsNullableFor(context);
}
public override bool Equals(object? obj) =>
obj is DfaMatchingState<T> s && PrevCharKind == s.PrevCharKind && Node.Equals(s.Node);
public override int GetHashCode() => (PrevCharKind, Node).GetHashCode();
public override string ToString() =>
PrevCharKind == 0 ? Node.ToString() :
$"({CharKind.DescribePrev(PrevCharKind)},{Node})";
#if DEBUG
internal string DgmlView
{
get
{
string info = CharKind.DescribePrev(PrevCharKind);
if (info != string.Empty)
{
info = $"Previous: {info} ";
}
string deriv = WebUtility.HtmlEncode(Node.ToString());
if (deriv == string.Empty)
{
deriv = "()";
}
return $"{info}{deriv}";
}
}
#endif
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltScenarios/EXslt/regex-test.xsl
|
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:regexp="http://exslt.org/regular-expressions" exclude-result-prefixes="regexp">
<xsl:output indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="data">
<out>
<test1>
<xsl:if test="not(regexp:test(email/valid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if>
</test1>
<test2>
<xsl:if test="not(regexp:test(email/invalid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if>
</test2>
<test3>
<xsl:if test="not(regexp:test('',
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if>
</test3>
<test4>
<xsl:if test="not(regexp:test(email/valid, ''))">Email address is not valid.</xsl:if>
</test4>
<test5>
<xsl:if test="not(regexp:test(email/valid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', ''))">Email address is not valid.</xsl:if>
</test5>
<test6>
<xsl:if test="not(regexp:test(email/valid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', 'dummy'))">Email address is not valid.</xsl:if>
</test6>
<test7>
<xsl:if test="not(regexp:test(email/valid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', 'g'))">Email address is not valid.</xsl:if>
</test7>
<test8>
<xsl:if test="regexp:test('FOO', 'foo', 'i')">Ok</xsl:if>
</test8>
<test9>
<xsl:if test="regexp:test('FOO', 'foo')">Ok</xsl:if>
</test9>
</out>
</xsl:template>
</xsl:stylesheet>
|
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:regexp="http://exslt.org/regular-expressions" exclude-result-prefixes="regexp">
<xsl:output indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="data">
<out>
<test1>
<xsl:if test="not(regexp:test(email/valid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if>
</test1>
<test2>
<xsl:if test="not(regexp:test(email/invalid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if>
</test2>
<test3>
<xsl:if test="not(regexp:test('',
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'))">Email address is not valid.</xsl:if>
</test3>
<test4>
<xsl:if test="not(regexp:test(email/valid, ''))">Email address is not valid.</xsl:if>
</test4>
<test5>
<xsl:if test="not(regexp:test(email/valid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', ''))">Email address is not valid.</xsl:if>
</test5>
<test6>
<xsl:if test="not(regexp:test(email/valid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', 'dummy'))">Email address is not valid.</xsl:if>
</test6>
<test7>
<xsl:if test="not(regexp:test(email/valid,
'\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*', 'g'))">Email address is not valid.</xsl:if>
</test7>
<test8>
<xsl:if test="regexp:test('FOO', 'foo', 'i')">Ok</xsl:if>
</test8>
<test9>
<xsl:if test="regexp:test('FOO', 'foo')">Ok</xsl:if>
</test9>
</out>
</xsl:template>
</xsl:stylesheet>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/opt/Tailcall/ImplicitByrefTailCalls.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/Interop/SuppressGCTransition/SuppressGCTransitionUtil.il
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern mscorlib { }
.assembly extern System.Runtime { auto }
.assembly SuppressGCTransitionUtil { }
.class public auto ansi beforefieldinit FunctionPointer
extends [System.Runtime]System.Object
{
.method hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ldarg.0
call instance void [System.Runtime]System.Object::.ctor()
ret
}
.method public hidebysig static int32 Call_NextUInt(native int fptr,
int32* n) cil managed
{
.custom instance void [System.Runtime]System.Runtime.InteropServices.SuppressGCTransitionAttribute::.ctor() = ( 01 00 00 00 )
.maxstack 8
ldarg.1
ldarg.0
calli unmanaged cdecl int32 (int32*)
ret
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern mscorlib { }
.assembly extern System.Runtime { auto }
.assembly SuppressGCTransitionUtil { }
.class public auto ansi beforefieldinit FunctionPointer
extends [System.Runtime]System.Object
{
.method hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ldarg.0
call instance void [System.Runtime]System.Object::.ctor()
ret
}
.method public hidebysig static int32 Call_NextUInt(native int fptr,
int32* n) cil managed
{
.custom instance void [System.Runtime]System.Runtime.InteropServices.SuppressGCTransitionAttribute::.ctor() = ( 01 00 00 00 )
.maxstack 8
ldarg.1
ldarg.0
calli unmanaged cdecl int32 (int32*)
ret
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Text.Json/Common/JsonSourceGenerationOptionsAttribute.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Text.Json.Serialization
{
/// <summary>
/// Instructs the System.Text.Json source generator to assume the specified
/// options will be used at run time via <see cref="JsonSerializerOptions"/>.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
#if BUILDING_SOURCE_GENERATOR
internal
#else
public
#endif
sealed class JsonSourceGenerationOptionsAttribute : JsonAttribute
{
/// <summary>
/// Specifies the default ignore condition.
/// </summary>
public JsonIgnoreCondition DefaultIgnoreCondition { get; set; }
/// <summary>
/// Specifies whether to ignore read-only fields.
/// </summary>
public bool IgnoreReadOnlyFields { get; set; }
/// <summary>
/// Specifies whether to ignore read-only properties.
/// </summary>
public bool IgnoreReadOnlyProperties { get; set; }
/// <summary>
/// Specifies whether to include fields for serialization and deserialization.
/// </summary>
public bool IncludeFields { get; set; }
/// <summary>
/// Specifies a built-in naming polices to convert JSON property names with.
/// </summary>
public JsonKnownNamingPolicy PropertyNamingPolicy { get; set; }
/// <summary>
/// Specifies whether JSON output should be pretty-printed.
/// </summary>
public bool WriteIndented { get; set; }
/// <summary>
/// Specifies the source generation mode for types that don't explicitly set the mode with <see cref="JsonSerializableAttribute.GenerationMode"/>.
/// </summary>
public JsonSourceGenerationMode GenerationMode { get; set; }
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Text.Json.Serialization
{
/// <summary>
/// Instructs the System.Text.Json source generator to assume the specified
/// options will be used at run time via <see cref="JsonSerializerOptions"/>.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
#if BUILDING_SOURCE_GENERATOR
internal
#else
public
#endif
sealed class JsonSourceGenerationOptionsAttribute : JsonAttribute
{
/// <summary>
/// Specifies the default ignore condition.
/// </summary>
public JsonIgnoreCondition DefaultIgnoreCondition { get; set; }
/// <summary>
/// Specifies whether to ignore read-only fields.
/// </summary>
public bool IgnoreReadOnlyFields { get; set; }
/// <summary>
/// Specifies whether to ignore read-only properties.
/// </summary>
public bool IgnoreReadOnlyProperties { get; set; }
/// <summary>
/// Specifies whether to include fields for serialization and deserialization.
/// </summary>
public bool IncludeFields { get; set; }
/// <summary>
/// Specifies a built-in naming polices to convert JSON property names with.
/// </summary>
public JsonKnownNamingPolicy PropertyNamingPolicy { get; set; }
/// <summary>
/// Specifies whether JSON output should be pretty-printed.
/// </summary>
public bool WriteIndented { get; set; }
/// <summary>
/// Specifies the source generation mode for types that don't explicitly set the mode with <see cref="JsonSerializableAttribute.GenerationMode"/>.
/// </summary>
public JsonSourceGenerationMode GenerationMode { get; set; }
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Reflection.MetadataLoadContext/tests/src/Tests/TypeInfoFromProjectN/TypeInfo_PropertyTests.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Xunit;
#pragma warning disable 0414
#pragma warning disable 0067
namespace System.Reflection.Tests
{
[System.Runtime.InteropServices.Guid("FD80F123-BEDD-4492-B50A-5D46AE94DD4E")]
public class TypeInfoPropertyTests
{
// Verify BaseType() method
[Fact]
public static void TestBaseType1()
{
Type t = typeof(TypeInfoPropertyDerived).Project();
TypeInfo ti = t.GetTypeInfo();
Type basetype = ti.BaseType;
Assert.Equal(basetype, typeof(TypeInfoPropertyBase).Project());
}
// Verify BaseType() method
[Fact]
public static void TestBaseType2()
{
Type t = typeof(TypeInfoPropertyBase).Project();
TypeInfo ti = t.GetTypeInfo();
Type basetype = ti.BaseType;
Assert.Equal(basetype, typeof(object).Project());
}
// Verify ContainsGenericParameter
[Fact]
public static void TestContainsGenericParameter1()
{
Type t = typeof(ClassWithConstraints<,>).Project();
TypeInfo ti = t.GetTypeInfo();
bool hasgenericParam = ti.ContainsGenericParameters;
Assert.True(hasgenericParam, string.Format("Failed!! TestContainsGenericParameter did not return correct result. "));
}
// Verify ContainsGenericParameter
[Fact]
public static void TestContainsGenericParameter2()
{
Type t = typeof(TypeInfoPropertyBase).Project();
TypeInfo ti = t.GetTypeInfo();
bool hasgenericParam = ti.ContainsGenericParameters;
Assert.False(hasgenericParam, string.Format("Failed!! TestContainsGenericParameter did not return correct result. "));
}
// Verify FullName
[Fact]
public static void TestFullName()
{
Type t = typeof(int).Project();
TypeInfo ti = t.GetTypeInfo();
string fname = ti.FullName;
Assert.Equal("System.Int32", fname);
}
// Verify Guid
[Fact]
public static void TestGuid()
{
Type t = typeof(TypeInfoPropertyTests).Project();
TypeInfo ti = t.GetTypeInfo();
Guid myguid = ti.GUID;
Assert.NotEqual(Guid.Empty, myguid);
}
// Verify HasElementType
[Fact]
public static void TestHasElementType()
{
Type t = typeof(int).Project();
TypeInfo ti = t.GetTypeInfo();
Assert.False(ti.HasElementType, "Failed!! .HasElementType returned true for a type that does not contain element ");
int[] nums = { 1, 1, 2, 3 };
Type te = nums.GetType();
TypeInfo tei = te.GetTypeInfo();
Assert.True(tei.HasElementType, "Failed!! .HasElementType returned false for a type that contains element ");
}
//Verify IsAbstract
[Fact]
public static void TestIsAbstract()
{
Assert.True(typeof(abstractClass).Project().GetTypeInfo().IsAbstract, "Failed!! .IsAbstract returned false for a type that is abstract.");
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsAbstract, "Failed!! .IsAbstract returned true for a type that is not abstract.");
}
//Verify IsAnsiClass
[Fact]
public static void TestIsAnsiClass()
{
string mystr = "A simple string";
Type t = mystr.GetType();
TypeInfo ti = t.GetTypeInfo();
Assert.True(ti.IsAnsiClass, "Failed!! .IsAnsiClass returned false.");
}
//Verify IsAray
[Fact]
public static void TestIsArray()
{
int[] myarray = { 1, 2, 3 };
Type arraytype = myarray.GetType();
Assert.True(arraytype.GetTypeInfo().IsArray, "Failed!! .IsArray returned false for a type that is array.");
Assert.False(typeof(int).Project().GetTypeInfo().IsArray, "Failed!! .IsArray returned true for a type that is not an array.");
}
// VerifyIsByRef
[Fact]
public static void TestIsByRefType()
{
TypeInfo ti = typeof(int).Project().GetTypeInfo();
Type byreftype = ti.MakeByRefType();
Assert.NotNull(byreftype);
Assert.True(byreftype.IsByRef, "Failed!! IsByRefType() returned false");
Assert.False(typeof(int).Project().GetTypeInfo().IsByRef, "Failed!! IsByRefType() returned true");
}
// VerifyIsClass
[Fact]
public static void TestIsClass()
{
Assert.True(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsClass, "Failed!! IsClass returned false for a class Type");
Assert.False(typeof(MYENUM).Project().GetTypeInfo().IsClass, "Failed!! IsClass returned true for a non-class Type");
}
// VerifyIsEnum
[Fact]
public static void TestIsEnum()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsEnum, "Failed!! IsEnum returned true for a class Type");
Assert.True(typeof(MYENUM).Project().GetTypeInfo().IsEnum, "Failed!! IsEnum returned false for a Enum Type");
}
// VerifyIsInterface
[Fact]
public static void TestIsInterface()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsInterface, "Failed!! IsInterface returned true for a class Type");
Assert.True(typeof(ITest).Project().GetTypeInfo().IsInterface, "Failed!! IsInterface returned false for a interface Type");
}
// VerifyIsNested
[Fact]
public static void TestIsNested()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsNested, "Failed!! IsNested returned true for a non nested class Type");
Assert.True(typeof(PublicClass.PublicNestedType).Project().GetTypeInfo().IsNested, "Failed!! IsNested returned false for a nested class Type");
}
// Verify IsPointer
[Fact]
public static void TestIsPointer()
{
TypeInfo ti = typeof(int).Project().GetTypeInfo();
Type ptrtype = ti.MakePointerType();
Assert.NotNull(ptrtype);
Assert.True(ptrtype.IsPointer, "Failed!! IsPointer returned false for pointer type");
Assert.False(typeof(int).Project().GetTypeInfo().IsPointer, "Failed!! IsPointer returned true for non -pointer type");
}
// VerifyIsPrimitive
[Fact]
public static void TestIsPrimitive()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsPrimitive, "Failed!! IsPrimitive returned true for a non primitive Type");
Assert.True(typeof(int).Project().GetTypeInfo().IsPrimitive, "Failed!! IsPrimitive returned true for a primitive Type");
Assert.True(typeof(char).Project().GetTypeInfo().IsPrimitive, "Failed!! IsPrimitive returned true for a primitive Type");
}
// VerifyIsPublic
[Fact]
public static void TestIsPublic()
{
Assert.True(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
Assert.True(typeof(TypeInfoPropertyDerived).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
Assert.True(typeof(PublicClass).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
Assert.True(typeof(ITest).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
Assert.True(typeof(ImplClass).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
}
// VerifyIsNotPublic
[Fact]
public static void TestIsNotPublic()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
Assert.False(typeof(TypeInfoPropertyDerived).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
Assert.False(typeof(ITest).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
Assert.False(typeof(ImplClass).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
}
// VerifyIsNestedPublic
[Fact]
public static void TestIsNestedPublic()
{
Assert.True(typeof(PublicClass.publicNestedClass).Project().GetTypeInfo().IsNestedPublic, "Failed!! IsNestedPublic returned false for a nested public Type");
}
// VerifyIsNestedPrivate
[Fact]
public static void TestIsNestedPrivate()
{
Assert.False(typeof(PublicClass.publicNestedClass).Project().GetTypeInfo().IsNestedPrivate, "Failed!! IsNestedPrivate returned true for a nested public Type");
}
// Verify IsSealed
[Fact]
public static void TestIsSealed()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsSealed, "Failed!! IsSealed returned true for a Type that is not sealed");
Assert.True(typeof(sealedClass).Project().GetTypeInfo().IsSealed, "Failed!! IsSealed returned false for a Type that is sealed");
}
// Verify IsSerializable
[Fact]
public static void TestIsSerializable()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsSerializable, "Failed!! IsSerializable returned true for a Type that is not serializable");
}
// VerifyIsValueType
[Fact]
public static void TestIsValueType()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsValueType, "Failed!! IsValueType returned true for a class Type");
Assert.True(typeof(MYENUM).Project().GetTypeInfo().IsValueType, "Failed!! IsValueType returned false for a Enum Type");
}
// VerifyIsValueType
[Fact]
public static void TestIsVisible()
{
Assert.True(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
Assert.True(typeof(ITest).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
Assert.True(typeof(MYENUM).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
Assert.True(typeof(PublicClass).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
Assert.True(typeof(PublicClass.publicNestedClass).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
}
// Verify Namespace property
[Fact]
public static void TestNamespace()
{
Assert.Equal("System.Reflection.Tests", typeof(TypeInfoPropertyBase).Project().GetTypeInfo().Namespace);
Assert.Equal("System.Reflection.Tests", typeof(ITest).Project().GetTypeInfo().Namespace);
Assert.Equal("System.Reflection.Tests", typeof(MYENUM).Project().GetTypeInfo().Namespace);
Assert.Equal("System.Reflection.Tests", typeof(PublicClass).Project().GetTypeInfo().Namespace);
Assert.Equal("System.Reflection.Tests", typeof(PublicClass.publicNestedClass).Project().GetTypeInfo().Namespace);
Assert.Equal("System", typeof(int).Project().GetTypeInfo().Namespace);
}
// VerifyIsImport
[Fact]
public static void TestIsImport()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsImport, "Failed!! IsImport returned true for a class Type that is not imported.");
Assert.False(typeof(MYENUM).Project().GetTypeInfo().IsImport, "Failed!! IsImport returned true for a non-class Type that is not imported.");
}
// VerifyIsUnicodeClass
[Fact]
public static void TestIsUnicodeClass()
{
string str = "mystring";
Type type = str.GetType();
Type ref_type = type.MakeByRefType();
Assert.False(type.GetTypeInfo().IsUnicodeClass, "Failed!! IsUnicodeClass returned true for string.");
Assert.False(ref_type.GetTypeInfo().IsUnicodeClass, "Failed!! IsUnicodeClass returned true for string.");
}
// Verify IsAutoClass
[Fact]
public static void TestIsAutoClass()
{
string str = "mystring";
Type type = str.GetType();
Type ref_type = type.MakeByRefType();
Assert.False(type.GetTypeInfo().IsAutoClass, "Failed!! IsAutoClass returned true for string.");
Assert.False(ref_type.GetTypeInfo().IsAutoClass, "Failed!! IsAutoClass returned true for string.");
}
[Fact]
public static void TestIsMarshalByRef()
{
string str = "mystring";
Type type = str.GetType();
Type ptr_type = type.MakePointerType();
Type ref_type = type.MakeByRefType();
Assert.False(type.GetTypeInfo().IsMarshalByRef, "Failed!! IsMarshalByRef returned true.");
Assert.False(ptr_type.GetTypeInfo().IsMarshalByRef, "Failed!! IsMarshalByRef returned true.");
Assert.False(ref_type.GetTypeInfo().IsMarshalByRef, "Failed!! IsMarshalByRef returned true.");
}
// VerifyIsNestedAssembly
[Fact]
public static void TestIsNestedAssembly()
{
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNestedAssembly, "Failed!! IsNestedAssembly returned true for a class with public visibility.");
}
// VerifyIsNestedFamily
[Fact]
public static void TestIsNestedFamily()
{
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNestedFamily, "Failed!! IsNestedFamily returned true for a class with private visibility.");
}
// VerifyIsNestedFamANDAssem
[Fact]
public static void TestIsNestedFamAndAssem()
{
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNestedFamANDAssem, "Failed!! IsNestedFamAndAssem returned true for a class with private visibility.");
}
// VerifyIsNestedFamOrAssem
[Fact]
public static void TestIsNestedFamOrAssem()
{
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNestedFamORAssem, "Failed!! IsNestedFamOrAssem returned true for a class with private visibility.");
}
}
//Metadata for Reflection
public class PublicClass
{
public int PublicField;
public static int PublicStaticField;
public PublicClass() { }
public void PublicMethod() { }
public void overRiddenMethod() { }
public void overRiddenMethod(int i) { }
public void overRiddenMethod(string s) { }
public void overRiddenMethod(object o) { }
public static void PublicStaticMethod() { }
public class PublicNestedType { }
public int PublicProperty { get { return default(int); } set { } }
public class publicNestedClass { }
}
public sealed class sealedClass { }
public abstract class abstractClass { }
public interface ITest { }
public class TypeInfoPropertyBase { }
public class TypeInfoPropertyDerived : TypeInfoPropertyBase { }
public class ImplClass : ITest { }
public class TypeInfoPropertyGenericClass<T> { }
public class ClassWithConstraints<T, U>
where T : TypeInfoPropertyBase, ITest
where U : class, new()
{ }
public enum MYENUM { one = 1, Two = 2 }
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Xunit;
#pragma warning disable 0414
#pragma warning disable 0067
namespace System.Reflection.Tests
{
[System.Runtime.InteropServices.Guid("FD80F123-BEDD-4492-B50A-5D46AE94DD4E")]
public class TypeInfoPropertyTests
{
// Verify BaseType() method
[Fact]
public static void TestBaseType1()
{
Type t = typeof(TypeInfoPropertyDerived).Project();
TypeInfo ti = t.GetTypeInfo();
Type basetype = ti.BaseType;
Assert.Equal(basetype, typeof(TypeInfoPropertyBase).Project());
}
// Verify BaseType() method
[Fact]
public static void TestBaseType2()
{
Type t = typeof(TypeInfoPropertyBase).Project();
TypeInfo ti = t.GetTypeInfo();
Type basetype = ti.BaseType;
Assert.Equal(basetype, typeof(object).Project());
}
// Verify ContainsGenericParameter
[Fact]
public static void TestContainsGenericParameter1()
{
Type t = typeof(ClassWithConstraints<,>).Project();
TypeInfo ti = t.GetTypeInfo();
bool hasgenericParam = ti.ContainsGenericParameters;
Assert.True(hasgenericParam, string.Format("Failed!! TestContainsGenericParameter did not return correct result. "));
}
// Verify ContainsGenericParameter
[Fact]
public static void TestContainsGenericParameter2()
{
Type t = typeof(TypeInfoPropertyBase).Project();
TypeInfo ti = t.GetTypeInfo();
bool hasgenericParam = ti.ContainsGenericParameters;
Assert.False(hasgenericParam, string.Format("Failed!! TestContainsGenericParameter did not return correct result. "));
}
// Verify FullName
[Fact]
public static void TestFullName()
{
Type t = typeof(int).Project();
TypeInfo ti = t.GetTypeInfo();
string fname = ti.FullName;
Assert.Equal("System.Int32", fname);
}
// Verify Guid
[Fact]
public static void TestGuid()
{
Type t = typeof(TypeInfoPropertyTests).Project();
TypeInfo ti = t.GetTypeInfo();
Guid myguid = ti.GUID;
Assert.NotEqual(Guid.Empty, myguid);
}
// Verify HasElementType
[Fact]
public static void TestHasElementType()
{
Type t = typeof(int).Project();
TypeInfo ti = t.GetTypeInfo();
Assert.False(ti.HasElementType, "Failed!! .HasElementType returned true for a type that does not contain element ");
int[] nums = { 1, 1, 2, 3 };
Type te = nums.GetType();
TypeInfo tei = te.GetTypeInfo();
Assert.True(tei.HasElementType, "Failed!! .HasElementType returned false for a type that contains element ");
}
//Verify IsAbstract
[Fact]
public static void TestIsAbstract()
{
Assert.True(typeof(abstractClass).Project().GetTypeInfo().IsAbstract, "Failed!! .IsAbstract returned false for a type that is abstract.");
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsAbstract, "Failed!! .IsAbstract returned true for a type that is not abstract.");
}
//Verify IsAnsiClass
[Fact]
public static void TestIsAnsiClass()
{
string mystr = "A simple string";
Type t = mystr.GetType();
TypeInfo ti = t.GetTypeInfo();
Assert.True(ti.IsAnsiClass, "Failed!! .IsAnsiClass returned false.");
}
//Verify IsAray
[Fact]
public static void TestIsArray()
{
int[] myarray = { 1, 2, 3 };
Type arraytype = myarray.GetType();
Assert.True(arraytype.GetTypeInfo().IsArray, "Failed!! .IsArray returned false for a type that is array.");
Assert.False(typeof(int).Project().GetTypeInfo().IsArray, "Failed!! .IsArray returned true for a type that is not an array.");
}
// VerifyIsByRef
[Fact]
public static void TestIsByRefType()
{
TypeInfo ti = typeof(int).Project().GetTypeInfo();
Type byreftype = ti.MakeByRefType();
Assert.NotNull(byreftype);
Assert.True(byreftype.IsByRef, "Failed!! IsByRefType() returned false");
Assert.False(typeof(int).Project().GetTypeInfo().IsByRef, "Failed!! IsByRefType() returned true");
}
// VerifyIsClass
[Fact]
public static void TestIsClass()
{
Assert.True(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsClass, "Failed!! IsClass returned false for a class Type");
Assert.False(typeof(MYENUM).Project().GetTypeInfo().IsClass, "Failed!! IsClass returned true for a non-class Type");
}
// VerifyIsEnum
[Fact]
public static void TestIsEnum()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsEnum, "Failed!! IsEnum returned true for a class Type");
Assert.True(typeof(MYENUM).Project().GetTypeInfo().IsEnum, "Failed!! IsEnum returned false for a Enum Type");
}
// VerifyIsInterface
[Fact]
public static void TestIsInterface()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsInterface, "Failed!! IsInterface returned true for a class Type");
Assert.True(typeof(ITest).Project().GetTypeInfo().IsInterface, "Failed!! IsInterface returned false for a interface Type");
}
// VerifyIsNested
[Fact]
public static void TestIsNested()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsNested, "Failed!! IsNested returned true for a non nested class Type");
Assert.True(typeof(PublicClass.PublicNestedType).Project().GetTypeInfo().IsNested, "Failed!! IsNested returned false for a nested class Type");
}
// Verify IsPointer
[Fact]
public static void TestIsPointer()
{
TypeInfo ti = typeof(int).Project().GetTypeInfo();
Type ptrtype = ti.MakePointerType();
Assert.NotNull(ptrtype);
Assert.True(ptrtype.IsPointer, "Failed!! IsPointer returned false for pointer type");
Assert.False(typeof(int).Project().GetTypeInfo().IsPointer, "Failed!! IsPointer returned true for non -pointer type");
}
// VerifyIsPrimitive
[Fact]
public static void TestIsPrimitive()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsPrimitive, "Failed!! IsPrimitive returned true for a non primitive Type");
Assert.True(typeof(int).Project().GetTypeInfo().IsPrimitive, "Failed!! IsPrimitive returned true for a primitive Type");
Assert.True(typeof(char).Project().GetTypeInfo().IsPrimitive, "Failed!! IsPrimitive returned true for a primitive Type");
}
// VerifyIsPublic
[Fact]
public static void TestIsPublic()
{
Assert.True(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
Assert.True(typeof(TypeInfoPropertyDerived).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
Assert.True(typeof(PublicClass).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
Assert.True(typeof(ITest).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
Assert.True(typeof(ImplClass).Project().GetTypeInfo().IsPublic, "Failed!! IsPublic returned false for a public Type");
}
// VerifyIsNotPublic
[Fact]
public static void TestIsNotPublic()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
Assert.False(typeof(TypeInfoPropertyDerived).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
Assert.False(typeof(ITest).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
Assert.False(typeof(ImplClass).Project().GetTypeInfo().IsNotPublic, "Failed!! IsNotPublic returned false for a public Type");
}
// VerifyIsNestedPublic
[Fact]
public static void TestIsNestedPublic()
{
Assert.True(typeof(PublicClass.publicNestedClass).Project().GetTypeInfo().IsNestedPublic, "Failed!! IsNestedPublic returned false for a nested public Type");
}
// VerifyIsNestedPrivate
[Fact]
public static void TestIsNestedPrivate()
{
Assert.False(typeof(PublicClass.publicNestedClass).Project().GetTypeInfo().IsNestedPrivate, "Failed!! IsNestedPrivate returned true for a nested public Type");
}
// Verify IsSealed
[Fact]
public static void TestIsSealed()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsSealed, "Failed!! IsSealed returned true for a Type that is not sealed");
Assert.True(typeof(sealedClass).Project().GetTypeInfo().IsSealed, "Failed!! IsSealed returned false for a Type that is sealed");
}
// Verify IsSerializable
[Fact]
public static void TestIsSerializable()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsSerializable, "Failed!! IsSerializable returned true for a Type that is not serializable");
}
// VerifyIsValueType
[Fact]
public static void TestIsValueType()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsValueType, "Failed!! IsValueType returned true for a class Type");
Assert.True(typeof(MYENUM).Project().GetTypeInfo().IsValueType, "Failed!! IsValueType returned false for a Enum Type");
}
// VerifyIsValueType
[Fact]
public static void TestIsVisible()
{
Assert.True(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
Assert.True(typeof(ITest).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
Assert.True(typeof(MYENUM).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
Assert.True(typeof(PublicClass).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
Assert.True(typeof(PublicClass.publicNestedClass).Project().GetTypeInfo().IsVisible, "Failed!! IsVisible returned false");
}
// Verify Namespace property
[Fact]
public static void TestNamespace()
{
Assert.Equal("System.Reflection.Tests", typeof(TypeInfoPropertyBase).Project().GetTypeInfo().Namespace);
Assert.Equal("System.Reflection.Tests", typeof(ITest).Project().GetTypeInfo().Namespace);
Assert.Equal("System.Reflection.Tests", typeof(MYENUM).Project().GetTypeInfo().Namespace);
Assert.Equal("System.Reflection.Tests", typeof(PublicClass).Project().GetTypeInfo().Namespace);
Assert.Equal("System.Reflection.Tests", typeof(PublicClass.publicNestedClass).Project().GetTypeInfo().Namespace);
Assert.Equal("System", typeof(int).Project().GetTypeInfo().Namespace);
}
// VerifyIsImport
[Fact]
public static void TestIsImport()
{
Assert.False(typeof(TypeInfoPropertyBase).Project().GetTypeInfo().IsImport, "Failed!! IsImport returned true for a class Type that is not imported.");
Assert.False(typeof(MYENUM).Project().GetTypeInfo().IsImport, "Failed!! IsImport returned true for a non-class Type that is not imported.");
}
// VerifyIsUnicodeClass
[Fact]
public static void TestIsUnicodeClass()
{
string str = "mystring";
Type type = str.GetType();
Type ref_type = type.MakeByRefType();
Assert.False(type.GetTypeInfo().IsUnicodeClass, "Failed!! IsUnicodeClass returned true for string.");
Assert.False(ref_type.GetTypeInfo().IsUnicodeClass, "Failed!! IsUnicodeClass returned true for string.");
}
// Verify IsAutoClass
[Fact]
public static void TestIsAutoClass()
{
string str = "mystring";
Type type = str.GetType();
Type ref_type = type.MakeByRefType();
Assert.False(type.GetTypeInfo().IsAutoClass, "Failed!! IsAutoClass returned true for string.");
Assert.False(ref_type.GetTypeInfo().IsAutoClass, "Failed!! IsAutoClass returned true for string.");
}
[Fact]
public static void TestIsMarshalByRef()
{
string str = "mystring";
Type type = str.GetType();
Type ptr_type = type.MakePointerType();
Type ref_type = type.MakeByRefType();
Assert.False(type.GetTypeInfo().IsMarshalByRef, "Failed!! IsMarshalByRef returned true.");
Assert.False(ptr_type.GetTypeInfo().IsMarshalByRef, "Failed!! IsMarshalByRef returned true.");
Assert.False(ref_type.GetTypeInfo().IsMarshalByRef, "Failed!! IsMarshalByRef returned true.");
}
// VerifyIsNestedAssembly
[Fact]
public static void TestIsNestedAssembly()
{
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNestedAssembly, "Failed!! IsNestedAssembly returned true for a class with public visibility.");
}
// VerifyIsNestedFamily
[Fact]
public static void TestIsNestedFamily()
{
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNestedFamily, "Failed!! IsNestedFamily returned true for a class with private visibility.");
}
// VerifyIsNestedFamANDAssem
[Fact]
public static void TestIsNestedFamAndAssem()
{
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNestedFamANDAssem, "Failed!! IsNestedFamAndAssem returned true for a class with private visibility.");
}
// VerifyIsNestedFamOrAssem
[Fact]
public static void TestIsNestedFamOrAssem()
{
Assert.False(typeof(PublicClass).Project().GetTypeInfo().IsNestedFamORAssem, "Failed!! IsNestedFamOrAssem returned true for a class with private visibility.");
}
}
//Metadata for Reflection
public class PublicClass
{
public int PublicField;
public static int PublicStaticField;
public PublicClass() { }
public void PublicMethod() { }
public void overRiddenMethod() { }
public void overRiddenMethod(int i) { }
public void overRiddenMethod(string s) { }
public void overRiddenMethod(object o) { }
public static void PublicStaticMethod() { }
public class PublicNestedType { }
public int PublicProperty { get { return default(int); } set { } }
public class publicNestedClass { }
}
public sealed class sealedClass { }
public abstract class abstractClass { }
public interface ITest { }
public class TypeInfoPropertyBase { }
public class TypeInfoPropertyDerived : TypeInfoPropertyBase { }
public class ImplClass : ITest { }
public class TypeInfoPropertyGenericClass<T> { }
public class ClassWithConstraints<T, U>
where T : TypeInfoPropertyBase, ITest
where U : class, new()
{ }
public enum MYENUM { one = 1, Two = 2 }
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.IO.FileSystem/tests/FileInfo/Extension.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Xunit;
namespace System.IO.Tests
{
public class FileInfo_Extension : FileSystemTest
{
[Theory]
[InlineData("filename", ".end")]
[InlineData("filename", "")]
[InlineData("foo.bar.fkl;fkds92-509450-4359.$#%()#%().%#(%)_#(%_)", ".cool")]
[InlineData("filename", ".$#@$_)+_)!@@!!@##&_$)#_")]
public void ValidExtensions(string fileName, string extension)
{
string path = Path.Combine(TestDirectory, fileName + extension);
FileInfo file = new FileInfo(path);
Assert.Equal(extension, file.Extension);
}
[Theory]
[InlineData(".")]
[InlineData("............")]
[PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid extensions should be removed
public void WindowsInvalidExtensionsAreRemoved(string extension)
{
string testFile = GetTestFilePath();
FileInfo testInfo = new FileInfo(testFile + extension);
Assert.Equal(string.Empty, testInfo.Extension);
}
[Theory]
[InlineData(".s", ".")]
[InlineData(".s", ".s....")]
[PlatformSpecific(TestPlatforms.Windows)] // Trailing dots in extension are removed
public void WindowsCurtailTrailingDots(string extension, string trailing)
{
string testFile = GetTestFilePath();
FileInfo testInfo = new FileInfo(testFile + extension + trailing);
Assert.Equal(extension, testInfo.Extension);
}
[Theory]
[InlineData(".s", ".")]
[InlineData(".s.s....", ".ls")]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Last dot is extension
public void UnixLastDotIsExtension(string extension, string trailing)
{
string testFile = GetTestFilePath();
FileInfo testInfo = new FileInfo(testFile + extension + trailing);
Assert.Equal(trailing, testInfo.Extension);
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Xunit;
namespace System.IO.Tests
{
public class FileInfo_Extension : FileSystemTest
{
[Theory]
[InlineData("filename", ".end")]
[InlineData("filename", "")]
[InlineData("foo.bar.fkl;fkds92-509450-4359.$#%()#%().%#(%)_#(%_)", ".cool")]
[InlineData("filename", ".$#@$_)+_)!@@!!@##&_$)#_")]
public void ValidExtensions(string fileName, string extension)
{
string path = Path.Combine(TestDirectory, fileName + extension);
FileInfo file = new FileInfo(path);
Assert.Equal(extension, file.Extension);
}
[Theory]
[InlineData(".")]
[InlineData("............")]
[PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid extensions should be removed
public void WindowsInvalidExtensionsAreRemoved(string extension)
{
string testFile = GetTestFilePath();
FileInfo testInfo = new FileInfo(testFile + extension);
Assert.Equal(string.Empty, testInfo.Extension);
}
[Theory]
[InlineData(".s", ".")]
[InlineData(".s", ".s....")]
[PlatformSpecific(TestPlatforms.Windows)] // Trailing dots in extension are removed
public void WindowsCurtailTrailingDots(string extension, string trailing)
{
string testFile = GetTestFilePath();
FileInfo testInfo = new FileInfo(testFile + extension + trailing);
Assert.Equal(extension, testInfo.Extension);
}
[Theory]
[InlineData(".s", ".")]
[InlineData(".s.s....", ".ls")]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Last dot is extension
public void UnixLastDotIsExtension(string extension, string trailing)
{
string testFile = GetTestFilePath();
FileInfo testInfo = new FileInfo(testFile + extension + trailing);
Assert.Equal(trailing, testInfo.Extension);
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/native/external/brotli/enc/cluster.c
|
/* Copyright 2013 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
/* Functions for clustering similar histograms together. */
#include "./cluster.h"
#include "../common/platform.h"
#include <brotli/types.h>
#include "./bit_cost.h" /* BrotliPopulationCost */
#include "./fast_log.h"
#include "./histogram.h"
#include "./memory.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
static BROTLI_INLINE BROTLI_BOOL HistogramPairIsLess(
const HistogramPair* p1, const HistogramPair* p2) {
if (p1->cost_diff != p2->cost_diff) {
return TO_BROTLI_BOOL(p1->cost_diff > p2->cost_diff);
}
return TO_BROTLI_BOOL((p1->idx2 - p1->idx1) > (p2->idx2 - p2->idx1));
}
/* Returns entropy reduction of the context map when we combine two clusters. */
static BROTLI_INLINE double ClusterCostDiff(size_t size_a, size_t size_b) {
size_t size_c = size_a + size_b;
return (double)size_a * FastLog2(size_a) +
(double)size_b * FastLog2(size_b) -
(double)size_c * FastLog2(size_c);
}
#define CODE(X) X
#define FN(X) X ## Literal
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Command
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Distance
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#undef CODE
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
|
/* Copyright 2013 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
/* Functions for clustering similar histograms together. */
#include "./cluster.h"
#include "../common/platform.h"
#include <brotli/types.h>
#include "./bit_cost.h" /* BrotliPopulationCost */
#include "./fast_log.h"
#include "./histogram.h"
#include "./memory.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
static BROTLI_INLINE BROTLI_BOOL HistogramPairIsLess(
const HistogramPair* p1, const HistogramPair* p2) {
if (p1->cost_diff != p2->cost_diff) {
return TO_BROTLI_BOOL(p1->cost_diff > p2->cost_diff);
}
return TO_BROTLI_BOOL((p1->idx2 - p1->idx1) > (p2->idx2 - p2->idx1));
}
/* Returns entropy reduction of the context map when we combine two clusters. */
static BROTLI_INLINE double ClusterCostDiff(size_t size_a, size_t size_b) {
size_t size_c = size_a + size_b;
return (double)size_a * FastLog2(size_a) +
(double)size_b * FastLog2(size_b) -
(double)size_c * FastLog2(size_c);
}
#define CODE(X) X
#define FN(X) X ## Literal
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Command
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Distance
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#undef CODE
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/mono/mono/tests/dim-simple.il
|
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Metadata version: v4.0.30319
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly simple
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
// --- The following custom attribute is added automatically, do not uncomment -------
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module simple.exe
// MVID: {0B8FCFD0-673A-4DEB-90CC-B96749DE09C8}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x01A80000
// =============== CLASS MEMBERS DECLARATION ===================
.class interface private abstract auto ansi IBlah
{
.method public hidebysig newslot virtual
instance int32 Blah(int32 c) cil managed
{
// Code size 39 (0x27)
.maxstack 2
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBlah.Blah"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldarg.1
IL_000d: ldarg.0
IL_000e: call instance int32 IBlah::Blah_Private_GetA()
IL_0013: add
IL_0014: ldarg.0
IL_0015: call instance int32 IBlah::Blah_Internal_GetB()
IL_001a: add
IL_001b: ldarg.0
IL_001c: call instance int32 IBlah::Blah_Protected_GetC()
IL_0021: add
IL_0022: stloc.0
IL_0023: br.s IL_0025
IL_0025: ldloc.0
IL_0026: ret
} // end of method IBlah::Blah
.method private hidebysig instance int32
Blah_Private_GetA() cil managed
{
// Code size 18 (0x12)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBlah.Blah_Private_GetA"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldc.i4.1
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method IBlah_Impl::Blah_Private_GetA
.method assembly hidebysig instance int32
Blah_Internal_GetB() cil managed
{
// Code size 18 (0x12)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBlah.Blah_Internal_GetB"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldc.i4.2
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method IBlah_Impl::Blah_Internal_GetB
.method family hidebysig instance int32
Blah_Protected_GetC() cil managed
{
// Code size 18 (0x12)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBlah.Blah_Protected_GetC"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldc.i4.3
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method IBlah_Impl::Blah_Protected_GetC
} // end of class IBlah
.class interface private abstract auto ansi IFoo
{
.method public hidebysig newslot virtual
instance int32 Foo(int32 a) cil managed
{
// Code size 20 (0x14)
.maxstack 2
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IFoo.Foo"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldarg.1
IL_000d: ldc.i4.1
IL_000e: add
IL_000f: stloc.0
IL_0010: br.s IL_0012
IL_0012: ldloc.0
IL_0013: ret
} // end of method IFoo::Foo
} // end of class IFoo
.class interface private abstract auto ansi IBar
{
.method public hidebysig newslot virtual
instance int32 Bar(int32 b) cil managed
{
// Code size 21 (0x15)
.maxstack 2
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBar.Bar"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldarg.1
IL_000d: ldc.i4.s 10
IL_000f: add
IL_0010: stloc.0
IL_0011: br.s IL_0013
IL_0013: ldloc.0
IL_0014: ret
} // end of method IBar::Bar
} // end of class IBar
.class private auto ansi beforefieldinit Base
extends [mscorlib]System.Object
implements IBlah
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method Base::.ctor
} // end of class Base
.class private auto ansi beforefieldinit FooBar
extends Base
implements IFoo,
IBar
{
.method public hidebysig instance int32
CallBlahProtected() cil managed
{
// Code size 12 (0xc)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance int32 IBlah::Blah_Protected_GetC()
IL_0007: stloc.0
IL_0008: br.s IL_000a
IL_000a: ldloc.0
IL_000b: ret
} // end of method FooBar::CallBlahProtected
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void Base::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method FooBar::.ctor
} // end of class FooBar
.class private auto ansi beforefieldinit Program
extends [mscorlib]System.Object
{
.method public hidebysig static int32 Main() cil managed
{
.entrypoint
// Code size 158 (0x9e)
.maxstack 2
.locals init (class FooBar V_0,
class IFoo V_1,
class IBar V_2,
class IBlah V_3,
int32 V_4)
IL_0000: nop
IL_0001: newobj instance void FooBar::.ctor()
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.0
IL_000a: stloc.2
IL_000b: ldloc.0
IL_000c: stloc.3
IL_000d: ldstr "Calling IFoo.Foo on FooBar - expecting default met"
+ "hod on IFoo.Foo. "
IL_0012: call void [mscorlib]System.Console::WriteLine(string)
IL_0017: nop
IL_0018: ldloc.1
IL_0019: ldc.i4.s 10
IL_001b: callvirt instance int32 IFoo::Foo(int32)
IL_0020: ldc.i4.s 11
IL_0022: ceq
IL_0024: ldstr "Calling IFoo.Foo on FooBar"
IL_0029: call void Test::Assert(bool,
string)
IL_002e: nop
IL_002f: ldstr "Calling IBar.Bar on FooBar - expecting default met"
+ "hod on IBar.Bar. "
IL_0034: call void [mscorlib]System.Console::WriteLine(string)
IL_0039: nop
IL_003a: ldloc.2
IL_003b: ldc.i4.s 10
IL_003d: callvirt instance int32 IBar::Bar(int32)
IL_0042: ldc.i4.s 20
IL_0044: ceq
IL_0046: ldstr "Calling IBar.Bar on FooBar"
IL_004b: call void Test::Assert(bool,
string)
IL_0050: nop
IL_0051: ldstr "Calling IBlah.Blah on FooBar - expecting default m"
+ "ethod on IBlah.Blah from Base. "
IL_0056: call void [mscorlib]System.Console::WriteLine(string)
IL_005b: nop
IL_005c: ldloc.3
IL_005d: ldc.i4.s 10
IL_005f: callvirt instance int32 IBlah::Blah(int32)
IL_0064: ldc.i4.s 16
IL_0066: ceq
IL_0068: ldstr "Calling IBlah.Blah on FooBar"
IL_006d: call void Test::Assert(bool,
string)
IL_0072: nop
IL_0073: ldstr "Calling FooBar.CallBlahProtected - expecting prote"
+ "cted methods on interface can be called"
IL_0078: call void [mscorlib]System.Console::WriteLine(string)
IL_007d: nop
IL_007e: ldloc.0
IL_007f: callvirt instance int32 FooBar::CallBlahProtected()
IL_0084: ldc.i4.3
IL_0085: ceq
IL_0087: ldstr "Calling FooBar.CallBlahProtected"
IL_008c: call void Test::Assert(bool,
string)
IL_0091: nop
IL_0092: call int32 Test::Ret()
IL_0097: stloc.s V_4
IL_0099: br.s IL_009b
IL_009b: ldloc.s V_4
IL_009d: ret
} // end of method Program::Main
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method Program::.ctor
} // end of class Program
.class private auto ansi beforefieldinit Test
extends [mscorlib]System.Object
{
.field private static bool Pass
.method public hidebysig static int32 Ret() cil managed
{
// Code size 19 (0x13)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldsfld bool Test::Pass
IL_0006: brtrue.s IL_000c
IL_0008: ldc.i4.s 101
IL_000a: br.s IL_000e
IL_000c: ldc.i4.s 0
IL_000e: stloc.0
IL_000f: br.s IL_0011
IL_0011: ldloc.0
IL_0012: ret
} // end of method Test::Ret
.method public hidebysig static void Assert(bool cond,
string msg) cil managed
{
// Code size 47 (0x2f)
.maxstack 2
.locals init (bool V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: stloc.0
IL_0003: ldloc.0
IL_0004: brfalse.s IL_0015
IL_0006: nop
IL_0007: ldstr "PASS"
IL_000c: call void [mscorlib]System.Console::WriteLine(string)
IL_0011: nop
IL_0012: nop
IL_0013: br.s IL_002e
IL_0015: nop
IL_0016: ldstr "FAIL: "
IL_001b: ldarg.1
IL_001c: call string [mscorlib]System.String::Concat(string,
string)
IL_0021: call void [mscorlib]System.Console::WriteLine(string)
IL_0026: nop
IL_0027: ldc.i4.0
IL_0028: stsfld bool Test::Pass
IL_002d: nop
IL_002e: ret
} // end of method Test::Assert
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method Test::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldc.i4.1
IL_0001: stsfld bool Test::Pass
IL_0006: ret
} // end of method Test::.cctor
} // end of class Test
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file simple.res
|
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
// Metadata version: v4.0.30319
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly simple
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
// --- The following custom attribute is added automatically, do not uncomment -------
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module simple.exe
// MVID: {0B8FCFD0-673A-4DEB-90CC-B96749DE09C8}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x01A80000
// =============== CLASS MEMBERS DECLARATION ===================
.class interface private abstract auto ansi IBlah
{
.method public hidebysig newslot virtual
instance int32 Blah(int32 c) cil managed
{
// Code size 39 (0x27)
.maxstack 2
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBlah.Blah"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldarg.1
IL_000d: ldarg.0
IL_000e: call instance int32 IBlah::Blah_Private_GetA()
IL_0013: add
IL_0014: ldarg.0
IL_0015: call instance int32 IBlah::Blah_Internal_GetB()
IL_001a: add
IL_001b: ldarg.0
IL_001c: call instance int32 IBlah::Blah_Protected_GetC()
IL_0021: add
IL_0022: stloc.0
IL_0023: br.s IL_0025
IL_0025: ldloc.0
IL_0026: ret
} // end of method IBlah::Blah
.method private hidebysig instance int32
Blah_Private_GetA() cil managed
{
// Code size 18 (0x12)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBlah.Blah_Private_GetA"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldc.i4.1
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method IBlah_Impl::Blah_Private_GetA
.method assembly hidebysig instance int32
Blah_Internal_GetB() cil managed
{
// Code size 18 (0x12)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBlah.Blah_Internal_GetB"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldc.i4.2
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method IBlah_Impl::Blah_Internal_GetB
.method family hidebysig instance int32
Blah_Protected_GetC() cil managed
{
// Code size 18 (0x12)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBlah.Blah_Protected_GetC"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldc.i4.3
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method IBlah_Impl::Blah_Protected_GetC
} // end of class IBlah
.class interface private abstract auto ansi IFoo
{
.method public hidebysig newslot virtual
instance int32 Foo(int32 a) cil managed
{
// Code size 20 (0x14)
.maxstack 2
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IFoo.Foo"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldarg.1
IL_000d: ldc.i4.1
IL_000e: add
IL_000f: stloc.0
IL_0010: br.s IL_0012
IL_0012: ldloc.0
IL_0013: ret
} // end of method IFoo::Foo
} // end of class IFoo
.class interface private abstract auto ansi IBar
{
.method public hidebysig newslot virtual
instance int32 Bar(int32 b) cil managed
{
// Code size 21 (0x15)
.maxstack 2
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldstr "At IBar.Bar"
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
IL_000b: nop
IL_000c: ldarg.1
IL_000d: ldc.i4.s 10
IL_000f: add
IL_0010: stloc.0
IL_0011: br.s IL_0013
IL_0013: ldloc.0
IL_0014: ret
} // end of method IBar::Bar
} // end of class IBar
.class private auto ansi beforefieldinit Base
extends [mscorlib]System.Object
implements IBlah
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method Base::.ctor
} // end of class Base
.class private auto ansi beforefieldinit FooBar
extends Base
implements IFoo,
IBar
{
.method public hidebysig instance int32
CallBlahProtected() cil managed
{
// Code size 12 (0xc)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance int32 IBlah::Blah_Protected_GetC()
IL_0007: stloc.0
IL_0008: br.s IL_000a
IL_000a: ldloc.0
IL_000b: ret
} // end of method FooBar::CallBlahProtected
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void Base::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method FooBar::.ctor
} // end of class FooBar
.class private auto ansi beforefieldinit Program
extends [mscorlib]System.Object
{
.method public hidebysig static int32 Main() cil managed
{
.entrypoint
// Code size 158 (0x9e)
.maxstack 2
.locals init (class FooBar V_0,
class IFoo V_1,
class IBar V_2,
class IBlah V_3,
int32 V_4)
IL_0000: nop
IL_0001: newobj instance void FooBar::.ctor()
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.0
IL_000a: stloc.2
IL_000b: ldloc.0
IL_000c: stloc.3
IL_000d: ldstr "Calling IFoo.Foo on FooBar - expecting default met"
+ "hod on IFoo.Foo. "
IL_0012: call void [mscorlib]System.Console::WriteLine(string)
IL_0017: nop
IL_0018: ldloc.1
IL_0019: ldc.i4.s 10
IL_001b: callvirt instance int32 IFoo::Foo(int32)
IL_0020: ldc.i4.s 11
IL_0022: ceq
IL_0024: ldstr "Calling IFoo.Foo on FooBar"
IL_0029: call void Test::Assert(bool,
string)
IL_002e: nop
IL_002f: ldstr "Calling IBar.Bar on FooBar - expecting default met"
+ "hod on IBar.Bar. "
IL_0034: call void [mscorlib]System.Console::WriteLine(string)
IL_0039: nop
IL_003a: ldloc.2
IL_003b: ldc.i4.s 10
IL_003d: callvirt instance int32 IBar::Bar(int32)
IL_0042: ldc.i4.s 20
IL_0044: ceq
IL_0046: ldstr "Calling IBar.Bar on FooBar"
IL_004b: call void Test::Assert(bool,
string)
IL_0050: nop
IL_0051: ldstr "Calling IBlah.Blah on FooBar - expecting default m"
+ "ethod on IBlah.Blah from Base. "
IL_0056: call void [mscorlib]System.Console::WriteLine(string)
IL_005b: nop
IL_005c: ldloc.3
IL_005d: ldc.i4.s 10
IL_005f: callvirt instance int32 IBlah::Blah(int32)
IL_0064: ldc.i4.s 16
IL_0066: ceq
IL_0068: ldstr "Calling IBlah.Blah on FooBar"
IL_006d: call void Test::Assert(bool,
string)
IL_0072: nop
IL_0073: ldstr "Calling FooBar.CallBlahProtected - expecting prote"
+ "cted methods on interface can be called"
IL_0078: call void [mscorlib]System.Console::WriteLine(string)
IL_007d: nop
IL_007e: ldloc.0
IL_007f: callvirt instance int32 FooBar::CallBlahProtected()
IL_0084: ldc.i4.3
IL_0085: ceq
IL_0087: ldstr "Calling FooBar.CallBlahProtected"
IL_008c: call void Test::Assert(bool,
string)
IL_0091: nop
IL_0092: call int32 Test::Ret()
IL_0097: stloc.s V_4
IL_0099: br.s IL_009b
IL_009b: ldloc.s V_4
IL_009d: ret
} // end of method Program::Main
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method Program::.ctor
} // end of class Program
.class private auto ansi beforefieldinit Test
extends [mscorlib]System.Object
{
.field private static bool Pass
.method public hidebysig static int32 Ret() cil managed
{
// Code size 19 (0x13)
.maxstack 1
.locals init (int32 V_0)
IL_0000: nop
IL_0001: ldsfld bool Test::Pass
IL_0006: brtrue.s IL_000c
IL_0008: ldc.i4.s 101
IL_000a: br.s IL_000e
IL_000c: ldc.i4.s 0
IL_000e: stloc.0
IL_000f: br.s IL_0011
IL_0011: ldloc.0
IL_0012: ret
} // end of method Test::Ret
.method public hidebysig static void Assert(bool cond,
string msg) cil managed
{
// Code size 47 (0x2f)
.maxstack 2
.locals init (bool V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: stloc.0
IL_0003: ldloc.0
IL_0004: brfalse.s IL_0015
IL_0006: nop
IL_0007: ldstr "PASS"
IL_000c: call void [mscorlib]System.Console::WriteLine(string)
IL_0011: nop
IL_0012: nop
IL_0013: br.s IL_002e
IL_0015: nop
IL_0016: ldstr "FAIL: "
IL_001b: ldarg.1
IL_001c: call string [mscorlib]System.String::Concat(string,
string)
IL_0021: call void [mscorlib]System.Console::WriteLine(string)
IL_0026: nop
IL_0027: ldc.i4.0
IL_0028: stsfld bool Test::Pass
IL_002d: nop
IL_002e: ret
} // end of method Test::Assert
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method Test::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldc.i4.1
IL_0001: stsfld bool Test::Pass
IL_0006: ret
} // end of method Test::.cctor
} // end of class Test
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file simple.res
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b08109/b08109.il
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern legacy library mscorlib {}
.assembly extern System.Console
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
.ver 4:0:0:0
}
.assembly b08109
{
}
.class ILGEN_941132142 {
// spew2 /L16 /d10
.method static int32 main() {
.entrypoint
.maxstack 11
.locals ( float64, int32, float64, float32, int32, float64, int32, int64, int64, int64, int32, int32, int32, float32, int32, int64)
ldc.r8 float64(0x11977df818424f1d)
stloc 0
ldc.i4 0x133f2fe1
stloc 1
ldc.r8 float64(0x43b5683435761161)
stloc 2
ldc.r4 float32(0x12e23f2)
stloc 3
ldc.i4 0x662f2d18
stloc 4
ldc.r8 float64(0x4ee235045c12d57)
stloc 5
ldc.i4 0x199c651f
stloc 6
ldc.i8 0x5d271bd574de106a
stloc 7
ldc.i8 0x6d9b2f6d1ec91cfd
stloc 8
ldc.i8 0x7a141ee368c9c30
stloc 9
ldc.i4 0x5403c7b
stloc 10
ldc.i4 0x2ee711e
stloc 11
ldc.i4 0x22925b2
stloc 12
ldc.r4 float32(0x2b35631a)
stloc 13
ldc.i4 0x19c283f
stloc 14
ldc.i8 0x347f41ae74c05146
stloc 15
ldloc 5
ldc.i4.3
stloc 11
ldc.i4.1
conv.u2
stloc 4
ldc.i8 0x60d8126c484f5a0d
ldloc 8
pop
conv.r8
pop
nop
conv.r8
conv.i8
ldc.i4.5
conv.i
ldloc 13
conv.i4
mul
conv.u8
ldloc 8
ldloc 9
sub
conv.i4
conv.u8
sub
ldloc 11
ldc.i4.7
add
ldc.i4.2
ldc.i4.2
cgt.un
add
conv.u
conv.i4
stloc 10
ldloc 15
ldloc 0
stloc 0
ldc.r4 float32(0x1f253dfa)
ldc.i4.0
pop
stloc 3
ldloc 7
ldloc 15
pop
ldc.i8 0x69fb66ee323f4561
ldloc 0
stloc 2
stloc 7
stloc 7
ldloc 7
conv.r4
nop
ldc.i8 0x276d265930713225
conv.u4
ldloc 5
ldc.r8 float64(0x5988593c2bea3472)
ceq
cgt.un
pop
pop
ldc.r4 float32(0x69a8358f)
conv.r8
neg
ldloc 15
not
not
stloc 8
neg
pop
or
xor
conv.i1
conv.u4
ldloc 9
conv.i4
conv.r4
conv.i8
ldloc 9
conv.i
ldloc 8
not
stloc 9
ldc.i4.0
conv.i
conv.u
cgt
stloc 11
ldloc 1
conv.i8
nop
neg
ldloc 2
conv.r4
ldc.r4 float32(0x792817ed)
ldc.r4 float32(0x3fb05f46)
mul
add
ldc.r4 float32(0x60391592)
neg
ldc.i4.5
ldc.i4.4
clt
stloc 6
ceq
stloc 1
mul
conv.r4
ldloc 2
conv.r4
ldloc 12
conv.r8
stloc 5
ldc.r4 float32(0x2b8265ee)
ldloc 7
pop
ldloc 7
conv.i8
pop
cgt.un
conv.r4
ldc.r4 float32(0x682f4238)
ldc.r4 float32(0xbb87586)
sub
conv.r4
neg
conv.i8
stloc 15
ldloc 7
ldloc 8
ceq
conv.u2
neg
ldloc 4
conv.i8
conv.i8
conv.i2
stloc 12
conv.u1
stloc 12
pop
ldc.i8 0x1f5251e835c4486
nop
ldloc 9
ldc.i8 0x255a651025c34deb
clt.un
stloc 1
neg
ldc.i8 0x2c53325d3b3c7a
ldc.r4 float32(0x67e523c4)
pop
ldc.i8 0x4ecf5ed937f94cd6
ldc.r4 float32(0x55e238da)
pop
and
ldc.i8 0x378062b171e01284
ldc.i8 0x3fca23d01fca77a
xor
ldc.i8 0x1f9a540766ce6ea
ldloc 8
clt.un
stloc 11
or
clt
conv.r8
nop
conv.r4
ceq
ldc.i8 0xd304fa011547afc
conv.i
conv.r.un
neg
neg
ldc.i4.8
ldc.i4.7
xor
conv.i
ldc.i4.6
conv.r8
ldloc 5
conv.u4
pop
pop
conv.r.un
clt
conv.i
conv.r4
ldloc 10
conv.r8
ldloc 7
conv.r8
sub
ldloc 5
conv.i8
conv.r8
pop
ldc.i4.2
conv.i
conv.r.un
ldloc 5
ldc.i8 0x778752b83395645b
pop
ldloc 13
conv.r8
mul
sub
mul
ldloc 13
neg
conv.i8
nop
conv.r8
pop
conv.i
pop
pop
sub
ldc.i4 119
sub
ldc.i4 100
add
ret
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern legacy library mscorlib {}
.assembly extern System.Console
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
.ver 4:0:0:0
}
.assembly b08109
{
}
.class ILGEN_941132142 {
// spew2 /L16 /d10
.method static int32 main() {
.entrypoint
.maxstack 11
.locals ( float64, int32, float64, float32, int32, float64, int32, int64, int64, int64, int32, int32, int32, float32, int32, int64)
ldc.r8 float64(0x11977df818424f1d)
stloc 0
ldc.i4 0x133f2fe1
stloc 1
ldc.r8 float64(0x43b5683435761161)
stloc 2
ldc.r4 float32(0x12e23f2)
stloc 3
ldc.i4 0x662f2d18
stloc 4
ldc.r8 float64(0x4ee235045c12d57)
stloc 5
ldc.i4 0x199c651f
stloc 6
ldc.i8 0x5d271bd574de106a
stloc 7
ldc.i8 0x6d9b2f6d1ec91cfd
stloc 8
ldc.i8 0x7a141ee368c9c30
stloc 9
ldc.i4 0x5403c7b
stloc 10
ldc.i4 0x2ee711e
stloc 11
ldc.i4 0x22925b2
stloc 12
ldc.r4 float32(0x2b35631a)
stloc 13
ldc.i4 0x19c283f
stloc 14
ldc.i8 0x347f41ae74c05146
stloc 15
ldloc 5
ldc.i4.3
stloc 11
ldc.i4.1
conv.u2
stloc 4
ldc.i8 0x60d8126c484f5a0d
ldloc 8
pop
conv.r8
pop
nop
conv.r8
conv.i8
ldc.i4.5
conv.i
ldloc 13
conv.i4
mul
conv.u8
ldloc 8
ldloc 9
sub
conv.i4
conv.u8
sub
ldloc 11
ldc.i4.7
add
ldc.i4.2
ldc.i4.2
cgt.un
add
conv.u
conv.i4
stloc 10
ldloc 15
ldloc 0
stloc 0
ldc.r4 float32(0x1f253dfa)
ldc.i4.0
pop
stloc 3
ldloc 7
ldloc 15
pop
ldc.i8 0x69fb66ee323f4561
ldloc 0
stloc 2
stloc 7
stloc 7
ldloc 7
conv.r4
nop
ldc.i8 0x276d265930713225
conv.u4
ldloc 5
ldc.r8 float64(0x5988593c2bea3472)
ceq
cgt.un
pop
pop
ldc.r4 float32(0x69a8358f)
conv.r8
neg
ldloc 15
not
not
stloc 8
neg
pop
or
xor
conv.i1
conv.u4
ldloc 9
conv.i4
conv.r4
conv.i8
ldloc 9
conv.i
ldloc 8
not
stloc 9
ldc.i4.0
conv.i
conv.u
cgt
stloc 11
ldloc 1
conv.i8
nop
neg
ldloc 2
conv.r4
ldc.r4 float32(0x792817ed)
ldc.r4 float32(0x3fb05f46)
mul
add
ldc.r4 float32(0x60391592)
neg
ldc.i4.5
ldc.i4.4
clt
stloc 6
ceq
stloc 1
mul
conv.r4
ldloc 2
conv.r4
ldloc 12
conv.r8
stloc 5
ldc.r4 float32(0x2b8265ee)
ldloc 7
pop
ldloc 7
conv.i8
pop
cgt.un
conv.r4
ldc.r4 float32(0x682f4238)
ldc.r4 float32(0xbb87586)
sub
conv.r4
neg
conv.i8
stloc 15
ldloc 7
ldloc 8
ceq
conv.u2
neg
ldloc 4
conv.i8
conv.i8
conv.i2
stloc 12
conv.u1
stloc 12
pop
ldc.i8 0x1f5251e835c4486
nop
ldloc 9
ldc.i8 0x255a651025c34deb
clt.un
stloc 1
neg
ldc.i8 0x2c53325d3b3c7a
ldc.r4 float32(0x67e523c4)
pop
ldc.i8 0x4ecf5ed937f94cd6
ldc.r4 float32(0x55e238da)
pop
and
ldc.i8 0x378062b171e01284
ldc.i8 0x3fca23d01fca77a
xor
ldc.i8 0x1f9a540766ce6ea
ldloc 8
clt.un
stloc 11
or
clt
conv.r8
nop
conv.r4
ceq
ldc.i8 0xd304fa011547afc
conv.i
conv.r.un
neg
neg
ldc.i4.8
ldc.i4.7
xor
conv.i
ldc.i4.6
conv.r8
ldloc 5
conv.u4
pop
pop
conv.r.un
clt
conv.i
conv.r4
ldloc 10
conv.r8
ldloc 7
conv.r8
sub
ldloc 5
conv.i8
conv.r8
pop
ldc.i4.2
conv.i
conv.r.un
ldloc 5
ldc.i8 0x778752b83395645b
pop
ldloc 13
conv.r8
mul
sub
mul
ldloc 13
neg
conv.i8
nop
conv.r8
pop
conv.i
pop
pop
sub
ldc.i4 119
sub
ldc.i4 100
add
ret
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/coreclr/vm/ClrEtwAll.man
|
<instrumentationManifest xmlns="http://schemas.microsoft.com/win/2004/08/events">
<instrumentation xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events">
<events xmlns="http://schemas.microsoft.com/win/2004/08/events">
<!--CLR Runtime Publisher-->
<provider name="Microsoft-Windows-DotNETRuntime"
guid="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}"
symbol="MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--Keywords-->
<keywords>
<keyword name="GCKeyword" mask="0x1"
message="$(string.RuntimePublisher.GCKeywordMessage)" symbol="CLR_GC_KEYWORD"/>
<keyword name="GCHandleKeyword" mask="0x2"
message="$(string.RuntimePublisher.GCHandleKeywordMessage)" symbol="CLR_GCHANDLE_KEYWORD"/>
<keyword name="AssemblyLoaderKeyword" mask="0x4"
message="$(string.RuntimePublisher.AssemblyLoaderKeywordMessage)" symbol="CLR_ASSEMBLY_LOADER_KEYWORD"/>
<keyword name="LoaderKeyword" mask="0x8"
message="$(string.RuntimePublisher.LoaderKeywordMessage)" symbol="CLR_LOADER_KEYWORD"/>
<keyword name="JitKeyword" mask="0x10"
message="$(string.RuntimePublisher.JitKeywordMessage)" symbol="CLR_JIT_KEYWORD"/>
<keyword name="NGenKeyword" mask="0x20"
message="$(string.RuntimePublisher.NGenKeywordMessage)" symbol="CLR_NGEN_KEYWORD"/>
<keyword name="StartEnumerationKeyword" mask="0x40"
message="$(string.RuntimePublisher.StartEnumerationKeywordMessage)" symbol="CLR_STARTENUMERATION_KEYWORD"/>
<keyword name="EndEnumerationKeyword" mask="0x80"
message="$(string.RuntimePublisher.EndEnumerationKeywordMessage)" symbol="CLR_ENDENUMERATION_KEYWORD"/>
<!-- Keyword mask 0x100 is now defunct -->
<!-- Keyword mask 0x200 is now defunct -->
<keyword name="SecurityKeyword" mask="0x400"
message="$(string.RuntimePublisher.SecurityKeywordMessage)" symbol="CLR_SECURITY_KEYWORD"/>
<keyword name="AppDomainResourceManagementKeyword" mask="0x800"
message="$(string.RuntimePublisher.AppDomainResourceManagementKeywordMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_KEYWORD"/>
<keyword name="JitTracingKeyword" mask="0x1000"
message="$(string.RuntimePublisher.JitTracingKeywordMessage)" symbol="CLR_JITTRACING_KEYWORD"/>
<keyword name="InteropKeyword" mask="0x2000"
message="$(string.RuntimePublisher.InteropKeywordMessage)" symbol="CLR_INTEROP_KEYWORD"/>
<keyword name="ContentionKeyword" mask="0x4000"
message="$(string.RuntimePublisher.ContentionKeywordMessage)" symbol="CLR_CONTENTION_KEYWORD"/>
<keyword name="ExceptionKeyword" mask="0x8000"
message="$(string.RuntimePublisher.ExceptionKeywordMessage)" symbol="CLR_EXCEPTION_KEYWORD"/>
<keyword name="ThreadingKeyword" mask="0x10000"
message="$(string.RuntimePublisher.ThreadingKeywordMessage)" symbol="CLR_THREADING_KEYWORD"/>
<keyword name="JittedMethodILToNativeMapKeyword" mask="0x20000"
message="$(string.RuntimePublisher.JittedMethodILToNativeMapKeywordMessage)" symbol="CLR_JITTEDMETHODILTONATIVEMAP_KEYWORD"/>
<keyword name="OverrideAndSuppressNGenEventsKeyword" mask="0x40000"
message="$(string.RuntimePublisher.OverrideAndSuppressNGenEventsKeywordMessage)" symbol="CLR_OVERRIDEANDSUPPRESSNGENEVENTS_KEYWORD"/>
<keyword name="TypeKeyword" mask="0x80000"
message="$(string.RuntimePublisher.TypeKeywordMessage)" symbol="CLR_TYPE_KEYWORD"/>
<keyword name="GCHeapDumpKeyword" mask="0x100000"
message="$(string.RuntimePublisher.GCHeapDumpKeywordMessage)" symbol="CLR_GCHEAPDUMP_KEYWORD"/>
<keyword name="GCSampledObjectAllocationHighKeyword" mask="0x200000"
message="$(string.RuntimePublisher.GCSampledObjectAllocationHighKeywordMessage)" symbol="CLR_GCHEAPALLOCHIGH_KEYWORD"/>
<keyword name="GCHeapSurvivalAndMovementKeyword" mask="0x400000"
message="$(string.RuntimePublisher.GCHeapSurvivalAndMovementKeywordMessage)" symbol="CLR_GCHEAPSURVIVALANDMOVEMENT_KEYWORD"/>
<keyword name="GCHeapCollectKeyword" mask="0x800000"
message="$(string.RuntimePublisher.GCHeapCollectKeyword)" symbol="CLR_GCHEAPCOLLECT_KEYWORD"/>
<keyword name="GCHeapAndTypeNamesKeyword" mask="0x1000000"
message="$(string.RuntimePublisher.GCHeapAndTypeNamesKeyword)" symbol="CLR_GCHEAPANDTYPENAMES_KEYWORD"/>
<keyword name="GCSampledObjectAllocationLowKeyword" mask="0x2000000"
message="$(string.RuntimePublisher.GCSampledObjectAllocationLowKeywordMessage)" symbol="CLR_GCHEAPALLOCLOW_KEYWORD"/>
<keyword name="PerfTrackKeyword" mask="0x20000000"
message="$(string.RuntimePublisher.PerfTrackKeywordMessage)" symbol="CLR_PERFTRACK_KEYWORD"/>
<keyword name="StackKeyword" mask="0x40000000"
message="$(string.RuntimePublisher.StackKeywordMessage)" symbol="CLR_STACK_KEYWORD"/>
<keyword name="ThreadTransferKeyword" mask="0x80000000"
message="$(string.RuntimePublisher.ThreadTransferKeywordMessage)" symbol="CLR_THREADTRANSFER_KEYWORD"/>
<keyword name="DebuggerKeyword" mask="0x100000000"
message="$(string.RuntimePublisher.DebuggerKeywordMessage)" symbol="CLR_DEBUGGER_KEYWORD" />
<keyword name="MonitoringKeyword" mask="0x200000000"
message="$(string.RuntimePublisher.MonitoringKeywordMessage)" symbol="CLR_MONITORING_KEYWORD" />
<keyword name="CodeSymbolsKeyword" mask="0x400000000"
message="$(string.RuntimePublisher.CodeSymbolsKeywordMessage)" symbol="CLR_CODESYMBOLS_KEYWORD" />
<keyword name="EventSourceKeyword" mask="0x800000000"
message="$(string.RuntimePublisher.EventSourceKeywordMessage)" symbol="CLR_EVENTSOURCE_KEYWORD" />
<keyword name="CompilationKeyword" mask="0x1000000000"
message="$(string.RuntimePublisher.CompilationKeywordMessage)" symbol="CLR_COMPILATION_KEYWORD" />
<keyword name="CompilationDiagnosticKeyword" mask="0x2000000000"
message="$(string.RuntimePublisher.CompilationDiagnosticKeywordMessage)" symbol="CLR_COMPILATIONDIAGNOSTIC_KEYWORD" />
<keyword name="MethodDiagnosticKeyword" mask="0x4000000000"
message="$(string.RuntimePublisher.MethodDiagnosticKeywordMessage)" symbol="CLR_METHODDIAGNOSTIC_KEYWORD" />
<keyword name="TypeDiagnosticKeyword" mask="0x8000000000"
message="$(string.RuntimePublisher.TypeDiagnosticKeywordMessage)" symbol="CLR_TYPEDIAGNOSTIC_KEYWORD" />
<keyword name="JitInstrumentationDataKeyword" mask="0x10000000000"
message="$(string.RuntimePublisher.JitInstrumentationDataKeywordMessage)" symbol="CLR_JITINSTRUMENTEDDATA_KEYWORD" />
<keyword name="ProfilerKeyword" mask="0x20000000000"
message="$(string.RuntimePublisher.ProfilerKeywordMessage)" symbol="CLR_PROFILER_KEYWORD" />
</keywords>
<!--Tasks-->
<tasks>
<task name="GarbageCollection" symbol="CLR_GC_TASK"
value="1" eventGUID="{044973cd-251f-4dff-a3e9-9d6307286b05}"
message="$(string.RuntimePublisher.GarbageCollectionTaskMessage)">
<opcodes>
<!-- These opcode use to be 4 through 9 but we added 128 to them to avoid using the reserved range 0-10 -->
<opcode name="GCRestartEEEnd" message="$(string.RuntimePublisher.GCRestartEEEndOpcodeMessage)" symbol="CLR_GC_RESTARTEEEND_OPCODE" value="132"> </opcode>
<opcode name="GCHeapStats" message="$(string.RuntimePublisher.GCHeapStatsOpcodeMessage)" symbol="CLR_GC_HEAPSTATS_OPCODE" value="133"> </opcode>
<opcode name="GCCreateSegment" message="$(string.RuntimePublisher.GCCreateSegmentOpcodeMessage)" symbol="CLR_GC_CREATESEGMENT_OPCODE" value="134"> </opcode>
<opcode name="GCFreeSegment" message="$(string.RuntimePublisher.GCFreeSegmentOpcodeMessage)" symbol="CLR_GC_FREESEGMENT_OPCODE" value="135"> </opcode>
<opcode name="GCRestartEEBegin" message="$(string.RuntimePublisher.GCRestartEEBeginOpcodeMessage)" symbol="CLR_GC_RESTARTEEBEING_OPCODE" value="136"> </opcode>
<opcode name="GCSuspendEEEnd" message="$(string.RuntimePublisher.GCSuspendEEEndOpcodeMessage)" symbol="CLR_GC_SUSPENDEEND_OPCODE" value="137"> </opcode>
<opcode name="GCSuspendEEBegin" message="$(string.RuntimePublisher.GCSuspendEEBeginOpcodeMessage)" symbol="CLR_GC_SUSPENDEEBEGIN_OPCODE" value="10"> </opcode>
<opcode name="GCAllocationTick" message="$(string.RuntimePublisher.GCAllocationTickOpcodeMessage)" symbol="CLR_GC_ALLOCATIONTICK_OPCODE" value="11"> </opcode>
<opcode name="GCCreateConcurrentThread" message="$(string.RuntimePublisher.GCCreateConcurrentThreadOpcodeMessage)" symbol="CLR_GC_CREATECONCURRENTTHREAD_OPCODE" value="12"> </opcode>
<opcode name="GCTerminateConcurrentThread" message="$(string.RuntimePublisher.GCTerminateConcurrentThreadOpcodeMessage)" symbol="CLR_GC_TERMINATECONCURRENTTHREAD_OPCODE" value="13"> </opcode>
<opcode name="GCFinalizersEnd" message="$(string.RuntimePublisher.GCFinalizersEndOpcodeMessage)" symbol="CLR_GC_FINALIZERSEND_OPCODE" value="15"> </opcode>
<opcode name="GCFinalizersBegin" message="$(string.RuntimePublisher.GCFinalizersBeginOpcodeMessage)" symbol="CLR_GC_FINALIZERSBEGIN_OPCODE" value="19"> </opcode>
<opcode name="GCBulkRootEdge" message="$(string.RuntimePublisher.GCBulkRootEdgeOpcodeMessage)" symbol="CLR_GC_BULKROOTEDGE_OPCODE" value="20"> </opcode>
<opcode name="GCBulkRootConditionalWeakTableElementEdge" message="$(string.RuntimePublisher.GCBulkRootConditionalWeakTableElementEdgeOpcodeMessage)" symbol="CLR_GC_BULKROOTCONDITIONALWEAKTABLEELEMENTEDGE_OPCODE" value="21"> </opcode>
<opcode name="GCBulkNode" message="$(string.RuntimePublisher.GCBulkNodeOpcodeMessage)" symbol="CLR_GC_BULKNODE_OPCODE" value="22"> </opcode>
<opcode name="GCBulkEdge" message="$(string.RuntimePublisher.GCBulkEdgeOpcodeMessage)" symbol="CLR_GC_BULKEDGE_OPCODE" value="23"> </opcode>
<opcode name="GCSampledObjectAllocation" message="$(string.RuntimePublisher.GCSampledObjectAllocationOpcodeMessage)" symbol="CLR_GC_OBJECTALLOCATION_OPCODE" value="24"> </opcode>
<opcode name="GCBulkSurvivingObjectRanges" message="$(string.RuntimePublisher.GCBulkSurvivingObjectRangesOpcodeMessage)" symbol="CLR_GC_BULKSURVIVINGOBJECTRANGES_OPCODE" value="25"> </opcode>
<opcode name="GCBulkMovedObjectRanges" message="$(string.RuntimePublisher.GCBulkMovedObjectRangesOpcodeMessage)" symbol="CLR_GC_BULKMOVEDOBJECTRANGES_OPCODE" value="26"> </opcode>
<opcode name="GCGenerationRange" message="$(string.RuntimePublisher.GCGenerationRangeOpcodeMessage)" symbol="CLR_GC_GENERATIONRANGE_OPCODE" value="27"> </opcode>
<opcode name="GCMarkStackRoots" message="$(string.RuntimePublisher.GCMarkStackRootsOpcodeMessage)" symbol="CLR_GC_MARKSTACKROOTS_OPCODE" value="28"> </opcode>
<opcode name="GCMarkFinalizeQueueRoots" message="$(string.RuntimePublisher.GCMarkFinalizeQueueRootsOpcodeMessage)" symbol="CLR_GC_MARKFINALIZEQUEUEROOTS_OPCODE" value="29"> </opcode>
<opcode name="GCMarkHandles" message="$(string.RuntimePublisher.GCMarkHandlesOpcodeMessage)" symbol="CLR_GC_MARKHANDLES_OPCODE" value="30"> </opcode>
<opcode name="GCMarkOlderGenerationRoots" message="$(string.RuntimePublisher.GCMarkOlderGenerationRootsOpcodeMessage)" symbol="CLR_GC_MARKCARDS_OPCODE" value="31"> </opcode>
<opcode name="FinalizeObject" message="$(string.RuntimePublisher.FinalizeObjectOpcodeMessage)" symbol="CLR_GC_FINALIZEOBJECT_OPCODE" value="32"> </opcode>
<opcode name="SetGCHandle" message="$(string.RuntimePublisher.SetGCHandleOpcodeMessage)" symbol="CLR_GC_SETGCHANDLE_OPCODE" value="33"> </opcode>
<opcode name="DestroyGCHandle" message="$(string.RuntimePublisher.DestroyGCHandleOpcodeMessage)" symbol="CLR_GC_DESTROYGCHANDLE_OPCODE" value="34"> </opcode>
<opcode name="Triggered" message="$(string.RuntimePublisher.TriggeredOpcodeMessage)" symbol="CLR_GC_TRIGGERED_OPCODE" value="35"> </opcode>
<opcode name="PinObjectAtGCTime" message="$(string.RuntimePublisher.PinObjectAtGCTimeOpcodeMessage)" symbol="CLR_GC_PINGCOBJECT_OPCODE" value="36"> </opcode>
<opcode name="GCBulkRootCCW" message="$(string.RuntimePublisher.GCBulkRootCCWOpcodeMessage)" symbol="CLR_GC_BULKROOTCCW_OPCODE" value="38"> </opcode>
<opcode name="GCBulkRCW" message="$(string.RuntimePublisher.GCBulkRCWOpcodeMessage)" symbol="CLR_GC_BULKRCW_OPCODE" value="39"> </opcode>
<opcode name="GCBulkRootStaticVar" message="$(string.RuntimePublisher.GCBulkRootStaticVarOpcodeMessage)" symbol="CLR_GC_BULKROOTSTATICVAR_OPCODE" value="40"> </opcode>
<opcode name="GCDynamicEvent" message="$(string.RuntimePublisher.GCDynamicEventOpcodeMessage)" symbol="CLR_GC_DYNAMICEVENT_OPCODE" value="41"> </opcode>
<opcode name="IncreaseMemoryPressure" message="$(string.RuntimePublisher.IncreaseMemoryPressureOpcodeMessage)" symbol="CLR_GC_INCREASEMEMORYPRESSURE_OPCODE" value="200"> </opcode>
<opcode name="DecreaseMemoryPressure" message="$(string.RuntimePublisher.DecreaseMemoryPressureOpcodeMessage)" symbol="CLR_GC_DECREASEMEMORYPRESSURE_OPCODE" value="201"> </opcode>
<opcode name="GCMarkWithType" message="$(string.RuntimePublisher.GCMarkOpcodeMessage)" symbol="CLR_GC_MARK_OPCODE" value="202"> </opcode>
<opcode name="GCJoin" message="$(string.RuntimePublisher.GCJoinOpcodeMessage)" symbol="CLR_GC_JOIN_OPCODE" value="203"> </opcode>
<opcode name="GCPerHeapHistory" message="$(string.RuntimePublisher.GCPerHeapHistoryOpcodeMessage)" symbol="CLR_GC_GCPERHEAPHISTORY_OPCODE" value="204"> </opcode>
<opcode name="GCGlobalHeapHistory" message="$(string.RuntimePublisher.GCGlobalHeapHistoryOpcodeMessage)" symbol="CLR_GC_GCGLOBALHEAPHISTORY_OPCODE" value="205"> </opcode>
<opcode name="GenAwareBegin" message="$(string.RuntimePublisher.GenAwareBeginOpcodeMessage)" symbol="CLR_GC_GENAWAREBEGIN_OPCODE" value="206"> </opcode>
<opcode name="GenAwareEnd" message="$(string.RuntimePublisher.GenAwareEndOpcodeMessage)" symbol="CLR_GC_GENAWAREEND_OPCODE" value="207"> </opcode>
<opcode name="GCLOHCompact" message="$(string.RuntimePublisher.GCLOHCompactOpcodeMessage)" symbol="CLR_GC_GCLOHCOMPACT_OPCODE" value="208"> </opcode>
<opcode name="GCFitBucketInfo" message="$(string.RuntimePublisher.GCFitBucketInfoOpcodeMessage)" symbol="CLR_GC_GCFITBUCKETINFO_OPCODE" value="209"> </opcode>
</opcodes>
</task>
<task name="WorkerThreadCreation" symbol="CLR_WORKERTHREADCREATE_TASK"
value="2" eventGUID="{cfc4ba53-fb42-4757-8b70-5f5d51fee2f4}"
message="$(string.RuntimePublisher.WorkerThreadCreationTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="IOThreadCreation" symbol="CLR_IOTHREADCREATE_TASK"
value="3" eventGUID="{c71408de-42cc-4f81-9c93-b8912abf2a0f}"
message="$(string.RuntimePublisher.IOThreadCreationTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="WorkerThreadRetirement" symbol="CLR_WORKERTHREADRETIRE_TASK"
value="4" eventGUID="{efdf1eac-1d5d-4e84-893a-19b80f692176}"
message="$(string.RuntimePublisher.WorkerThreadRetirementTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="IOThreadRetirement" symbol="CLR_IOTHREADRETIRE_TASK"
value="5" eventGUID="{840c8456-6457-4eb7-9cd0-d28f01c64f5e}"
message="$(string.RuntimePublisher.IOThreadRetirementTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ThreadpoolSuspension" symbol="CLR_THREADPOOLSUSPEND_TASK"
value="6" eventGUID="{c424b3e3-2ae0-416e-a039-410c5d8e5f14}"
message="$(string.RuntimePublisher.ThreadpoolSuspensionTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="Exception" symbol="CLR_EXCEPTION_TASK"
value="7" eventGUID="{300ce105-86d1-41f8-b9d2-83fcbff32d99}"
message="$(string.RuntimePublisher.ExceptionTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ExceptionCatch" symbol="CLR_EXCEPTION_CATCH_TASK"
value="27" eventGUID="{5BBF9499-1715-4658-88DC-AFD7690A8711}"
message="$(string.RuntimePublisher.ExceptionCatchTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ExceptionFinally" symbol="CLR_EXCEPTION_FINALLY_TASK"
value="28" eventGUID="{9565BC31-300F-4EA2-A532-30BCE9A14199}"
message="$(string.RuntimePublisher.ExceptionFinallyTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ExceptionFilter" symbol="CLR_EXCEPTION_FILTER_TASK"
value="29" eventGUID="{72E72606-BB71-4290-A242-D5F36CE5312E}"
message="$(string.RuntimePublisher.ExceptionFilterTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="Contention" symbol="CLR_CONTENTION_TASK"
value="8" eventGUID="{561410f5-a138-4ab3-945e-516483cddfbc}"
message="$(string.RuntimePublisher.ContentionTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRMethod" symbol="CLR_METHOD_TASK"
value="9" eventGUID="{3044F61A-99B0-4c21-B203-D39423C73B00}"
message="$(string.RuntimePublisher.MethodTaskMessage)">
<opcodes>
<!-- The following 2 opcodes are now defunct -->
<opcode name="DCStartComplete" message="$(string.RuntimePublisher.DCStartCompleteOpcodeMessage)" symbol="CLR_METHOD_DCSTARTCOMPLETE_OPCODE" value="14"> </opcode>
<opcode name="DCEndComplete" message="$(string.RuntimePublisher.DCEndCompleteOpcodeMessage)" symbol="CLR_METHOD_DCENDCOMPLETE_OPCODE" value="15"> </opcode>
<opcode name="MethodLoad" message="$(string.RuntimePublisher.MethodLoadOpcodeMessage)" symbol="CLR_METHOD_METHODLOAD_OPCODE" value="33"> </opcode>
<opcode name="MethodUnload" message="$(string.RuntimePublisher.MethodUnloadOpcodeMessage)" symbol="CLR_METHOD_METHODUNLOAD_OPCODE" value="34"> </opcode>
<!-- The following 2 opcodes are now defunct -->
<opcode name="MethodDCStart" message="$(string.RuntimePublisher.MethodDCStartOpcodeMessage)" symbol="CLR_METHOD_METHODDCSTART_OPCODE" value="35"> </opcode>
<opcode name="MethodDCEnd" message="$(string.RuntimePublisher.MethodDCEndOpcodeMessage)" symbol="CLR_METHOD_METHODDCEND_OPCODE" value="36"> </opcode>
<opcode name="MethodLoadVerbose" message="$(string.RuntimePublisher.MethodLoadVerboseOpcodeMessage)" symbol="CLR_METHOD_METHODLOADVERBOSE_OPCODE" value="37"> </opcode>
<opcode name="MethodUnloadVerbose" message="$(string.RuntimePublisher.MethodUnloadVerboseOpcodeMessage)" symbol="CLR_METHOD_METHODUNLOADVERBOSE_OPCODE" value="38"> </opcode>
<opcode name="MethodDetails" message="$(string.RuntimePublisher.MethodDetailsOpcodeMessage)" symbol="CLR_METHODDETAILS_OPCODE" value="43"> </opcode>
<!-- The following 2 opcodes are now defunct -->
<opcode name="MethodDCStartVerbose" message="$(string.RuntimePublisher.MethodDCStartVerboseOpcodeMessage)" symbol="CLR_METHOD_METHODDCSTARTVERBOSE_OPCODE" value="39"> </opcode>
<opcode name="MethodDCEndVerbose" message="$(string.RuntimePublisher.MethodDCEndVerboseOpcodeMessage)" symbol="CLR_METHOD_METHODDCENDVERBOSE_OPCODE" value="40"> </opcode>
<opcode name="MethodJittingStarted" message="$(string.RuntimePublisher.MethodJittingStartedOpcodeMessage)" symbol="CLR_METHOD_METHODJITTINGSTARTED_OPCODE" value="42"> </opcode>
<opcode name="MemoryAllocatedForJitCode" message="$(string.RuntimePublisher.MemoryAllocatedForJitCodeOpcodeMessage)" symbol="CLR_METHOD_MEMORY_ALLOCATED_FOR_JIT_CODE_OPCODE" value="103"> </opcode>
<opcode name="JitInliningSucceeded" message="$(string.RuntimePublisher.JitInliningSucceededOpcodeMessage)" symbol="CLR_JITINLININGSUCCEEDED_OPCODE" value="83"> </opcode>
<opcode name="JitInliningFailed" message="$(string.RuntimePublisher.JitInliningFailedOpcodeMessage)" symbol="CLR_JITINLININGFAILED_OPCODE" value="84"> </opcode>
<opcode name="JitTailCallSucceeded" message="$(string.RuntimePublisher.JitTailCallSucceededOpcodeMessage)" symbol="CLR_JITTAILCALLSUCCEEDED_OPCODE" value="85"> </opcode>
<opcode name="JitTailCallFailed" message="$(string.RuntimePublisher.JitTailCallFailedOpcodeMessage)" symbol="CLR_JITTAILCALLFAILED_OPCODE" value="86"> </opcode>
<opcode name="MethodILToNativeMap" message="$(string.RuntimePublisher.MethodILToNativeMapOpcodeMessage)" symbol="CLR_METHODILTONATIVEMAP_OPCODE" value="87"> </opcode>
</opcodes>
</task>
<task name="CLRLoader" symbol="CLR_LOADER_TASK"
value="10" eventGUID="{D00792DA-07B7-40f5-97EB-5D974E054740}"
message="$(string.RuntimePublisher.LoaderTaskMessage)">
<opcodes>
<opcode name="DomainModuleLoad" message="$(string.RuntimePublisher.DomainModuleLoadOpcodeMessage)" symbol="CLR_DOMAINMODULELOAD_OPCODE" value="45"> </opcode>
<opcode name="ModuleLoad" message="$(string.RuntimePublisher.ModuleLoadOpcodeMessage)" symbol="CLR_MODULELOAD_OPCODE" value="33"> </opcode>
<opcode name="ModuleUnload" message="$(string.RuntimePublisher.ModuleUnloadOpcodeMessage)" symbol="CLR_MODULEUNLOAD_OPCODE" value="34"> </opcode>
<!-- The following 2 opcodes are now defunct -->
<opcode name="ModuleDCStart" message="$(string.RuntimePublisher.ModuleDCStartOpcodeMessage)" symbol="CLR_MODULEDCSTART_OPCODE" value="35"> </opcode>
<opcode name="ModuleDCEnd" message="$(string.RuntimePublisher.ModuleDCEndOpcodeMessage)" symbol="CLR_MODULEDCEND_OPCODE" value="36"> </opcode>
<opcode name="AssemblyLoad" message="$(string.RuntimePublisher.AssemblyLoadOpcodeMessage)" symbol="CLR_ASSEMBLYLOAD_OPCODE" value="37"> </opcode>
<opcode name="AssemblyUnload" message="$(string.RuntimePublisher.AssemblyUnloadOpcodeMessage)" symbol="CLR_ASSEMBLYUNLOAD_OPCODE" value="38"> </opcode>
<opcode name="AppDomainLoad" message="$(string.RuntimePublisher.AppDomainLoadOpcodeMessage)" symbol="CLR_APPDOMAINLOAD_OPCODE" value="41"> </opcode>
<opcode name="AppDomainUnload" message="$(string.RuntimePublisher.AppDomainUnloadOpcodeMessage)" symbol="CLR_APPDOMAINUNLOAD_OPCODE" value="42"> </opcode>
</opcodes>
</task>
<task name="CLRStack" symbol="CLR_STACK_TASK"
value="11" eventGUID="{d3363dc0-243a-4620-a4d0-8a07d772f533}"
message="$(string.RuntimePublisher.StackTaskMessage)" >
<opcodes>
<opcode name="CLRStackWalk" message="$(string.RuntimePublisher.CLRStackWalkOpcodeMessage)" symbol="CLR_STACK_STACKWALK_OPCODE" value="82"> </opcode>
</opcodes>
</task>
<task name="CLRStrongNameVerification" symbol="CLR_STRONGNAMEVERIFICATION_TASK"
value="12" eventGUID="{15447A14-B523-46ae-B75B-023F900B4393}"
message="$(string.RuntimePublisher.StrongNameVerificationTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRAuthenticodeVerification" symbol="CLR_AUTHENTICODEVERIFICATION_TASK"
value="13" eventGUID="{B17304D9-5AFA-4da6-9F7B-5A4FA73129B6}"
message="$(string.RuntimePublisher.AuthenticodeVerificationTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="AppDomainResourceManagement" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_TASK"
value="14" eventGUID="{88e83959-6185-4e0b-95b8-0e4a35df6122}"
message="$(string.RuntimePublisher.AppDomainResourceManagementTaskMessage)">
<opcodes>
<opcode name="AppDomainMemAllocated" message="$(string.RuntimePublisher.AppDomainMemAllocatedOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_APPDOMAINMEMALLOCATED_OPCODE" value="48"> </opcode>
<opcode name="AppDomainMemSurvived" message="$(string.RuntimePublisher.AppDomainMemSurvivedOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_APPDOMAINMEMSURVIVED_OPCODE" value="49"> </opcode>
<opcode name="ThreadCreated" message="$(string.RuntimePublisher.ThreadCreatedOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_THREADCREATED_OPCODE" value="50"> </opcode>
<opcode name="ThreadTerminated" message="$(string.RuntimePublisher.ThreadTerminatedOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_THREADTERMINATED_OPCODE" value="51"> </opcode>
<opcode name="ThreadDomainEnter" message="$(string.RuntimePublisher.ThreadDomainEnterOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_THREADDOMAINENTER_OPCODE" value="52"> </opcode>
</opcodes>
</task>
<task name="CLRILStub" symbol="CLR_IL_STUB"
value="15" eventGUID="{D00792DA-07B7-40f5-0000-5D974E054740}"
message="$(string.RuntimePublisher.ILStubTaskMessage)">
<opcodes>
<opcode name="ILStubGenerated" message="$(string.RuntimePublisher.ILStubGeneratedOpcodeMessage)" symbol="CLR_ILSTUB_ILSTUBGENERATED_OPCODE" value="88"> </opcode>
<opcode name="ILStubCacheHit" message="$(string.RuntimePublisher.ILStubCacheHitOpcodeMessage)" symbol="CLR_ILSTUB_ILSTUBCACHEHIT_OPCODE" value="89"> </opcode>
</opcodes>
</task>
<task name="ThreadPoolWorkerThread" symbol="CLR_THREADPOOLWORKERTHREAD_TASK"
value="16" eventGUID="{8a9a44ab-f681-4271-8810-830dab9f5621}"
message="$(string.RuntimePublisher.ThreadPoolWorkerThreadTaskMessage)">
<opcodes>
<opcode name="Wait" message="$(string.RuntimePublisher.WaitOpcodeMessage)" symbol="CLR_WAIT_OPCODE" value="90"> </opcode>
</opcodes>
</task>
<task name="ThreadPoolWorkerThreadRetirement" symbol="CLR_THREADPOOLWORKERTHREADRETIREMENT_TASK"
value="17" eventGUID="{402ee399-c137-4dc0-a5ab-3c2dea64ac9c}"
message="$(string.RuntimePublisher.ThreadPoolWorkerThreadRetirementTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ThreadPoolWorkerThreadAdjustment" symbol="CLR_THREADPOOLWORKERTHREADADJUSTMENT_TASK"
value="18" eventGUID="{94179831-e99a-4625-8824-23ca5e00ca7d}"
message="$(string.RuntimePublisher.ThreadPoolWorkerThreadAdjustmentTaskMessage)">
<opcodes>
<opcode name="Sample" message="$(string.RuntimePublisher.SampleOpcodeMessage)" symbol="CLR_THREADPOOL_WORKERTHREADADJUSTMENT_SAMPLE_OPCODE" value="100"> </opcode>
<opcode name="Adjustment" message="$(string.RuntimePublisher.AdjustmentOpcodeMessage)" symbol="CLR_THREADPOOL_WORKERTHREADADJUSTMENT_ADJUSTMENT_OPCODE" value="101"> </opcode>
<opcode name="Stats" message="$(string.RuntimePublisher.StatsOpcodeMessage)" symbol="CLR_THREADPOOL_WORKERTHREADADJUSTMENT_STATS_OPCODE" value="102"> </opcode>
</opcodes>
</task>
<task name="CLRRuntimeInformation" symbol="CLR_EEStartup_TASK"
value="19" eventGUID="{CD7D3E32-65FE-40cd-9225-A2577D203FC3}"
message="$(string.RuntimePublisher.EEStartupTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRPerfTrack" symbol="CLR_PERFTRACK_TASK"
value="20" eventGUID="{EAC685F6-2104-4dec-88FD-91E4254221EC}"
message="$(string.RuntimePublisher.PerfTrackTaskMessage)">
<opcodes>
<opcode name="ModuleRangeLoad" message="$(string.RuntimePublisher.ModuleRangeLoadOpcodeMessage)" symbol="CLR_PERFTRACK_MODULERANGELOAD_OPCODE" value="10"> </opcode>
</opcodes>
</task>
<task name="Type" symbol="CLR_TYPE_TASK"
value="21" eventGUID="{003E5A9B-4757-4d3e-B4A1-E47BFB489408}"
message="$(string.RuntimePublisher.TypeTaskMessage)">
<opcodes>
<opcode name="BulkType" message="$(string.RuntimePublisher.BulkTypeOpcodeMessage)" symbol="CLR_BULKTYPE_OPCODE" value="10"> </opcode>
</opcodes>
</task>
<task name="ThreadPoolWorkingThreadCount" symbol="CLR_THREADPOOLWORKINGTHREADCOUNT_TASK"
value="22" eventGUID="{1b032b96-767c-42e4-8481-cb528a66d7bd}"
message="$(string.RuntimePublisher.ThreadPoolWorkingThreadCountTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ThreadPool" symbol="CLR_THREADPOOL_TASK"
value="23" eventGUID="{EAD685F6-2104-4dec-88FD-91E4254221E9}"
message="$(string.RuntimePublisher.ThreadPoolTaskMessage)">
<opcodes>
<opcode name="Enqueue" message="$(string.RuntimePublisher.EnqueueOpcodeMessage)" symbol="CLR_ENQUEUE_OPCODE" value="11"> </opcode>
<opcode name="Dequeue" message="$(string.RuntimePublisher.DequeueOpcodeMessage)" symbol="CLR_DEQUEUE_OPCODE" value="12"> </opcode>
<opcode name="IOEnqueue" message="$(string.RuntimePublisher.IOEnqueueOpcodeMessage)" symbol="CLR_IOENQUEUE_OPCODE" value="13"> </opcode>
<opcode name="IODequeue" message="$(string.RuntimePublisher.IODequeueOpcodeMessage)" symbol="CLR_IODEQUEUE_OPCODE" value="14"> </opcode>
<opcode name="IOPack" message="$(string.RuntimePublisher.IOPackOpcodeMessage)" symbol="CLR_IOPACK_OPCODE" value="15"> </opcode>
</opcodes>
</task>
<task name="Thread" symbol="CLR_THREADING_TASK"
value="24" eventGUID="{641994C5-16F2-4123-91A7-A2999DD7BFC3}"
message="$(string.RuntimePublisher.ThreadTaskMessage)">
<opcodes>
<opcode name="Creating" message="$(string.RuntimePublisher.ThreadCreatingOpcodeMessage)" symbol="CLR_THREAD_CREATING_OPCODE" value="11"> </opcode>
<opcode name="Running" message="$(string.RuntimePublisher.ThreadRunningOpcodeMessage)" symbol="CLR_THREAD_RUNNING_OPCODE" value="12"> </opcode>
</opcodes>
</task>
<task name="DebugIPCEvent" symbol="CLR_DEBUG_IPC_EVENT_TASK"
value="25" eventGUID="{EC2F3703-8321-4301-BD51-2CB9A09F31B1}"
message="$(string.RuntimePublisher.DebugIPCEventTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="DebugExceptionProcessing" symbol="CLR_EXCEPTION_PROCESSING_TASK"
value="26" eventGUID="{C4412198-EF03-47F1-9BD1-11C6637A2062}"
message="$(string.RuntimePublisher.DebugExceptionProcessingTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CodeSymbols" symbol="CLR_CODE_SYMBOLS_TASK"
value="30" eventGUID="{53aedf69-2049-4f7d-9345-d3018b5c4d80}"
message="$(string.RuntimePublisher.CodeSymbolsTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="TieredCompilation" symbol="CLR_TIERED_COMPILATION_TASK"
value="31" eventGUID="{A77F474D-9D0D-4311-B98E-CFBCF84B9E0F}"
message="$(string.RuntimePublisher.TieredCompilationTaskMessage)">
<opcodes>
<opcode name="Settings" message="$(string.RuntimePublisher.TieredCompilationSettingsOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_SETTINGS_OPCODE" value="11"/>
<opcode name="Pause" message="$(string.RuntimePublisher.TieredCompilationPauseOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_PAUSE_OPCODE" value="12"/>
<opcode name="Resume" message="$(string.RuntimePublisher.TieredCompilationResumeOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_RESUME_OPCODE" value="13"/>
</opcodes>
</task>
<task name="AssemblyLoader" symbol="CLR_ASSEMBLY_LOADER_TASK"
value="32" eventGUID="{BCF2339E-B0A6-452D-966C-33AC9DD82573}"
message="$(string.RuntimePublisher.AssemblyLoaderTaskMessage)">
<opcodes>
<opcode name="ResolutionAttempted" message="$(string.RuntimePublisher.ResolutionAttemptedOpcodeMessage)" symbol="CLR_RESOLUTION_ATTEMPTED_OPCODE" value="11"/>
<opcode name="AssemblyLoadContextResolvingHandlerInvoked" message="$(string.RuntimePublisher.AssemblyLoadContextResolvingHandlerInvokedOpcodeMessage)" symbol="CLR_ALC_RESOLVING_HANDLER_INVOKED_OPCODE" value="12"/>
<opcode name="AppDomainAssemblyResolveHandlerInvoked" message="$(string.RuntimePublisher.AppDomainAssemblyResolveHandlerInvokedOpcodeMessage)" symbol="CLR_APPDOMAIN_ASSEMBLY_RESOLVE_HANDLER_INVOKED_OPCODE" value="13"/>
<opcode name="AssemblyLoadFromResolveHandlerInvoked" message="$(string.RuntimePublisher.AssemblyLoadFromResolveHandlerInvokedOpcodeMessage)" symbol="CLR_ASSEMBLY_LOAD_FROM_RESOLVE_HANDLER_INVOKED_OPCODE" value="14"/>
<opcode name="KnownPathProbed" message="$(string.RuntimePublisher.KnownPathProbedOpcodeMessage)" symbol="CLR_BINDING_PATH_PROBED_OPCODE" value="15"/>
</opcodes>
</task>
<task name="TypeLoad" symbol="CLR_TYPELOAD_TASK"
value="33" eventGUID="{9DB1562B-512F-475D-8D4C-0C6D97C1E73C}"
message="$(string.RuntimePublisher.TypeLoadTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="JitInstrumentationData" symbol="CLR_JITINSTRUMENTATIONDATA_TASK"
value="34" eventGUID="{F8666925-22C8-4B70-A131-0738137E7F25}"
message="$(string.RuntimePublisher.JitInstrumentationDataTaskMessage)">
<opcodes>
<opcode name="InstrumentationData" message="$(string.RuntimePublisher.InstrumentationDataOpcodeMessage)" symbol="CLR_INSTRUMENTATION_DATA_OPCODE" value="11"/>
<opcode name="InstrumentationDataVerbose" message="$(string.RuntimePublisher.InstrumentationDataOpcodeMessage)" symbol="CLR_INSTRUMENTATION_DATA_VERBOSE_OPCODE" value="12"/>
</opcodes>
</task>
<task name="ExecutionCheckpoint" symbol="CLR_EXECUTION_CHECKPOINT_TASK"
value="35" eventGUID="{598832C8-DF4D-4E9E-ABE6-2C7BF0BA2DA2}"
message="$(string.RuntimePublisher.ExecutionCheckpointTaskMessage)">
<opcodes>
<opcode name="ExecutionCheckpoint" message="$(string.RuntimePublisher.ExecutionCheckpointOpcodeMessage)" symbol="CLR_EXECUTIONCHECKPOINT_OPCODE" value="11"> </opcode>
</opcodes>
</task>
<task name="Profiler" symbol="CLR_PROFILER_TASK"
value="36" eventGUID="{68895E46-FD03-4528-89D2-5E1FBB1D3BCF}"
message="$(string.RuntimePublisher.ProfilerTaskMessage)">
<opcodes>
<opcode name="Profiler" message="$(string.RuntimePublisher.ProfilerOpcodeMessage)" symbol="CLR_PROFILER_OPCODE" value="11"/>
</opcodes>
</task>
<task name="YieldProcessorMeasurement" symbol="CLR_YIELD_PROCESSOR_MEASUREMENT_TASK"
value="37" eventGUID="{B4AFC324-DECE-4B02-86DC-AAB8F22BC1B1}"
message="$(string.RuntimePublisher.YieldProcessorMeasurementTaskMessage)">
<opcodes>
</opcodes>
</task>
<!--Next available ID is 38-->
</tasks>
<!--Maps-->
<maps>
<!-- ValueMaps -->
<valueMap name="GCSegmentTypeMap">
<map value="0x0" message="$(string.RuntimePublisher.GCSegment.SmallObjectHeapMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCSegment.LargeObjectHeapMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCSegment.ReadOnlyHeapMapMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.GCSegment.PinnedObjectHeapMapMessage)"/>
</valueMap>
<valueMap name="GCAllocationKindMap">
<map value="0x0" message="$(string.RuntimePublisher.GCAllocation.SmallMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCAllocation.LargeMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCAllocation.PinnedMapMessage)"/>
</valueMap>
<valueMap name="GCBucketKindMap">
<map value="0x0" message="$(string.RuntimePublisher.GCBucket.FLItemMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCBucket.PlugMessage)"/>
</valueMap>
<valueMap name="GCTypeMap">
<map value="0x0" message="$(string.RuntimePublisher.GCType.NonConcurrentGCMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCType.BackgroundGCMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCType.ForegroundGCMapMessage)"/>
</valueMap>
<valueMap name="GCReasonMap">
<map value="0x0" message="$(string.RuntimePublisher.GCReason.AllocSmallMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCReason.InducedMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCReason.LowMemoryMapMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.GCReason.EmptyMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.GCReason.AllocLargeMapMessage)"/>
<map value="0x5" message="$(string.RuntimePublisher.GCReason.OutOfSpaceSmallObjectHeapMapMessage)"/>
<map value="0x6" message="$(string.RuntimePublisher.GCReason.OutOfSpaceLargeObjectHeapMapMessage)"/>
<map value="0x7" message="$(string.RuntimePublisher.GCReason.InducedNoForceMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.GCReason.StressMapMessage)"/>
<map value="0x9" message="$(string.RuntimePublisher.GCReason.InducedLowMemoryMapMessage)"/>
</valueMap>
<valueMap name="GCSuspendEEReasonMap">
<map value="0x0" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendOtherMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForGCMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForAppDomainShutdownMapMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForCodePitchingMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForShutdownMapMessage)"/>
<map value="0x5" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForDebuggerMapMessage)"/>
<map value="0x6" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForGCPrepMapMessage)"/>
<map value="0x7" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForDebuggerSweepMapMessage)"/>
</valueMap>
<valueMap name="ContentionFlagsMap">
<map value="0x0" message="$(string.RuntimePublisher.Contention.ManagedMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.Contention.NativeMapMessage)"/>
</valueMap>
<valueMap name="TailCallTypeMap">
<map value="0x0" message="$(string.RuntimePublisher.TailCallType.OptimizedMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.TailCallType.RecursiveMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.TailCallType.HelperMapMessage)"/>
</valueMap>
<valueMap name="ThreadAdjustmentReasonMap">
<map value="0x0" message="$(string.RuntimePublisher.ThreadAdjustmentReason.WarmupMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.ThreadAdjustmentReason.InitializingMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.ThreadAdjustmentReason.RandomMoveMapMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.ThreadAdjustmentReason.ClimbingMoveMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.ThreadAdjustmentReason.ChangePointMapMessage)"/>
<map value="0x5" message="$(string.RuntimePublisher.ThreadAdjustmentReason.StabilizingMapMessage)"/>
<map value="0x6" message="$(string.RuntimePublisher.ThreadAdjustmentReason.StarvationMapMessage)"/>
<map value="0x7" message="$(string.RuntimePublisher.ThreadAdjustmentReason.ThreadTimedOutMapMessage)"/>
</valueMap>
<valueMap name="GCRootKindMap">
<map value="0" message="$(string.RuntimePublisher.GCRootKind.Stack)"/>
<map value="1" message="$(string.RuntimePublisher.GCRootKind.Finalizer)"/>
<map value="2" message="$(string.RuntimePublisher.GCRootKind.Handle)"/>
<map value="3" message="$(string.RuntimePublisher.GCRootKind.Older)"/>
<map value="4" message="$(string.RuntimePublisher.GCRootKind.SizedRef)"/>
<map value="5" message="$(string.RuntimePublisher.GCRootKind.Overflow)"/>
<map value="6" message="$(string.RuntimePublisher.GCRootKind.DependentHandle)"/>
<map value="7" message="$(string.RuntimePublisher.GCRootKind.NewFQ)"/>
<map value="8" message="$(string.RuntimePublisher.GCRootKind.Steal)"/>
<map value="9" message="$(string.RuntimePublisher.GCRootKind.BGC)"/>
</valueMap>
<valueMap name="GCHandleKindMap">
<map value="0x0" message="$(string.RuntimePublisher.GCHandleKind.WeakShortMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCHandleKind.WeakLongMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCHandleKind.StrongMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.GCHandleKind.PinnedMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.GCHandleKind.VariableMessage)"/>
<map value="0x5" message="$(string.RuntimePublisher.GCHandleKind.RefCountedMessage)"/>
<map value="0x6" message="$(string.RuntimePublisher.GCHandleKind.DependentMessage)"/>
<map value="0x7" message="$(string.RuntimePublisher.GCHandleKind.AsyncPinnedMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.GCHandleKind.SizedRefMessage)"/>
</valueMap>
<valueMap name="KnownPathSourceMap">
<map value="0x0" message="$(string.RuntimePublisher.KnownPathSource.ApplicationAssembliesMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.KnownPathSource.UnusedMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.KnownPathSource.AppPathsMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.KnownPathSource.PlatformResourceRootsMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.KnownPathSource.SatelliteSubdirectoryMessage)"/>
</valueMap>
<valueMap name="ResolutionAttemptedStageMap">
<map value="0x0" message="$(string.RuntimePublisher.ResolutionAttempted.FindInLoadContext)"/>
<map value="0x1" message="$(string.RuntimePublisher.ResolutionAttempted.AssemblyLoadContextLoad)"/>
<map value="0x2" message="$(string.RuntimePublisher.ResolutionAttempted.ApplicationAssemblies)"/>
<map value="0x3" message="$(string.RuntimePublisher.ResolutionAttempted.DefaultAssemblyLoadContextFallback)"/>
<map value="0x4" message="$(string.RuntimePublisher.ResolutionAttempted.ResolveSatelliteAssembly)"/>
<map value="0x5" message="$(string.RuntimePublisher.ResolutionAttempted.AssemblyLoadContextResolvingEvent)"/>
<map value="0x6" message="$(string.RuntimePublisher.ResolutionAttempted.AppDomainAssemblyResolveEvent)"/>
</valueMap>
<valueMap name="ResolutionAttemptedResultMap">
<map value="0x0" message="$(string.RuntimePublisher.ResolutionAttempted.Success)"/>
<map value="0x1" message="$(string.RuntimePublisher.ResolutionAttempted.AssemblyNotFound)"/>
<map value="0x2" message="$(string.RuntimePublisher.ResolutionAttempted.MismatchedAssemblyName)"/>
<map value="0x3" message="$(string.RuntimePublisher.ResolutionAttempted.IncompatibleVersion)"/>
<map value="0x4" message="$(string.RuntimePublisher.ResolutionAttempted.Failure)"/>
<map value="0x5" message="$(string.RuntimePublisher.ResolutionAttempted.Exception)"/>
</valueMap>
<!-- BitMaps -->
<bitMap name="ModuleRangeTypeMap">
<map value="0x4" message="$(string.RuntimePublisher.ModuleRangeTypeMap.ColdRangeMessage)"/>
</bitMap>
<bitMap name="AppDomainFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.AppDomain.DefaultMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.AppDomain.ExecutableMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.AppDomain.SharedMapMessage)"/>
</bitMap>
<bitMap name="AssemblyFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.Assembly.DomainNeutralMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.Assembly.DynamicMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.Assembly.NativeMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.Assembly.CollectibleMapMessage)"/>
</bitMap>
<bitMap name="ModuleFlagsMap">
<map value= "0x1" message="$(string.RuntimePublisher.Module.DomainNeutralMapMessage)"/>
<map value= "0x2" message="$(string.RuntimePublisher.Module.NativeMapMessage)"/>
<map value= "0x4" message="$(string.RuntimePublisher.Module.DynamicMapMessage)"/>
<map value= "0x8" message="$(string.RuntimePublisher.Module.ManifestMapMessage)"/>
<map value= "0x10" message="$(string.RuntimePublisher.Module.IbcOptimizedMapMessage)"/>
<map value= "0x20" message="$(string.RuntimePublisher.Module.ReadyToRunModuleMapMessage)"/>
<map value= "0x40" message="$(string.RuntimePublisher.Module.PartialReadyToRunModuleMapMessage)"/>
</bitMap>
<bitMap name="MethodFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.Method.DynamicMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.Method.GenericMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.Method.HasSharedGenericCodeMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.Method.JittedMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.Method.JitHelperMapMessage)"/>
<map value="0x20" message="$(string.RuntimePublisher.Method.ProfilerRejectedPrecompiledCodeMapMessage)"/>
<map value="0x40" message="$(string.RuntimePublisher.Method.ReadyToRunRejectedPrecompiledCodeMapMessage)"/>
<!-- 0x80 to 0x200 are used for the optimization tier -->
</bitMap>
<bitMap name="StartupModeMap">
<map value="0x1" message="$(string.RuntimePublisher.StartupMode.ManagedExeMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.StartupMode.HostedCLRMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.StartupMode.IjwDllMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.StartupMode.ComActivatedMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.StartupMode.OtherMapMessage)"/>
</bitMap>
<bitMap name="RuntimeSkuMap">
<map value="0x1" message="$(string.RuntimePublisher.RuntimeSku.DesktopCLRMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.RuntimeSku.CoreCLRMapMessage)"/>
</bitMap>
<bitMap name="ExceptionThrownFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.ExceptionThrown.HasInnerExceptionMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.ExceptionThrown.NestedMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.ExceptionThrown.ReThrownMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.ExceptionThrown.CorruptedStateMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.ExceptionThrown.CLSCompliantMapMessage)"/>
</bitMap>
<bitMap name="ILStubGeneratedFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.ILStubGenerated.ReverseInteropMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.ILStubGenerated.COMInteropMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.ILStubGenerated.NGenedStubMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.ILStubGenerated.DelegateMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.ILStubGenerated.VarArgMapMessage)"/>
<map value="0x20" message="$(string.RuntimePublisher.ILStubGenerated.UnmanagedCalleeMapMessage)"/>
<map value="0x40" message="$(string.RuntimePublisher.ILStubGenerated.StructStubMapMessage)"/>
</bitMap>
<bitMap name="StartupFlagsMap">
<map value="0x000001" message="$(string.RuntimePublisher.Startup.CONCURRENT_GCMapMessage)"/>
<map value="0x000002" message="$(string.RuntimePublisher.Startup.LOADER_OPTIMIZATION_SINGLE_DOMAINMapMessage)"/>
<map value="0x000004" message="$(string.RuntimePublisher.Startup.LOADER_OPTIMIZATION_MULTI_DOMAINMapMessage)"/>
<map value="0x000010" message="$(string.RuntimePublisher.Startup.LOADER_SAFEMODEMapMessage)"/>
<map value="0x000100" message="$(string.RuntimePublisher.Startup.LOADER_SETPREFERENCEMapMessage)"/>
<map value="0x001000" message="$(string.RuntimePublisher.Startup.SERVER_GCMapMessage)"/>
<map value="0x002000" message="$(string.RuntimePublisher.Startup.HOARD_GC_VMMapMessage)"/>
<map value="0x004000" message="$(string.RuntimePublisher.Startup.SINGLE_VERSION_HOSTING_INTERFACEMapMessage)"/>
<map value="0x010000" message="$(string.RuntimePublisher.Startup.LEGACY_IMPERSONATIONMapMessage)"/>
<map value="0x020000" message="$(string.RuntimePublisher.Startup.DISABLE_COMMITTHREADSTACKMapMessage)"/>
<map value="0x040000" message="$(string.RuntimePublisher.Startup.ALWAYSFLOW_IMPERSONATIONMapMessage)"/>
<map value="0x080000" message="$(string.RuntimePublisher.Startup.TRIM_GC_COMMITMapMessage)"/>
<map value="0x100000" message="$(string.RuntimePublisher.Startup.ETWMapMessage)"/>
<map value="0x200000" message="$(string.RuntimePublisher.Startup.SERVER_BUILDMapMessage)"/>
<map value="0x400000" message="$(string.RuntimePublisher.Startup.ARMMapMessage)"/>
</bitMap>
<bitMap name="TypeFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.TypeFlags.Delegate)"/>
<map value="0x2" message="$(string.RuntimePublisher.TypeFlags.Finalizable)"/>
<map value="0x4" message="$(string.RuntimePublisher.TypeFlags.ExternallyImplementedCOMObject)"/>
<map value="0x8" message="$(string.RuntimePublisher.TypeFlags.Array)"/>
<map value="0x100" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit0)"/>
<map value="0x200" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit1)"/>
<map value="0x400" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit2)"/>
<map value="0x800" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit3)"/>
<map value="0x1000" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit4)"/>
<map value="0x2000" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit5)"/>
</bitMap>
<bitMap name="GCRootFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.GCRootFlags.Pinning)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCRootFlags.WeakRef)"/>
<map value="0x4" message="$(string.RuntimePublisher.GCRootFlags.Interior)"/>
<map value="0x8" message="$(string.RuntimePublisher.GCRootFlags.RefCounted)"/>
</bitMap>
<bitMap name="GCRootStaticVarFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.GCRootStaticVarFlags.ThreadLocal)"/>
</bitMap>
<bitMap name="GCRootCCWFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.GCRootCCWFlags.Strong)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCRootCCWFlags.Pegged)"/>
</bitMap>
<bitMap name="ThreadFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.ThreadFlags.GCSpecial)"/>
<map value="0x2" message="$(string.RuntimePublisher.ThreadFlags.Finalizer)"/>
<map value="0x4" message="$(string.RuntimePublisher.ThreadFlags.ThreadPoolWorker)"/>
</bitMap>
<bitMap name="TieredCompilationSettingsFlagsMap">
<map value="0x0" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.NoneMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.QuickJitMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage)"/>
</bitMap>
</maps>
<!--Templates-->
<templates>
<template tid="EventSource">
<data name="EventID" inType="win:Int32" />
<data name="EventName" inType="win:UnicodeString" />
<data name="EventSourceName" inType="win:UnicodeString" />
<data name="Payload" inType="win:UnicodeString" />
<UserData>
<EventSource xmlns="myNs">
<EventID> %1 </EventID>
<EventName> %2 </EventName>
<EventSourceName> %3 </EventSourceName>
<Payload> %4 </Payload>
</EventSource>
</UserData>
</template>
<template tid="StrongNameVerification">
<data name="VerificationFlags" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ErrorCode" inType="win:UInt32" outType="win:HexInt32"/>
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<UserData>
<StrongNameVerification xmlns="myNs">
<VerificationFlags> %1 </VerificationFlags>
<ErrorCode> %2 </ErrorCode>
<FullyQualifiedAssemblyName> %3 </FullyQualifiedAssemblyName>
</StrongNameVerification>
</UserData>
</template>
<template tid="StrongNameVerification_V1">
<data name="VerificationFlags" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ErrorCode" inType="win:UInt32" outType="win:HexInt32"/>
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<StrongNameVerification_V1 xmlns="myNs">
<VerificationFlags> %1 </VerificationFlags>
<ErrorCode> %2 </ErrorCode>
<FullyQualifiedAssemblyName> %3 </FullyQualifiedAssemblyName>
<ClrInstanceID> %4 </ClrInstanceID>
</StrongNameVerification_V1>
</UserData>
</template>
<template tid="AuthenticodeVerification">
<data name="VerificationFlags" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ErrorCode" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ModulePath" inType="win:UnicodeString" />
<UserData>
<AuthenticodeVerification xmlns="myNs">
<VerificationFlags> %1 </VerificationFlags>
<ErrorCode> %2 </ErrorCode>
<ModulePath> %3 </ModulePath>
</AuthenticodeVerification>
</UserData>
</template>
<template tid="AuthenticodeVerification_V1">
<data name="VerificationFlags" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ErrorCode" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ModulePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AuthenticodeVerification_V1 xmlns="myNs">
<VerificationFlags> %1 </VerificationFlags>
<ErrorCode> %2 </ErrorCode>
<ModulePath> %3 </ModulePath>
<ClrInstanceID> %4 </ClrInstanceID>
</AuthenticodeVerification_V1>
</UserData>
</template>
<template tid="RuntimeInformation">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Sku" inType="win:UInt16" map="RuntimeSkuMap" />
<data name="BclMajorVersion" inType="win:UInt16" />
<data name="BclMinorVersion" inType="win:UInt16" />
<data name="BclBuildNumber" inType="win:UInt16" />
<data name="BclQfeNumber" inType="win:UInt16" />
<data name="VMMajorVersion" inType="win:UInt16" />
<data name="VMMinorVersion" inType="win:UInt16" />
<data name="VMBuildNumber" inType="win:UInt16" />
<data name="VMQfeNumber" inType="win:UInt16" />
<data name="StartupFlags" inType="win:UInt32" map="StartupFlagsMap" />
<data name="StartupMode" inType="win:UInt8" map="StartupModeMap" />
<data name="CommandLine" inType="win:UnicodeString" />
<data name="ComObjectGuid" inType="win:GUID" />
<data name="RuntimeDllPath" inType="win:UnicodeString" />
<UserData>
<RuntimeInformation xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Sku> %2 </Sku>
<BclMajorVersion> %3 </BclMajorVersion>
<BclMinorVersion> %4 </BclMinorVersion>
<BclBuildNumber> %5 </BclBuildNumber>
<BclQfeNumber> %6 </BclQfeNumber>
<VMMajorVersion> %7 </VMMajorVersion>
<VMMinorVersion> %8 </VMMinorVersion>
<VMBuildNumber> %9 </VMBuildNumber>
<VMQfeNumber> %10 </VMQfeNumber>
<StartupFlags> %11 </StartupFlags>
<StartupMode> %12 </StartupMode>
<CommandLine> %13 </CommandLine>
<ComObjectGuid> %14 </ComObjectGuid>
<RuntimeDllPath> %15 </RuntimeDllPath>
</RuntimeInformation>
</UserData>
</template>
<template tid="GCStart">
<data name="Count" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Reason" inType="win:UInt32" map="GCReasonMap" />
<UserData>
<GCStart xmlns="myNs">
<Count> %1 </Count>
<Reason> %2 </Reason>
</GCStart>
</UserData>
</template>
<template tid="GCStart_V1">
<data name="Count" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Depth" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Reason" inType="win:UInt32" map="GCReasonMap" />
<data name="Type" inType="win:UInt32" map="GCTypeMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCStart_V1 xmlns="myNs">
<Count> %1 </Count>
<Depth> %2 </Depth>
<Reason> %3 </Reason>
<Type> %4 </Type>
<ClrInstanceID> %5 </ClrInstanceID>
</GCStart_V1>
</UserData>
</template>
<template tid="GCStart_V2">
<data name="Count" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Depth" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Reason" inType="win:UInt32" map="GCReasonMap" />
<data name="Type" inType="win:UInt32" map="GCTypeMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ClientSequenceNumber" inType="win:UInt64" />
<UserData>
<GCStart_V1 xmlns="myNs">
<Count> %1 </Count>
<Depth> %2 </Depth>
<Reason> %3 </Reason>
<Type> %4 </Type>
<ClrInstanceID> %5 </ClrInstanceID>
<ClientSequenceNumber> %6 </ClientSequenceNumber>
</GCStart_V1>
</UserData>
</template>
<template tid="GCEnd">
<data name="Count" inType="win:UInt32" />
<data name="Depth" inType="win:UInt16" />
<UserData>
<GCEnd xmlns="myNs">
<Count> %1 </Count>
<Depth> %2 </Depth>
</GCEnd>
</UserData>
</template>
<template tid="GCEnd_V1">
<data name="Count" inType="win:UInt32" />
<data name="Depth" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCEnd_V1 xmlns="myNs">
<Count> %1 </Count>
<Depth> %2 </Depth>
<ClrInstanceID> %3 </ClrInstanceID>
</GCEnd_V1>
</UserData>
</template>
<template tid="GCHeapStats">
<data name="GenerationSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedCount" inType="win:UInt64" />
<data name="PinnedObjectCount" inType="win:UInt32" />
<data name="SinkBlockCount" inType="win:UInt32" />
<data name="GCHandleCount" inType="win:UInt32" />
<UserData>
<GCHeapStats xmlns="myNs">
<GenerationSize0> %1 </GenerationSize0>
<TotalPromotedSize0> %2 </TotalPromotedSize0>
<GenerationSize1> %3 </GenerationSize1>
<TotalPromotedSize1> %4 </TotalPromotedSize1>
<GenerationSize2> %5 </GenerationSize2>
<TotalPromotedSize2> %6 </TotalPromotedSize2>
<GenerationSize3> %7 </GenerationSize3>
<TotalPromotedSize3> %8 </TotalPromotedSize3>
<FinalizationPromotedSize> %9 </FinalizationPromotedSize>
<FinalizationPromotedCount> %10 </FinalizationPromotedCount>
<PinnedObjectCount> %11 </PinnedObjectCount>
<SinkBlockCount> %12 </SinkBlockCount>
<GCHandleCount> %13 </GCHandleCount>
</GCHeapStats>
</UserData>
</template>
<template tid="GCHeapStats_V1">
<data name="GenerationSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedCount" inType="win:UInt64" />
<data name="PinnedObjectCount" inType="win:UInt32" />
<data name="SinkBlockCount" inType="win:UInt32" />
<data name="GCHandleCount" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCHeapStats_V1 xmlns="myNs">
<GenerationSize0> %1 </GenerationSize0>
<TotalPromotedSize0> %2 </TotalPromotedSize0>
<GenerationSize1> %3 </GenerationSize1>
<TotalPromotedSize1> %4 </TotalPromotedSize1>
<GenerationSize2> %5 </GenerationSize2>
<TotalPromotedSize2> %6 </TotalPromotedSize2>
<GenerationSize3> %7 </GenerationSize3>
<TotalPromotedSize3> %8 </TotalPromotedSize3>
<FinalizationPromotedSize> %9 </FinalizationPromotedSize>
<FinalizationPromotedCount> %10 </FinalizationPromotedCount>
<PinnedObjectCount> %11 </PinnedObjectCount>
<SinkBlockCount> %12 </SinkBlockCount>
<GCHandleCount> %13 </GCHandleCount>
<ClrInstanceID> %14 </ClrInstanceID>
</GCHeapStats_V1>
</UserData>
</template>
<template tid="GCHeapStats_V2">
<data name="GenerationSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedCount" inType="win:UInt64" />
<data name="PinnedObjectCount" inType="win:UInt32" />
<data name="SinkBlockCount" inType="win:UInt32" />
<data name="GCHandleCount" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="GenerationSize4" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize4" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCHeapStats_V2 xmlns="myNs">
<GenerationSize0> %1 </GenerationSize0>
<TotalPromotedSize0> %2 </TotalPromotedSize0>
<GenerationSize1> %3 </GenerationSize1>
<TotalPromotedSize1> %4 </TotalPromotedSize1>
<GenerationSize2> %5 </GenerationSize2>
<TotalPromotedSize2> %6 </TotalPromotedSize2>
<GenerationSize3> %7 </GenerationSize3>
<TotalPromotedSize3> %8 </TotalPromotedSize3>
<FinalizationPromotedSize> %9 </FinalizationPromotedSize>
<FinalizationPromotedCount> %10 </FinalizationPromotedCount>
<PinnedObjectCount> %11 </PinnedObjectCount>
<SinkBlockCount> %12 </SinkBlockCount>
<GCHandleCount> %13 </GCHandleCount>
<ClrInstanceID> %14 </ClrInstanceID>
<GenerationSize4> %15 </GenerationSize4>
<TotalPromotedSize4> %16 </TotalPromotedSize4>
</GCHeapStats_V2>
</UserData>
</template>
<template tid="GCCreateSegment">
<data name="Address" inType="win:UInt64" outType="win:HexInt64" />
<data name="Size" inType="win:UInt64" outType="win:HexInt64" />
<data name="Type" inType="win:UInt32" map="GCSegmentTypeMap" />
<UserData>
<GCCreateSegment xmlns="myNs">
<Address> %1 </Address>
<Size> %2 </Size>
<Type> %3 </Type>
</GCCreateSegment>
</UserData>
</template>
<template tid="GCCreateSegment_V1">
<data name="Address" inType="win:UInt64" outType="win:HexInt64" />
<data name="Size" inType="win:UInt64" outType="win:HexInt64" />
<data name="Type" inType="win:UInt32" map="GCSegmentTypeMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCCreateSegment_V1 xmlns="myNs">
<Address> %1 </Address>
<Size> %2 </Size>
<Type> %3 </Type>
<ClrInstanceID> %4 </ClrInstanceID>
</GCCreateSegment_V1>
</UserData>
</template>
<template tid="GCFreeSegment">
<data name="Address" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCFreeSegment xmlns="myNs">
<Address> %1 </Address>
</GCFreeSegment>
</UserData>
</template>
<template tid="GCFreeSegment_V1">
<data name="Address" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCFreeSegment_V1 xmlns="myNs">
<Address> %1 </Address>
<ClrInstanceID> %2 </ClrInstanceID>
</GCFreeSegment_V1>
</UserData>
</template>
<template tid="GCNoUserData">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCNoUserData xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCNoUserData>
</UserData>
</template>
<template tid="GenAwareTemplate">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GenAwareTemplate xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</GenAwareTemplate>
</UserData>
</template>
<template tid="GCSuspendEE">
<data name="Reason" inType="win:UInt16" map="GCSuspendEEReasonMap" />
<UserData>
<GCSuspendEE xmlns="myNs">
<Reason> %1 </Reason>
</GCSuspendEE>
</UserData>
</template>
<template tid="GCSuspendEE_V1">
<data name="Reason" inType="win:UInt32" map="GCSuspendEEReasonMap" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCSuspendEE_V1 xmlns="myNs">
<Reason> %1 </Reason>
<Count> %2 </Count>
<ClrInstanceID> %3 </ClrInstanceID>
</GCSuspendEE_V1>
</UserData>
</template>
<template tid="GCAllocationTick">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<UserData>
<GCAllocationTick xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
</GCAllocationTick>
</UserData>
</template>
<template tid="GCAllocationTick_V1">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCAllocationTick_V1 xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
<ClrInstanceID> %3 </ClrInstanceID>
</GCAllocationTick_V1>
</UserData>
</template>
<template tid="GCAllocationTick_V2">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AllocationAmount64" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:Pointer" />
<data name="TypeName" inType="win:UnicodeString" />
<data name="HeapIndex" inType="win:UInt32" />
<UserData>
<GCAllocationTick_V2 xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
<ClrInstanceID> %3 </ClrInstanceID>
<AllocationAmount64> %4 </AllocationAmount64>
<TypeID> %5 </TypeID>
<TypeName> %6 </TypeName>
<HeapIndex> %7 </HeapIndex>
</GCAllocationTick_V2>
</UserData>
</template>
<template tid="GCAllocationTick_V3">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AllocationAmount64" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:Pointer" />
<data name="TypeName" inType="win:UnicodeString" />
<data name="HeapIndex" inType="win:UInt32" />
<data name="Address" inType="win:Pointer" />
<UserData>
<GCAllocationTick_V3 xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
<ClrInstanceID> %3 </ClrInstanceID>
<AllocationAmount64> %4 </AllocationAmount64>
<TypeID> %5 </TypeID>
<TypeName> %6 </TypeName>
<HeapIndex> %7 </HeapIndex>
<Address> %8 </Address>
</GCAllocationTick_V3>
</UserData>
</template>
<template tid="GCAllocationTick_V4">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AllocationAmount64" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:Pointer" />
<data name="TypeName" inType="win:UnicodeString" />
<data name="HeapIndex" inType="win:UInt32" />
<data name="Address" inType="win:Pointer" />
<data name="ObjectSize" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCAllocationTick_V4 xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
<ClrInstanceID> %3 </ClrInstanceID>
<AllocationAmount64> %4 </AllocationAmount64>
<TypeID> %5 </TypeID>
<TypeName> %6 </TypeName>
<HeapIndex> %7 </HeapIndex>
<Address> %8 </Address>
<ObjectSize> %9 </ObjectSize>
</GCAllocationTick_V4>
</UserData>
</template>
<template tid="GCCreateConcurrentThread">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCCreateConcurrentThread xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCCreateConcurrentThread>
</UserData>
</template>
<template tid="GCTerminateConcurrentThread">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCTerminateConcurrentThread xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCTerminateConcurrentThread>
</UserData>
</template>
<template tid="GCFinalizersEnd">
<data name="Count" inType="win:UInt32" />
<UserData>
<GCFinalizersEnd xmlns="myNs">
<Count> %1 </Count>
</GCFinalizersEnd>
</UserData>
</template>
<template tid="GCFinalizersEnd_V1">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCFinalizersEnd_V1 xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</GCFinalizersEnd_V1>
</UserData>
</template>
<template tid="GCMark">
<data name="HeapNum" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCMark xmlns="myNs">
<HeapNum> %1 </HeapNum>
<ClrInstanceID> %2 </ClrInstanceID>
</GCMark>
</UserData>
</template>
<template tid="GCMarkWithType">
<data name="HeapNum" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Type" inType="win:UInt32" map="GCRootKindMap" />
<data name="Bytes" inType="win:UInt64" />
<UserData>
<GCMarkWithType xmlns="myNs">
<HeapNum> %1 </HeapNum>
<ClrInstanceID> %2 </ClrInstanceID>
<Type> %3 </Type>
<Bytes> %4 </Bytes>
</GCMarkWithType>
</UserData>
</template>
<template tid="GCJoin_V2">
<data name="Heap" inType="win:UInt32" />
<data name="JoinTime" inType="win:UInt32" />
<data name="JoinType" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="JoinID" inType="win:UInt32" />
<UserData>
<GCJoin_V2 xmlns="myNs">
<Heap> %1 </Heap>
<JoinTime> %2 </JoinTime>
<JoinType> %3 </JoinType>
<ClrInstanceID> %4 </ClrInstanceID>
<JoinID> %5 </JoinID>
</GCJoin_V2>
</UserData>
</template>
<template tid="GCPerHeapHistory_V3">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="FreeListAllocated" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeListRejected" inType="win:Pointer" outType="win:HexInt64" />
<data name="EndOfSegAllocated" inType="win:Pointer" outType="win:HexInt64" />
<data name="CondemnedAllocated" inType="win:Pointer" outType="win:HexInt64" />
<data name="PinnedAllocated" inType="win:Pointer" outType="win:HexInt64" />
<data name="PinnedAllocatedAdvance" inType="win:Pointer" outType="win:HexInt64" />
<data name="RunningFreeListEfficiency" inType="win:UInt32" />
<data name="CondemnReasons0" inType="win:UInt32" />
<data name="CondemnReasons1" inType="win:UInt32" />
<data name="CompactMechanisms" inType="win:UInt32" />
<data name="ExpandMechanisms" inType="win:UInt32" />
<data name="HeapIndex" inType="win:UInt32" />
<data name="ExtraGen0Commit" inType="win:Pointer" outType="win:HexInt64" />
<data name="Count" inType="win:UInt32" />
<struct name="Values" count="Count" >
<data name="SizeBefore" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeListBefore" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeObjBefore" inType="win:Pointer" outType="win:HexInt64" />
<data name="SizeAfter" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeListAfter" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeObjAfter" inType="win:Pointer" outType="win:HexInt64" />
<data name="In" inType="win:Pointer" outType="win:HexInt64" />
<data name="PinnedSurv" inType="win:Pointer" outType="win:HexInt64" />
<data name="NonePinnedSurv" inType="win:Pointer" outType="win:HexInt64" />
<data name="NewAllocation" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCPerHeapHistory_V3 xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<FreeListAllocated> %2 </FreeListAllocated>
<FreeListRejected> %3 </FreeListRejected>
<EndOfSegAllocated> %4 </EndOfSegAllocated>
<CondemnedAllocated> %5 </CondemnedAllocated>
<PinnedAllocated> %6 </PinnedAllocated>
<PinnedAllocatedAdvance> %7 </PinnedAllocatedAdvance>
<RunningFreeListEfficiency> %8 </RunningFreeListEfficiency>
<CondemnReasons0> %9 </CondemnReasons0>
<CondemnReasons1> %10 </CondemnReasons1>
<CompactMechanisms> %11 </CompactMechanisms>
<ExpandMechanisms> %12 </ExpandMechanisms>
<HeapIndex> %13 </HeapIndex>
<ExtraGen0Commit> %14 </ExtraGen0Commit>
<Count> %15 </Count>
</GCPerHeapHistory_V3>
</UserData>
</template>
<template tid="GCGlobalHeap_V2">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="PauseMode" inType="win:UInt32" />
<data name="MemoryPressure" inType="win:UInt32" />
<UserData>
<GCGlobalHeap_V2 xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
<ClrInstanceID> %7 </ClrInstanceID>
<PauseMode> %8 </PauseMode>
<MemoryPressure> %9 </MemoryPressure>
</GCGlobalHeap_V2>
</UserData>
</template>
<template tid="GCGlobalHeap_V3">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="PauseMode" inType="win:UInt32" />
<data name="MemoryPressure" inType="win:UInt32" />
<data name="CondemnReasons0" inType="win:UInt32" />
<data name="CondemnReasons1" inType="win:UInt32" />
<UserData>
<GCGlobalHeap_V3 xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
<ClrInstanceID> %7 </ClrInstanceID>
<PauseMode> %8 </PauseMode>
<MemoryPressure> %9 </MemoryPressure>
<CondemnReasons0> %10 </CondemnReasons0>
<CondemnReasons1> %11 </CondemnReasons1>
</GCGlobalHeap_V3>
</UserData>
</template>
<template tid="GCGlobalHeap_V4">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="PauseMode" inType="win:UInt32" />
<data name="MemoryPressure" inType="win:UInt32" />
<data name="CondemnReasons0" inType="win:UInt32" />
<data name="CondemnReasons1" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<struct name="Values" count="Count" >
<data name="Time" inType="win:UInt32" />
</struct>
<UserData>
<GCGlobalHeap_V4 xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
<ClrInstanceID> %7 </ClrInstanceID>
<PauseMode> %8 </PauseMode>
<MemoryPressure> %9 </MemoryPressure>
<CondemnReasons0> %10 </CondemnReasons0>
<CondemnReasons1> %11 </CondemnReasons1>
<Count> %12 </Count>
</GCGlobalHeap_V4>
</UserData>
</template>
<template tid="GCLOHCompact">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Count" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="TimePlan" inType="win:UInt32" />
<data name="TimeCompact" inType="win:UInt32" />
<data name="TimeRelocate" inType="win:UInt32" />
<data name="TotalRefs" inType="win:Pointer" />
<data name="ZeroRefs" inType="win:Pointer" />
</struct>
<UserData>
<GCLOHCompact xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Count> %2 </Count>
</GCLOHCompact>
</UserData>
</template>
<template tid="GCFitBucketInfo">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="BucketKind" inType="win:UInt16" map="GCBucketKindMap" />
<data name="TotalSize" inType="win:UInt64" />
<data name="Count" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="Index" inType="win:UInt16" />
<data name="Count" inType="win:UInt32" />
<data name="Size" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCFitBucketInfo xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<BucketKind> %2 </BucketKind>
<TotalSize> %3 </TotalSize>
<Count> %4 </Count>
</GCFitBucketInfo>
</UserData>
</template>
<template tid="FinalizeObject">
<data name="TypeID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<FinalizeObject xmlns="myNs">
<TypeID> %1 </TypeID>
<ObjectID> %2 </ObjectID>
<ClrInstanceID> %3 </ClrInstanceID>
</FinalizeObject>
</UserData>
</template>
<template tid="DestroyGCHandle">
<data name="HandleID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DestroyGCHandle xmlns="myNs">
<HandleID> %1 </HandleID>
<ClrInstanceID> %2 </ClrInstanceID>
</DestroyGCHandle>
</UserData>
</template>
<template tid="SetGCHandle">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="Kind" map="GCHandleKindMap" inType="win:UInt32" />
<data name="Generation" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<SetGCHandle xmlns="myNs">
<HandleID> %1 </HandleID>
<ObjectID> %2 </ObjectID>
<Kind> %3 </Kind>
<Generation> %4 </Generation>
<AppDomainID> %5 </AppDomainID>
<ClrInstanceID> %6 </ClrInstanceID>
</SetGCHandle>
</UserData>
</template>
<template tid="GCTriggered">
<data name="Reason" inType="win:UInt32" map="GCReasonMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCTriggered xmlns="myNs">
<Reason> %1 </Reason>
<ClrInstanceID> %2 </ClrInstanceID>
</GCTriggered>
</UserData>
</template>
<template tid="PinObjectAtGCTime">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="ObjectSize" inType="win:UInt64" />
<data name="TypeName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="GCDynamicEvent">
<data name="Name" inType="win:UnicodeString" />
<data name="DataSize" inType="win:UInt32" />
<data name="Data" inType="win:Binary" length="DataSize" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="IncreaseMemoryPressure">
<data name="BytesAllocated" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="DecreaseMemoryPressure">
<data name="BytesFreed" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="ClrWorkerThread">
<data name="WorkerThreadCount" inType="win:UInt32" />
<data name="RetiredWorkerThreads" inType="win:UInt32" />
<UserData>
<WorkerThread xmlns="myNs">
<WorkerThreadCount> %1 </WorkerThreadCount>
<RetiredWorkerThreads> %2 </RetiredWorkerThreads>
</WorkerThread>
</UserData>
</template>
<template tid="IOThread">
<data name="IOThreadCount" inType="win:UInt32" />
<data name="RetiredIOThreads" inType="win:UInt32" />
<UserData>
<IOThread xmlns="myNs">
<IOThreadCount> %1 </IOThreadCount>
<RetiredIOThreads> %2 </RetiredIOThreads>
</IOThread>
</UserData>
</template>
<template tid="IOThread_V1">
<data name="IOThreadCount" inType="win:UInt32" />
<data name="RetiredIOThreads" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<IOThread_V1 xmlns="myNs">
<IOThreadCount> %1 </IOThreadCount>
<RetiredIOThreads> %2 </RetiredIOThreads>
<ClrInstanceID> %3 </ClrInstanceID>
</IOThread_V1>
</UserData>
</template>
<template tid="ClrThreadPoolSuspend">
<data name="ClrThreadID" inType="win:UInt32" />
<data name="CpuUtilization" inType="win:UInt32" />
<UserData>
<CLRThreadPoolSuspend xmlns="myNs">
<ClrThreadID> %1 </ClrThreadID>
<CpuUtilization> %2 </CpuUtilization>
</CLRThreadPoolSuspend>
</UserData>
</template>
<template tid="ThreadPoolWorkerThread">
<data name="ActiveWorkerThreadCount" inType="win:UInt32" />
<data name="RetiredWorkerThreadCount" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkerThread xmlns="myNs">
<ActiveWorkerThreadCount> %1 </ActiveWorkerThreadCount>
<RetiredWorkerThreadCount> %2 </RetiredWorkerThreadCount>
<ClrInstanceID> %3 </ClrInstanceID>
</ThreadPoolWorkerThread>
</UserData>
</template>
<template tid="ThreadPoolWorkerThreadAdjustmentSample">
<data name="Throughput" inType="win:Double" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkerThreadAdjustmentSample xmlns="myNs">
<Throughput> %1 </Throughput>
<ClrInstanceID> %2 </ClrInstanceID>
</ThreadPoolWorkerThreadAdjustmentSample>
</UserData>
</template>
<template tid="ThreadPoolWorkerThreadAdjustmentAdjustment">
<data name="AverageThroughput" inType="win:Double" />
<data name="NewWorkerThreadCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" map="ThreadAdjustmentReasonMap"/>
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkerThreadAdjustmentAdjustment xmlns="myNs">
<AverageThroughput> %1 </AverageThroughput>
<NewWorkerThreadCount> %2 </NewWorkerThreadCount>
<Reason> %3 </Reason>
<ClrInstanceID> %4 </ClrInstanceID>
</ThreadPoolWorkerThreadAdjustmentAdjustment>
</UserData>
</template>
<template tid="ThreadPoolWorkerThreadAdjustmentStats">
<data name="Duration" inType="win:Double" />
<data name="Throughput" inType="win:Double" />
<data name="ThreadWave" inType="win:Double"/>
<data name="ThroughputWave" inType="win:Double"/>
<data name="ThroughputErrorEstimate" inType="win:Double"/>
<data name="AverageThroughputErrorEstimate" inType="win:Double"/>
<data name="ThroughputRatio" inType="win:Double" />
<data name="Confidence" inType="win:Double" />
<data name="NewControlSetting" inType="win:Double" />
<data name="NewThreadWaveMagnitude" inType="win:UInt16" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkerThreadAdjustmentStats xmlns="myNs">
<Duration> %1 </Duration>
<Throughput> %2 </Throughput>
<ThreadWave> %3 </ThreadWave>
<ThroughputWave> %4 </ThroughputWave>
<ThroughputErrorEstimate> %5 </ThroughputErrorEstimate>
<AverageThroughputErrorEstimate> %6 </AverageThroughputErrorEstimate>
<ThroughputRatio> %7 </ThroughputRatio>
<Confidence> %8 </Confidence>
<NewControlSetting> %9 </NewControlSetting>
<NewThreadWaveMagnitude> %10 </NewThreadWaveMagnitude>
<ClrInstanceID> %11 </ClrInstanceID>
</ThreadPoolWorkerThreadAdjustmentStats>
</UserData>
</template>
<template tid="ThreadPoolWork">
<data name="WorkID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="ThreadPoolIOWork">
<data name="NativeOverlapped" inType="win:Pointer" />
<data name="Overlapped" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="ThreadPoolIOWorkEnqueue">
<data name="NativeOverlapped" inType="win:Pointer" />
<data name="Overlapped" inType="win:Pointer" />
<data name="MultiDequeues" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="ThreadPoolWorkingThreadCount">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkingThreadCount xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</ThreadPoolWorkingThreadCount>
</UserData>
</template>
<template tid="ThreadStartWork">
<data name="ID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="Exception">
<data name="ExceptionType" inType="win:UnicodeString" />
<data name="ExceptionMessage" inType="win:UnicodeString" />
<data name="ExceptionEIP" inType="win:Pointer" />
<data name="ExceptionHRESULT" inType="win:UInt32" outType="win:HexInt32" />
<data name="ExceptionFlags" inType="win:UInt16" map="ExceptionThrownFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<Exception xmlns="myNs">
<ExceptionType> %1 </ExceptionType>
<ExceptionMessage> %2 </ExceptionMessage>
<ExceptionEIP> %3 </ExceptionEIP>
<ExceptionHRESULT> %4 </ExceptionHRESULT>
<ExceptionFlags> %5 </ExceptionFlags>
<ClrInstanceID> %6 </ClrInstanceID>
</Exception>
</UserData>
</template>
<template tid="ExceptionHandling">
<data name="EntryEIP" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ExceptionHandling xmlns="myNs">
<EntryEIP> %1 </EntryEIP>
<MethodID> %2 </MethodID>
<MethodName> %3 </MethodName>
<ClrInstanceID> %4 </ClrInstanceID>
</ExceptionHandling>
</UserData>
</template>
<template tid="Contention">
<data name="ContentionFlags" inType="win:UInt8" map="ContentionFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<Contention xmlns="myNs">
<ContentionFlags> %1 </ContentionFlags>
<ClrInstanceID> %2 </ClrInstanceID>
</Contention>
</UserData>
</template>
<template tid="ContentionStop_V1">
<data name="ContentionFlags" inType="win:UInt8" map="ContentionFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="DurationNs" inType="win:Double" />
<UserData>
<Contention xmlns="myNs">
<ContentionFlags> %1 </ContentionFlags>
<ClrInstanceID> %2 </ClrInstanceID>
<DurationNs> %3 </DurationNs>
</Contention>
</UserData>
</template>
<template tid="DomainModuleLoadUnload">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<UserData>
<DomainModuleLoadUnload xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<AppDomainID> %3 </AppDomainID>
<ModuleFlags> %4 </ModuleFlags>
<ModuleILPath> %5 </ModuleILPath>
<ModuleNativePath> %6 </ModuleNativePath>
</DomainModuleLoadUnload>
</UserData>
</template>
<template tid="DomainModuleLoadUnload_V1">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DomainModuleLoadUnload_V1 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<AppDomainID> %3 </AppDomainID>
<ModuleFlags> %4 </ModuleFlags>
<ModuleILPath> %5 </ModuleILPath>
<ModuleNativePath> %6 </ModuleNativePath>
<ClrInstanceID> %7 </ClrInstanceID>
</DomainModuleLoadUnload_V1>
</UserData>
</template>
<template tid="ModuleLoadUnload">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<UserData>
<ModuleLoadUnload xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
</ModuleLoadUnload>
</UserData>
</template>
<template tid="ModuleLoadUnload_V1">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ModuleLoadUnload_V1 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
<ClrInstanceID> %6 </ClrInstanceID>
</ModuleLoadUnload_V1>
</UserData>
</template>
<template tid="ModuleLoadUnload_V2">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ManagedPdbSignature" inType="win:GUID" />
<data name="ManagedPdbAge" inType="win:UInt32" />
<data name="ManagedPdbBuildPath" inType="win:UnicodeString" />
<data name="NativePdbSignature" inType="win:GUID" />
<data name="NativePdbAge" inType="win:UInt32" />
<data name="NativePdbBuildPath" inType="win:UnicodeString" />
<UserData>
<ModuleLoadUnload_V2 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
<ClrInstanceID> %6 </ClrInstanceID>
<ManagedPdbSignature> %7 </ManagedPdbSignature>
<ManagedPdbAge> %8 </ManagedPdbAge>
<ManagedPdbBuildPath> %9 </ManagedPdbBuildPath>
<NativePdbSignature> %10 </NativePdbSignature>
<NativePdbAge> %11 </NativePdbAge>
<NativePdbBuildPath> %12 </NativePdbBuildPath>
</ModuleLoadUnload_V2>
</UserData>
</template>
<template tid="AssemblyLoadUnload">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyFlags" inType="win:UInt32" map="AssemblyFlagsMap" />
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadUnload xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<AppDomainID> %2 </AppDomainID>
<AssemblyFlags> %3 </AssemblyFlags>
<FullyQualifiedAssemblyName> %4 </FullyQualifiedAssemblyName>
</AssemblyLoadUnload>
</UserData>
</template>
<template tid="AssemblyLoadUnload_V1">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="BindingID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyFlags" inType="win:UInt32" map="AssemblyFlagsMap" />
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AssemblyLoadUnload_V1 xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<AppDomainID> %2 </AppDomainID>
<BindingID> %3 </BindingID>
<AssemblyFlags> %4 </AssemblyFlags>
<FullyQualifiedAssemblyName> %5 </FullyQualifiedAssemblyName>
<ClrInstanceID> %6 </ClrInstanceID>
</AssemblyLoadUnload_V1>
</UserData>
</template>
<template tid="AppDomainLoadUnload">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainFlags" inType="win:UInt32" map="AppDomainFlagsMap" />
<data name="AppDomainName" inType="win:UnicodeString" />
<UserData>
<AppDomainLoadUnload xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainFlags> %2 </AppDomainFlags>
<AppDomainName> %3 </AppDomainName>
</AppDomainLoadUnload>
</UserData>
</template>
<template tid="AppDomainLoadUnload_V1">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainFlags" inType="win:UInt32" map="AppDomainFlagsMap" />
<data name="AppDomainName" inType="win:UnicodeString" />
<data name="AppDomainIndex" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AppDomainLoadUnload_V1 xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainFlags> %2 </AppDomainFlags>
<AppDomainName> %3 </AppDomainName>
<AppDomainIndex> %4 </AppDomainIndex>
<ClrInstanceID> %5 </ClrInstanceID>
</AppDomainLoadUnload_V1>
</UserData>
</template>
<template tid="AssemblyLoadStart">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="AssemblyPath" inType="win:UnicodeString" />
<data name="RequestingAssembly" inType="win:UnicodeString" />
<data name="AssemblyLoadContext" inType="win:UnicodeString" />
<data name="RequestingAssemblyLoadContext" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadStart xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<AssemblyPath> %3 </AssemblyPath>
<RequestingAssembly> %4 </RequestingAssembly>
<AssemblyLoadContext> %5 </AssemblyLoadContext>
<RequestingAssemblyLoadContext> %6 </RequestingAssemblyLoadContext>
</AssemblyLoadStart>
</UserData>
</template>
<template tid="AssemblyLoadStop">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="AssemblyPath" inType="win:UnicodeString" />
<data name="RequestingAssembly" inType="win:UnicodeString" />
<data name="AssemblyLoadContext" inType="win:UnicodeString" />
<data name="RequestingAssemblyLoadContext" inType="win:UnicodeString" />
<data name="Success" inType="win:Boolean" />
<data name="ResultAssemblyName" inType="win:UnicodeString" />
<data name="ResultAssemblyPath" inType="win:UnicodeString" />
<data name="Cached" inType="win:Boolean" />
<UserData>
<AssemblyLoadStop xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<AssemblyPath> %3 </AssemblyPath>
<RequestingAssembly> %4 </RequestingAssembly>
<AssemblyLoadContext> %5 </AssemblyLoadContext>
<RequestingAssemblyLoadContext> %6 </RequestingAssemblyLoadContext>
<Success> %7 </Success>
<ResultAssemblyName> %8 </ResultAssemblyName>
<ResultAssemblyPath> %9 </ResultAssemblyPath>
<Cached> %10 </Cached>
</AssemblyLoadStop>
</UserData>
</template>
<template tid="ResolutionAttempted">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="Stage" map="ResolutionAttemptedStageMap" inType="win:UInt16" />
<data name="AssemblyLoadContext" inType="win:UnicodeString" />
<data name="Result" map="ResolutionAttemptedResultMap" inType="win:UInt16" />
<data name="ResultAssemblyName" inType="win:UnicodeString" />
<data name="ResultAssemblyPath" inType="win:UnicodeString" />
<data name="ErrorMessage" inType="win:UnicodeString" />
<UserData>
<ResolutionAttempted xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<Stage> %3 </Stage>
<AssemblyLoadContext> %4 </AssemblyLoadContext>
<Result> %5 </Result>
<ResultAssemblyName> %6 </ResultAssemblyName>
<ResultAssemblyPath> %7 </ResultAssemblyPath>
<ErrorMessage> %8 </ErrorMessage>
</ResolutionAttempted>
</UserData>
</template>
<template tid="AssemblyLoadContextResolvingHandlerInvoked">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="HandlerName" inType="win:UnicodeString" />
<data name="AssemblyLoadContext" inType="win:UnicodeString" />
<data name="ResultAssemblyName" inType="win:UnicodeString" />
<data name="ResultAssemblyPath" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadContextResolvingHandlerInvoked xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<HandlerName> %3 </HandlerName>
<AssemblyLoadContext> %4 </AssemblyLoadContext>
<ResultAssemblyName> %5 </ResultAssemblyName>
<ResultAssemblyPath> %6 </ResultAssemblyPath>
</AssemblyLoadContextResolvingHandlerInvoked>
</UserData>
</template>
<template tid="AppDomainAssemblyResolveHandlerInvoked">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="HandlerName" inType="win:UnicodeString" />
<data name="ResultAssemblyName" inType="win:UnicodeString" />
<data name="ResultAssemblyPath" inType="win:UnicodeString" />
<UserData>
<AppDomainAssemblyResolveHandlerInvoked xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<HandlerName> %3 </HandlerName>
<ResultAssemblyName> %4 </ResultAssemblyName>
<ResultAssemblyPath> %5 </ResultAssemblyPath>
</AppDomainAssemblyResolveHandlerInvoked>
</UserData>
</template>
<template tid="AssemblyLoadFromResolveHandlerInvoked">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="IsTrackedLoad" inType="win:Boolean" />
<data name="RequestingAssemblyPath" inType="win:UnicodeString" />
<data name="ComputedRequestedAssemblyPath" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadFromResolveHandlerInvoked xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<IsTrackedLoad> %3 </IsTrackedLoad>
<RequestingAssemblyPath> %4 </RequestingAssemblyPath>
<ComputedRequestedAssemblyPath> %5 </ComputedRequestedAssemblyPath>
</AssemblyLoadFromResolveHandlerInvoked>
</UserData>
</template>
<template tid="KnownPathProbed">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="FilePath" inType="win:UnicodeString" />
<data name="Source" inType="win:UInt16" map="KnownPathSourceMap" />
<data name="Result" inType="win:Int32" />
<UserData>
<KnownPathProbed xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<FilePath> %2 </FilePath>
<Source> %3 </Source>
<Result> %4 </Result>
</KnownPathProbed>
</UserData>
</template>
<template tid="MethodDetails">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="TypeParameterCount" inType="win:UInt32" />
<data name="LoaderModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeParameters" count="TypeParameterCount" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodDetails xmlns="myNs">
<MethodID> %1 </MethodID>
<TypeID> %2 </TypeID>
<MethodToken> %3 </MethodToken>
<TypeParameterCount> %4 </TypeParameterCount>
<LoaderModuleID> %5 </LoaderModuleID>
</MethodDetails>
</UserData>
</template>
<template tid="TypeLoadStart">
<data name="TypeLoadStartID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TypeLoadStart xmlns="myNs">
<TypeLoadStartID> %1 </TypeLoadStartID>
<ClrInstanceID> %2 </ClrInstanceID>
</TypeLoadStart>
</UserData>
</template>
<template tid="TypeLoadStop">
<data name="TypeLoadStartID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="LoadLevel" inType="win:UInt16" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeName" inType="win:UnicodeString" />
<UserData>
<TypeLoadStop xmlns="myNs">
<TypeLoadStartID> %1 </TypeLoadStartID>
<ClrInstanceID> %2 </ClrInstanceID>
<LoadLevel> %3 </LoadLevel>
<TypeID> %4 </TypeID>
<TypeName> %5 </TypeName>
</TypeLoadStop>
</UserData>
</template>
<template tid="MethodLoadUnload">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<UserData>
<MethodLoadUnload xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
</MethodLoadUnload>
</UserData>
</template>
<template tid="MethodLoadUnload_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodLoadUnload_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<ClrInstanceID> %7 </ClrInstanceID>
</MethodLoadUnload_V1>
</UserData>
</template>
<template tid="MethodLoadUnload_V2">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodLoadUnload_V2 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<ClrInstanceID> %7 </ClrInstanceID>
<ReJITID> %8 </ReJITID>
</MethodLoadUnload_V2>
</UserData>
</template>
<template tid="R2RGetEntryPoint">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="EntryPoint" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<R2RGetEntryPoint xmlns="myNs">
<MethodID> %1 </MethodID>
<MethodNamespace> %2 </MethodNamespace>
<MethodName> %3 </MethodName>
<MethodSignature> %4 </MethodSignature>
<EntryPoint> %5 </EntryPoint>
<ClrInstanceID> %6 </ClrInstanceID>
</R2RGetEntryPoint>
</UserData>
</template>
<template tid="R2RGetEntryPointStart">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<R2RGetEntryPointStart xmlns="myNs">
<MethodID> %1 </MethodID>
<ClrInstanceID> %2 </ClrInstanceID>
</R2RGetEntryPointStart>
</UserData>
</template>
<template tid="MethodLoadUnloadVerbose">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<UserData>
<MethodLoadUnloadVerbose xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
</MethodLoadUnloadVerbose>
</UserData>
</template>
<template tid="MethodLoadUnloadVerbose_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodLoadUnloadVerbose_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
<ClrInstanceID> %10 </ClrInstanceID>
</MethodLoadUnloadVerbose_V1>
</UserData>
</template>
<template tid="MethodLoadUnloadVerbose_V2">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodLoadUnloadVerbose_V2 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
<ClrInstanceID> %10 </ClrInstanceID>
<ReJITID> %11 </ReJITID>
</MethodLoadUnloadVerbose_V2>
</UserData>
</template>
<template tid="MethodJittingStarted">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodILSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<UserData>
<MethodJittingStarted xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodToken> %3 </MethodToken>
<MethodILSize> %4 </MethodILSize>
<MethodNamespace> %5 </MethodNamespace>
<MethodName> %6 </MethodName>
<MethodSignature> %7 </MethodSignature>
</MethodJittingStarted>
</UserData>
</template>
<template tid="MethodJittingStarted_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodILSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJittingStarted_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodToken> %3 </MethodToken>
<MethodILSize> %4 </MethodILSize>
<MethodNamespace> %5 </MethodNamespace>
<MethodName> %6 </MethodName>
<MethodSignature> %7 </MethodSignature>
<ClrInstanceID> %8 </ClrInstanceID>
</MethodJittingStarted_V1>
</UserData>
</template>
<template tid="MethodJitInliningSucceeded">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="InlinerNamespace" inType="win:UnicodeString" />
<data name="InlinerName" inType="win:UnicodeString" />
<data name="InlinerNameSignature" inType="win:UnicodeString" />
<data name="InlineeNamespace" inType="win:UnicodeString" />
<data name="InlineeName" inType="win:UnicodeString" />
<data name="InlineeNameSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitInliningSucceeded xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<InlinerNamespace> %4 </InlinerNamespace>
<InlinerName> %5 </InlinerName>
<InlinerNameSignature> %6 </InlinerNameSignature>
<InlineeNamespace> %7 </InlineeNamespace>
<InlineeName> %8 </InlineeName>
<InlineeNameSignature> %9 </InlineeNameSignature>
<ClrInstanceID> %10 </ClrInstanceID>
</MethodJitInliningSucceeded>
</UserData>
</template>
<template tid="MethodJitInliningFailed">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="InlinerNamespace" inType="win:UnicodeString" />
<data name="InlinerName" inType="win:UnicodeString" />
<data name="InlinerNameSignature" inType="win:UnicodeString" />
<data name="InlineeNamespace" inType="win:UnicodeString" />
<data name="InlineeName" inType="win:UnicodeString" />
<data name="InlineeNameSignature" inType="win:UnicodeString" />
<data name="FailAlways" inType="win:Boolean" />
<data name="FailReason" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitInliningFailed xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<InlinerNamespace> %4 </InlinerNamespace>
<InlinerName> %5 </InlinerName>
<InlinerNameSignature> %6 </InlinerNameSignature>
<InlineeNamespace> %7 </InlineeNamespace>
<InlineeName> %8 </InlineeName>
<InlineeNameSignature> %9 </InlineeNameSignature>
<FailAlways> %10 </FailAlways>
<FailReason> %11 </FailReason>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitInliningFailed>
</UserData>
</template>
<template tid="MethodJitInliningFailedAnsi">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="InlinerNamespace" inType="win:UnicodeString" />
<data name="InlinerName" inType="win:UnicodeString" />
<data name="InlinerNameSignature" inType="win:UnicodeString" />
<data name="InlineeNamespace" inType="win:UnicodeString" />
<data name="InlineeName" inType="win:UnicodeString" />
<data name="InlineeNameSignature" inType="win:UnicodeString" />
<data name="FailAlways" inType="win:Boolean" />
<data name="FailReason" inType="win:AnsiString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitInliningFailedAnsi xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<InlinerNamespace> %4 </InlinerNamespace>
<InlinerName> %5 </InlinerName>
<InlinerNameSignature> %6 </InlinerNameSignature>
<InlineeNamespace> %7 </InlineeNamespace>
<InlineeName> %8 </InlineeName>
<InlineeNameSignature> %9 </InlineeNameSignature>
<FailAlways> %10 </FailAlways>
<FailReason> %11 </FailReason>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitInliningFailedAnsi>
</UserData>
</template>
<template tid="MethodJitTailCallSucceeded">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="CallerNamespace" inType="win:UnicodeString" />
<data name="CallerName" inType="win:UnicodeString" />
<data name="CallerNameSignature" inType="win:UnicodeString" />
<data name="CalleeNamespace" inType="win:UnicodeString" />
<data name="CalleeName" inType="win:UnicodeString" />
<data name="CalleeNameSignature" inType="win:UnicodeString" />
<data name="TailPrefix" inType="win:Boolean" />
<data name="TailCallType" inType="win:UInt32" map="TailCallTypeMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitTailCallSucceeded xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<CallerNamespace> %4 </CallerNamespace>
<CallerName> %5 </CallerName>
<CallerNameSignature> %6 </CallerNameSignature>
<CalleeNamespace> %7 </CalleeNamespace>
<CalleeName> %8 </CalleeName>
<CalleeNameSignature> %9 </CalleeNameSignature>
<TailPrefix> %10 </TailPrefix>
<TailCallType> %11 </TailCallType>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitTailCallSucceeded>
</UserData>
</template>
<template tid="MethodJitTailCallFailed">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="CallerNamespace" inType="win:UnicodeString" />
<data name="CallerName" inType="win:UnicodeString" />
<data name="CallerNameSignature" inType="win:UnicodeString" />
<data name="CalleeNamespace" inType="win:UnicodeString" />
<data name="CalleeName" inType="win:UnicodeString" />
<data name="CalleeNameSignature" inType="win:UnicodeString" />
<data name="TailPrefix" inType="win:Boolean" />
<data name="FailReason" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitTailCallFailed xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<CallerNamespace> %4 </CallerNamespace>
<CallerName> %5 </CallerName>
<CallerNameSignature> %6 </CallerNameSignature>
<CalleeNamespace> %7 </CalleeNamespace>
<CalleeName> %8 </CalleeName>
<CalleeNameSignature> %9 </CalleeNameSignature>
<TailPrefix> %10 </TailPrefix>
<FailReason> %11 </FailReason>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitTailCallFailed>
</UserData>
</template>
<template tid="MethodJitTailCallFailedAnsi">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="CallerNamespace" inType="win:UnicodeString" />
<data name="CallerName" inType="win:UnicodeString" />
<data name="CallerNameSignature" inType="win:UnicodeString" />
<data name="CalleeNamespace" inType="win:UnicodeString" />
<data name="CalleeName" inType="win:UnicodeString" />
<data name="CalleeNameSignature" inType="win:UnicodeString" />
<data name="TailPrefix" inType="win:Boolean" />
<data name="FailReason" inType="win:AnsiString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitTailCallFailedAnsi xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<CallerNamespace> %4 </CallerNamespace>
<CallerName> %5 </CallerName>
<CallerNameSignature> %6 </CallerNameSignature>
<CalleeNamespace> %7 </CalleeNamespace>
<CalleeName> %8 </CalleeName>
<CalleeNameSignature> %9 </CalleeNameSignature>
<TailPrefix> %10 </TailPrefix>
<FailReason> %11 </FailReason>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitTailCallFailedAnsi>
</UserData>
</template>
<template tid="MethodJitMemoryAllocatedForCode">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="JitHotCodeRequestSize" inType="win:UInt64" />
<data name="JitRODataRequestSize" inType="win:UInt64" />
<data name="AllocatedSizeForJitCode" inType="win:UInt64" />
<data name="JitAllocFlag" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitMemoryAllocatedForCode xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<JitHotCodeRequestSize> %3 </JitHotCodeRequestSize>
<JitRODataRequestSize> %4 </JitRODataRequestSize>
<AllocatedSizeForJitCode> %5 </AllocatedSizeForJitCode>
<JitAllocFlag> %6 </JitAllocFlag>
<ClrInstanceID> %7 </ClrInstanceID>
</MethodJitMemoryAllocatedForCode>
</UserData>
</template>
<template tid="MethodILToNativeMap">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodExtent" inType="win:UInt8" />
<data name="CountOfMapEntries" inType="win:UInt16" />
<data name="ILOffsets" count="CountOfMapEntries" inType="win:UInt32" />
<data name="NativeOffsets" count="CountOfMapEntries" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodILToNativeMap xmlns="myNs">
<MethodID> %1 </MethodID>
<ReJITID> %2 </ReJITID>
<MethodExtent> %3 </MethodExtent>
<CountOfMapEntries> %4 </CountOfMapEntries>
<ClrInstanceID> %5 </ClrInstanceID>
</MethodILToNativeMap>
</UserData>
</template>
<template tid="ClrStackWalk">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Reserved1" inType="win:UInt8" />
<data name="Reserved2" inType="win:UInt8" />
<data name="FrameCount" inType="win:UInt32" />
<data name="Stack" count="2" inType="win:Pointer" />
</template>
<template tid="AppDomainMemAllocated">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Allocated" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AppDomainMemAllocated xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<Allocated> %2 </Allocated>
<ClrInstanceID> %3 </ClrInstanceID>
</AppDomainMemAllocated>
</UserData>
</template>
<template tid="AppDomainMemSurvived">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Survived" inType="win:UInt64" outType="win:HexInt64" />
<data name="ProcessSurvived" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AppDomainMemSurvived xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<Survived> %2 </Survived>
<ProcessSurvived> %3 </ProcessSurvived>
<ClrInstanceID> %4 </ClrInstanceID>
</AppDomainMemSurvived>
</UserData>
</template>
<template tid="ThreadCreated">
<data name="ManagedThreadID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Flags" inType="win:UInt32" map="ThreadFlagsMap" />
<data name="ManagedThreadIndex" inType="win:UInt32" />
<data name="OSThreadID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadCreated xmlns="myNs">
<ManagedThreadID> %1 </ManagedThreadID>
<AppDomainID> %2 </AppDomainID>
<Flags> %3 </Flags>
<ManagedThreadIndex> %4 </ManagedThreadIndex>
<OSThreadID> %5 </OSThreadID>
<ClrInstanceID> %6 </ClrInstanceID>
</ThreadCreated>
</UserData>
</template>
<template tid="ThreadTerminatedOrTransition">
<data name="ManagedThreadID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadTerminatedOrTransition xmlns="myNs">
<ManagedThreadID> %1 </ManagedThreadID>
<AppDomainID> %2 </AppDomainID>
<ClrInstanceID> %3 </ClrInstanceID>
</ThreadTerminatedOrTransition>
</UserData>
</template>
<template tid="ILStubGenerated">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="StubMethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="StubFlags" inType="win:UInt32" map="ILStubGeneratedFlagsMap" />
<data name="ManagedInteropMethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="ManagedInteropMethodNamespace" inType="win:UnicodeString" />
<data name="ManagedInteropMethodName" inType="win:UnicodeString" />
<data name="ManagedInteropMethodSignature" inType="win:UnicodeString" />
<data name="NativeMethodSignature" inType="win:UnicodeString" />
<data name="StubMethodSignature" inType="win:UnicodeString" />
<data name="StubMethodILCode" inType="win:UnicodeString" />
<UserData>
<ILStubGenerated xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<StubMethodID> %3 </StubMethodID>
<StubFlags> %4 </StubFlags>
<ManagedInteropMethodToken> %5 </ManagedInteropMethodToken>
<ManagedInteropMethodNamespace> %6 </ManagedInteropMethodNamespace>
<ManagedInteropMethodName> %7 </ManagedInteropMethodName>
<ManagedInteropMethodSignature> %8 </ManagedInteropMethodSignature>
<NativeMethodSignature> %9 </NativeMethodSignature>
<StubMethodSignature> %10 </StubMethodSignature>
<StubMethodILCode> %11 </StubMethodILCode>
</ILStubGenerated>
</UserData>
</template>
<template tid="ILStubCacheHit">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="StubMethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ManagedInteropMethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="ManagedInteropMethodNamespace" inType="win:UnicodeString" />
<data name="ManagedInteropMethodName" inType="win:UnicodeString" />
<data name="ManagedInteropMethodSignature" inType="win:UnicodeString" />
<UserData>
<ILStubCacheHit xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<StubMethodID> %3 </StubMethodID>
<ManagedInteropMethodToken> %4 </ManagedInteropMethodToken>
<ManagedInteropMethodNamespace> %5 </ManagedInteropMethodNamespace>
<ManagedInteropMethodName> %6 </ManagedInteropMethodName>
<ManagedInteropMethodSignature> %7 </ManagedInteropMethodSignature>
</ILStubCacheHit>
</UserData>
</template>
<template tid="ModuleRange">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64"/>
<data name="RangeBegin" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeSize" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeType" map="ModuleRangeTypeMap" inType="win:UInt8"/>
<UserData>
<ModuleRange xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<RangeBegin> %3 </RangeBegin>
<RangeSize> %4 </RangeSize>
<RangeType> %5 </RangeType>
</ModuleRange>
</UserData>
</template>
<template tid="BulkType">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeNameID" inType="win:UInt32" />
<data name="Flags" inType="win:UInt32" map="TypeFlagsMap"/>
<data name="CorElementType" inType="win:UInt8" />
<data name="Name" inType="win:UnicodeString" />
<data name="TypeParameterCount" inType="win:UInt32" />
<data name="TypeParameters" count="TypeParameterCount" inType="win:UInt64" outType="win:HexInt64" />
</struct>
<UserData>
<Type xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</Type>
</UserData>
</template>
<template tid="GCBulkRootEdge">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="RootedNodeAddress" inType="win:Pointer" />
<data name="GCRootKind" inType="win:UInt8" map="GCRootKindMap" />
<data name="GCRootFlag" inType="win:UInt32" map="GCRootFlagsMap" />
<data name="GCRootID" inType="win:Pointer" />
</struct>
<UserData>
<GCBulkRootEdge xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkRootEdge>
</UserData>
</template>
<template tid="GCBulkRootCCW">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="GCRootID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="IUnknown" inType="win:UInt64" outType="win:HexInt64" />
<data name="RefCount" inType="win:UInt32"/>
<data name="PeggedRefCount" inType="win:UInt32"/>
<data name="Flags" inType="win:UInt32" map="GCRootCCWFlagsMap"/>
</struct>
<UserData>
<Type xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</Type>
</UserData>
</template>
<template tid="GCBulkRCW">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="ObjectID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="IUnknown" inType="win:UInt64" outType="win:HexInt64" />
<data name="VTable" inType="win:UInt64" outType="win:HexInt64" />
<data name="RefCount" inType="win:UInt32"/>
<data name="Flags" inType="win:UInt32"/>
</struct>
<UserData>
<Type xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</Type>
</UserData>
</template>
<template tid="GCBulkRootStaticVar">
<data name="Count" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="GCRootID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Flags" inType="win:UInt32" map="GCRootStaticVarFlagsMap" />
<data name="FieldName" inType="win:UnicodeString" />
</struct>
<UserData>
<Type xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</Type>
</UserData>
</template>
<template tid="GCBulkRootConditionalWeakTableElementEdge">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="GCKeyNodeID" inType="win:Pointer" />
<data name="GCValueNodeID" inType="win:Pointer" />
<data name="GCRootID" inType="win:Pointer" />
</struct>
<UserData>
<GCBulkRootConditionalWeakTableElementEdge xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkRootConditionalWeakTableElementEdge>
</UserData>
</template>
<template tid="GCBulkNode">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="Address" inType="win:Pointer" />
<data name="Size" inType="win:UInt64" />
<data name="TypeID" inType="win:UInt64" />
<data name="EdgeCount" inType="win:UInt64" />
</struct>
<UserData>
<GCBulkNode xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkNode>
</UserData>
</template>
<template tid="GCBulkEdge">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="Value" inType="win:Pointer" outType="win:HexInt64" />
<data name="ReferencingFieldID" inType="win:UInt32" />
</struct>
<UserData>
<GCBulkEdge xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkEdge>
</UserData>
</template>
<template tid="GCSampledObjectAllocation">
<data name="Address" inType="win:Pointer" />
<data name="TypeID" inType="win:Pointer" />
<data name="ObjectCountForTypeSample" inType="win:UInt32" />
<data name="TotalSizeForTypeSample" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCSampledObjectAllocation xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Address> %2 </Address>
<TypeID> %3 </TypeID>
<ObjectCountForTypeSample> %4 </ObjectCountForTypeSample>
<TotalSizeForTypeSample> %5 </TotalSizeForTypeSample>
</GCSampledObjectAllocation>
</UserData>
</template>
<template tid="GCBulkSurvivingObjectRanges">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="RangeBase" inType="win:Pointer" outType="win:HexInt64" />
<data name="RangeLength" inType="win:UInt64" />
</struct>
<UserData>
<GCBulkSurvivingObjectRanges xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkSurvivingObjectRanges>
</UserData>
</template>
<template tid="GCBulkMovedObjectRanges">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="OldRangeBase" inType="win:Pointer" outType="win:HexInt64" />
<data name="NewRangeBase" inType="win:Pointer" outType="win:HexInt64" />
<data name="RangeLength" inType="win:UInt64" />
</struct>
<UserData>
<GCBulkMovedObjectRanges xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkMovedObjectRanges>
</UserData>
</template>
<template tid="GCGenerationRange">
<data name="Generation" inType="win:UInt8" />
<data name="RangeStart" inType="win:Pointer" outType="win:HexInt64" />
<data name="RangeUsedLength" inType="win:UInt64" />
<data name="RangeReservedLength" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCGenerationRange xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Generation> %2 </Generation>
<RangeStart> %3 </RangeStart>
<RangeUsedLength> %4 </RangeUsedLength>
<RangeReservedLength> %5 </RangeReservedLength>
</GCGenerationRange>
</UserData>
</template>
<template tid="CodeSymbols">
<data name="ModuleId" inType="win:UInt64" />
<data name="TotalChunks" inType="win:UInt16" />
<data name="ChunkNumber" inType="win:UInt16" />
<data name="ChunkLength" inType="win:UInt32" />
<data name="Chunk" inType="win:Binary" length="ChunkLength"/>
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<CodeSymbols xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleId> %2 </ModuleId>
<TotalChunks> %3 </TotalChunks>
<ChunkNumber> %4 </ChunkNumber>
<ChunkLength> %5 </ChunkLength>
<Chunk> %6 </Chunk>
</CodeSymbols>
</UserData>
</template>
<template tid="TieredCompilationEmpty">
<data name="ClrInstanceID" inType="win:UInt16"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</Settings>
</UserData>
</template>
<template tid="TieredCompilationSettings">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="Flags" inType="win:UInt32" outType="win:HexInt32" map="TieredCompilationSettingsFlagsMap"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Flags> %2 </Flags>
</Settings>
</UserData>
</template>
<template tid="TieredCompilationResume">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="NewMethodCount" inType="win:UInt32"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<NewMethodCount> %2 </NewMethodCount>
</Settings>
</UserData>
</template>
<template tid="TieredCompilationBackgroundJitStart">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="PendingMethodCount" inType="win:UInt32"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<PendingMethodCount> %2 </PendingMethodCount>
</Settings>
</UserData>
</template>
<template tid="TieredCompilationBackgroundJitStop">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="PendingMethodCount" inType="win:UInt32"/>
<data name="JittedMethodCount" inType="win:UInt32"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<PendingMethodCount> %2 </PendingMethodCount>
<JittedMethodCount> %2 </JittedMethodCount>
</Settings>
</UserData>
</template>
<template tid="JitInstrumentationData">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="MethodFlags" inType="win:UInt32" />
<data name="DataSize" inType="win:UInt32" />
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Data" inType="win:Binary" length="DataSize" />
<UserData>
<Settings xmlns="myNs">
<MethodID> %4 </MethodID>
</Settings>
</UserData>
</template>
<template tid="JitInstrumentationDataVerbose">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="MethodFlags" inType="win:UInt32" />
<data name="DataSize" inType="win:UInt32" />
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="Data" inType="win:Binary" length="DataSize" />
<UserData>
<Settings xmlns="myNs">
<MethodID> %4 </MethodID>
<ModuleID> %5 </ModuleID>
<MethodToken> %6 </MethodToken>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
</Settings>
</UserData>
</template>
<template tid="ExecutionCheckpoint">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Name" inType="win:UnicodeString" />
<data name="Timestamp" inType="win:Int64" />
<UserData>
<ExecutionCheckpoint xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Name> %2 </Name>
<Timestamp> %3 </Timestamp>
</ExecutionCheckpoint>
</UserData>
</template>
<template tid="ProfilerMessage">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="Message" inType="win:UnicodeString" />
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Message> %2 </Message>
</Settings>
</UserData>
</template>
<template tid="YieldProcessorMeasurement">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="NsPerYield" inType="win:Double"/>
<data name="EstablishedNsPerYield" inType="win:Double"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<NsPerYield> %2 </NsPerYield>
<EstablishedNsPerYield> %3 </EstablishedNsPerYield>
</Settings>
</UserData>
</template>
</templates>
<events>
<!-- CLR GC events, value reserved from 0 to 39 and 200 to 239 -->
<!-- Note the opcode's for GC events do include 0 to 9 for backward compatibility, even though
they don't mean what those predefined opcodes are supposed to mean -->
<event value="1" version="0" level="win:Informational" template="GCStart"
keywords="GCKeyword" opcode="win:Start"
task="GarbageCollection"
symbol="GCStart" message="$(string.RuntimePublisher.GCStartEventMessage)"/>
<event value="1" version="1" level="win:Informational" template="GCStart_V1"
keywords="GCKeyword" opcode="win:Start"
task="GarbageCollection"
symbol="GCStart_V1" message="$(string.RuntimePublisher.GCStart_V1EventMessage)"/>
<event value="1" version="2" level="win:Informational" template="GCStart_V2"
keywords="GCKeyword" opcode="win:Start"
task="GarbageCollection"
symbol="GCStart_V2" message="$(string.RuntimePublisher.GCStart_V2EventMessage)"/>
<event value="2" version="0" level="win:Informational" template="GCEnd"
keywords="GCKeyword" opcode="win:Stop"
task="GarbageCollection"
symbol="GCEnd" message="$(string.RuntimePublisher.GCEndEventMessage)"/>
<event value="2" version="1" level="win:Informational" template="GCEnd_V1"
keywords ="GCKeyword" opcode="win:Stop"
task="GarbageCollection"
symbol="GCEnd_V1" message="$(string.RuntimePublisher.GCEnd_V1EventMessage)"/>
<event value="3" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCRestartEEEnd"
task="GarbageCollection"
symbol="GCRestartEEEnd" message="$(string.RuntimePublisher.GCRestartEEEndEventMessage)"/>
<event value="3" version="1" level="win:Informational" template="GCNoUserData"
keywords ="GCKeyword" opcode="GCRestartEEEnd"
task="GarbageCollection"
symbol="GCRestartEEEnd_V1" message="$(string.RuntimePublisher.GCRestartEEEnd_V1EventMessage)"/>
<event value="4" version="0" level="win:Informational" template="GCHeapStats"
keywords ="GCKeyword" opcode="GCHeapStats"
task="GarbageCollection"
symbol="GCHeapStats" message="$(string.RuntimePublisher.GCHeapStatsEventMessage)"/>
<event value="4" version="1" level="win:Informational" template="GCHeapStats_V1"
keywords ="GCKeyword" opcode="GCHeapStats"
task="GarbageCollection"
symbol="GCHeapStats_V1" message="$(string.RuntimePublisher.GCHeapStats_V1EventMessage)"/>
<event value="4" version="2" level="win:Informational" template="GCHeapStats_V2"
keywords ="GCKeyword" opcode="GCHeapStats"
task="GarbageCollection"
symbol="GCHeapStats_V2" message="$(string.RuntimePublisher.GCHeapStats_V2EventMessage)"/>
<event value="5" version="0" level="win:Informational" template="GCCreateSegment"
keywords ="GCKeyword" opcode="GCCreateSegment"
task="GarbageCollection"
symbol="GCCreateSegment" message="$(string.RuntimePublisher.GCCreateSegmentEventMessage)"/>
<event value="5" version="1" level="win:Informational" template="GCCreateSegment_V1"
keywords ="GCKeyword" opcode="GCCreateSegment"
task="GarbageCollection"
symbol="GCCreateSegment_V1" message="$(string.RuntimePublisher.GCCreateSegment_V1EventMessage)"/>
<event value="6" version="0" level="win:Informational" template="GCFreeSegment"
keywords ="GCKeyword" opcode="GCFreeSegment"
task="GarbageCollection"
symbol="GCFreeSegment" message="$(string.RuntimePublisher.GCFreeSegmentEventMessage)"/>
<event value="6" version="1" level="win:Informational" template="GCFreeSegment_V1"
keywords ="GCKeyword" opcode="GCFreeSegment"
task="GarbageCollection"
symbol="GCFreeSegment_V1" message="$(string.RuntimePublisher.GCFreeSegment_V1EventMessage)"/>
<event value="7" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCRestartEEBegin"
task="GarbageCollection"
symbol="GCRestartEEBegin" message="$(string.RuntimePublisher.GCRestartEEBeginEventMessage)"/>
<event value="7" version="1" level="win:Informational" template="GCNoUserData"
keywords ="GCKeyword" opcode="GCRestartEEBegin"
task="GarbageCollection"
symbol="GCRestartEEBegin_V1" message="$(string.RuntimePublisher.GCRestartEEBegin_V1EventMessage)"/>
<event value="8" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCSuspendEEEnd"
task="GarbageCollection"
symbol="GCSuspendEEEnd" message="$(string.RuntimePublisher.GCSuspendEEEndEventMessage)"/>
<event value="8" version="1" level="win:Informational" template="GCNoUserData"
keywords ="GCKeyword" opcode="GCSuspendEEEnd"
task="GarbageCollection"
symbol="GCSuspendEEEnd_V1" message="$(string.RuntimePublisher.GCSuspendEEEnd_V1EventMessage)"/>
<event value="9" version="0" level="win:Informational" template="GCSuspendEE"
keywords ="GCKeyword" opcode="GCSuspendEEBegin"
task="GarbageCollection"
symbol="GCSuspendEEBegin" message="$(string.RuntimePublisher.GCSuspendEEEventMessage)"/>
<event value="9" version="1" level="win:Informational" template="GCSuspendEE_V1"
keywords ="GCKeyword" opcode="GCSuspendEEBegin"
task="GarbageCollection"
symbol="GCSuspendEEBegin_V1" message="$(string.RuntimePublisher.GCSuspendEE_V1EventMessage)"/>
<event value="10" version="0" level="win:Verbose" template="GCAllocationTick"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick" message="$(string.RuntimePublisher.GCAllocationTickEventMessage)"/>
<event value="10" version="1" level="win:Verbose" template="GCAllocationTick_V1"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick_V1" message="$(string.RuntimePublisher.GCAllocationTick_V1EventMessage)"/>
<event value="10" version="2" level="win:Verbose" template="GCAllocationTick_V2"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick_V2" message="$(string.RuntimePublisher.GCAllocationTick_V2EventMessage)"/>
<event value="10" version="3" level="win:Verbose" template="GCAllocationTick_V3"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick_V3" message="$(string.RuntimePublisher.GCAllocationTick_V3EventMessage)"/>
<event value="10" version="4" level="win:Verbose" template="GCAllocationTick_V4"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick_V4" message="$(string.RuntimePublisher.GCAllocationTick_V4EventMessage)"/>
<event value="11" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCCreateConcurrentThread"
task="GarbageCollection"
symbol="GCCreateConcurrentThread" message="$(string.RuntimePublisher.GCCreateConcurrentThreadEventMessage)"/>
<event value="11" version="1" level="win:Informational" template="GCCreateConcurrentThread"
keywords ="GCKeyword ThreadingKeyword" opcode="GCCreateConcurrentThread"
task="GarbageCollection"
symbol="GCCreateConcurrentThread_V1" message="$(string.RuntimePublisher.GCCreateConcurrentThread_V1EventMessage)"/>
<event value="12" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCTerminateConcurrentThread"
task="GarbageCollection"
symbol="GCTerminateConcurrentThread" message="$(string.RuntimePublisher.GCTerminateConcurrentThreadEventMessage)"/>
<event value="12" version="1" level="win:Informational" template="GCTerminateConcurrentThread"
keywords ="GCKeyword ThreadingKeyword" opcode="GCTerminateConcurrentThread"
task="GarbageCollection"
symbol="GCTerminateConcurrentThread_V1" message="$(string.RuntimePublisher.GCTerminateConcurrentThread_V1EventMessage)"/>
<event value="13" version="0" level="win:Informational" template="GCFinalizersEnd"
keywords ="GCKeyword" opcode="GCFinalizersEnd"
task="GarbageCollection"
symbol="GCFinalizersEnd" message="$(string.RuntimePublisher.GCFinalizersEndEventMessage)"/>
<event value="13" version="1" level="win:Informational" template="GCFinalizersEnd_V1"
keywords ="GCKeyword" opcode="GCFinalizersEnd"
task="GarbageCollection"
symbol="GCFinalizersEnd_V1" message="$(string.RuntimePublisher.GCFinalizersEnd_V1EventMessage)"/>
<event value="14" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCFinalizersBegin"
task="GarbageCollection"
symbol="GCFinalizersBegin" message="$(string.RuntimePublisher.GCFinalizersBeginEventMessage)"/>
<event value="14" version="1" level="win:Informational" template="GCNoUserData"
keywords ="GCKeyword" opcode="GCFinalizersBegin"
task="GarbageCollection"
symbol="GCFinalizersBegin_V1" message="$(string.RuntimePublisher.GCFinalizersBegin_V1EventMessage)"/>
<event value="15" version="0" level="win:Informational" template="BulkType"
keywords ="TypeKeyword" opcode="BulkType"
task="Type"
symbol="BulkType" message="$(string.RuntimePublisher.BulkTypeEventMessage)"/>
<event value="16" version="0" level="win:Informational" template="GCBulkRootEdge"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRootEdge"
task="GarbageCollection"
symbol="GCBulkRootEdge" message="$(string.RuntimePublisher.GCBulkRootEdgeEventMessage)"/>
<event value="17" version="0" level="win:Informational" template="GCBulkRootConditionalWeakTableElementEdge"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRootConditionalWeakTableElementEdge"
task="GarbageCollection"
symbol="GCBulkRootConditionalWeakTableElementEdge" message="$(string.RuntimePublisher.GCBulkRootConditionalWeakTableElementEdgeEventMessage)"/>
<event value="18" version="0" level="win:Informational" template="GCBulkNode"
keywords ="GCHeapDumpKeyword" opcode="GCBulkNode"
task="GarbageCollection"
symbol="GCBulkNode" message="$(string.RuntimePublisher.GCBulkNodeEventMessage)"/>
<event value="19" version="0" level="win:Informational" template="GCBulkEdge"
keywords ="GCHeapDumpKeyword" opcode="GCBulkEdge"
task="GarbageCollection"
symbol="GCBulkEdge" message="$(string.RuntimePublisher.GCBulkEdgeEventMessage)"/>
<event value="20" version="0" level="win:Informational" template="GCSampledObjectAllocation"
keywords ="GCSampledObjectAllocationHighKeyword" opcode="GCSampledObjectAllocation"
task="GarbageCollection"
symbol="GCSampledObjectAllocationHigh" message="$(string.RuntimePublisher.GCSampledObjectAllocationHighEventMessage)"/>
<event value="21" version="0" level="win:Informational" template="GCBulkSurvivingObjectRanges"
keywords ="GCHeapSurvivalAndMovementKeyword" opcode="GCBulkSurvivingObjectRanges"
task="GarbageCollection"
symbol="GCBulkSurvivingObjectRanges" message="$(string.RuntimePublisher.GCBulkSurvivingObjectRangesEventMessage)"/>
<event value="22" version="0" level="win:Informational" template="GCBulkMovedObjectRanges"
keywords ="GCHeapSurvivalAndMovementKeyword" opcode="GCBulkMovedObjectRanges"
task="GarbageCollection"
symbol="GCBulkMovedObjectRanges" message="$(string.RuntimePublisher.GCBulkMovedObjectRangesEventMessage)"/>
<event value="23" version="0" level="win:Informational" template="GCGenerationRange"
keywords ="GCHeapSurvivalAndMovementKeyword" opcode="GCGenerationRange"
task="GarbageCollection"
symbol="GCGenerationRange" message="$(string.RuntimePublisher.GCGenerationRangeEventMessage)"/>
<event value="25" version="0" level="win:Informational" template="GCMark"
keywords ="GCKeyword" opcode="GCMarkStackRoots"
task="GarbageCollection"
symbol="GCMarkStackRoots" message="$(string.RuntimePublisher.GCMarkStackRootsEventMessage)"/>
<event value="26" version="0" level="win:Informational" template="GCMark"
keywords ="GCKeyword" opcode="GCMarkFinalizeQueueRoots"
task="GarbageCollection"
symbol="GCMarkFinalizeQueueRoots" message="$(string.RuntimePublisher.GCMarkFinalizeQueueRootsEventMessage)"/>
<event value="27" version="0" level="win:Informational" template="GCMark"
keywords ="GCKeyword" opcode="GCMarkHandles"
task="GarbageCollection"
symbol="GCMarkHandles" message="$(string.RuntimePublisher.GCMarkHandlesEventMessage)"/>
<event value="28" version="0" level="win:Informational" template="GCMark"
keywords ="GCKeyword" opcode="GCMarkOlderGenerationRoots"
task="GarbageCollection"
symbol="GCMarkOlderGenerationRoots" message="$(string.RuntimePublisher.GCMarkOlderGenerationRootsEventMessage)"/>
<event value="29" version="0" level="win:Verbose" template="FinalizeObject"
keywords ="GCKeyword"
opcode="FinalizeObject"
task="GarbageCollection"
symbol="FinalizeObject" message="$(string.RuntimePublisher.FinalizeObjectEventMessage)"/>
<event value="30" version="0" level="win:Informational" template="SetGCHandle"
keywords="GCHandleKeyword"
opcode="SetGCHandle"
task="GarbageCollection"
symbol="SetGCHandle" message="$(string.RuntimePublisher.SetGCHandleEventMessage)"/>
<event value="31" version="0" level="win:Informational" template="DestroyGCHandle"
keywords="GCHandleKeyword"
opcode="DestroyGCHandle"
task="GarbageCollection"
symbol="DestroyGCHandle" message="$(string.RuntimePublisher.DestroyGCHandleEventMessage)"/>
<event value="32" version="0" level="win:Informational" template="GCSampledObjectAllocation"
keywords ="GCSampledObjectAllocationLowKeyword" opcode="GCSampledObjectAllocation"
task="GarbageCollection"
symbol="GCSampledObjectAllocationLow" message="$(string.RuntimePublisher.GCSampledObjectAllocationLowEventMessage)"/>
<event value="33" version="0" level="win:Verbose" template="PinObjectAtGCTime"
keywords="GCKeyword"
opcode="PinObjectAtGCTime"
task="GarbageCollection"
symbol="PinObjectAtGCTime" message="$(string.RuntimePublisher.PinObjectAtGCTimeEventMessage)"/>
<event value="35" version="0" level="win:Informational" template="GCTriggered"
keywords="GCKeyword" opcode="Triggered"
task="GarbageCollection"
symbol="GCTriggered" message="$(string.RuntimePublisher.GCTriggeredEventMessage)"/>
<event value="36" version="0" level="win:Informational" template="GCBulkRootCCW"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRootCCW"
task="GarbageCollection"
symbol="GCBulkRootCCW" message="$(string.RuntimePublisher.GCBulkRootCCWEventMessage)"/>
<event value="37" version="0" level="win:Informational" template="GCBulkRCW"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRCW"
task="GarbageCollection"
symbol="GCBulkRCW" message="$(string.RuntimePublisher.GCBulkRCWEventMessage)"/>
<event value="38" version="0" level="win:Informational" template="GCBulkRootStaticVar"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRootStaticVar"
task="GarbageCollection"
symbol="GCBulkRootStaticVar" message="$(string.RuntimePublisher.GCBulkRootStaticVarEventMessage)"/>
<event value="39" version="0" level="win:LogAlways" template="GCDynamicEvent"
keywords= "GCKeyword GCHandleKeyword GCHeapDumpKeyword GCSampledObjectAllocationHighKeyword GCHeapSurvivalAndMovementKeyword GCHeapCollectKeyword GCHeapAndTypeNamesKeyword GCSampledObjectAllocationLowKeyword"
opcode="GCDynamicEvent"
task="GarbageCollection"
symbol="GCDynamicEvent"/>
<!-- CLR Threading events, value reserved from 40 to 79 -->
<event value="40" version="0" level="win:Informational" template="ClrWorkerThread"
keywords="ThreadingKeyword" opcode="win:Start"
task="WorkerThreadCreation"
symbol="WorkerThreadCreate" message="$(string.RuntimePublisher.WorkerThreadCreateEventMessage)"/>
<event value="41" version="0" level="win:Informational" template="ClrWorkerThread"
keywords="ThreadingKeyword" opcode="win:Stop"
task="WorkerThreadCreation"
symbol="WorkerThreadTerminate" message="$(string.RuntimePublisher.WorkerThreadTerminateEventMessage)"/>
<event value="42" version="0" level="win:Informational" template="ClrWorkerThread"
keywords="ThreadingKeyword" opcode="win:Start"
task="WorkerThreadRetirement"
symbol="WorkerThreadRetire" message="$(string.RuntimePublisher.WorkerThreadRetirementRetireThreadEventMessage)"/>
<event value="43" version="0" level="win:Informational" template="ClrWorkerThread"
keywords="ThreadingKeyword" opcode="win:Stop"
task="WorkerThreadRetirement"
symbol="WorkerThreadUnretire" message="$(string.RuntimePublisher.WorkerThreadRetirementUnretireThreadEventMessage)"/>
<event value="44" version="0" level="win:Informational" template="IOThread"
keywords="ThreadingKeyword" opcode="win:Start"
task="IOThreadCreation"
symbol="IOThreadCreate" message="$(string.RuntimePublisher.IOThreadCreateEventMessage)"/>
<event value="44" version="1" level="win:Informational" template="IOThread_V1"
keywords="ThreadingKeyword" opcode="win:Start"
task="IOThreadCreation"
symbol="IOThreadCreate_V1" message="$(string.RuntimePublisher.IOThreadCreate_V1EventMessage)"/>
<event value="45" version="0" level="win:Informational" template="IOThread"
keywords="ThreadingKeyword" opcode="win:Stop"
task="IOThreadCreation"
symbol="IOThreadTerminate" message="$(string.RuntimePublisher.IOThreadTerminateEventMessage)"/>
<event value="45" version="1" level="win:Informational" template="IOThread_V1"
keywords="ThreadingKeyword" opcode="win:Stop"
task="IOThreadCreation"
symbol="IOThreadTerminate_V1" message="$(string.RuntimePublisher.IOThreadTerminate_V1EventMessage)"/>
<event value="46" version="0" level="win:Informational" template="IOThread"
keywords="ThreadingKeyword" opcode="win:Start"
task="IOThreadRetirement"
symbol="IOThreadRetire" message="$(string.RuntimePublisher.IOThreadRetirementRetireThreadEventMessage)"/>
<event value="46" version="1" level="win:Informational" template="IOThread_V1"
keywords="ThreadingKeyword" opcode="win:Start"
task="IOThreadRetirement"
symbol="IOThreadRetire_V1" message="$(string.RuntimePublisher.IOThreadRetirementRetireThread_V1EventMessage)"/>
<event value="47" version="0" level="win:Informational" template="IOThread"
keywords="ThreadingKeyword" opcode="win:Stop"
task="IOThreadRetirement"
symbol="IOThreadUnretire" message="$(string.RuntimePublisher.IOThreadRetirementUnretireThreadEventMessage)"/>
<event value="47" version="1" level="win:Informational" template="IOThread_V1"
keywords="ThreadingKeyword" opcode="win:Stop"
task="IOThreadRetirement"
symbol="IOThreadUnretire_V1" message="$(string.RuntimePublisher.IOThreadRetirementUnretireThread_V1EventMessage)"/>
<event value="48" version="0" level="win:Informational" template="ClrThreadPoolSuspend"
keywords ="ThreadingKeyword" opcode="win:Start"
task="ThreadpoolSuspension"
symbol="ThreadpoolSuspensionSuspendThread" message="$(string.RuntimePublisher.ThreadPoolSuspendSuspendThreadEventMessage)"/>
<event value="49" version="0" level="win:Informational" template="ClrThreadPoolSuspend"
keywords ="ThreadingKeyword" opcode="win:Stop"
task="ThreadpoolSuspension"
symbol="ThreadpoolSuspensionResumeThread" message="$(string.RuntimePublisher.ThreadPoolSuspendResumeThreadEventMessage)"/>
<event value="50" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="win:Start"
task="ThreadPoolWorkerThread"
symbol="ThreadPoolWorkerThreadStart" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="51" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="win:Stop"
task="ThreadPoolWorkerThread"
symbol="ThreadPoolWorkerThreadStop" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="52" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="win:Start"
task="ThreadPoolWorkerThreadRetirement"
symbol="ThreadPoolWorkerThreadRetirementStart" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="53" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="win:Stop"
task="ThreadPoolWorkerThreadRetirement"
symbol="ThreadPoolWorkerThreadRetirementStop" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="54" version="0" level="win:Informational" template="ThreadPoolWorkerThreadAdjustmentSample"
keywords ="ThreadingKeyword" opcode="Sample"
task="ThreadPoolWorkerThreadAdjustment"
symbol="ThreadPoolWorkerThreadAdjustmentSample" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadAdjustmentSampleEventMessage)"/>
<event value="55" version="0" level="win:Informational" template="ThreadPoolWorkerThreadAdjustmentAdjustment"
keywords ="ThreadingKeyword" opcode="Adjustment"
task="ThreadPoolWorkerThreadAdjustment"
symbol="ThreadPoolWorkerThreadAdjustmentAdjustment" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadAdjustmentAdjustmentEventMessage)"/>
<event value="56" version="0" level="win:Verbose" template="ThreadPoolWorkerThreadAdjustmentStats"
keywords ="ThreadingKeyword" opcode="Stats"
task="ThreadPoolWorkerThreadAdjustment"
symbol="ThreadPoolWorkerThreadAdjustmentStats" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadAdjustmentStatsEventMessage)"/>
<event value="57" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="Wait"
task="ThreadPoolWorkerThread"
symbol="ThreadPoolWorkerThreadWait" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="58" version="0" level="win:Informational" template="YieldProcessorMeasurement"
keywords="ThreadingKeyword" task="YieldProcessorMeasurement" opcode="win:Info"
symbol="YieldProcessorMeasurement" message="$(string.RuntimePublisher.YieldProcessorMeasurementEventMessage)"/>
<!-- CLR private ThreadPool events -->
<event value="60" version="0" level="win:Verbose" template="ThreadPoolWorkingThreadCount"
keywords="ThreadingKeyword"
opcode="win:Start"
task="ThreadPoolWorkingThreadCount"
symbol="ThreadPoolWorkingThreadCount" message="$(string.RuntimePublisher.ThreadPoolWorkingThreadCountEventMessage)"/>
<event value="61" version="0" level="win:Verbose" template="ThreadPoolWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="ThreadPool"
opcode="Enqueue"
symbol="ThreadPoolEnqueue"
message="$(string.RuntimePublisher.ThreadPoolEnqueueEventMessage)"/>
<event value="62" version="0" level="win:Verbose" template="ThreadPoolWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="ThreadPool"
opcode="Dequeue"
symbol="ThreadPoolDequeue"
message="$(string.RuntimePublisher.ThreadPoolDequeueEventMessage)"/>
<event value="63" version="0" level="win:Verbose" template="ThreadPoolIOWorkEnqueue"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="ThreadPool"
opcode="IOEnqueue"
symbol="ThreadPoolIOEnqueue"
message="$(string.RuntimePublisher.ThreadPoolIOEnqueueEventMessage)"/>
<event value="64" version="0" level="win:Verbose" template="ThreadPoolIOWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="ThreadPool"
opcode="IODequeue"
symbol="ThreadPoolIODequeue"
message="$(string.RuntimePublisher.ThreadPoolIODequeueEventMessage)"/>
<event value="65" version="0" level="win:Verbose" template="ThreadPoolIOWork"
keywords="ThreadingKeyword"
task="ThreadPool"
opcode="IOPack"
symbol="ThreadPoolIOPack"
message="$(string.RuntimePublisher.ThreadPoolIOPackEventMessage)"/>
<event value="70" version="0" level="win:Informational" template="ThreadStartWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="Thread"
opcode="Creating"
symbol="ThreadCreating"
message="$(string.RuntimePublisher.ThreadCreatingEventMessage)"/>
<event value="71" version="0" level="win:Informational" template="ThreadStartWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="Thread"
opcode="Running"
symbol="ThreadRunning"
message="$(string.RuntimePublisher.ThreadRunningEventMessage)"/>
<event value="72" version="0" level="win:Informational" template="MethodDetails"
keywords="MethodDiagnosticKeyword"
task="CLRMethod"
opcode="MethodDetails"
symbol="MethodDetails"
message="$(string.RuntimePublisher.MethodDetailsEventMessage)"/>
<event value="73" version="0" level="win:Informational" template="TypeLoadStart"
keywords="TypeDiagnosticKeyword"
task="TypeLoad"
opcode="win:Start"
symbol="TypeLoadStart"
message="$(string.RuntimePublisher.TypeLoadStartEventMessage)"/>
<event value="74" version="0" level="win:Informational" template="TypeLoadStop"
keywords="TypeDiagnosticKeyword"
task="TypeLoad"
opcode="win:Stop"
symbol="TypeLoadStop"
message="$(string.RuntimePublisher.TypeLoadStopEventMessage)"/>
<!-- CLR Exception events -->
<event value="80" version="0" level="win:Informational"
opcode="win:Start"
task="Exception"
symbol="ExceptionThrown" message="$(string.RuntimePublisher.ExceptionExceptionThrownEventMessage)"/>
<event value="80" version="1" level="win:Error" template="Exception"
keywords ="ExceptionKeyword MonitoringKeyword" opcode="win:Start"
task="Exception"
symbol="ExceptionThrown_V1" message="$(string.RuntimePublisher.ExceptionExceptionThrown_V1EventMessage)"/>
<event value="250" version="0" level="win:Informational" template="ExceptionHandling"
keywords ="ExceptionKeyword" opcode="win:Start"
task="ExceptionCatch"
symbol="ExceptionCatchStart" message="$(string.RuntimePublisher.ExceptionExceptionHandlingEventMessage)"/>
<event value="251" version="0" level="win:Informational"
keywords ="ExceptionKeyword" opcode="win:Stop"
task="ExceptionCatch"
symbol="ExceptionCatchStop" message="$(string.RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage)"/>
<event value="252" version="0" level="win:Informational" template="ExceptionHandling"
keywords ="ExceptionKeyword" opcode="win:Start"
task="ExceptionFinally"
symbol="ExceptionFinallyStart" message="$(string.RuntimePublisher.ExceptionExceptionHandlingEventMessage)"/>
<event value="253" version="0" level="win:Informational"
keywords ="ExceptionKeyword" opcode="win:Stop"
task="ExceptionFinally"
symbol="ExceptionFinallyStop" message="$(string.RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage)"/>
<event value="254" version="0" level="win:Informational" template="ExceptionHandling"
keywords ="ExceptionKeyword" opcode="win:Start"
task="ExceptionFilter"
symbol="ExceptionFilterStart" message="$(string.RuntimePublisher.ExceptionExceptionHandlingEventMessage)"/>
<event value="255" version="0" level="win:Informational"
keywords ="ExceptionKeyword" opcode="win:Stop"
task="ExceptionFilter"
symbol="ExceptionFilterStop" message="$(string.RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage)"/>
<event value="256" version="0" level="win:Informational"
keywords ="ExceptionKeyword" opcode="win:Stop"
task="Exception"
symbol="ExceptionThrownStop" message="$(string.RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage)"/>
<!-- CLR Contention events -->
<event value="81" version="0" level="win:Informational"
opcode="win:Start"
task="Contention"
symbol="Contention" message="$(string.RuntimePublisher.ContentionStartEventMessage)"/>
<event value="81" version="1" level="win:Informational" template="Contention"
keywords ="ContentionKeyword" opcode="win:Start"
task="Contention"
symbol="ContentionStart_V1" message="$(string.RuntimePublisher.ContentionStart_V1EventMessage)"/>
<event value="91" version="0" level="win:Informational" template="Contention"
keywords ="ContentionKeyword" opcode="win:Stop"
task="Contention"
symbol="ContentionStop" message="$(string.RuntimePublisher.ContentionStopEventMessage)"/>
<event value="91" version="1" level="win:Informational" template="ContentionStop_V1"
keywords ="ContentionKeyword" opcode="win:Stop"
task="Contention"
symbol="ContentionStop_V1" message="$(string.RuntimePublisher.ContentionStop_V1EventMessage)"/>
<!-- CLR Stack events -->
<event value="82" version="0" level="win:LogAlways" template="ClrStackWalk"
keywords ="StackKeyword" opcode="CLRStackWalk"
task="CLRStack"
symbol="CLRStackWalk" message="$(string.RuntimePublisher.StackEventMessage)"/>
<!-- CLR AppDomainResourceManagement events -->
<event value="83" version="0" level="win:Informational" template="AppDomainMemAllocated"
keywords ="AppDomainResourceManagementKeyword" opcode="AppDomainMemAllocated"
task="AppDomainResourceManagement"
symbol="AppDomainMemAllocated" message="$(string.RuntimePublisher.AppDomainMemAllocatedEventMessage)"/>
<event value="84" version="0" level="win:Informational" template="AppDomainMemSurvived"
keywords ="AppDomainResourceManagementKeyword" opcode="AppDomainMemSurvived"
task="AppDomainResourceManagement"
symbol="AppDomainMemSurvived" message="$(string.RuntimePublisher.AppDomainMemSurvivedEventMessage)"/>
<event value="85" version="0" level="win:Informational" template="ThreadCreated"
keywords ="AppDomainResourceManagementKeyword ThreadingKeyword" opcode="ThreadCreated"
task="AppDomainResourceManagement"
symbol="ThreadCreated" message="$(string.RuntimePublisher.ThreadCreatedEventMessage)"/>
<event value="86" version="0" level="win:Informational" template="ThreadTerminatedOrTransition"
keywords ="AppDomainResourceManagementKeyword ThreadingKeyword" opcode="ThreadTerminated"
task="AppDomainResourceManagement"
symbol="ThreadTerminated" message="$(string.RuntimePublisher.ThreadTerminatedEventMessage)"/>
<event value="87" version="0" level="win:Informational" template="ThreadTerminatedOrTransition"
keywords ="AppDomainResourceManagementKeyword ThreadingKeyword" opcode="ThreadDomainEnter"
task="AppDomainResourceManagement"
symbol="ThreadDomainEnter" message="$(string.RuntimePublisher.ThreadDomainEnterEventMessage)"/>
<!-- CLR Interop events -->
<event value="88" version="0" level="win:Informational" template="ILStubGenerated"
keywords ="InteropKeyword" opcode="ILStubGenerated"
task="CLRILStub"
symbol="ILStubGenerated" message="$(string.RuntimePublisher.ILStubGeneratedEventMessage)"/>
<event value="89" version="0" level="win:Informational" template="ILStubCacheHit"
keywords ="InteropKeyword" opcode="ILStubCacheHit"
task="CLRILStub"
symbol="ILStubCacheHit" message="$(string.RuntimePublisher.ILStubCacheHitEventMessage)"/>
<!-- CLR Method events -->
<!-- The following 6 events are now defunct -->
<event value="135" version="0" level="win:Informational"
keywords ="JitKeyword NGenKeyword" opcode="DCStartComplete"
task="CLRMethod"
symbol="DCStartCompleteV2" message="$(string.RuntimePublisher.DCStartCompleteEventMessage)"/>
<event value="136" version="0" level="win:Informational"
keywords ="JitKeyword NGenKeyword" opcode="DCEndComplete"
task="CLRMethod"
symbol="DCEndCompleteV2" message="$(string.RuntimePublisher.DCEndCompleteEventMessage)"/>
<event value="137" version="0" level="win:Informational" template="MethodLoadUnload"
keywords ="JitKeyword NGenKeyword" opcode="MethodDCStart"
task="CLRMethod"
symbol="MethodDCStartV2" message="$(string.RuntimePublisher.MethodDCStartEventMessage)"/>
<event value="138" version="0" level="win:Informational" template="MethodLoadUnload"
keywords ="JitKeyword NGenKeyword" opcode="MethodDCEnd"
task="CLRMethod"
symbol="MethodDCEndV2" message="$(string.RuntimePublisher.MethodDCEndEventMessage)"/>
<event value="139" version="0" level="win:Informational" template="MethodLoadUnloadVerbose"
keywords ="JitKeyword NGenKeyword" opcode="MethodDCStartVerbose"
task="CLRMethod"
symbol="MethodDCStartVerboseV2" message="$(string.RuntimePublisher.MethodDCStartEventMessage)"/>
<event value="140" version="0" level="win:Informational" template="MethodLoadUnloadVerbose"
keywords ="JitKeyword NGenKeyword" opcode="MethodDCEndVerbose"
task="CLRMethod"
symbol="MethodDCEndVerboseV2" message="$(string.RuntimePublisher.MethodDCEndVerboseEventMessage)"/>
<event value="141" version="0" level="win:Informational" template="MethodLoadUnload"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="MethodLoad" message="$(string.RuntimePublisher.MethodLoadEventMessage)"/>
<event value="141" version="1" level="win:Informational" template="MethodLoadUnload_V1"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="MethodLoad_V1" message="$(string.RuntimePublisher.MethodLoad_V1EventMessage)"/>
<event value="141" version="2" level="win:Informational" template="MethodLoadUnload_V2"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="MethodLoad_V2" message="$(string.RuntimePublisher.MethodLoad_V2EventMessage)"/>
<event value="159" version="0" level="win:Informational" template="R2RGetEntryPoint"
keywords ="CompilationDiagnosticKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="R2RGetEntryPoint" message="$(string.RuntimePublisher.R2RGetEntryPointEventMessage)"/>
<event value="160" version="0" level="win:Informational" template="R2RGetEntryPointStart"
keywords ="CompilationDiagnosticKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="R2RGetEntryPointStart" message="$(string.RuntimePublisher.R2RGetEntryPointStartEventMessage)"/>
<event value="142" version="0" level="win:Informational" template="MethodLoadUnload"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnload"
task="CLRMethod"
symbol="MethodUnload" message="$(string.RuntimePublisher.MethodUnloadEventMessage)"/>
<event value="142" version="1" level="win:Informational" template="MethodLoadUnload_V1"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnload"
task="CLRMethod"
symbol="MethodUnload_V1" message="$(string.RuntimePublisher.MethodUnload_V1EventMessage)"/>
<event value="142" version="2" level="win:Informational" template="MethodLoadUnload_V2"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnload"
task="CLRMethod"
symbol="MethodUnload_V2" message="$(string.RuntimePublisher.MethodUnload_V2EventMessage)"/>
<event value="143" version="0" level="win:Informational" template="MethodLoadUnloadVerbose"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoadVerbose"
task="CLRMethod"
symbol="MethodLoadVerbose" message="$(string.RuntimePublisher.MethodLoadVerboseEventMessage)"/>
<event value="143" version="1" level="win:Informational" template="MethodLoadUnloadVerbose_V1"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoadVerbose"
task="CLRMethod"
symbol="MethodLoadVerbose_V1" message="$(string.RuntimePublisher.MethodLoadVerbose_V1EventMessage)"/>
<event value="143" version="2" level="win:Informational" template="MethodLoadUnloadVerbose_V2"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoadVerbose"
task="CLRMethod"
symbol="MethodLoadVerbose_V2" message="$(string.RuntimePublisher.MethodLoadVerbose_V2EventMessage)"/>
<event value="144" version="0" level="win:Informational" template="MethodLoadUnloadVerbose"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnloadVerbose"
task="CLRMethod"
symbol="MethodUnloadVerbose" message="$(string.RuntimePublisher.MethodUnloadVerboseEventMessage)"/>
<event value="144" version="1" level="win:Informational" template="MethodLoadUnloadVerbose_V1"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnloadVerbose"
task="CLRMethod"
symbol="MethodUnloadVerbose_V1" message="$(string.RuntimePublisher.MethodUnloadVerbose_V1EventMessage)"/>
<event value="144" version="2" level="win:Informational" template="MethodLoadUnloadVerbose_V2"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnloadVerbose"
task="CLRMethod"
symbol="MethodUnloadVerbose_V2" message="$(string.RuntimePublisher.MethodUnloadVerbose_V2EventMessage)"/>
<event value="145" version="0" level="win:Verbose" template="MethodJittingStarted"
keywords ="JitKeyword" opcode="MethodJittingStarted"
task="CLRMethod"
symbol="MethodJittingStarted" message="$(string.RuntimePublisher.MethodJittingStartedEventMessage)"/>
<event value="145" version="1" level="win:Verbose" template="MethodJittingStarted_V1"
keywords ="JitKeyword" opcode="MethodJittingStarted"
task="CLRMethod"
symbol="MethodJittingStarted_V1" message="$(string.RuntimePublisher.MethodJittingStarted_V1EventMessage)"/>
<event value="146" version="0" level="win:Verbose" template="MethodJitMemoryAllocatedForCode"
keywords ="JitKeyword" opcode="MemoryAllocatedForJitCode"
task="CLRMethod"
symbol="MethodJitMemoryAllocatedForCode" message="$(string.RuntimePublisher.MethodJitMemoryAllocatedForCodeEventMessage)"/>
<event value="185" version="0" level="win:Verbose" template="MethodJitInliningSucceeded"
keywords ="JitTracingKeyword" opcode="JitInliningSucceeded"
task="CLRMethod"
symbol="MethodJitInliningSucceeded"
message="$(string.RuntimePublisher.MethodJitInliningSucceededEventMessage)"/>
<event value="186" version="0" level="win:Verbose" template="MethodJitInliningFailedAnsi"
keywords ="JitTracingKeyword" opcode="JitInliningFailed"
task="CLRMethod"
symbol="MethodJitInliningFailedAnsi"
message="$(string.RuntimePublisher.MethodJitInliningFailedEventMessage)"/>
<event value="188" version="0" level="win:Verbose" template="MethodJitTailCallSucceeded"
keywords ="JitTracingKeyword" opcode="JitTailCallSucceeded"
task="CLRMethod"
symbol="MethodJitTailCallSucceeded"
message="$(string.RuntimePublisher.MethodJitTailCallSucceededEventMessage)"/>
<event value="189" version="0" level="win:Verbose" template="MethodJitTailCallFailedAnsi"
keywords ="JitTracingKeyword" opcode="JitTailCallFailed"
task="CLRMethod"
symbol="MethodJitTailCallFailedAnsi"
message="$(string.RuntimePublisher.MethodJitTailCallFailedEventMessage)"/>
<event value="190" version="0" level="win:Verbose" template="MethodILToNativeMap"
keywords ="JittedMethodILToNativeMapKeyword" opcode="MethodILToNativeMap"
task="CLRMethod"
symbol="MethodILToNativeMap"
message="$(string.RuntimePublisher.MethodILToNativeMapEventMessage)"/>
<event value="191" version="0" level="win:Verbose" template="MethodJitTailCallFailed"
keywords ="JitTracingKeyword" opcode="JitTailCallFailed"
task="CLRMethod"
symbol="MethodJitTailCallFailed"
message="$(string.RuntimePublisher.MethodJitTailCallFailedEventMessage)"/>
<event value="192" version="0" level="win:Verbose" template="MethodJitInliningFailed"
keywords ="JitTracingKeyword" opcode="JitInliningFailed"
task="CLRMethod"
symbol="MethodJitInliningFailed"
message="$(string.RuntimePublisher.MethodJitInliningFailedEventMessage)"/>
<!-- CLR Loader events -->
<!-- The following 2 events are now defunct -->
<event value="149" version="0" level="win:Informational" template="ModuleLoadUnload"
keywords ="LoaderKeyword" opcode="ModuleDCStart"
task="CLRLoader"
symbol="ModuleDCStartV2" message="$(string.RuntimePublisher.ModuleDCStartEventMessage)"/>
<event value="150" version="0" level="win:Informational" template="ModuleLoadUnload"
keywords ="LoaderKeyword" opcode="ModuleDCEnd"
task="CLRLoader"
symbol="ModuleDCEndV2" message="$(string.RuntimePublisher.ModuleDCEndEventMessage)"/>
<event value="151" version="0" level="win:Informational" template="DomainModuleLoadUnload"
keywords ="LoaderKeyword" opcode="DomainModuleLoad"
task="CLRLoader"
symbol="DomainModuleLoad" message="$(string.RuntimePublisher.DomainModuleLoadEventMessage)"/>
<event value="151" version="1" level="win:Informational" template="DomainModuleLoadUnload_V1"
keywords ="LoaderKeyword" opcode="DomainModuleLoad"
task="CLRLoader"
symbol="DomainModuleLoad_V1" message="$(string.RuntimePublisher.DomainModuleLoad_V1EventMessage)"/>
<event value="152" version="0" level="win:Informational" template="ModuleLoadUnload"
keywords ="LoaderKeyword" opcode="ModuleLoad"
task="CLRLoader"
symbol="ModuleLoad" message="$(string.RuntimePublisher.ModuleLoadEventMessage)"/>
<event value="152" version="1" level="win:Informational" template="ModuleLoadUnload_V1"
keywords ="LoaderKeyword PerfTrackKeyword" opcode="ModuleLoad"
task="CLRLoader"
symbol="ModuleLoad_V1" message="$(string.RuntimePublisher.ModuleLoad_V1EventMessage)"/>
<event value="152" version="2" level="win:Informational" template="ModuleLoadUnload_V2"
keywords ="LoaderKeyword PerfTrackKeyword" opcode="ModuleLoad"
task="CLRLoader"
symbol="ModuleLoad_V2" message="$(string.RuntimePublisher.ModuleLoad_V2EventMessage)"/>
<event value="153" version="0" level="win:Informational" template="ModuleLoadUnload"
keywords ="LoaderKeyword" opcode="ModuleUnload"
task="CLRLoader"
symbol="ModuleUnload" message="$(string.RuntimePublisher.ModuleUnloadEventMessage)"/>
<event value="153" version="1" level="win:Informational" template="ModuleLoadUnload_V1"
keywords ="LoaderKeyword PerfTrackKeyword" opcode="ModuleUnload"
task="CLRLoader"
symbol="ModuleUnload_V1" message="$(string.RuntimePublisher.ModuleUnload_V1EventMessage)"/>
<event value="153" version="2" level="win:Informational" template="ModuleLoadUnload_V2"
keywords ="LoaderKeyword PerfTrackKeyword" opcode="ModuleUnload"
task="CLRLoader"
symbol="ModuleUnload_V2" message="$(string.RuntimePublisher.ModuleUnload_V2EventMessage)"/>
<event value="154" version="0" level="win:Informational" template="AssemblyLoadUnload"
keywords ="LoaderKeyword" opcode="AssemblyLoad"
task="CLRLoader"
symbol="AssemblyLoad" message="$(string.RuntimePublisher.AssemblyLoadEventMessage)"/>
<event value="154" version="1" level="win:Informational" template="AssemblyLoadUnload_V1"
keywords ="LoaderKeyword" opcode="AssemblyLoad"
task="CLRLoader"
symbol="AssemblyLoad_V1" message="$(string.RuntimePublisher.AssemblyLoad_V1EventMessage)"/>
<event value="155" version="0" level="win:Informational" template="AssemblyLoadUnload"
keywords ="LoaderKeyword" opcode="AssemblyUnload"
task="CLRLoader"
symbol="AssemblyUnload" message="$(string.RuntimePublisher.AssemblyUnloadEventMessage)"/>
<event value="155" version="1" level="win:Informational" template="AssemblyLoadUnload_V1"
keywords ="LoaderKeyword" opcode="AssemblyUnload"
task="CLRLoader"
symbol="AssemblyUnload_V1" message="$(string.RuntimePublisher.AssemblyUnload_V1EventMessage)"/>
<event value="156" version="0" level="win:Informational" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainLoad"
task="CLRLoader"
symbol="AppDomainLoad" message="$(string.RuntimePublisher.AppDomainLoadEventMessage)"/>
<event value="156" version="1" level="win:Informational" template="AppDomainLoadUnload_V1"
keywords ="LoaderKeyword" opcode="AppDomainLoad"
task="CLRLoader"
symbol="AppDomainLoad_V1" message="$(string.RuntimePublisher.AppDomainLoad_V1EventMessage)"/>
<event value="157" version="0" level="win:Informational" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainUnload"
task="CLRLoader"
symbol="AppDomainUnload" message="$(string.RuntimePublisher.AppDomainUnloadEventMessage)"/>
<event value="157" version="1" level="win:Informational" template="AppDomainLoadUnload_V1"
keywords ="LoaderKeyword" opcode="AppDomainUnload"
task="CLRLoader"
symbol="AppDomainUnload_V1" message="$(string.RuntimePublisher.AppDomainUnload_V1EventMessage)"/>
<event value="158" version="0" level="win:Informational" template="ModuleRange"
keywords ="PerfTrackKeyword" opcode="ModuleRangeLoad"
task="CLRPerfTrack"
symbol="ModuleRangeLoad" message="$(string.RuntimePublisher.ModuleRangeLoadEventMessage)"/>
<!-- CLR Security events -->
<event value="181" version="0" level="win:Verbose" template="StrongNameVerification"
keywords ="SecurityKeyword" opcode="win:Start"
task="CLRStrongNameVerification"
symbol="StrongNameVerificationStart" message="$(string.RuntimePublisher.StrongNameVerificationStartEventMessage)"/>
<event value="181" version="1" level="win:Verbose" template="StrongNameVerification_V1"
keywords ="SecurityKeyword" opcode="win:Start"
task="CLRStrongNameVerification"
symbol="StrongNameVerificationStart_V1" message="$(string.RuntimePublisher.StrongNameVerificationStart_V1EventMessage)"/>
<event value="182" version="0" level="win:Informational" template="StrongNameVerification"
keywords ="SecurityKeyword" opcode="win:Stop"
task="CLRStrongNameVerification"
symbol="StrongNameVerificationStop" message="$(string.RuntimePublisher.StrongNameVerificationEndEventMessage)"/>
<event value="182" version="1" level="win:Informational" template="StrongNameVerification_V1"
keywords ="SecurityKeyword" opcode="win:Stop"
task="CLRStrongNameVerification"
symbol="StrongNameVerificationStop_V1" message="$(string.RuntimePublisher.StrongNameVerificationEnd_V1EventMessage)"/>
<event value="183" version="0" level="win:Verbose" template="AuthenticodeVerification"
keywords ="SecurityKeyword" opcode="win:Start"
task="CLRAuthenticodeVerification"
symbol="AuthenticodeVerificationStart" message="$(string.RuntimePublisher.AuthenticodeVerificationStartEventMessage)"/>
<event value="183" version="1" level="win:Verbose" template="AuthenticodeVerification_V1"
keywords ="SecurityKeyword" opcode="win:Start"
task="CLRAuthenticodeVerification"
symbol="AuthenticodeVerificationStart_V1" message="$(string.RuntimePublisher.AuthenticodeVerificationStart_V1EventMessage)"/>
<event value="184" version="0" level="win:Informational" template="AuthenticodeVerification"
keywords ="SecurityKeyword" opcode="win:Stop"
task="CLRAuthenticodeVerification"
symbol="AuthenticodeVerificationStop" message="$(string.RuntimePublisher.AuthenticodeVerificationEndEventMessage)"/>
<event value="184" version="1" level="win:Informational" template="AuthenticodeVerification_V1"
keywords ="SecurityKeyword" opcode="win:Stop"
task="CLRAuthenticodeVerification"
symbol="AuthenticodeVerificationStop_V1" message="$(string.RuntimePublisher.AuthenticodeVerificationEnd_V1EventMessage)"/>
<!-- CLR RuntimeInformation events -->
<event value="187" version="0" level="win:Informational" template="RuntimeInformation"
opcode="win:Start"
task="CLRRuntimeInformation"
symbol="RuntimeInformationStart" message="$(string.RuntimePublisher.RuntimeInformationEventMessage)"/>
<!-- Additional GC events 200-239 -->
<event value="200" version="0" level="win:Verbose" template="IncreaseMemoryPressure"
keywords="GCKeyword" opcode="IncreaseMemoryPressure"
task="GarbageCollection"
symbol="IncreaseMemoryPressure" message="$(string.RuntimePublisher.IncreaseMemoryPressureEventMessage)"/>
<event value="201" version="0" level="win:Verbose" template="DecreaseMemoryPressure"
keywords="GCKeyword" opcode="DecreaseMemoryPressure"
task="GarbageCollection"
symbol="DecreaseMemoryPressure" message="$(string.RuntimePublisher.DecreaseMemoryPressureEventMessage)"/>
<event value="202" version="0" level="win:Informational" template="GCMarkWithType"
keywords ="GCKeyword" opcode="GCMarkWithType"
task="GarbageCollection"
symbol="GCMarkWithType" message="$(string.RuntimePublisher.GCMarkWithTypeEventMessage)"/>
<event value="203" version="2" level="win:Verbose" template="GCJoin_V2"
keywords ="GCKeyword" opcode="GCJoin"
task="GarbageCollection"
symbol="GCJoin_V2" message="$(string.RuntimePublisher.GCJoin_V2EventMessage)"/>
<event value="204" version="3" level="win:Informational" template="GCPerHeapHistory_V3"
keywords ="GCKeyword" opcode="GCPerHeapHistory"
task="GarbageCollection"
symbol="GCPerHeapHistory_V3" message="$(string.RuntimePublisher.GCPerHeapHistory_V3EventMessage)"/>
<event value="205" version="2" level="win:Informational" template="GCGlobalHeap_V2"
keywords ="GCKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollection"
symbol="GCGlobalHeapHistory_V2" message="$(string.RuntimePublisher.GCGlobalHeap_V2EventMessage)"/>
<event value="205" version="3" level="win:Informational" template="GCGlobalHeap_V3"
keywords ="GCKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollection"
symbol="GCGlobalHeapHistory_V3" message="$(string.RuntimePublisher.GCGlobalHeap_V3EventMessage)"/>
<event value="205" version="4" level="win:Informational" template="GCGlobalHeap_V4"
keywords ="GCKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollection"
symbol="GCGlobalHeapHistory_V4" message="$(string.RuntimePublisher.GCGlobalHeap_V4EventMessage)"/>
<event value="206" version="0" level="win:Informational" template="GenAwareTemplate"
keywords ="GCHeapDumpKeyword" opcode="GenAwareBegin"
task="GarbageCollection"
symbol="GenAwareBegin" message="$(string.RuntimePublisher.GenAwareBeginEventMessage)"/>
<event value="207" version="0" level="win:Informational" template="GenAwareTemplate"
keywords ="GCHeapDumpKeyword" opcode="GenAwareEnd"
task="GarbageCollection"
symbol="GenAwareEnd" message="$(string.RuntimePublisher.GenAwareEndEventMessage)"/>
<event value="208" version="0" level="win:Informational" template="GCLOHCompact"
keywords ="GCKeyword" opcode="GCLOHCompact"
task="GarbageCollection"
symbol="GCLOHCompact" message="$(string.RuntimePublisher.GCLOHCompactEventMessage)"/>
<event value="209" version="0" level="win:Verbose" template="GCFitBucketInfo"
keywords ="GCKeyword" opcode="GCFitBucketInfo"
task="GarbageCollection"
symbol="GCFitBucketInfo" message="$(string.RuntimePublisher.GCFitBucketInfoEventMessage)"/>
<!-- CLR Debugger events 240-249 -->
<event value="240" version="0" level="win:Informational"
keywords="DebuggerKeyword" opcode="win:Start"
task="DebugIPCEvent"
symbol="DebugIPCEventStart" />
<event value="241" version="0" level="win:Informational"
keywords="DebuggerKeyword" opcode="win:Stop"
task="DebugIPCEvent"
symbol="DebugIPCEventEnd" />
<event value="242" version="0" level="win:Informational"
keywords="DebuggerKeyword" opcode="win:Start"
task="DebugExceptionProcessing"
symbol="DebugExceptionProcessingStart" />
<event value="243" version="0" level="win:Informational"
keywords="DebuggerKeyword" opcode="win:Stop"
task="DebugExceptionProcessing"
symbol="DebugExceptionProcessingEnd" />
<!-- CLR Code Symbol Emission events 260-269 -->
<event value="260" version="0" level="win:Verbose" template="CodeSymbols"
keywords="CodeSymbolsKeyword" opcode="win:Start"
task="CodeSymbols"
symbol="CodeSymbols" message="$(string.RuntimePublisher.CodeSymbolsEventMessage)"/>
<event value="270" version="0" level="win:Informational" template="EventSource"
keywords="EventSourceKeyword"
symbol="EventSource" />
<!-- Tiered compilation events 280-289 -->
<event value="280" version="0" level="win:Informational" template="TieredCompilationSettings"
keywords="CompilationKeyword" task="TieredCompilation" opcode="Settings"
symbol="TieredCompilationSettings" message="$(string.RuntimePublisher.TieredCompilationSettingsEventMessage)"/>
<event value="281" version="0" level="win:Informational" template="TieredCompilationEmpty"
keywords="CompilationKeyword" task="TieredCompilation" opcode="Pause"
symbol="TieredCompilationPause" message="$(string.RuntimePublisher.TieredCompilationPauseEventMessage)"/>
<event value="282" version="0" level="win:Informational" template="TieredCompilationResume"
keywords="CompilationKeyword" task="TieredCompilation" opcode="Resume"
symbol="TieredCompilationResume" message="$(string.RuntimePublisher.TieredCompilationResumeEventMessage)"/>
<event value="283" version="0" level="win:Informational" template="TieredCompilationBackgroundJitStart"
keywords="CompilationKeyword" task="TieredCompilation" opcode="win:Start"
symbol="TieredCompilationBackgroundJitStart" message="$(string.RuntimePublisher.TieredCompilationBackgroundJitStartEventMessage)"/>
<event value="284" version="0" level="win:Informational" template="TieredCompilationBackgroundJitStop"
keywords="CompilationKeyword" task="TieredCompilation" opcode="win:Stop"
symbol="TieredCompilationBackgroundJitStop" message="$(string.RuntimePublisher.TieredCompilationBackgroundJitStopEventMessage)"/>
<!-- Assembly loader events 290-299 -->
<event value="290" version="0" level="win:Informational" template="AssemblyLoadStart"
keywords ="AssemblyLoaderKeyword" opcode="win:Start"
task="AssemblyLoader"
symbol="AssemblyLoadStart" message="$(string.RuntimePublisher.AssemblyLoadStartEventMessage)"/>
<event value="291" version="0" level="win:Informational" template="AssemblyLoadStop"
keywords ="AssemblyLoaderKeyword" opcode="win:Stop"
task="AssemblyLoader"
symbol="AssemblyLoadStop" message="$(string.RuntimePublisher.AssemblyLoadStopEventMessage)"/>
<event value="292" version="0" level="win:Informational" template="ResolutionAttempted"
keywords ="AssemblyLoaderKeyword" opcode="ResolutionAttempted"
task="AssemblyLoader"
symbol="ResolutionAttempted" message="$(string.RuntimePublisher.ResolutionAttemptedEventMessage)"/>
<event value="293" version="0" level="win:Informational" template="AssemblyLoadContextResolvingHandlerInvoked"
keywords ="AssemblyLoaderKeyword" opcode="AssemblyLoadContextResolvingHandlerInvoked"
task="AssemblyLoader"
symbol="AssemblyLoadContextResolvingHandlerInvoked" message="$(string.RuntimePublisher.AssemblyLoadContextResolvingHandlerInvokedEventMessage)"/>
<event value="294" version="0" level="win:Informational" template="AppDomainAssemblyResolveHandlerInvoked"
keywords ="AssemblyLoaderKeyword" opcode="AppDomainAssemblyResolveHandlerInvoked"
task="AssemblyLoader"
symbol="AppDomainAssemblyResolveHandlerInvoked" message="$(string.RuntimePublisher.AppDomainAssemblyResolveHandlerInvokedEventMessage)"/>
<event value="295" version="0" level="win:Informational" template="AssemblyLoadFromResolveHandlerInvoked"
keywords ="AssemblyLoaderKeyword" opcode="AssemblyLoadFromResolveHandlerInvoked"
task="AssemblyLoader"
symbol="AssemblyLoadFromResolveHandlerInvoked" message="$(string.RuntimePublisher.AssemblyLoadFromResolveHandlerInvokedEventMessage)"/>
<event value="296" version="0" level="win:Informational" template="KnownPathProbed"
keywords ="AssemblyLoaderKeyword" opcode="KnownPathProbed"
task="AssemblyLoader"
symbol="KnownPathProbed" message="$(string.RuntimePublisher.KnownPathProbedEventMessage)"/>
<event value="297" version="0" level="win:Informational" template="JitInstrumentationData"
keywords ="JitInstrumentationDataKeyword" opcode="InstrumentationData"
task="JitInstrumentationData"
symbol="JitInstrumentationData" message="$(string.RuntimePublisher.JitInstrumentationDataEventMessage)"/>
<event value="298" version="0" level="win:Informational" template="JitInstrumentationDataVerbose"
keywords ="JitInstrumentationDataKeyword" opcode="InstrumentationDataVerbose"
task="JitInstrumentationData"
symbol="JitInstrumentationDataVerbose" message="$(string.RuntimePublisher.JitInstrumentationDataEventMessage)"/>
<event value="299" version="0" level="win:Informational" template="ProfilerMessage"
keywords ="ProfilerKeyword" opcode="Profiler"
task="Profiler"
symbol="ProfilerMessage" message="$(string.RuntimePublisher.ProfilerEventMessage)"/>
<!-- Execution Checkpoint event 300 -->
<event value="300" version="0" level="win:Informational" template="ExecutionCheckpoint"
keywords ="PerfTrackKeyword" opcode="ExecutionCheckpoint" task="ExecutionCheckpoint" symbol="ExecutionCheckpoint"
message="$(string.RuntimePublisher.ExecutionCheckpointEventMessage)"/>
</events>
</provider>
<!--CLR Rundown Publisher-->
<provider name="Microsoft-Windows-DotNETRuntimeRundown"
guid="{A669021C-C450-4609-A035-5AF59AF4DF18}"
symbol="MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--Keywords-->
<keywords>
<keyword name="GCRundownKeyword" mask="0x1"
message="$(string.RundownPublisher.GCKeywordMessage)" symbol="CLR_RUNDOWNGC_KEYWORD"/>
<keyword name="LoaderRundownKeyword" mask="0x8"
message="$(string.RundownPublisher.LoaderKeywordMessage)" symbol="CLR_RUNDOWNLOADER_KEYWORD"/>
<keyword name="JitRundownKeyword" mask="0x10"
message="$(string.RundownPublisher.JitKeywordMessage)" symbol="CLR_RUNDOWNJIT_KEYWORD"/>
<keyword name="NGenRundownKeyword" mask="0x20"
message="$(string.RundownPublisher.NGenKeywordMessage)" symbol="CLR_RUNDOWNNGEN_KEYWORD"/>
<keyword name="StartRundownKeyword" mask="0x40"
message="$(string.RundownPublisher.StartRundownKeywordMessage)" symbol="CLR_RUNDOWNSTART_KEYWORD"/>
<keyword name="EndRundownKeyword" mask="0x100"
message="$(string.RundownPublisher.EndRundownKeywordMessage)" symbol="CLR_RUNDOWNEND_KEYWORD"/>
<!-- Keyword mask 0x200 is now defunct -->
<keyword name="AppDomainResourceManagementRundownKeyword" mask="0x800"
message="$(string.RuntimePublisher.AppDomainResourceManagementRundownKeywordMessage)" symbol="CLR_RUNDOWNAPPDOMAINRESOURCEMANAGEMENT_KEYWORD"/>
<keyword name="ThreadingKeyword" mask="0x10000"
message="$(string.RundownPublisher.ThreadingKeywordMessage)" symbol="CLR_RUNDOWNTHREADING_KEYWORD"/>
<keyword name="JittedMethodILToNativeMapRundownKeyword" mask="0x20000"
message="$(string.RundownPublisher.JittedMethodILToNativeMapRundownKeywordMessage)" symbol="CLR_RUNDOWNJITTEDMETHODILTONATIVEMAP_KEYWORD"/>
<keyword name="OverrideAndSuppressNGenEventsRundownKeyword" mask="0x40000"
message="$(string.RundownPublisher.OverrideAndSuppressNGenEventsRundownKeywordMessage)" symbol="CLR_RUNDOWNOVERRIDEANDSUPPRESSNGENEVENTS_KEYWORD"/>
<keyword name="PerfTrackRundownKeyword" mask="0x20000000"
message="$(string.RundownPublisher.PerfTrackRundownKeywordMessage)" symbol="CLR_RUNDOWNPERFTRACK_KEYWORD"/>
<keyword name="StackKeyword" mask="0x40000000"
message="$(string.RundownPublisher.StackKeywordMessage)" symbol="CLR_RUNDOWNSTACK_KEYWORD"/>
<keyword name="CompilationKeyword" mask="0x1000000000"
message="$(string.RundownPublisher.CompilationKeywordMessage)" symbol="CLR_COMPILATION_RUNDOWN_KEYWORD" />
</keywords>
<!--Tasks-->
<tasks>
<task name="CLRMethodRundown" symbol="CLR_METHODRUNDOWN_TASK"
value="1" eventGUID="{0BCD91DB-F943-454a-A662-6EDBCFBB76D2}"
message="$(string.RundownPublisher.MethodTaskMessage)">
<opcodes>
<opcode name="MethodDCStart" message="$(string.RundownPublisher.MethodDCStartOpcodeMessage)" symbol="CLR_METHODDC_METHODDCSTART_OPCODE" value="35"> </opcode>
<opcode name="MethodDCEnd" message="$(string.RundownPublisher.MethodDCEndOpcodeMessage)" symbol="CLR_METHODDC_METHODDCEND_OPCODE" value="36"> </opcode>
<opcode name="MethodDCStartVerbose" message="$(string.RundownPublisher.MethodDCStartVerboseOpcodeMessage)" symbol="CLR_METHODDC_METHODDCSTARTVERBOSE_OPCODE" value="39"> </opcode>
<opcode name="MethodDCEndVerbose" message="$(string.RundownPublisher.MethodDCEndVerboseOpcodeMessage)" symbol="CLR_METHODDC_METHODDCENDVERBOSE_OPCODE" value="40"> </opcode>
<opcode name="MethodDCStartILToNativeMap" message="$(string.RundownPublisher.MethodDCStartILToNativeMapOpcodeMessage)" symbol="CLR_METHODDC_METHODDCSTARTILTONATIVEMAP_OPCODE" value="41"> </opcode>
<opcode name="MethodDCEndILToNativeMap" message="$(string.RundownPublisher.MethodDCEndILToNativeMapOpcodeMessage)" symbol="CLR_METHODDC_METHODDCENDILTONATIVEMAP_OPCODE" value="42"> </opcode>
<opcode name="DCStartComplete" message="$(string.RundownPublisher.DCStartCompleteOpcodeMessage)" symbol="CLR_METHODDC_DCSTARTCOMPLETE_OPCODE" value="14"> </opcode>
<opcode name="DCEndComplete" message="$(string.RundownPublisher.DCEndCompleteOpcodeMessage)" symbol="CLR_METHODDC_DCENDCOMPLETE_OPCODE" value="15"> </opcode>
<opcode name="DCStartInit" message="$(string.RundownPublisher.DCStartInitOpcodeMessage)" symbol="CLR_METHODDC_DCSTARTINIT_OPCODE" value="16"> </opcode>
<opcode name="DCEndInit" message="$(string.RundownPublisher.DCEndInitOpcodeMessage)" symbol="CLR_METHODDC_DCENDINIT_OPCODE" value="17"> </opcode>
</opcodes>
</task>
<task name="CLRLoaderRundown" symbol="CLR_LOADERRUNDOWN_TASK"
value="2" eventGUID="{5A54F4DF-D302-4fee-A211-6C2C0C1DCB1A}"
message="$(string.RundownPublisher.LoaderTaskMessage)">
<opcodes>
<opcode name="ModuleDCStart" message="$(string.RundownPublisher.ModuleDCStartOpcodeMessage)" symbol="CLR_LOADERDC_MODULEDCSTART_OPCODE" value="35"> </opcode>
<opcode name="ModuleDCEnd" message="$(string.RundownPublisher.ModuleDCEndOpcodeMessage)" symbol="CLR_LOADERDC_MODULEDCEND_OPCODE" value="36"> </opcode>
<opcode name="AssemblyDCStart" message="$(string.RundownPublisher.AssemblyDCStartOpcodeMessage)" symbol="CLR_LOADERDC_ASSEMBLYDCSTART_OPCODE" value="39"> </opcode>
<opcode name="AssemblyDCEnd" message="$(string.RundownPublisher.AssemblyDCEndOpcodeMessage)" symbol="CLR_LOADERDC_ASSEMBLYDCEND_OPCODE" value="40"> </opcode>
<opcode name="AppDomainDCStart" message="$(string.RundownPublisher.AppDomainDCStartOpcodeMessage)" symbol="CLR_LOADERDC_APPDOMAINDCSTART_OPCODE" value="43"> </opcode>
<opcode name="AppDomainDCEnd" message="$(string.RundownPublisher.AppDomainDCEndOpcodeMessage)" symbol="CLR_LOADERDC_APPDOMAINDCEND_OPCODE" value="44"> </opcode>
<opcode name="DomainModuleDCStart" message="$(string.RundownPublisher.DomainModuleDCStartOpcodeMessage)" symbol="CLR_LOADERDC_DOMAINMODULEDCSTART_OPCODE" value="46"> </opcode>
<opcode name="DomainModuleDCEnd" message="$(string.RundownPublisher.DomainModuleDCEndOpcodeMessage)" symbol="CLR_LOADERDC_DOMAINMODULEDCEND_OPCODE" value="47"> </opcode>
<opcode name="ThreadDC" message="$(string.RundownPublisher.ThreadDCOpcodeMessage)" symbol="CLR_LOADERDC_THREADDC_OPCODE" value="48"> </opcode>
</opcodes>
</task>
<task name="CLRStackRundown" symbol="CLR_STACKRUNDOWN_TASK"
value="11" eventGUID="{d3363dc0-243a-4620-a4d0-8a07d772f533}"
message="$(string.RundownPublisher.StackTaskMessage)">
<opcodes>
<opcode name="CLRStackWalk" message="$(string.RundownPublisher.CLRStackWalkOpcodeMessage)" symbol="CLR_RUNDOWNSTACK_STACKWALK_OPCODE" value="82"> </opcode>
</opcodes>
</task>
<task name="CLRRuntimeInformationRundown" symbol="CLR_RuntimeInformation_TASK"
value="19" eventGUID="{CD7D3E32-65FE-40cd-9225-A2577D203FC3}"
message="$(string.RundownPublisher.EEStartupTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRPerfTrackRundown" symbol="CLR_PERFTRACKRUNDOWN_TASK"
value="20" eventGUID="{EAC685F6-2104-4dec-88FD-91E4254221EC}"
message="$(string.RundownPublisher.PerfTrackTaskMessage)">
<opcodes>
<opcode name="ModuleRangeDCStart" message="$(string.RundownPublisher.ModuleRangeDCStartOpcodeMessage)" symbol="CLR_PERFTRACKRUNDOWN_MODULERANGEDCSTART_OPCODE" value="10"> </opcode>
<opcode name="ModuleRangeDCEnd" message="$(string.RundownPublisher.ModuleRangeDCEndOpcodeMessage)" symbol="CLR_PERFTRACKRUNDOWN_MODULERANGEDCEND_OPCODE" value="11"> </opcode>
</opcodes>
</task>
<task name="TieredCompilationRundown" symbol="CLR_TIERED_COMPILATION_RUNDOWN_TASK"
value="31" eventGUID="{A1673472-0564-48EA-A95D-B49D4173F105}"
message="$(string.RundownPublisher.TieredCompilationTaskMessage)">
<opcodes>
<opcode name="SettingsDCStart" message="$(string.RundownPublisher.TieredCompilationSettingsDCStartOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_SETTINGS_DCSTART_OPCODE" value="11"/>
</opcodes>
</task>
<task name="ExecutionCheckpointRundown" symbol="CLR_EXECUTION_CHECKPOINT_RUNDOWN_TASK"
value="35" eventGUID="{DFF63ECA-ADAA-431F-8F91-72820C7217DB}"
message="$(string.RundownPublisher.ExecutionCheckpointTaskMessage)">
<opcodes>
<opcode name="ExecutionCheckpointDCEnd" message="$(string.RundownPublisher.ExecutionCheckpointDCEndOpcodeMessage)" symbol="CLR_EXECUTIONCHECKPOINT_DCSTART_OPCODE" value="11"/>
</opcodes>
</task>
<task name="CLRGCRundown" symbol="CLR_GC_RUNDOWN_TASK"
value="40" eventGUID="{51B6C146-777F-4375-A0F8-1349D076E215}"
message="$(string.RundownPublisher.GCTaskMessage)">
<opcodes>
<opcode name="GCSettingsRundown" message="$(string.RundownPublisher.GCSettingsOpcodeMessage)" symbol="CLR_GC_GCSETTINGS_OPCODE" value="10"> </opcode>
</opcodes>
</task>
</tasks>
<maps>
<bitMap name="ModuleRangeTypeMap">
<map value="0x4" message="$(string.RundownPublisher.ModuleRangeTypeMap.ColdRangeMessage)"/>
</bitMap>
<!-- BitMaps -->
<bitMap name="AppDomainFlagsMap">
<map value="0x1" message="$(string.RundownPublisher.AppDomain.DefaultMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.AppDomain.ExecutableMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.AppDomain.SharedMapMessage)"/>
</bitMap>
<bitMap name="AssemblyFlagsMap">
<map value="0x1" message="$(string.RundownPublisher.Assembly.DomainNeutralMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.Assembly.DynamicMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.Assembly.NativeMapMessage)"/>
<map value="0x8" message="$(string.RundownPublisher.Assembly.CollectibleMapMessage)"/>
</bitMap>
<bitMap name="ModuleFlagsMap">
<map value= "0x1" message="$(string.RundownPublisher.Module.DomainNeutralMapMessage)"/>
<map value= "0x2" message="$(string.RundownPublisher.Module.NativeMapMessage)"/>
<map value= "0x4" message="$(string.RundownPublisher.Module.DynamicMapMessage)"/>
<map value= "0x8" message="$(string.RundownPublisher.Module.ManifestMapMessage)"/>
<map value= "0x10" message="$(string.RundownPublisher.Module.IbcOptimizedMapMessage)"/>
<map value= "0x20" message="$(string.RundownPublisher.Module.ReadyToRunModuleMapMessage)"/>
<map value= "0x40" message="$(string.RundownPublisher.Module.PartialReadyToRunModuleMapMessage)"/>
</bitMap>
<bitMap name="MethodFlagsMap">
<map value="0x1" message="$(string.RundownPublisher.Method.DynamicMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.Method.GenericMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.Method.HasSharedGenericCodeMapMessage)"/>
<map value="0x8" message="$(string.RundownPublisher.Method.JittedMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.Method.JitHelperMapMessage)"/>
<map value="0x20" message="$(string.RuntimePublisher.Method.ProfilerRejectedPrecompiledCodeMapMessage)"/>
<map value="0x40" message="$(string.RuntimePublisher.Method.ReadyToRunRejectedPrecompiledCodeMapMessage)"/>
<!-- 0x80 to 0x200 are used for the optimization tier -->
</bitMap>
<bitMap name="StartupModeMap">
<map value="0x1" message="$(string.RundownPublisher.StartupMode.ManagedExeMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.StartupMode.HostedCLRMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.StartupMode.IjwDllMapMessage)"/>
<map value="0x8" message="$(string.RundownPublisher.StartupMode.ComActivatedMapMessage)"/>
<map value="0x10" message="$(string.RundownPublisher.StartupMode.OtherMapMessage)"/>
</bitMap>
<bitMap name="RuntimeSkuMap">
<map value="0x1" message="$(string.RundownPublisher.RuntimeSku.DesktopCLRMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.RuntimeSku.CoreCLRMapMessage)"/>
</bitMap>
<bitMap name="StartupFlagsMap">
<map value="0x000001" message="$(string.RundownPublisher.Startup.CONCURRENT_GCMapMessage)"/>
<map value="0x000002" message="$(string.RundownPublisher.Startup.LOADER_OPTIMIZATION_SINGLE_DOMAINMapMessage)"/>
<map value="0x000004" message="$(string.RundownPublisher.Startup.LOADER_OPTIMIZATION_MULTI_DOMAINMapMessage)"/>
<map value="0x000010" message="$(string.RundownPublisher.Startup.LOADER_SAFEMODEMapMessage)"/>
<map value="0x000100" message="$(string.RundownPublisher.Startup.LOADER_SETPREFERENCEMapMessage)"/>
<map value="0x001000" message="$(string.RundownPublisher.Startup.SERVER_GCMapMessage)"/>
<map value="0x002000" message="$(string.RundownPublisher.Startup.HOARD_GC_VMMapMessage)"/>
<map value="0x004000" message="$(string.RundownPublisher.Startup.SINGLE_VERSION_HOSTING_INTERFACEMapMessage)"/>
<map value="0x010000" message="$(string.RundownPublisher.Startup.LEGACY_IMPERSONATIONMapMessage)"/>
<map value="0x020000" message="$(string.RundownPublisher.Startup.DISABLE_COMMITTHREADSTACKMapMessage)"/>
<map value="0x040000" message="$(string.RundownPublisher.Startup.ALWAYSFLOW_IMPERSONATIONMapMessage)"/>
<map value="0x080000" message="$(string.RundownPublisher.Startup.TRIM_GC_COMMITMapMessage)"/>
<map value="0x100000" message="$(string.RundownPublisher.Startup.ETWMapMessage)"/>
<map value="0x200000" message="$(string.RundownPublisher.Startup.SERVER_BUILDMapMessage)"/>
<map value="0x400000" message="$(string.RundownPublisher.Startup.ARMMapMessage)"/>
</bitMap>
<bitMap name="ThreadFlagsMap">
<map value="0x1" message="$(string.RundownPublisher.ThreadFlags.GCSpecial)"/>
<map value="0x2" message="$(string.RundownPublisher.ThreadFlags.Finalizer)"/>
<map value="0x4" message="$(string.RundownPublisher.ThreadFlags.ThreadPoolWorker)"/>
</bitMap>
<bitMap name="TieredCompilationSettingsFlagsMap">
<map value="0x0" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.NoneMapMessage)"/>
<map value="0x1" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.QuickJitMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage)"/>
</bitMap>
</maps>
<!--Templates-->
<templates>
<template tid="GCSettingsRundown">
<data name="HardLimit" inType="win:UInt64" />
<data name="LOHThreshold" inType="win:UInt64" />
<data name="PhysicalMemoryConfig" inType="win:UInt64" />
<data name="Gen0MinBudgetConfig" inType="win:UInt64" />
<data name="Gen0MaxBudgetConfig" inType="win:UInt64" />
<data name="HighMemPercentConfig" inType="win:UInt32" />
<data name="BitSettings" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCSettingsRundown xmlns="myNs">
<HardLimit> %1 </HardLimit>
<LOHThreshold> %2 </LOHThreshold>
<PhysicalMemoryConfig> %3 </PhysicalMemoryConfig>
<Gen0MinBudgetConfig> %4 </Gen0MinBudgetConfig>
<Gen0MaxBudgetConfig> %5 </Gen0MaxBudgetConfig>
<HighMemPercentConfig> %6 </HighMemPercentConfig>
<BitSettings> %7 </BitSettings>
<ClrInstanceID> %8 </ClrInstanceID>
</GCSettingsRundown>
</UserData>
</template>
<template tid="RuntimeInformationRundown">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Sku" inType="win:UInt16" map="RuntimeSkuMap" />
<data name="BclMajorVersion" inType="win:UInt16" />
<data name="BclMinorVersion" inType="win:UInt16" />
<data name="BclBuildNumber" inType="win:UInt16" />
<data name="BclQfeNumber" inType="win:UInt16" />
<data name="VMMajorVersion" inType="win:UInt16" />
<data name="VMMinorVersion" inType="win:UInt16" />
<data name="VMBuildNumber" inType="win:UInt16" />
<data name="VMQfeNumber" inType="win:UInt16" />
<data name="StartupFlags" inType="win:UInt32" map="StartupFlagsMap" />
<data name="StartupMode" inType="win:UInt8" map="StartupModeMap" />
<data name="CommandLine" inType="win:UnicodeString" />
<data name="ComObjectGuid" inType="win:GUID" />
<data name="RuntimeDllPath" inType="win:UnicodeString" />
<UserData>
<RuntimeInformationRundown xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Sku> %2 </Sku>
<BclMajorVersion> %3 </BclMajorVersion>
<BclMinorVersion> %4 </BclMinorVersion>
<BclBuildNumber> %5 </BclBuildNumber>
<BclQfeNumber> %6 </BclQfeNumber>
<VMMajorVersion> %7 </VMMajorVersion>
<VMMinorVersion> %8 </VMMinorVersion>
<VMBuildNumber> %9 </VMBuildNumber>
<VMQfeNumber> %10 </VMQfeNumber>
<StartupFlags> %11 </StartupFlags>
<StartupMode> %12 </StartupMode>
<CommandLine> %13 </CommandLine>
<ComObjectGuid> %14 </ComObjectGuid>
<RuntimeDllPath> %15 </RuntimeDllPath>
</RuntimeInformationRundown>
</UserData>
</template>
<template tid="DomainModuleLoadUnloadRundown">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<UserData>
<DomainModuleLoadUnloadRundown xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<AppDomainID> %3 </AppDomainID>
<ModuleFlags> %4 </ModuleFlags>
<ModuleILPath> %5 </ModuleILPath>
<ModuleNativePath> %6 </ModuleNativePath>
</DomainModuleLoadUnloadRundown>
</UserData>
</template>
<template tid="DomainModuleLoadUnloadRundown_V1">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DomainModuleLoadUnloadRundown_V1 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<AppDomainID> %3 </AppDomainID>
<ModuleFlags> %4 </ModuleFlags>
<ModuleILPath> %5 </ModuleILPath>
<ModuleNativePath> %6 </ModuleNativePath>
<ClrInstanceID> %7 </ClrInstanceID>
</DomainModuleLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="ModuleLoadUnloadRundown">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<UserData>
<ModuleLoadUnloadRundown xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
</ModuleLoadUnloadRundown>
</UserData>
</template>
<template tid="ModuleLoadUnloadRundown_V1">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ModuleLoadUnloadRundown_V1 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
<ClrInstanceID> %6 </ClrInstanceID>
</ModuleLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="ModuleLoadUnloadRundown_V2">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ManagedPdbSignature" inType="win:GUID" />
<data name="ManagedPdbAge" inType="win:UInt32" />
<data name="ManagedPdbBuildPath" inType="win:UnicodeString" />
<data name="NativePdbSignature" inType="win:GUID" />
<data name="NativePdbAge" inType="win:UInt32" />
<data name="NativePdbBuildPath" inType="win:UnicodeString" />
<UserData>
<ModuleLoadUnloadRundown_V2 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
<ClrInstanceID> %6 </ClrInstanceID>
<ManagedPdbSignature> %7 </ManagedPdbSignature>
<ManagedPdbAge> %8 </ManagedPdbAge>
<ManagedPdbBuildPath> %9 </ManagedPdbBuildPath>
<NativePdbSignature> %10 </NativePdbSignature>
<NativePdbAge> %11 </NativePdbAge>
<NativePdbBuildPath> %12 </NativePdbBuildPath>
</ModuleLoadUnloadRundown_V2>
</UserData>
</template>
<template tid="AssemblyLoadUnloadRundown">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyFlags" inType="win:UInt32" map="AssemblyFlagsMap" />
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadUnloadRundown xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<AppDomainID> %2 </AppDomainID>
<AssemblyFlags> %3 </AssemblyFlags>
<FullyQualifiedAssemblyName> %4 </FullyQualifiedAssemblyName>
</AssemblyLoadUnloadRundown>
</UserData>
</template>
<template tid="AssemblyLoadUnloadRundown_V1">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="BindingID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyFlags" inType="win:UInt32" map="AssemblyFlagsMap" />
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AssemblyLoadUnloadRundown_V1 xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<AppDomainID> %2 </AppDomainID>
<BindingID> %3 </BindingID>
<AssemblyFlags> %4 </AssemblyFlags>
<FullyQualifiedAssemblyName> %5 </FullyQualifiedAssemblyName>
<ClrInstanceID> %6 </ClrInstanceID>
</AssemblyLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="AppDomainLoadUnloadRundown">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainFlags" inType="win:UInt32" map="AppDomainFlagsMap" />
<data name="AppDomainName" inType="win:UnicodeString" />
<UserData>
<AppDomainLoadUnloadRundown xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainFlags> %2 </AppDomainFlags>
<AppDomainName> %3 </AppDomainName>
</AppDomainLoadUnloadRundown>
</UserData>
</template>
<template tid="AppDomainLoadUnloadRundown_V1">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainFlags" inType="win:UInt32" map="AppDomainFlagsMap" />
<data name="AppDomainName" inType="win:UnicodeString" />
<data name="AppDomainIndex" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AppDomainLoadUnloadRundown_V1 xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainFlags> %2 </AppDomainFlags>
<AppDomainName> %3 </AppDomainName>
<AppDomainIndex> %4 </AppDomainIndex>
<ClrInstanceID> %5 </ClrInstanceID>
</AppDomainLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="MethodLoadUnloadRundown">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" />
<data name="MethodToken" inType="win:UInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<UserData>
<MethodLoadUnloadRundown xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
</MethodLoadUnloadRundown>
</UserData>
</template>
<template tid="MethodLoadUnloadRundown_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodLoadUnloadRundown_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<ClrInstanceID> %7 </ClrInstanceID>
</MethodLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="MethodLoadUnloadRundown_V2">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodLoadUnloadRundown_V2 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<ClrInstanceID> %7 </ClrInstanceID>
<ReJITID> %8 </ReJITID>
</MethodLoadUnloadRundown_V2>
</UserData>
</template>
<template tid="MethodLoadUnloadRundownVerbose">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<UserData>
<MethodLoadUnloadRundownVerbose xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
</MethodLoadUnloadRundownVerbose>
</UserData>
</template>
<template tid="MethodLoadUnloadRundownVerbose_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodLoadUnloadRundownVerbose_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
<ClrInstanceID> %10 </ClrInstanceID>
</MethodLoadUnloadRundownVerbose_V1>
</UserData>
</template>
<template tid="MethodLoadUnloadRundownVerbose_V2">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodLoadUnloadRundownVerbose_V2 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
<ClrInstanceID> %10 </ClrInstanceID>
<ReJITID> %11 </ReJITID>
</MethodLoadUnloadRundownVerbose_V2>
</UserData>
</template>
<template tid="MethodILToNativeMapRundown">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodExtent" inType="win:UInt8" />
<data name="CountOfMapEntries" inType="win:UInt16" />
<data name="ILOffsets" count="CountOfMapEntries" inType="win:UInt32" />
<data name="NativeOffsets" count="CountOfMapEntries" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodILToNativeMap xmlns="myNs">
<MethodID> %1 </MethodID>
<ReJITID> %2 </ReJITID>
<MethodExtent> %3 </MethodExtent>
<CountOfMapEntries> %4 </CountOfMapEntries>
<ClrInstanceID> %5 </ClrInstanceID>
</MethodILToNativeMap>
</UserData>
</template>
<template tid="DCStartEnd">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DCStartEnd xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</DCStartEnd>
</UserData>
</template>
<template tid="ClrStackWalk">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Reserved1" inType="win:UInt8" />
<data name="Reserved2" inType="win:UInt8" />
<data name="FrameCount" inType="win:UInt32" />
<data name="Stack" count="2" inType="win:Pointer" />
</template>
<template tid="ThreadCreatedRundown">
<data name="ManagedThreadID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Flags" inType="win:UInt32" map="ThreadFlagsMap" />
<data name="ManagedThreadIndex" inType="win:UInt32" />
<data name="OSThreadID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadCreatedRundown xmlns="myNs">
<ManagedThreadID> %1 </ManagedThreadID>
<AppDomainID> %2 </AppDomainID>
<Flags> %3 </Flags>
<ManagedThreadIndex> %4 </ManagedThreadIndex>
<OSThreadID> %5 </OSThreadID>
<ClrInstanceID> %6 </ClrInstanceID>
</ThreadCreatedRundown>
</UserData>
</template>
<template tid="ModuleRangeRundown">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64"/>
<data name="RangeBegin" count="1" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeSize" count="1" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeType" map="ModuleRangeTypeMap" inType="win:UInt8"/>
<UserData>
<ModuleRangeRundown xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<RangeBegin> %3 </RangeBegin>
<RangeSize> %4 </RangeSize>
<RangeType> %5 </RangeType>
</ModuleRangeRundown>
</UserData>
</template>
<template tid="TieredCompilationSettings">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="Flags" inType="win:UInt32" outType="win:HexInt32" map="TieredCompilationSettingsFlagsMap"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Flags> %2 </Flags>
</Settings>
</UserData>
</template>
<template tid="ExecutionCheckpointRundown">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Name" inType="win:UnicodeString" />
<data name="Timestamp" inType="win:Int64" />
<UserData>
<ExecutionCheckpointRundown xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Name> %2 </Name>
<Timestamp> %3 </Timestamp>
</ExecutionCheckpointRundown>
</UserData>
</template>
</templates>
<events>
<!-- CLR StackWalk Rundown Events -->
<event value="0" version="0" level="win:LogAlways" template="ClrStackWalk"
keywords ="StackKeyword" opcode="CLRStackWalk"
task="CLRStackRundown"
symbol="CLRStackWalkDCStart" message="$(string.RundownPublisher.StackEventMessage)"/>
<!-- CLR GC events for rundown -->
<event value="10" version="0" level="win:Informational" template="GCSettingsRundown"
opcode="GCSettingsRundown"
task="CLRGCRundown"
symbol="GCSettingsRundown" message="$(string.RundownPublisher.GCSettingsRundownEventMessage)"/>
<!-- CLR Method Rundown Events -->
<event value="141" version="0" level="win:Informational" template="MethodLoadUnloadRundown"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStart"
task="CLRMethodRundown"
symbol="MethodDCStart" message="$(string.RundownPublisher.MethodDCStartEventMessage)"/>
<event value="141" version="1" level="win:Informational" template="MethodLoadUnloadRundown_V1"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStart"
task="CLRMethodRundown"
symbol="MethodDCStart_V1" message="$(string.RundownPublisher.MethodDCStart_V1EventMessage)"/>
<event value="141" version="2" level="win:Informational" template="MethodLoadUnloadRundown_V2"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStart"
task="CLRMethodRundown"
symbol="MethodDCStart_V2" message="$(string.RundownPublisher.MethodDCStart_V2EventMessage)"/>
<event value="142" version="0" level="win:Informational" template="MethodLoadUnloadRundown"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEnd"
task="CLRMethodRundown"
symbol="MethodDCEnd" message="$(string.RundownPublisher.MethodDCEndEventMessage)"/>
<event value="142" version="1" level="win:Informational" template="MethodLoadUnloadRundown_V1"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEnd"
task="CLRMethodRundown"
symbol="MethodDCEnd_V1" message="$(string.RundownPublisher.MethodDCEnd_V1EventMessage)"/>
<event value="142" version="2" level="win:Informational" template="MethodLoadUnloadRundown_V2"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEnd"
task="CLRMethodRundown"
symbol="MethodDCEnd_V2" message="$(string.RundownPublisher.MethodDCEnd_V2EventMessage)"/>
<event value="143" version="0" level="win:Informational" template="MethodLoadUnloadRundownVerbose"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStartVerbose"
task="CLRMethodRundown"
symbol="MethodDCStartVerbose" message="$(string.RundownPublisher.MethodDCStartVerboseEventMessage)"/>
<event value="143" version="1" level="win:Informational" template="MethodLoadUnloadRundownVerbose_V1"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStartVerbose"
task="CLRMethodRundown"
symbol="MethodDCStartVerbose_V1" message="$(string.RundownPublisher.MethodDCStartVerbose_V1EventMessage)"/>
<event value="143" version="2" level="win:Informational" template="MethodLoadUnloadRundownVerbose_V2"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStartVerbose"
task="CLRMethodRundown"
symbol="MethodDCStartVerbose_V2" message="$(string.RundownPublisher.MethodDCStartVerbose_V2EventMessage)"/>
<event value="144" version="0" level="win:Informational" template="MethodLoadUnloadRundownVerbose"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEndVerbose"
task="CLRMethodRundown"
symbol="MethodDCEndVerbose" message="$(string.RundownPublisher.MethodDCEndVerboseEventMessage)"/>
<event value="144" version="1" level="win:Informational" template="MethodLoadUnloadRundownVerbose_V1"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEndVerbose"
task="CLRMethodRundown"
symbol="MethodDCEndVerbose_V1" message="$(string.RundownPublisher.MethodDCEndVerbose_V1EventMessage)"/>
<event value="144" version="2" level="win:Informational" template="MethodLoadUnloadRundownVerbose_V2"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEndVerbose"
task="CLRMethodRundown"
symbol="MethodDCEndVerbose_V2" message="$(string.RundownPublisher.MethodDCEndVerbose_V2EventMessage)"/>
<event value="145" version="0" level="win:Informational"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCStartComplete"
task="CLRMethodRundown"
symbol="DCStartComplete"/>
<event value="145" version="1" level="win:Informational" template="DCStartEnd"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCStartComplete"
task="CLRMethodRundown"
symbol="DCStartComplete_V1" message="$(string.RundownPublisher.DCStartCompleteEventMessage)"/>
<event value="146" version="0" level="win:Informational"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCEndComplete"
task="CLRMethodRundown"
symbol="DCEndComplete"/>
<event value="146" version="1" level="win:Informational" template="DCStartEnd"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCEndComplete"
task="CLRMethodRundown"
symbol="DCEndComplete_V1" message="$(string.RundownPublisher.DCEndCompleteEventMessage)"/>
<event value="147" version="0" level="win:Informational"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCStartInit"
task="CLRMethodRundown"
symbol="DCStartInit"/>
<event value="147" version="1" level="win:Informational" template="DCStartEnd"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCStartInit"
task="CLRMethodRundown"
symbol="DCStartInit_V1" message="$(string.RundownPublisher.DCStartInitEventMessage)"/>
<event value="148" version="0" level="win:Informational"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCEndInit"
task="CLRMethodRundown"
symbol="DCEndInit"/>
<event value="148" version="1" level="win:Informational" template="DCStartEnd"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCEndInit"
task="CLRMethodRundown"
symbol="DCEndInit_V1" message="$(string.RundownPublisher.DCEndInitEventMessage)"/>
<event value="149" version="0" level="win:Verbose" template="MethodILToNativeMapRundown"
keywords ="JittedMethodILToNativeMapRundownKeyword" opcode="MethodDCStartILToNativeMap"
task="CLRMethodRundown"
symbol="MethodDCStartILToNativeMap"
message="$(string.RundownPublisher.MethodDCStartILToNativeMapEventMessage)"/>
<event value="150" version="0" level="win:Verbose" template="MethodILToNativeMapRundown"
keywords ="JittedMethodILToNativeMapRundownKeyword" opcode="MethodDCEndILToNativeMap"
task="CLRMethodRundown"
symbol="MethodDCEndILToNativeMap"
message="$(string.RundownPublisher.MethodDCEndILToNativeMapEventMessage)"/>
<!-- CLR Loader Rundown Events -->
<event value="151" version="0" level="win:Informational" template="DomainModuleLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="DomainModuleDCStart"
task="CLRLoaderRundown"
symbol="DomainModuleDCStart" message="$(string.RundownPublisher.DomainModuleDCStartEventMessage)"/>
<event value="151" version="1" level="win:Informational" template="DomainModuleLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="DomainModuleDCStart"
task="CLRLoaderRundown"
symbol="DomainModuleDCStart_V1" message="$(string.RundownPublisher.DomainModuleDCStart_V1EventMessage)"/>
<event value="152" version="0" level="win:Informational" template="DomainModuleLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="DomainModuleDCEnd"
task="CLRLoaderRundown"
symbol="DomainModuleDCEnd" message="$(string.RundownPublisher.DomainModuleDCEndEventMessage)"/>
<event value="152" version="1" level="win:Informational" template="DomainModuleLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="DomainModuleDCEnd"
task="CLRLoaderRundown"
symbol="DomainModuleDCEnd_V1" message="$(string.RundownPublisher.DomainModuleDCEnd_V1EventMessage)"/>
<event value="153" version="0" level="win:Informational" template="ModuleLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="ModuleDCStart"
task="CLRLoaderRundown"
symbol="ModuleDCStart" message="$(string.RundownPublisher.ModuleDCStartEventMessage)"/>
<event value="153" version="1" level="win:Informational" template="ModuleLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword PerfTrackRundownKeyword" opcode="ModuleDCStart"
task="CLRLoaderRundown"
symbol="ModuleDCStart_V1" message="$(string.RundownPublisher.ModuleDCStart_V1EventMessage)"/>
<event value="153" version="2" level="win:Informational" template="ModuleLoadUnloadRundown_V2"
keywords ="LoaderRundownKeyword PerfTrackRundownKeyword" opcode="ModuleDCStart"
task="CLRLoaderRundown"
symbol="ModuleDCStart_V2" message="$(string.RundownPublisher.ModuleDCStart_V2EventMessage)"/>
<event value="154" version="0" level="win:Informational" template="ModuleLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="ModuleDCEnd"
task="CLRLoaderRundown"
symbol="ModuleDCEnd" message="$(string.RundownPublisher.ModuleDCEndEventMessage)"/>
<event value="154" version="1" level="win:Informational" template="ModuleLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword PerfTrackRundownKeyword" opcode="ModuleDCEnd"
task="CLRLoaderRundown"
symbol="ModuleDCEnd_V1" message="$(string.RundownPublisher.ModuleDCEnd_V1EventMessage)"/>
<event value="154" version="2" level="win:Informational" template="ModuleLoadUnloadRundown_V2"
keywords ="LoaderRundownKeyword PerfTrackRundownKeyword" opcode="ModuleDCEnd"
task="CLRLoaderRundown"
symbol="ModuleDCEnd_V2" message="$(string.RundownPublisher.ModuleDCEnd_V2EventMessage)"/>
<event value="155" version="0" level="win:Informational" template="AssemblyLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="AssemblyDCStart"
task="CLRLoaderRundown"
symbol="AssemblyDCStart" message="$(string.RundownPublisher.AssemblyDCStartEventMessage)"/>
<event value="155" version="1" level="win:Informational" template="AssemblyLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="AssemblyDCStart"
task="CLRLoaderRundown"
symbol="AssemblyDCStart_V1" message="$(string.RundownPublisher.AssemblyDCStart_V1EventMessage)"/>
<event value="156" version="0" level="win:Informational" template="AssemblyLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="AssemblyDCEnd"
task="CLRLoaderRundown"
symbol="AssemblyDCEnd" message="$(string.RundownPublisher.AssemblyDCEndEventMessage)"/>
<event value="156" version="1" level="win:Informational" template="AssemblyLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="AssemblyDCEnd"
task="CLRLoaderRundown"
symbol="AssemblyDCEnd_V1" message="$(string.RundownPublisher.AssemblyDCEnd_V1EventMessage)"/>
<event value="157" version="0" level="win:Informational" template="AppDomainLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="AppDomainDCStart"
task="CLRLoaderRundown"
symbol="AppDomainDCStart" message="$(string.RundownPublisher.AppDomainDCStartEventMessage)"/>
<event value="157" version="1" level="win:Informational" template="AppDomainLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="AppDomainDCStart"
task="CLRLoaderRundown"
symbol="AppDomainDCStart_V1" message="$(string.RundownPublisher.AppDomainDCStart_V1EventMessage)"/>
<event value="158" version="0" level="win:Informational" template="AppDomainLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="AppDomainDCEnd"
task="CLRLoaderRundown"
symbol="AppDomainDCEnd" message="$(string.RundownPublisher.AppDomainDCEndEventMessage)"/>
<event value="158" version="1" level="win:Informational" template="AppDomainLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="AppDomainDCEnd"
task="CLRLoaderRundown"
symbol="AppDomainDCEnd_V1" message="$(string.RundownPublisher.AppDomainDCEnd_V1EventMessage)"/>
<event value="159" version="0" level="win:Informational" template="ThreadCreatedRundown"
keywords ="AppDomainResourceManagementRundownKeyword ThreadingKeyword" opcode="ThreadDC"
task="CLRLoaderRundown"
symbol="ThreadDC" message="$(string.RundownPublisher.ThreadCreatedEventMessage)"/>
<event value="160" version="0" level="win:Informational" template="ModuleRangeRundown"
keywords ="PerfTrackRundownKeyword" opcode="ModuleRangeDCStart"
task="CLRPerfTrackRundown"
symbol="ModuleRangeDCStart" message="$(string.RundownPublisher.ModuleRangeDCStartEventMessage)"/>
<event value="161" version="0" level="win:Informational" template="ModuleRangeRundown"
keywords ="PerfTrackRundownKeyword" opcode="ModuleRangeDCEnd"
task="CLRPerfTrackRundown"
symbol="ModuleRangeDCEnd" message="$(string.RundownPublisher.ModuleRangeDCEndEventMessage)"/>
<!-- CLR Runtime Information events for rundown -->
<event value="187" version="0" level="win:Informational" template="RuntimeInformationRundown"
opcode="win:Start"
task="CLRRuntimeInformationRundown"
symbol="RuntimeInformationDCStart" message="$(string.RundownPublisher.RuntimeInformationEventMessage)"/>
<!-- Tiered compilation events 280-289 -->
<event value="280" version="0" level="win:Informational" template="TieredCompilationSettings"
keywords="CompilationKeyword" task="TieredCompilationRundown" opcode="SettingsDCStart"
symbol="TieredCompilationSettingsDCStart" message="$(string.RundownPublisher.TieredCompilationSettingsDCStartEventMessage)"/>
<!-- Execution Checkpoint event 300 -->
<event value="300" version="0" level="win:Informational" template="ExecutionCheckpointRundown"
opcode="ExecutionCheckpointDCEnd" task="ExecutionCheckpointRundown"
symbol="ExecutionCheckpointDCEnd" message="$(string.RundownPublisher.ExecutionCheckpointDCEndEventMessage)"/>
</events>
</provider>
<!-- CLR Stress Publisher-->
<provider name="Microsoft-Windows-DotNETRuntimeStress"
guid="{CC2BCBBA-16B6-4cf3-8990-D74C2E8AF500}"
symbol="MICROSOFT_WINDOWS_DOTNETRUNTIME_STRESS_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--Keywords-->
<keywords>
<!-- Add your keywords here -->
<keyword name="StackKeyword" mask="0x40000000"
message="$(string.StressPublisher.StackKeywordMessage)" symbol="CLR_STRESSSTACK_KEYWORD"/>
</keywords>
<!--Tasks-->
<tasks>
<task name="StressLogTask" symbol="CLR_STRESSLOG_TASK" value="1"
eventGUID="{EA40C74D-4F65-4561-BB26-656231C8967F}"
message="$(string.StressPublisher.StressTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRStackStress" symbol="CLR_STACKSTRESS_TASK"
value="11" eventGUID="{d3363dc0-243a-4620-a4d0-8a07d772f533}"
message="$(string.StressPublisher.StackTaskMessage)">
<opcodes>
<opcode name="CLRStackWalk" message="$(string.StressPublisher.CLRStackWalkOpcodeMessage)" symbol="CLR_STRESSSTACK_STACKWALK_OPCODE" value="82"> </opcode>
</opcodes>
</task>
</tasks>
<!--Templates-->
<templates>
<template tid="StressLog">
<data name="Facility" inType="win:UInt32" outType="win:HexInt32" />
<data name="LogLevel" inType="win:UInt8" />
<data name="Message" inType="win:AnsiString" />
<UserData>
<StressLog xmlns="myNs">
<Facility> %1 </Facility>
<LogLevel> %2 </LogLevel>
<Message> %3 </Message>
</StressLog>
</UserData>
</template>
<template tid="StressLog_V1">
<data name="Facility" inType="win:UInt32" outType="win:HexInt32" />
<data name="LogLevel" inType="win:UInt8" />
<data name="Message" inType="win:AnsiString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<StressLog_V1 xmlns="myNs">
<Facility> %1 </Facility>
<LogLevel> %2 </LogLevel>
<Message> %3 </Message>
<ClrInstanceID> %4 </ClrInstanceID>
</StressLog_V1>
</UserData>
</template>
<template tid="ClrStackWalk">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Reserved1" inType="win:UInt8" />
<data name="Reserved2" inType="win:UInt8" />
<data name="FrameCount" inType="win:UInt32" />
<data name="Stack" count="2" inType="win:Pointer" />
</template>
</templates>
<!--Events-->
<events>
<event value="0" version="0" level="win:Informational" template="StressLog"
task="StressLogTask"
opcode="win:Start"
symbol="StressLogEvent" message="$(string.StressPublisher.StressLogEventMessage)"/>
<event value="0" version="1" level="win:Informational" template="StressLog_V1"
task="StressLogTask"
opcode="win:Start"
symbol="StressLogEvent_V1" message="$(string.StressPublisher.StressLog_V1EventMessage)"/>
<event value="1" version="0" level="win:LogAlways" template="ClrStackWalk"
keywords ="StackKeyword" opcode="CLRStackWalk"
task="CLRStackStress"
symbol="CLRStackWalkStress" message="$(string.StressPublisher.StackEventMessage)"/>
</events>
</provider>
<!-- CLR Private Publisher-->
<provider name="Microsoft-Windows-DotNETRuntimePrivate"
guid="{763FD754-7086-4dfe-95EB-C01A46FAF4CA}"
symbol="MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--CLR Private Publisher-->
<!--Keywords-->
<keywords>
<keyword name="GCPrivateKeyword" mask="0x00000001"
message="$(string.PrivatePublisher.GCPrivateKeywordMessage)" symbol="CLR_PRIVATEGC_KEYWORD"/>
<keyword name="BindingKeyword" mask="0x00000002"
message="$(string.PrivatePublisher.BindingKeywordMessage)" symbol="CLR_PRIVATEBINDING_KEYWORD"/>
<keyword name="NGenForceRestoreKeyword" mask="0x00000004"
message="$(string.PrivatePublisher.NGenForceRestoreKeywordMessage)" symbol="CLR_PRIVATENGENFORCERESTORE_KEYWORD"/>
<keyword name="PrivateFusionKeyword" mask="0x00000008"
message="$(string.PrivatePublisher.PrivateFusionKeywordMessage)" symbol="CLR_PRIVATEFUSION_KEYWORD"/>
<keyword name="LoaderHeapPrivateKeyword" mask="0x00000010"
message="$(string.PrivatePublisher.LoaderHeapPrivateKeywordMessage)" symbol="CLR_PRIVATELOADERHEAP_KEYWORD"/>
<keyword name="SecurityPrivateKeyword" mask="0x00000400"
message="$(string.PrivatePublisher.SecurityPrivateKeywordMessage)" symbol="CLR_PRIVATESECURITY_KEYWORD"/>
<keyword name="InteropPrivateKeyword" mask="0x2000"
message="$(string.PrivatePublisher.InteropPrivateKeywordMessage)" symbol="CLR_INTEROP_KEYWORD"/>
<keyword name="GCHandlePrivateKeyword" mask="0x4000"
message="$(string.PrivatePublisher.GCHandlePrivateKeywordMessage)" symbol="CLR_PRIVATEGCHANDLE_KEYWORD"/>
<keyword name="MulticoreJitPrivateKeyword" mask="0x20000"
message="$(string.PrivatePublisher.MulticoreJitPrivateKeywordMessage)" symbol="CLR_PRIVATEMULTICOREJIT_KEYWORD"/>
<keyword name="StackKeyword" mask="0x40000000"
message="$(string.PrivatePublisher.StackKeywordMessage)" symbol="CLR_PRIVATESTACK_KEYWORD"/>
<keyword name="StartupKeyword" mask="0x80000000"
message="$(string.PrivatePublisher.StartupKeywordMessage)" symbol="CLR_PRIVATESTARTUP_KEYWORD"/>
<keyword name="PerfTrackPrivateKeyword" mask="0x20000000"
message="$(string.PrivatePublisher.PerfTrackKeywordMessage)" symbol="CLR_PERFTRACK_PRIVATE_KEYWORD"/>
<!-- NOTE: This is not used anymore. They are kept around for backcompat with traces that might have already contained these -->
<keyword name="DynamicTypeUsageKeyword" mask="0x00000020"
message="$(string.PrivatePublisher.DynamicTypeUsageMessage)" symbol="CLR_PRIVATE_DYNAMICTYPEUSAGE_KEYWORD"/>
</keywords>
<!--Tasks-->
<tasks>
<task name="GarbageCollectionPrivate" symbol="CLR_GCPRIVATE_TASK"
value="1" eventGUID="{2f1b6bf6-18ff-4645-9501-15df6c64c2cf}"
message="$(string.PrivatePublisher.GarbageCollectionTaskMessage)">
<opcodes>
<opcode name="GCDecision" message="$(string.PrivatePublisher.GCDecisionOpcodeMessage)" symbol="CLR_PRIVATEGC_GCDECISION_OPCODE" value="132"> </opcode>
<opcode name="GCSettings" message="$(string.PrivatePublisher.GCSettingsOpcodeMessage)" symbol="CLR_PRIVATEGC_GCSETTINGS_OPCODE" value="14"> </opcode>
<opcode name="GCOptimized" message="$(string.PrivatePublisher.GCOptimizedOpcodeMessage)" symbol="CLR_PRIVATEGC_GCOPTIMIZED_OPCODE" value="16"> </opcode>
<opcode name="GCPerHeapHistory" message="$(string.PrivatePublisher.GCPerHeapHistoryOpcodeMessage)" symbol="CLR_PRIVATEGC_GCPERHEAPHISTORY_OPCODE" value="17"> </opcode>
<opcode name="GCGlobalHeapHistory" message="$(string.PrivatePublisher.GCGlobalHeapHistoryOpcodeMessage)" symbol="CLR_PRIVATEGC_GCGLOBALHEAPHISTORY_OPCODE" value="18"> </opcode>
<opcode name="GCFullNotify" message="$(string.PrivatePublisher.GCFullNotifyOpcodeMessage)" symbol="CLR_PRIVATEGC_GCFULLNOTIFY_OPCODE" value="19"> </opcode>
<opcode name="GCJoin" message="$(string.PrivatePublisher.GCJoinOpcodeMessage)" symbol="CLR_PRIVATEGC_JOIN_OPCODE" value="20"> </opcode>
<opcode name="PrvGCMarkStackRoots" message="$(string.PrivatePublisher.GCMarkStackRootsOpcodeMessage)" symbol="CLR_PRIVATEGC_MARKSTACKROOTS_OPCODE" value="21"> </opcode>
<opcode name="PrvGCMarkFinalizeQueueRoots" message="$(string.PrivatePublisher.GCMarkFinalizeQueueRootsOpcodeMessage)" symbol="CLR_PRIVATEGC_MARKFINALIZEQUEUEROOTS_OPCODE" value="22"> </opcode>
<opcode name="PrvGCMarkHandles" message="$(string.PrivatePublisher.GCMarkHandlesOpcodeMessage)" symbol="CLR_PRIVATEGC_MARKHANDLES_OPCODE" value="23"> </opcode>
<opcode name="PrvGCMarkCards" message="$(string.PrivatePublisher.GCMarkCardsOpcodeMessage)" symbol="CLR_PRIVATEGC_MARKCARDS_OPCODE" value="24"> </opcode>
<opcode name="BGCBegin" message="$(string.PrivatePublisher.BGCBeginOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCBEGIN_OPCODE" value="25"> </opcode>
<opcode name="BGC1stNonConEnd" message="$(string.PrivatePublisher.BGC1stNonCondEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC1STNONCONEND_OPCODE" value="26"> </opcode>
<opcode name="BGC1stConEnd" message="$(string.PrivatePublisher.BGC1stConEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC1STCONEND_OPCODE" value="27"> </opcode>
<opcode name="BGC2ndNonConBegin" message="$(string.PrivatePublisher.BGC2ndNonConBeginOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC2NDNONCONBEGIN_OPCODE" value="28"> </opcode>
<opcode name="BGC2ndNonConEnd" message="$(string.PrivatePublisher.BGC2ndNonConEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC2NDNONCONEND_OPCODE" value="29"> </opcode>
<opcode name="BGC2ndConBegin" message="$(string.PrivatePublisher.BGC2ndConBeginOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC2NDCONBEGIN_OPCODE" value="30"> </opcode>
<opcode name="BGC2ndConEnd" message="$(string.PrivatePublisher.BGC2ndConEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC2NDCONEND_OPCODE" value="31"> </opcode>
<opcode name="BGCPlanEnd" message="$(string.PrivatePublisher.BGCPlanEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCPLANEND_OPCODE" value="32"> </opcode>
<opcode name="BGCSweepEnd" message="$(string.PrivatePublisher.BGCSweepEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCSWEEPEND_OPCODE" value="33"> </opcode>
<opcode name="BGCDrainMark" message="$(string.PrivatePublisher.BGCDrainMarkOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCDRAINMARK_OPCODE" value="34"> </opcode>
<opcode name="BGCRevisit" message="$(string.PrivatePublisher.BGCRevisitOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCREVISIT_OPCODE" value="35"> </opcode>
<opcode name="BGCOverflow" message="$(string.PrivatePublisher.BGCOverflowOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCOVERFLOW_OPCODE" value="36"> </opcode>
<opcode name="BGCAllocWaitBegin" message="$(string.PrivatePublisher.BGCAllocWaitBeginOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCALLOCWAITBEGIN_OPCODE" value="37"> </opcode>
<opcode name="BGCAllocWaitEnd" message="$(string.PrivatePublisher.BGCAllocWaitEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCALLOCWAITEND_OPCODE" value="38"> </opcode>
<opcode name="PrvFinalizeObject" message="$(string.PrivatePublisher.FinalizeObjectOpcodeMessage)" symbol="CLR_PRIVATEGC_FINALIZEOBJECT_OPCODE" value="39"> </opcode>
<opcode name="CCWRefCountChange" message="$(string.PrivatePublisher.CCWRefCountChangeOpcodeMessage)" symbol="CLR_PRIVATEGC_CCWREFCOUNTCHANGE_OPCODE" value="40"> </opcode>
<opcode name="SetGCHandle" message="$(string.PrivatePublisher.SetGCHandleOpcodeMessage)" symbol="CLR_PRIVATEGC_SETGCHANDLE_OPCODE" value="42"> </opcode>
<opcode name="DestroyGCHandle" message="$(string.PrivatePublisher.DestroyGCHandleOpcodeMessage)" symbol="CLR_PRIVATEGC_DESTROYGCHANDLE_OPCODE" value="43"> </opcode>
<opcode name="PinPlugAtGCTime" message="$(string.PrivatePublisher.PinPlugAtGCTimeOpcodeMessage)" symbol="CLR_PRIVATEGC_PINGCPLUG_OPCODE" value="44"> </opcode>
<opcode name="BGC1stSweepEnd" message="$(string.PrivatePublisher.BGC1stSweepEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC1STSWEEPEND_OPCODE" value="45"> </opcode>
</opcodes>
</task>
<task name="CLRFailFast" symbol="CLR_FAILFAST_TASK"
value="2" eventGUID="{EE9EDE12-C5F5-4995-81A2-DCFB5F6B80C8}"
message="$(string.PrivatePublisher.FailFastTaskMessage)">
<opcodes>
<opcode name="FailFast" message="$(string.PrivatePublisher.FailFastOpcodeMessage)" symbol="CLR_FAILFAST_FAILFAST_OPCODE" value="52"> </opcode>
</opcodes>
</task>
<task name="Startup" symbol="CLR_STARTUP_TASK"
value="9" eventGUID="{02D08A4F-FD01-4538-989B-03E437B950F4}"
message="$(string.PrivatePublisher.StartupTaskMessage)">
<opcodes>
<opcode name="EEStartupStart" message="$(string.PrivatePublisher.EEStartupStartOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EESTARTUPSTART_OPCODE" value="128"> </opcode>
<opcode name="EEStartupEnd" message="$(string.PrivatePublisher.EEStartupEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EESTARTUPEND_OPCODE" value="129"> </opcode>
<opcode name="EEConfigSetup" message="$(string.PrivatePublisher.EEConfigSetupOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EECONFIGSETUP_OPCODE" value="130"> </opcode>
<opcode name="EEConfigSetupEnd" message="$(string.PrivatePublisher.EEConfigSetupEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EECONFIGSETUPEND_OPCODE" value="131"> </opcode>
<opcode name="LoadSystemBases" message="$(string.PrivatePublisher.LoadSystemBasesOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LOADSYSTEMBASES_OPCODE" value="132"> </opcode>
<opcode name="LoadSystemBasesEnd" message="$(string.PrivatePublisher.LoadSystemBasesEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LOADSYSTEMBASESEND_OPCODE" value="133"> </opcode>
<opcode name="ExecExe" message="$(string.PrivatePublisher.ExecExeOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EXEEXE_OPCODE" value="134"> </opcode>
<opcode name="ExecExeEnd" message="$(string.PrivatePublisher.ExecExeEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EXEEXEEND_OPCODE" value="135"> </opcode>
<opcode name="Main" message="$(string.PrivatePublisher.MainOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_MAIN_OPCODE" value="136"> </opcode>
<opcode name="MainEnd" message="$(string.PrivatePublisher.MainEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_MAINEND_OPCODE" value="137"> </opcode>
<opcode name="ApplyPolicyStart" message="$(string.PrivatePublisher.ApplyPolicyStartOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_APPLYPOLICYSTART_OPCODE" value="10"> </opcode>
<opcode name="ApplyPolicyEnd" message="$(string.PrivatePublisher.ApplyPolicyEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_APPLYPOLICYEND_OPCODE" value="11"> </opcode>
<opcode name="LdLibShFolder" message="$(string.PrivatePublisher.LdLibShFolderOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LDLIBSHFOLDER_OPCODE" value="12"> </opcode>
<opcode name="LdLibShFolderEnd" message="$(string.PrivatePublisher.LdLibShFolderEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LDLIBSHFOLDEREND_OPCODE" value="13"> </opcode>
<opcode name="PrestubWorker" message="$(string.PrivatePublisher.PrestubWorkerOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_PRESTUBWORKER_OPCODE" value="14"> </opcode>
<opcode name="PrestubWorkerEnd" message="$(string.PrivatePublisher.PrestubWorkerEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_PRESTUBWORKEREND_OPCODE" value="15"> </opcode>
<opcode name="GetInstallationStart" message="$(string.PrivatePublisher.GetInstallationStartOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_GETINSTALLATIONSTART_OPCODE" value="16"> </opcode>
<opcode name="GetInstallationEnd" message="$(string.PrivatePublisher.GetInstallationEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_GETINSTALLATIONEND_OPCODE" value="17"> </opcode>
<opcode name="OpenHModule" message="$(string.PrivatePublisher.OpenHModuleOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_OPENHMODULE_OPCODE" value="18"> </opcode>
<opcode name="OpenHModuleEnd" message="$(string.PrivatePublisher.OpenHModuleEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_OPENHMODULEEND_OPCODE" value="19"> </opcode>
<opcode name="ExplicitBindStart" message="$(string.PrivatePublisher.ExplicitBindStartOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EXPLICITBINDSTART_OPCODE" value="20"> </opcode>
<opcode name="ExplicitBindEnd" message="$(string.PrivatePublisher.ExplicitBindEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EXPLICITBINDEND_OPCODE" value="21"> </opcode>
<opcode name="ParseXml" message="$(string.PrivatePublisher.ParseXmlOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_PARSEXML_OPCODE" value="22"> </opcode>
<opcode name="ParseXmlEnd" message="$(string.PrivatePublisher.ParseXmlEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_PARSEXMLEND_OPCODE" value="23"> </opcode>
<opcode name="InitDefaultDomain" message="$(string.PrivatePublisher.InitDefaultDomainOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_INITDEFAULTDOMAIN_OPCODE" value="24"> </opcode>
<opcode name="InitDefaultDomainEnd" message="$(string.PrivatePublisher.InitDefaultDomainEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_INITDEFAULTDOMAINEND_OPCODE" value="25"> </opcode>
<opcode name="InitSecurity" message="$(string.PrivatePublisher.InitSecurityOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_INITSECURITY_OPCODE" value="26"> </opcode>
<opcode name="InitSecurityEnd" message="$(string.PrivatePublisher.InitSecurityEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_INITSECURITYEND_OPCODE" value="27"> </opcode>
<opcode name="AllowBindingRedirs" message="$(string.PrivatePublisher.AllowBindingRedirsOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_ALLOWBINDINGREDIRS_OPCODE" value="28"> </opcode>
<opcode name="AllowBindingRedirsEnd" message="$(string.PrivatePublisher.AllowBindingRedirsEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_ALLOWBINDINGREDIRSEND_OPCODE" value="29"> </opcode>
<opcode name="EEConfigSync" message="$(string.PrivatePublisher.EEConfigSyncOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EECONFIGSYNC_OPCODE" value="30"> </opcode>
<opcode name="EEConfigSyncEnd" message="$(string.PrivatePublisher.EEConfigSyncEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EECONFIGSYNCEND_OPCODE" value="31"> </opcode>
<opcode name="FusionBinding" message="$(string.PrivatePublisher.FusionBindingOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONBINDING_OPCODE" value="32"> </opcode>
<opcode name="FusionBindingEnd" message="$(string.PrivatePublisher.FusionBindingEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONBINDINGEND_OPCODE" value="33"> </opcode>
<opcode name="LoaderCatchCall" message="$(string.PrivatePublisher.LoaderCatchCallOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LOADERCATCHCALL_OPCODE" value="34"> </opcode>
<opcode name="LoaderCatchCallEnd" message="$(string.PrivatePublisher.LoaderCatchCallEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LOADERCATCHCALLEND_OPCODE" value="35"> </opcode>
<opcode name="FusionInit" message="$(string.PrivatePublisher.FusionInitOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONINIT_OPCODE" value="36"> </opcode>
<opcode name="FusionInitEnd" message="$(string.PrivatePublisher.FusionInitEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONINITEND_OPCODE" value="37"> </opcode>
<opcode name="FusionAppCtx" message="$(string.PrivatePublisher.FusionAppCtxOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONAPPCTX_OPCODE" value="38"> </opcode>
<opcode name="FusionAppCtxEnd" message="$(string.PrivatePublisher.FusionAppCtxEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONAPPCTXEND_OPCODE" value="39"> </opcode>
<opcode name="Fusion2EE" message="$(string.PrivatePublisher.Fusion2EEOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSION2EE_OPCODE" value="40"> </opcode>
<opcode name="Fusion2EEEnd" message="$(string.PrivatePublisher.Fusion2EEEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSION2EEEND_OPCODE" value="41"> </opcode>
<opcode name="SecurityCatchCall" message="$(string.PrivatePublisher.SecurityCatchCallOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_SECURITYCATCHCALL_OPCODE" value="42"> </opcode>
<opcode name="SecurityCatchCallEnd" message="$(string.PrivatePublisher.SecurityCatchCallEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_SECURITYCATCHCALLEND_OPCODE" value="43"> </opcode>
</opcodes>
</task>
<task name="Binding" symbol="CLR_BINDING_TASK"
value="10" eventGUID="{E90E32BA-E396-4e6a-A790-0A08C6C925DC}"
message="$(string.PrivatePublisher.BindingTaskMessage)">
<opcodes>
<opcode name="BindingPolicyPhaseStart" message="$(string.PrivatePublisher.BindingPolicyPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGPOLICYPHASESTART_OPCODE" value="51"> </opcode>
<opcode name="BindingPolicyPhaseEnd" message="$(string.PrivatePublisher.BindingPolicyPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGPOLICYPHASEEND_OPCODE" value="52"> </opcode>
<opcode name="BindingNgenPhaseStart" message="$(string.PrivatePublisher.BindingNgenPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGNGENPHASESTART_OPCODE" value="53"> </opcode>
<opcode name="BindingNgenPhaseEnd" message="$(string.PrivatePublisher.BindingNgenPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGNGENPHASEEND_OPCODE" value="54"> </opcode>
<opcode name="BindingLookupAndProbingPhaseStart" message="$(string.PrivatePublisher.BindingLoopupAndProbingPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGLOOKUPANDPROBINGPHASESTART_OPCODE" value="55"> </opcode>
<opcode name="BindingLookupAndProbingPhaseEnd" message="$(string.PrivatePublisher.BindingLookupAndProbingPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGLOOKUPANDPROBINGPHASEEND_OPCODE" value="56"> </opcode>
<opcode name="LoaderPhaseStart" message="$(string.PrivatePublisher.LoaderPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERPHASESTART_OPCODE" value="57"> </opcode>
<opcode name="LoaderPhaseEnd" message="$(string.PrivatePublisher.LoaderPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERPHASEEND_OPCODE" value="58"> </opcode>
<opcode name="BindingPhaseStart" message="$(string.PrivatePublisher.BindingPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGPHASESTART_OPCODE" value="59"> </opcode>
<opcode name="BindingPhaseEnd" message="$(string.PrivatePublisher.BindingPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGPHASEEND_OPCODE" value="60"> </opcode>
<opcode name="BindingDownloadPhaseStart" message="$(string.PrivatePublisher.BindingDownloadPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGDOWNLOADPHASESTART_OPCODE" value="61"> </opcode>
<opcode name="BindingDownloadPhaseEnd" message="$(string.PrivatePublisher.BindingDownloadPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGDOWNLOADPHASEEND_OPCODE" value="62"> </opcode>
<opcode name="LoaderAssemblyInitPhaseStart" message="$(string.PrivatePublisher.LoaderAssemblyInitPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERASSEMBLYINITPHASESTART_OPCODE" value="63"> </opcode>
<opcode name="LoaderAssemblyInitPhaseEnd" message="$(string.PrivatePublisher.LoaderAssemblyInitPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERASSEMBLYINITPHASEEND_OPCODE" value="64"> </opcode>
<opcode name="LoaderMappingPhaseStart" message="$(string.PrivatePublisher.LoaderMappingPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERMAPPINGPHASESTART_OPCODE" value="65"> </opcode>
<opcode name="LoaderMappingPhaseEnd" message="$(string.PrivatePublisher.LoaderMappingPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERMAPPINGPHASEEND_OPCODE" value="66"> </opcode>
<opcode name="LoaderDeliverEventsPhaseStart" message="$(string.PrivatePublisher.LoaderDeliverEventPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERDELIVERYEVENTSPHASESTART_OPCODE" value="67"> </opcode>
<opcode name="LoaderDeliverEventsPhaseEnd" message="$(string.PrivatePublisher.LoaderDeliverEventsPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERDELIVERYEVENTSPHASEEND_OPCODE" value="68"> </opcode>
<opcode name="FusionMessage" message="$(string.PrivatePublisher.FusionMessageOpcodeMessage)" symbol="CLR_PRIVATEBINDING_FUSIONMESSAGE_OPCODE" value="70"> </opcode>
<opcode name="FusionErrorCode" message="$(string.PrivatePublisher.FusionErrorCodeOpcodeMessage)" symbol="CLR_PRIVATEBINDING_FUSIONERRORCODE_OPCODE" value="71"> </opcode>
</opcodes>
</task>
<task name="CLRStackPrivate" symbol="CLR_STACKPRIVATE_TASK"
value="11" eventGUID="{d3363dc0-243a-4620-a4d0-8a07d772f533}"
message="$(string.PrivatePublisher.StackTaskMessage)">
<opcodes>
<opcode name="CLRStackWalk" message="$(string.PrivatePublisher.CLRStackWalkOpcodeMessage)" symbol="CLR_PRIVATESTACK_STACKWALK_OPCODE" value="82"> </opcode>
</opcodes>
</task>
<task name="EvidenceGeneratedTask" symbol="CLR_EVIDENCE_GENERATED_TASK"
value="12" eventGUID="{24333617-5ae4-4f9e-a5c5-5ede1bc59207}"
message="$(string.PrivatePublisher.EvidenceGeneratedTaskMessage)">
<opcodes>
<opcode name="EvidenceGenerated" message="$(string.PrivatePublisher.EvidenceGeneratedMessage)" symbol="CLR_EVIDENCEGENERATED_OPCODE" value="10"/>
</opcodes>
</task>
<task name="CLRNgenBinder" symbol="CLR_NGEN_BINDER_TASK"
value="13" eventGUID="{861f5339-19d6-4873-b350-7b03228bda7c}"
message="$(string.PrivatePublisher.NgenBinderTaskMessage)">
<opcodes>
<opcode name="NgenBind" message="$(string.PrivatePublisher.NgenBindOpcodeMessage)" symbol="CLR_NGEN_BINDER_OPCODE" value="69"></opcode>
</opcodes>
</task>
<task name="TransparencyComputation" symbol="CLR_TRANSPARENCY_COMPUTATION_TASK"
value="14" eventGUID="{e2444377-ddf9-4589-a885-08d6092521df}"
message="$(string.PrivatePublisher.TransparencyComputationMessage)">
<opcodes>
<opcode name="ModuleTransparencyComputationStart" message="$(string.PrivatePublisher.ModuleTransparencyComputationStartMessage)" symbol="CLR_MODULE_TRANSPARENCY_COMPUTATION_START_OPCODE" value="83"/>
<opcode name="ModuleTransparencyComputationEnd" message="$(string.PrivatePublisher.ModuleTransparencyComputationEndMessage)" symbol="CLR_MODULE_TRANSPARENCY_COMPUTATION_END_OPCODE" value="84"/>
<opcode name="TypeTransparencyComputationStart" message="$(string.PrivatePublisher.TypeTransparencyComputationStartMessage)" symbol="CLR_TYPE_TRANSPARENCY_COMPUTATION_START_OPCODE" value="85"/>
<opcode name="TypeTransparencyComputationEnd" message="$(string.PrivatePublisher.TypeTransparencyComputationEndMessage)" symbol="CLR_TYPE_TRANSPARENCY_COMPUTATION_END_OPCODE" value="86"/>
<opcode name="MethodTransparencyComputationStart" message="$(string.PrivatePublisher.MethodTransparencyComputationStartMessage)" symbol="CLR_METHOD_TRANSPARENCY_COMPUTATION_START_OPCODE" value="87"/>
<opcode name="MethodTransparencyComputationEnd" message="$(string.PrivatePublisher.MethodTransparencyComputationEndMessage)" symbol="CLR_METHOD_TRANSPARENCY_COMPUTATION_END_OPCODE" value="88"/>
<opcode name="FieldTransparencyComputationStart" message="$(string.PrivatePublisher.FieldTransparencyComputationStartMessage)" symbol="CLR_FIELD_TRANSPARENCY_COMPUTATION_START_OPCODE" value="89"/>
<opcode name="FieldTransparencyComputationEnd" message="$(string.PrivatePublisher.FieldTransparencyComputationEndMessage)" symbol="CLR_FIELD_TRANSPARENCY_COMPUTATION_END_OPCODE" value="90"/>
<opcode name="TokenTransparencyComputationStart" message="$(string.PrivatePublisher.TokenTransparencyComputationStartMessage)" symbol="CLR_TOKEN_TRANSPARENCY_COMPUTATION_START_OPCODE" value="91"/>
<opcode name="TokenTransparencyComputationEnd" message="$(string.PrivatePublisher.TokenTransparencyComputationEndMessage)" symbol="CLR_TOKEN_TRANSPARENCY_COMPUTATION_END_OPCODE" value="92"/>
</opcodes>
</task>
<task name="LoaderHeapAllocation" symbol="CLR_LOADERHEAPALLOCATIONPRIVATE_TASK"
value="16" eventGUID="{87f1e966-d604-41ba-b1ab-183849dff29d}"
message="$(string.PrivatePublisher.LoaderHeapAllocationPrivateTaskMessage)">
<opcodes>
<opcode name="AllocRequest" message="$(string.PrivatePublisher.LoaderHeapPrivateAllocRequestMessage)" symbol="CLR_LOADERHEAP_ALLOCREQUEST_OPCODE" value="97"/>
</opcodes>
</task>
<task name="CLRMulticoreJit" symbol="CLR_MULTICOREJIT_TASK"
value="17" eventGUID="{B85AD9E5-658B-4215-8DDB-834040F4BC10}"
message="$(string.PrivatePublisher.MulticoreJitTaskMessage)">
<opcodes>
<opcode name="Common" message="$(string.PrivatePublisher.MulticoreJitOpcodeMessage)" symbol="CLR_MULTICOREJIT_COMMON_OPCODE" value="10"> </opcode>
<opcode name="MethodCodeReturned" message="$(string.PrivatePublisher.MulticoreJitOpcodeMethodCodeReturnedMessage)" symbol="CLR_MULTICOREJIT_METHODCODERETURNED_OPCODE" value="11"> </opcode>
</opcodes>
</task>
<task name="CLRPerfTrackPrivate" symbol="CLR_PERFTRACK_PRIVATE_TASK"
value="20" eventGUID="{EAC685F6-2104-4dec-88FD-91E4254221EC}"
message="$(string.PrivatePublisher.PerfTrackTaskMessage)">
<opcodes>
<opcode name="ModuleRangeLoadPrivate" message="$(string.PrivatePublisher.ModuleRangeLoadOpcodeMessage)" symbol="CLR_PERFTRACK_PRIVATE_MODULE_RANGE_LOAD_OPCODE" value="10"> </opcode>
</opcodes>
</task>
<!-- NOTE: These are not used anymore. They are kept around for backcompat with traces that might have already contained these -->
<task name="DynamicTypeUsage" symbol="CLR_DYNAMICTYPEUSAGE_TASK"
value="22" eventGUID="{4F67E18D-EEDD-4056-B8CE-DD822FE54553}"
message="$(string.PrivatePublisher.DynamicTypeUsageTaskMessage)">
<opcodes>
<opcode name="IInspectableRuntimeClassName" message="$(string.PrivatePublisher.IInspectableRuntimeClassNameOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_IINSPECTABLERUNTIMECLASSNAME_OPCODE" value="11"> </opcode>
<opcode name="WinRTUnbox" message="$(string.PrivatePublisher.WinRTUnboxOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_WINRTUNBOX_OPCODE" value="12"> </opcode>
<opcode name="CreateRCW" message="$(string.PrivatePublisher.CreateRCWOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_CREATERCW_OPCODE" value="13"> </opcode>
<opcode name="RCWVariance" message="$(string.PrivatePublisher.RCWVarianceOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_RCWVARIANCE_OPCODE" value="14"> </opcode>
<opcode name="RCWIEnumerableCasting" message="$(string.PrivatePublisher.RCWIEnumerableCastingOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_RCWIENUMERABLECASTING_OPCODE" value="15"> </opcode>
<opcode name="CreateCCW" message="$(string.PrivatePublisher.CreateCCWOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_CREATECCW_OPCODE" value="16"> </opcode>
<opcode name="CCWVariance" message="$(string.PrivatePublisher.CCWVarianceOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_CCWVARIANCE_OPCODE" value="17"> </opcode>
<opcode name="ObjectVariantMarshallingToNative" message="$(string.PrivatePublisher.ObjectVariantMarshallingToNativeOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_OBJECTVARIANTMARSHALLINGTONATIVE_OPCODE" value="18"> </opcode>
<opcode name="GetTypeFromGUID" message="$(string.PrivatePublisher.GetTypeFromGUIDOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_GETTYPEFROMGUID_OPCODE" value="19"> </opcode>
<opcode name="GetTypeFromProgID" message="$(string.PrivatePublisher.GetTypeFromProgIDOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_GETTYPEFROMPROGID_OPCODE" value="20"> </opcode>
<opcode name="ConvertToCallbackEtw" message="$(string.PrivatePublisher.ConvertToCallbackEtwOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_CONVERTTOCALLBACKETW_OPCODE" value="21"> </opcode>
<opcode name="BeginCreateManagedReference" message="$(string.PrivatePublisher.BeginCreateManagedReferenceOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_BEGINCREATEMANAGEDREFERENCE_OPCODE" value="22"> </opcode>
<opcode name="EndCreateManagedReference" message="$(string.PrivatePublisher.EndCreateManagedReferenceOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_ENDCREATEMANAGEDREFERENCE_OPCODE" value="23"> </opcode>
<opcode name="ObjectVariantMarshallingToManaged" message="$(string.PrivatePublisher.ObjectVariantMarshallingToManagedOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_OBJECTVARIANTMARSHALLINGTOMANAGED_OPCODE" value="24"> </opcode>
</opcodes>
</task>
</tasks>
<maps>
<valueMap name="ModuleRangeSectionTypeMap">
<map value="0x1" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ModuleSection)"/>
<map value="0x2" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.EETableSection)"/>
<map value="0x3" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.WriteDataSection)"/>
<map value="0x4" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.WriteableDataSection)"/>
<map value="0x5" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DataSection)"/>
<map value="0x6" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.RVAStaticsSection)"/>
<map value="0x7" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.EEDataSection)"/>
<map value="0x8" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoTableEagerSection)"/>
<map value="0x9" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoTableSection)"/>
<map value="0xA" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.EEReadonlyData)"/>
<map value="0xB" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlyData)"/>
<map value="0xC" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ClassSection)"/>
<map value="0xD" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CrossDomainInfoSection)"/>
<map value="0xE" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodDescSection)"/>
<map value="0xF" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodDescWriteableSection)"/>
<map value="0x10" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ExceptionSection)"/>
<map value="0x11" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.InstrumentSection)"/>
<map value="0x12" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.VirtualImportThunkSection)"/>
<map value="0x13" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ExternalMethodThunkSection)"/>
<map value="0x14" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.HelperTableSection)"/>
<map value="0x15" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeWriteableSection)"/>
<map value="0x16" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeWriteSection)"/>
<map value="0x17" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeSection)"/>
<map value="0x18" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.Win32ResourcesSection)"/>
<map value="0x19" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.HeaderSection)"/>
<map value="0x1A" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MetadataSection)"/>
<map value="0x1B" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoSection)"/>
<map value="0x1C" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ImportTableSection)"/>
<map value="0x1D" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CodeSection)"/>
<map value="0x1E" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CodeHeaderSection)"/>
<map value="0x1F" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CodeManagerSection)"/>
<map value="0x20" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.UnwindDataSection)"/>
<map value="0x21" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.RuntimeFunctionSection)"/>
<map value="0x22" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.StubsSection)"/>
<map value="0x23" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.StubDispatchDataSection)"/>
<map value="0x24" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ExternalMethodDataSection)"/>
<map value="0x25" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoDelayListSection)"/>
<map value="0x26" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlySharedSection)"/>
<map value="0x27" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlySection)"/>
<map value="0x28" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ILSection)"/>
<map value="0x29" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.GCInfoSection)"/>
<map value="0x2A" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ILMetadataSection)"/>
<map value="0x2B" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ResourcesSection)"/>
<map value="0x2C" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CompressedMapsSection)"/>
<map value="0x2D" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DebugSection)"/>
<map value="0x2E" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.BaseRelocsSection)"/>
</valueMap>
<valueMap name="GCHandleKindMap">
<map value="0x0" message="$(string.PrivatePublisher.GCHandleKind.WeakShortMessage)"/>
<map value="0x1" message="$(string.PrivatePublisher.GCHandleKind.WeakLongMessage)"/>
<map value="0x2" message="$(string.PrivatePublisher.GCHandleKind.StrongMessage)"/>
<map value="0x3" message="$(string.PrivatePublisher.GCHandleKind.PinnedMessage)"/>
<map value="0x4" message="$(string.PrivatePublisher.GCHandleKind.VariableMessage)"/>
<map value="0x5" message="$(string.PrivatePublisher.GCHandleKind.RefCountedMessage)"/>
<map value="0x6" message="$(string.PrivatePublisher.GCHandleKind.DependentMessage)"/>
<map value="0x7" message="$(string.PrivatePublisher.GCHandleKind.AsyncPinnedMessage)"/>
<map value="0x8" message="$(string.PrivatePublisher.GCHandleKind.SizedRefMessage)"/>
</valueMap>
<bitMap name="ModuleRangeIBCTypeMap">
<map value="0x1" message="$(string.PrivatePublisher.ModuleRangeIBCTypeMap.IBCUnprofiledSectionMessage)"/>
<map value="0x2" message="$(string.PrivatePublisher.ModuleRangeIBCTypeMap.IBCProfiledSectionMessage)"/>
</bitMap>
<bitMap name="ModuleRangeTypeMap">
<map value="0x1" message="$(string.PrivatePublisher.ModuleRangeTypeMap.HotRangeMessage)"/>
<map value="0x2" message="$(string.PrivatePublisher.ModuleRangeTypeMap.WarmRangeMessage)"/>
<map value="0x4" message="$(string.PrivatePublisher.ModuleRangeTypeMap.ColdRangeMessage)"/>
<map value="0x8" message="$(string.PrivatePublisher.ModuleRangeTypeMap.HotColdRangeMessage)"/>
</bitMap>
</maps>
<!--Templates-->
<templates>
<!--Private Templates-->
<template tid="ClrStackWalk">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Reserved1" inType="win:UInt8" />
<data name="Reserved2" inType="win:UInt8" />
<data name="FrameCount" inType="win:UInt32" />
<data name="Stack" count="2" inType="win:Pointer" />
</template>
<template tid="EvidenceGenerated">
<data name="Type" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="AppDomain" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="ILImage" inType="win:UnicodeString"/>
<data name="ClrInstanceID" inType="win:UInt16"/>
<UserData>
<EvidenceGenerated xmlns="myNs">
<Type> %1 </Type>
<AppDomain> %2 </AppDomain>
<ILImage> %3 </ILImage>
</EvidenceGenerated>
</UserData>
</template>
<template tid="GCDecision">
<data name="DoCompact" inType="win:Boolean" />
<UserData>
<GCDecision xmlns="myNs">
<DoCompact> %1 </DoCompact>
</GCDecision>
</UserData>
</template>
<template tid="GCDecision_V1">
<data name="DoCompact" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCDecision_V1 xmlns="myNs">
<DoCompact> %1 </DoCompact>
<ClrInstanceID> %2 </ClrInstanceID>
</GCDecision_V1>
</UserData>
</template>
<template tid="PrvGCMark">
<data name="HeapNum" inType="win:UInt32" />
<UserData>
<PrvGCMark xmlns="myNs">
<HeapNum> %1 </HeapNum>
</PrvGCMark>
</UserData>
</template>
<template tid="PrvGCMark_V1">
<data name="HeapNum" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<PrvGCMark_V1 xmlns="myNs">
<HeapNum> %1 </HeapNum>
<ClrInstanceID> %2 </ClrInstanceID>
</PrvGCMark_V1>
</UserData>
</template>
<template tid="GCPerHeapHistory">
</template>
<template tid="GCPerHeapHistory_V1">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCPerHeapHistory_V1 xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCPerHeapHistory_V1>
</UserData>
</template>
<template tid="GCGlobalHeap">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<UserData>
<GCGlobalHeap xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
</GCGlobalHeap>
</UserData>
</template>
<template tid="GCGlobalHeap_V1">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCGlobalHeap_V1 xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
<ClrInstanceID> %7 </ClrInstanceID>
</GCGlobalHeap_V1>
</UserData>
</template>
<template tid="GCJoin">
<data name="Heap" inType="win:UInt32" />
<data name="JoinTime" inType="win:UInt32" />
<data name="JoinType" inType="win:UInt32" />
<UserData>
<GCJoin xmlns="myNs">
<Heap> %1 </Heap>
<JoinTime> %2 </JoinTime>
<JoinType> %3 </JoinType>
</GCJoin>
</UserData>
</template>
<template tid="GCJoin_V1">
<data name="Heap" inType="win:UInt32" />
<data name="JoinTime" inType="win:UInt32" />
<data name="JoinType" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCJoin_V1 xmlns="myNs">
<Heap> %1 </Heap>
<JoinTime> %2 </JoinTime>
<JoinType> %3 </JoinType>
<ClrInstanceID> %4 </ClrInstanceID>
</GCJoin_V1>
</UserData>
</template>
<template tid="GCOptimized">
<data name="DesiredAllocation" inType="win:UInt64" outType="win:HexInt64" />
<data name="NewAllocation" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationNumber" inType="win:UInt32" />
<UserData>
<GCOptimized xmlns="myNs">
<DesiredAllocation> %1 </DesiredAllocation>
<NewAllocation> %2 </NewAllocation>
<GenerationNumber> %3 </GenerationNumber>
</GCOptimized>
</UserData>
</template>
<template tid="GCOptimized_V1">
<data name="DesiredAllocation" inType="win:UInt64" outType="win:HexInt64" />
<data name="NewAllocation" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationNumber" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCOptimized_V1 xmlns="myNs">
<DesiredAllocation> %1 </DesiredAllocation>
<NewAllocation> %2 </NewAllocation>
<GenerationNumber> %3 </GenerationNumber>
<ClrInstanceID> %4 </ClrInstanceID>
</GCOptimized_V1>
</UserData>
</template>
<template tid="GCSettings">
<data name="SegmentSize" inType="win:UInt64" />
<data name="LargeObjectSegmentSize" inType="win:UInt64" />
<data name="ServerGC" inType="win:Boolean" />
<UserData>
<GCSettings xmlns="myNs">
<SegmentSize> %1 </SegmentSize>
<LargeObjectSegmentSize> %2 </LargeObjectSegmentSize>
<ServerGC> %3 </ServerGC>
</GCSettings>
</UserData>
</template>
<template tid="GCSettings_V1">
<data name="SegmentSize" inType="win:UInt64" />
<data name="LargeObjectSegmentSize" inType="win:UInt64" />
<data name="ServerGC" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCSettings_V1 xmlns="myNs">
<SegmentSize> %1 </SegmentSize>
<LargeObjectSegmentSize> %2 </LargeObjectSegmentSize>
<ServerGC> %3 </ServerGC>
<ClrInstanceID> %4 </ClrInstanceID>
</GCSettings_V1>
</UserData>
</template>
<template tid="BGCDrainMark">
<data name="Objects" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGCDrainMark xmlns="myNs">
<Objects> %1 </Objects>
<ClrInstanceID> %2 </ClrInstanceID>
</BGCDrainMark>
</UserData>
</template>
<template tid="BGCRevisit">
<data name="Pages" inType="win:UInt64" />
<data name="Objects" inType="win:UInt64" />
<data name="IsLarge" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGCRevisit xmlns="myNs">
<Pages> %1 </Pages>
<Objects> %2 </Objects>
<IsLarge> %3 </IsLarge>
<ClrInstanceID> %4 </ClrInstanceID>
</BGCRevisit>
</UserData>
</template>
<template tid="BGCOverflow">
<data name="Min" inType="win:UInt64" />
<data name="Max" inType="win:UInt64" />
<data name="Objects" inType="win:UInt64" />
<data name="IsLarge" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGCOverflow xmlns="myNs">
<Min> %1 </Min>
<Max> %2 </Max>
<Objects> %3 </Objects>
<IsLarge> %4 </IsLarge>
<ClrInstanceID> %5 </ClrInstanceID>
</BGCOverflow>
</UserData>
</template>
<template tid="BGCOverflow_V1">
<data name="Min" inType="win:UInt64" />
<data name="Max" inType="win:UInt64" />
<data name="Objects" inType="win:UInt64" />
<data name="IsLarge" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="GenNumber" inType="win:UInt32" />
<UserData>
<BGCOverflow_V1 xmlns="myNs">
<Min> %1 </Min>
<Max> %2 </Max>
<Objects> %3 </Objects>
<IsLarge> %4 </IsLarge>
<ClrInstanceID> %5 </ClrInstanceID>
<GenNumber> %6 </GenNumber>
</BGCOverflow_V1>
</UserData>
</template>
<template tid="BGCAllocWait">
<data name="Reason" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGCAllocWait xmlns="myNs">
<Reason> %1 </Reason>
<ClrInstanceID> %2 </ClrInstanceID>
</BGCAllocWait>
</UserData>
</template>
<template tid="GCFullNotify">
<data name="GenNumber" inType="win:UInt32" />
<data name="IsAlloc" inType="win:UInt32" />
<UserData>
<GCFullNotify xmlns="myNs">
<GenNumber> %1 </GenNumber>
<IsAlloc> %2 </IsAlloc>
</GCFullNotify>
</UserData>
</template>
<template tid="GCFullNotify_V1">
<data name="GenNumber" inType="win:UInt32" />
<data name="IsAlloc" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCFullNotify_V1 xmlns="myNs">
<GenNumber> %1 </GenNumber>
<IsAlloc> %2 </IsAlloc>
<ClrInstanceID> %3 </ClrInstanceID>
</GCFullNotify_V1>
</UserData>
</template>
<template tid="BGC1stSweepEnd">
<data name="GenNumber" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGC1stSweepEnd xmlns="myNs">
<GenNumber> %1 </GenNumber>
<ClrInstanceID> %2 </ClrInstanceID>
</BGC1stSweepEnd>
</UserData>
</template>
<template tid="GCNoUserData">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCNoUserData xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCNoUserData>
</UserData>
</template>
<template tid="Startup">
<UserData>
<Startup xmlns="myNs">
</Startup>
</UserData>
</template>
<template tid="Startup_V1">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<Startup_V1 xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</Startup_V1>
</UserData>
</template>
<template tid="FusionMessage">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Prepend" inType="win:Boolean" />
<data name="Message" inType="win:UnicodeString"/>
<UserData>
<FusionMessage xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Prepend> %2 </Prepend>
<Message> %3 </Message>
</FusionMessage>
</UserData>
</template>
<template tid="FusionErrorCode">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Category" inType="win:UInt32" />
<data name="ErrorCode" inType="win:UInt32" />
<UserData>
<FusionErrorCode xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Category> %2 </Category>
<ErrorCode> %3 </ErrorCode>
</FusionErrorCode>
</UserData>
</template>
<template tid="Binding">
<data name="AppDomainID" inType="win:UInt32" />
<data name="LoadContextID" inType="win:UInt32" />
<data name="FromLoaderCache" inType="win:UInt32" />
<data name="DynamicLoad" inType="win:UInt32" />
<data name="AssemblyCodebase" inType="win:UnicodeString" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<Binding xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<LoadContextID> %2 </LoadContextID>
<FromLoaderCache> %3 </FromLoaderCache>
<DynamicLoad> %4 </DynamicLoad>
<AssemblyCodebase> %5 </AssemblyCodebase>
<AssemblyName> %6 </AssemblyName>
<ClrInstanceID> %7 </ClrInstanceID>
</Binding>
</UserData>
</template>
<template tid="NgenBindEvent">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="BindingID" inType="win:UInt64" />
<data name="ReasonCode" inType="win:UInt32" />
<data name="AssemblyName" inType="win:UnicodeString" />
<UserData>
<NgenBindEvent xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<BindingID> %2 </BindingID>
<ReasonCode> %3 </ReasonCode>
<AssemblyName> %4 </AssemblyName>
</NgenBindEvent>
</UserData>
</template>
<template tid="ModuleTransparencyCalculation">
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ModuleTransparencyCalculation xmlns="myNs">
<Module> %1 </Module>
<AppDomainID> %2 </AppDomainID>
<ClrInstanceID> %3 </ClrInstanceID>
</ModuleTransparencyCalculation>
</UserData>
</template>
<template tid="TypeTransparencyCalculation">
<data name="Type" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TypeTransparencyCalculation xmlns="myNs">
<Type> %1 </Type>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<ClrInstanceID> %4 </ClrInstanceID>
</TypeTransparencyCalculation>
</UserData>
</template>
<template tid="MethodTransparencyCalculation">
<data name="Method" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodTransparencyCalculation xmlns="myNs">
<Method> %1 </Method>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<ClrInstanceID> %4 </ClrInstanceID>
</MethodTransparencyCalculation>
</UserData>
</template>
<template tid="FieldTransparencyCalculation">
<data name="Field" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<FieldTransparencyCalculation xmlns="myNs">
<Field> %1 </Field>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<ClrInstanceID> %4 </ClrInstanceID>
</FieldTransparencyCalculation>
</UserData>
</template>
<template tid="TokenTransparencyCalculation">
<data name="Token" inType="win:UInt32" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TokenTransparencyCalculation xmlns="myNs">
<Token> %1 </Token>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<ClrInstanceID> %4 </ClrInstanceID>
</TokenTransparencyCalculation>
</UserData>
</template>
<template tid="ModuleTransparencyCalculationResult">
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsAllCritical" inType="win:Boolean" />
<data name="IsAllTransparent" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="IsOpportunisticallyCritical" inType="win:Boolean" />
<data name="SecurityRuleSet" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ModuleTransparencyCalculationResult xmlns="myNs">
<Module> %1 </Module>
<AppDomainID> %2 </AppDomainID>
<IsAllCritical> %3 </IsAllCritical>
<IsAllTransparent> %4 </IsAllTransparent>
<IsTreatAsSafe> %5 </IsTreatAsSafe>
<IsOpportunisticallyCritical> %6 </IsOpportunisticallyCritical>
<SecurityRuleSet> %7 </SecurityRuleSet>
<ClrInstanceID> %8 </ClrInstanceID>
</ModuleTransparencyCalculationResult>
</UserData>
</template>
<template tid="TypeTransparencyCalculationResult">
<data name="Type" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsAllCritical" inType="win:Boolean" />
<data name="IsAllTransparent" inType="win:Boolean" />
<data name="IsCritical" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TypeTransparencyCalculationResult xmlns="myNs">
<Type> %1 </Type>
<Module> %2 </Module>
<AppDomainID> %3</AppDomainID>
<IsAllCritical> %4 </IsAllCritical>
<IsAllTransparent> %5 </IsAllTransparent>
<IsCritical> %6 </IsCritical>
<IsTreatAsSafe> %7 </IsTreatAsSafe>
<ClrInstanceID> %8 </ClrInstanceID>
</TypeTransparencyCalculationResult>
</UserData>
</template>
<template tid="MethodTransparencyCalculationResult">
<data name="Method" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsCritical" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodTransparencyCalculationResult xmlns="myNs">
<Method> %1 </Method>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<IsCritical> %4 </IsCritical>
<IsTreatAsSafe> %5 </IsTreatAsSafe>
<ClrInstanceID> %6 </ClrInstanceID>
</MethodTransparencyCalculationResult>
</UserData>
</template>
<template tid="FieldTransparencyCalculationResult">
<data name="Field" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsCritical" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<FieldTransparencyCalculationResult xmlns="myNs">
<Field> %1 </Field>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<IsCritical> %4 </IsCritical>
<IsTreatAsSafe> %5 </IsTreatAsSafe>
<ClrInstanceID> %6 </ClrInstanceID>
</FieldTransparencyCalculationResult>
</UserData>
</template>
<template tid="TokenTransparencyCalculationResult">
<data name="Token" inType="win:UInt32" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsCritical" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TokenTransparencyCalculationResult xmlns="myNs">
<Token> %1 </Token>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<IsCritical> %4 </IsCritical>
<IsTreatAsSafe> %5 </IsTreatAsSafe>
<ClrInstanceID> %6 </ClrInstanceID>
</TokenTransparencyCalculationResult>
</UserData>
</template>
<template tid="FailFast">
<data name="FailFastUserMessage" inType="win:UnicodeString" />
<data name="FailedEIP" inType="win:Pointer" />
<data name="OSExitCode" inType="win:UInt32" />
<data name="ClrExitCode" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<FailFast xmlns="myNs">
<FailFastUserMessage> %1 </FailFastUserMessage>
<FailedEIP> %2 </FailedEIP>
<OSExitCode> %3 </OSExitCode>
<ClrExitCode> %4 </ClrExitCode>
<ClrInstanceID> %5 </ClrInstanceID>
</FailFast>
</UserData>
</template>
<template tid="PrvFinalizeObject">
<data name="TypeID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="TypeName" inType="win:UnicodeString" />
</template>
<template tid="CCWRefCountChange">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="COMInterfacePointer" inType="win:Pointer" />
<data name="NewRefCount" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:UnicodeString" />
<data name="NameSpace" inType="win:UnicodeString" />
<data name="Operation" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="CCWRefCountChangeAnsi">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="COMInterfacePointer" inType="win:Pointer" />
<data name="NewRefCount" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:AnsiString" />
<data name="NameSpace" inType="win:AnsiString" />
<data name="Operation" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="PinPlugAtGCTime">
<data name="PlugStart" inType="win:Pointer" />
<data name="PlugEnd" inType="win:Pointer" />
<data name="GapBeforeSize" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="PrvDestroyGCHandle">
<data name="HandleID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="PrvSetGCHandle">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="Kind" map="GCHandleKindMap" inType="win:UInt32" />
<data name="Generation" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="LoaderHeapPrivate">
<data name="LoaderHeapPtr" inType="win:Pointer" />
<data name="MemoryAddress" inType="win:Pointer" />
<data name="RequestSize" inType="win:UInt32" />
<!-- we had a weird problem where the EtwCallout callback (which does stack traces)
was not being called for only this event. By adding this field which makes
the sigature of this event the same as SetGCHandle, we avoid the problem.
ideally this gets ripped out at some point -->
<data name="Unused1" inType="win:UInt32" />
<data name="Unused2" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<LoaderHeapPrivate xmlns="myNs">
<LoaderHeapPtr> %1 </LoaderHeapPtr>
<MemoryAddress> %2 </MemoryAddress>
<RequestSize> %3 </RequestSize>
<ClrInstanceID> %4 </ClrInstanceID>
</LoaderHeapPrivate>
</UserData>
</template>
<template tid="ModuleRangePrivate">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64"/>
<data name="RangeBegin" count="1" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeSize" count="1" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeType" map="ModuleRangeTypeMap" inType="win:UInt8"/>
<data name="IBCType" map="ModuleRangeIBCTypeMap" inType="win:UInt8"/>
<data name="SectionType" map="ModuleRangeSectionTypeMap" inType="win:UInt16" />
<UserData>
<ModuleRange xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<RangeBegin> %3 </RangeBegin>
<RangeSize> %4 </RangeSize>
<RangeType> %5 </RangeType>
<IBCType> %6 </IBCType>
<SectionType> %7 </SectionType>
</ModuleRange>
</UserData>
</template>
<template tid="MulticoreJitPrivate">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="String1" inType="win:UnicodeString" />
<data name="String2" inType="win:UnicodeString" />
<data name="Int1" inType="win:Int32" />
<data name="Int2" inType="win:Int32" />
<data name="Int3" inType="win:Int32" />
<UserData>
<MulticoreJit xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<String1> %2 </String1>
<String2> %3 </String2>
<Int1> %4 </Int1>
<Int2> %5 </Int2>
<Int3> %6 </Int3>
</MulticoreJit>
</UserData>
</template>
<template tid="MulticoreJitMethodCodeReturnedPrivate">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" />
<data name="MethodID" inType="win:UInt64" />
<UserData>
<MulticoreJitMethodCodeReturned xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<MethodID> %3 </MethodID>
</MulticoreJitMethodCodeReturned>
</UserData>
</template>
<template tid="DynamicTypeUsePrivate">
<data name="TypeName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeUse xmlns="myNs">
<TypeName> %1 </TypeName>
<ClrInstanceID> %2 </ClrInstanceID>
</DynamicTypeUse>
</UserData>
</template>
<template tid="DynamicTypeUseTwoParametersPrivate">
<data name="TypeName" inType="win:UnicodeString" />
<data name="SecondTypeName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeUseTwoParameters xmlns="myNs">
<TypeName> %1 </TypeName>
<SecondTypeName> %2 </SecondTypeName>
<ClrInstanceID> %3 </ClrInstanceID>
</DynamicTypeUseTwoParameters>
</UserData>
</template>
<template tid="DynamicTypeUsePrivateVariance">
<data name="TypeName" inType="win:UnicodeString" />
<data name="InterfaceTypeName" inType="win:UnicodeString" />
<data name="VariantInterfaceTypeName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeVariance xmlns="myNs">
<TypeName> %1 </TypeName>
<InterfaceTypeName> %2 </InterfaceTypeName>
<VariantInterfaceTypeName> %3 </VariantInterfaceTypeName>
<ClrInstanceID> %4 </ClrInstanceID>
</DynamicTypeVariance>
</UserData>
</template>
<template tid="DynamicTypeUseStringAndIntPrivate">
<data name="TypeName" inType="win:UnicodeString" />
<data name="Int1" inType="win:Int32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeUseStringAndInt xmlns="myNs">
<TypeName> %1 </TypeName>
<Int1> %2 </Int1>
<ClrInstanceID> %3 </ClrInstanceID>
</DynamicTypeUseStringAndInt>
</UserData>
</template>
<template tid="DynamicTypeUseNoParametersPrivate">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeUseStringAndInt xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</DynamicTypeUseStringAndInt>
</UserData>
</template>
</templates>
<!--Events-->
<events>
<!--Private GC events, value reserved from 0 to 79-->
<event value="1" version="0" level="win:Informational" template="GCDecision"
keywords ="GCPrivateKeyword" opcode="GCDecision"
task="GarbageCollectionPrivate"
symbol="GCDecision" message="$(string.PrivatePublisher.GCDecisionEventMessage)"/>
<event value="1" version="1" level="win:Informational" template="GCDecision_V1"
keywords ="GCPrivateKeyword" opcode="GCDecision"
task="GarbageCollectionPrivate"
symbol="GCDecision_V1" message="$(string.PrivatePublisher.GCDecision_V1EventMessage)"/>
<event value="2" version="0" level="win:Informational" template="GCSettings"
keywords ="GCPrivateKeyword" opcode="GCSettings"
task="GarbageCollectionPrivate"
symbol="GCSettings" message="$(string.PrivatePublisher.GCSettingsEventMessage)"/>
<event value="2" version="1" level="win:Informational" template="GCSettings_V1"
keywords ="GCPrivateKeyword" opcode="GCSettings"
task="GarbageCollectionPrivate"
symbol="GCSettings_V1" message="$(string.PrivatePublisher.GCSettings_V1EventMessage)"/>
<event value="3" version="0" level="win:Verbose" template="GCOptimized"
keywords ="GCPrivateKeyword" opcode="GCOptimized"
task="GarbageCollectionPrivate"
symbol="GCOptimized" message="$(string.PrivatePublisher.GCOptimizedEventMessage)"/>
<event value="3" version="1" level="win:Verbose" template="GCOptimized_V1"
keywords ="GCPrivateKeyword" opcode="GCOptimized"
task="GarbageCollectionPrivate"
symbol="GCOptimized_V1" message="$(string.PrivatePublisher.GCOptimized_V1EventMessage)"/>
<event value="4" version="2" level="win:Informational" template="GCPerHeapHistory"
keywords ="GCPrivateKeyword" opcode="GCPerHeapHistory"
task="GarbageCollectionPrivate"
symbol="GCPerHeapHistory" message="$(string.PrivatePublisher.GCPerHeapHistoryEventMessage)"/>
<event value="4" version="1" level="win:Informational" template="GCPerHeapHistory_V1"
keywords ="GCPrivateKeyword" opcode="GCPerHeapHistory"
task="GarbageCollectionPrivate"
symbol="GCPerHeapHistory_V1" message="$(string.PrivatePublisher.GCPerHeapHistory_V1EventMessage)"/>
<event value="5" version="0" level="win:Informational" template="GCGlobalHeap"
keywords ="GCPrivateKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollectionPrivate"
symbol="GCGlobalHeapHistory" message="$(string.PrivatePublisher.GCGlobalHeapEventMessage)"/>
<event value="5" version="1" level="win:Informational" template="GCGlobalHeap_V1"
keywords ="GCPrivateKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollectionPrivate"
symbol="GCGlobalHeapHistory_V1" message="$(string.PrivatePublisher.GCGlobalHeap_V1EventMessage)"/>
<event value="6" version="0" level="win:Verbose" template="GCJoin"
keywords ="GCPrivateKeyword" opcode="GCJoin"
task="GarbageCollectionPrivate"
symbol="GCJoin" message="$(string.PrivatePublisher.GCJoinEventMessage)"/>
<event value="6" version="1" level="win:Verbose" template="GCJoin_V1"
keywords ="GCPrivateKeyword" opcode="GCJoin"
task="GarbageCollectionPrivate"
symbol="GCJoin_V1" message="$(string.PrivatePublisher.GCJoin_V1EventMessage)"/>
<event value="7" version="0" level="win:Informational" template="PrvGCMark"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkStackRoots"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkStackRoots" message="$(string.PrivatePublisher.GCMarkStackRootsEventMessage)"/>
<event value="7" version="1" level="win:Informational" template="PrvGCMark_V1"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkStackRoots"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkStackRoots_V1" message="$(string.PrivatePublisher.GCMarkStackRoots_V1EventMessage)"/>
<event value="8" version="0" level="win:Informational" template="PrvGCMark"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkFinalizeQueueRoots"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkFinalizeQueueRoots" message="$(string.PrivatePublisher.GCMarkFinalizeQueueRootsEventMessage)"/>
<event value="8" version="1" level="win:Informational" template="PrvGCMark_V1"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkFinalizeQueueRoots"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkFinalizeQueueRoots_V1" message="$(string.PrivatePublisher.GCMarkFinalizeQueueRoots_V1EventMessage)"/>
<event value="9" version="0" level="win:Informational" template="PrvGCMark"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkHandles"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkHandles" message="$(string.PrivatePublisher.GCMarkHandlesEventMessage)"/>
<event value="9" version="1" level="win:Informational" template="PrvGCMark_V1"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkHandles"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkHandles_V1" message="$(string.PrivatePublisher.GCMarkHandles_V1EventMessage)"/>
<event value="10" version="0" level="win:Informational" template="PrvGCMark"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkCards"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkCards" message="$(string.PrivatePublisher.GCMarkCardsEventMessage)"/>
<event value="10" version="1" level="win:Informational" template="PrvGCMark_V1"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkCards"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkCards_V1" message="$(string.PrivatePublisher.GCMarkCards_V1EventMessage)"/>
<event value="11" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGCBegin"
task="GarbageCollectionPrivate"
symbol="BGCBegin" message="$(string.PrivatePublisher.BGCBeginEventMessage)"/>
<event value="12" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC1stNonConEnd"
task="GarbageCollectionPrivate"
symbol="BGC1stNonConEnd" message="$(string.PrivatePublisher.BGC1stNonConEndEventMessage)"/>
<event value="13" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC1stConEnd"
task="GarbageCollectionPrivate"
symbol="BGC1stConEnd" message="$(string.PrivatePublisher.BGC1stConEndEventMessage)"/>
<event value="14" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC2ndNonConBegin"
task="GarbageCollectionPrivate"
symbol="BGC2ndNonConBegin" message="$(string.PrivatePublisher.BGC2ndNonConBeginEventMessage)"/>
<event value="15" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC2ndNonConEnd"
task="GarbageCollectionPrivate"
symbol="BGC2ndNonConEnd" message="$(string.PrivatePublisher.BGC2ndNonConEndEventMessage)"/>
<event value="16" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC2ndConBegin"
task="GarbageCollectionPrivate"
symbol="BGC2ndConBegin" message="$(string.PrivatePublisher.BGC2ndConBeginEventMessage)"/>
<event value="17" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC2ndConEnd"
task="GarbageCollectionPrivate"
symbol="BGC2ndConEnd" message="$(string.PrivatePublisher.BGC2ndConEndEventMessage)"/>
<event value="18" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGCPlanEnd"
task="GarbageCollectionPrivate"
symbol="BGCPlanEnd" message="$(string.PrivatePublisher.BGCPlanEndEventMessage)"/>
<event value="19" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGCSweepEnd"
task="GarbageCollectionPrivate"
symbol="BGCSweepEnd" message="$(string.PrivatePublisher.BGCSweepEndEventMessage)"/>
<event value="20" version="0" level="win:Informational" template="BGCDrainMark"
keywords ="GCPrivateKeyword" opcode="BGCDrainMark"
task="GarbageCollectionPrivate"
symbol="BGCDrainMark" message="$(string.PrivatePublisher.BGCDrainMarkEventMessage)"/>
<event value="21" version="0" level="win:Informational" template="BGCRevisit"
keywords ="GCPrivateKeyword" opcode="BGCRevisit"
task="GarbageCollectionPrivate"
symbol="BGCRevisit" message="$(string.PrivatePublisher.BGCRevisitEventMessage)"/>
<event value="22" version="0" level="win:Informational" template="BGCOverflow"
keywords ="GCPrivateKeyword" opcode="BGCOverflow"
task="GarbageCollectionPrivate"
symbol="BGCOverflow" message="$(string.PrivatePublisher.BGCOverflowEventMessage)"/>
<event value="22" version="1" level="win:Informational" template="BGCOverflow_V1"
keywords ="GCPrivateKeyword" opcode="BGCOverflow"
task="GarbageCollectionPrivate"
symbol="BGCOverflow_V1" message="$(string.PrivatePublisher.BGCOverflowEventMessage)"/>
<event value="23" version="0" level="win:Informational" template="BGCAllocWait"
keywords ="GCPrivateKeyword" opcode="BGCAllocWaitBegin"
task="GarbageCollectionPrivate"
symbol="BGCAllocWaitBegin" message="$(string.PrivatePublisher.BGCAllocWaitEventMessage)"/>
<event value="24" version="0" level="win:Informational" template="BGCAllocWait"
keywords ="GCPrivateKeyword" opcode="BGCAllocWaitEnd"
task="GarbageCollectionPrivate"
symbol="BGCAllocWaitEnd" message="$(string.PrivatePublisher.BGCAllocWaitEventMessage)"/>
<event value="25" version="0" level="win:Informational" template="GCFullNotify"
keywords ="GCPrivateKeyword" opcode="GCFullNotify"
task="GarbageCollectionPrivate"
symbol="GCFullNotify" message="$(string.PrivatePublisher.GCFullNotifyEventMessage)"/>
<event value="25" version="1" level="win:Informational" template="GCFullNotify_V1"
keywords ="GCPrivateKeyword" opcode="GCFullNotify"
task="GarbageCollectionPrivate"
symbol="GCFullNotify_V1" message="$(string.PrivatePublisher.GCFullNotify_V1EventMessage)"/>
<event value="26" version="0" level="win:Informational" template="BGC1stSweepEnd"
keywords ="GCPrivateKeyword" opcode="BGC1stSweepEnd"
task="GarbageCollectionPrivate"
symbol="BGC1stSweepEnd" message="$(string.PrivatePublisher.BGC1stSweepEndEventMessage)"/>
<!--Private events from other components in CLR, starting value 80-->
<event value="80" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEStartupStart"
task="Startup"
symbol="EEStartupStart" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="80" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEStartupStart"
task="Startup"
symbol="EEStartupStart_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="81" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEStartupEnd"
task="Startup"
symbol="EEStartupEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="81" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEStartupEnd"
task="Startup"
symbol="EEStartupEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="82" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEConfigSetup"
task="Startup"
symbol="EEConfigSetup" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="82" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEConfigSetup"
task="Startup"
symbol="EEConfigSetup_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="83" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEConfigSetupEnd"
task="Startup"
symbol="EEConfigSetupEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="83" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEConfigSetupEnd"
task="Startup"
symbol="EEConfigSetupEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="84" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LoadSystemBases"
task="Startup"
symbol="LdSysBases" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="84" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LoadSystemBases"
task="Startup"
symbol="LdSysBases_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="85" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LoadSystemBasesEnd"
task="Startup"
symbol="LdSysBasesEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="85" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LoadSystemBasesEnd"
task="Startup"
symbol="LdSysBasesEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="86" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ExecExe"
task="Startup"
symbol="ExecExe" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="86" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ExecExe"
task="Startup"
symbol="ExecExe_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="87" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ExecExeEnd"
task="Startup"
symbol="ExecExeEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="87" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ExecExeEnd"
task="Startup"
symbol="ExecExeEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="88" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="Main"
task="Startup"
symbol="Main" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="88" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="Main"
task="Startup"
symbol="Main_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="89" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="MainEnd"
task="Startup"
symbol="MainEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="89" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="MainEnd"
task="Startup"
symbol="MainEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="90" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ApplyPolicyStart"
task="Startup"
symbol="ApplyPolicyStart" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="90" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ApplyPolicyStart"
task="Startup"
symbol="ApplyPolicyStart_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="91" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ApplyPolicyEnd"
task="Startup"
symbol="ApplyPolicyEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="91" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ApplyPolicyEnd"
task="Startup"
symbol="ApplyPolicyEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="92" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LdLibShFolder"
task="Startup"
symbol="LdLibShFolder" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="92" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LdLibShFolder"
task="Startup"
symbol="LdLibShFolder_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="93" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LdLibShFolderEnd"
task="Startup"
symbol="LdLibShFolderEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="93" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LdLibShFolderEnd"
task="Startup"
symbol="LdLibShFolderEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="94" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="PrestubWorker"
task="Startup"
symbol="PrestubWorker" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="94" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="PrestubWorker"
task="Startup"
symbol="PrestubWorker_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="95" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="PrestubWorkerEnd"
task="Startup"
symbol="PrestubWorkerEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="95" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="PrestubWorkerEnd"
task="Startup"
symbol="PrestubWorkerEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="96" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="GetInstallationStart"
task="Startup"
symbol="GetInstallationStart" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="96" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="GetInstallationStart"
task="Startup"
symbol="GetInstallationStart_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="97" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="GetInstallationEnd"
task="Startup"
symbol="GetInstallationEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="97" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="GetInstallationEnd"
task="Startup"
symbol="GetInstallationEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="98" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="OpenHModule"
task="Startup"
symbol="OpenHModule" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="98" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="OpenHModule"
task="Startup"
symbol="OpenHModule_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="99" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="OpenHModuleEnd"
task="Startup"
symbol="OpenHModuleEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="99" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="OpenHModuleEnd"
task="Startup"
symbol="OpenHModuleEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="100" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ExplicitBindStart"
task="Startup"
symbol="ExplicitBindStart" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="100" version="1" level="win:Informational" template="Startup_V1"
task="Startup"
keywords ="StartupKeyword" opcode="ExplicitBindStart"
symbol="ExplicitBindStart_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="101" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ExplicitBindEnd"
task="Startup"
symbol="ExplicitBindEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="101" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ExplicitBindEnd"
task="Startup"
symbol="ExplicitBindEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="102" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ParseXml"
task="Startup"
symbol="ParseXml" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="102" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ParseXml"
task="Startup"
symbol="ParseXml_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="103" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ParseXmlEnd"
task="Startup"
symbol="ParseXmlEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="103" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ParseXmlEnd"
task="Startup"
symbol="ParseXmlEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="104" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="InitDefaultDomain"
task="Startup"
symbol="InitDefaultDomain" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="104" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="InitDefaultDomain"
task="Startup"
symbol="InitDefaultDomain_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="105" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="InitDefaultDomainEnd"
task="Startup"
symbol="InitDefaultDomainEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="105" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="InitDefaultDomainEnd"
task="Startup"
symbol="InitDefaultDomainEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="106" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="InitSecurity"
task="Startup"
symbol="InitSecurity" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="106" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="InitSecurity"
task="Startup"
symbol="InitSecurity_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="107" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="InitSecurityEnd"
task="Startup"
symbol="InitSecurityEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="107" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="InitSecurityEnd"
task="Startup"
symbol="InitSecurityEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="108" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="AllowBindingRedirs"
task="Startup"
symbol="AllowBindingRedirs" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="108" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="AllowBindingRedirs"
task="Startup"
symbol="AllowBindingRedirs_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="109" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="AllowBindingRedirsEnd"
task="Startup"
symbol="AllowBindingRedirsEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="109" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="AllowBindingRedirsEnd"
task="Startup"
symbol="AllowBindingRedirsEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="110" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEConfigSync"
task="Startup"
symbol="EEConfigSync" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="110" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEConfigSync"
task="Startup"
symbol="EEConfigSync_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="111" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEConfigSyncEnd"
task="Startup"
symbol="EEConfigSyncEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="111" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEConfigSyncEnd"
task="Startup"
symbol="EEConfigSyncEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="112" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionBinding"
task="Startup"
symbol="FusionBinding" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="112" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionBinding"
task="Startup"
symbol="FusionBinding_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="113" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionBindingEnd"
task="Startup"
symbol="FusionBindingEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="113" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionBindingEnd"
task="Startup"
symbol="FusionBindingEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="114" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LoaderCatchCall"
task="Startup"
symbol="LoaderCatchCall" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="114" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LoaderCatchCall"
task="Startup"
symbol="LoaderCatchCall_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="115" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LoaderCatchCallEnd"
task="Startup"
symbol="LoaderCatchCallEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="115" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LoaderCatchCallEnd"
task="Startup"
symbol="LoaderCatchCallEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="116" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionInit"
task="Startup"
symbol="FusionInit" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="116" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionInit"
task="Startup"
symbol="FusionInit_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="117" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionInitEnd"
task="Startup"
symbol="FusionInitEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="117" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionInitEnd"
task="Startup"
symbol="FusionInitEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="118" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionAppCtx"
task="Startup"
symbol="FusionAppCtx" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="118" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionAppCtx"
task="Startup"
symbol="FusionAppCtx_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="119" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionAppCtxEnd"
task="Startup"
symbol="FusionAppCtxEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="119" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionAppCtxEnd"
task="Startup"
symbol="FusionAppCtxEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="120" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="Fusion2EE"
task="Startup"
symbol="Fusion2EE" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="120" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="Fusion2EE"
task="Startup"
symbol="Fusion2EE_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="121" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="Fusion2EEEnd"
task="Startup"
symbol="Fusion2EEEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="121" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="Fusion2EEEnd"
task="Startup"
symbol="Fusion2EEEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="122" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="SecurityCatchCall"
task="Startup"
symbol="SecurityCatchCall" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="122" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="SecurityCatchCall"
task="Startup"
symbol="SecurityCatchCall_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="123" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="SecurityCatchCallEnd"
task="Startup"
symbol="SecurityCatchCallEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="123" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="SecurityCatchCallEnd"
task="Startup"
symbol="SecurityCatchCallEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="151" version="0" level="win:LogAlways" template="ClrStackWalk"
keywords ="StackKeyword" opcode="CLRStackWalk"
task="CLRStackPrivate"
symbol="CLRStackWalkPrivate" message="$(string.PrivatePublisher.StackEventMessage)"/>
<event value="158" version="0" level="win:Informational" template="ModuleRangePrivate"
keywords ="PerfTrackPrivateKeyword" opcode="ModuleRangeLoadPrivate"
task="CLRPerfTrackPrivate"
symbol="ModuleRangeLoadPrivate" message="$(string.PrivatePublisher.ModuleRangeLoadEventMessage)"/>
<event value="159" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingPolicyPhaseStart"
task="Binding"
symbol="BindingPolicyPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="160" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingPolicyPhaseEnd"
task="Binding"
symbol="BindingPolicyPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="161" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingNgenPhaseStart"
task="Binding"
symbol="BindingNgenPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="162" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingNgenPhaseEnd"
task="Binding"
symbol="BindingNgenPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="163" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingLookupAndProbingPhaseStart"
task="Binding"
symbol="BindingLookupAndProbingPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="164" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingLookupAndProbingPhaseEnd"
task="Binding"
symbol="BindingLookupAndProbingPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="165" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderPhaseStart"
task="Binding"
symbol="LoaderPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="166" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderPhaseEnd"
task="Binding"
symbol="LoaderPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="167" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingPhaseStart"
task="Binding"
symbol="BindingPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="168" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingPhaseEnd"
task="Binding"
symbol="BindingPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="169" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingDownloadPhaseStart"
task="Binding"
symbol="BindingDownloadPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="170" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingDownloadPhaseEnd"
task="Binding"
symbol="BindingDownloadPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="171" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderAssemblyInitPhaseStart"
task="Binding"
symbol="LoaderAssemblyInitPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="172" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderAssemblyInitPhaseEnd"
task="Binding"
symbol="LoaderAssemblyInitPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="173" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderMappingPhaseStart"
task="Binding"
symbol="LoaderMappingPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="174" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderMappingPhaseEnd"
task="Binding"
symbol="LoaderMappingPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="175" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderDeliverEventsPhaseStart"
task="Binding"
symbol="LoaderDeliverEventsPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="176" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderDeliverEventsPhaseEnd"
task="Binding"
symbol="LoaderDeliverEventsPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="177" version="0" level="win:Informational" template="EvidenceGenerated"
keywords="SecurityPrivateKeyword" opcode="EvidenceGenerated"
task="EvidenceGeneratedTask"
symbol="EvidenceGenerated" message="$(string.PrivatePublisher.EvidenceGeneratedEventMessage)"/>
<event value="178" version="0" level="win:Informational" template="ModuleTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="ModuleTransparencyComputationStart"
task="TransparencyComputation"
symbol="ModuleTransparencyComputationStart" message="$(string.PrivatePublisher.ModuleTransparencyComputationStartEventMessage)" />
<event value="179" version="0" level="win:Informational" template="ModuleTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="ModuleTransparencyComputationEnd"
task="TransparencyComputation"
symbol="ModuleTransparencyComputationEnd" message="$(string.PrivatePublisher.ModuleTransparencyComputationEndEventMessage)" />
<event value="180" version="0" level="win:Informational" template="TypeTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="TypeTransparencyComputationStart"
task="TransparencyComputation"
symbol="TypeTransparencyComputationStart" message="$(string.PrivatePublisher.TypeTransparencyComputationStartEventMessage)" />
<event value="181" version="0" level="win:Informational" template="TypeTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="TypeTransparencyComputationEnd"
task="TransparencyComputation"
symbol="TypeTransparencyComputationEnd" message="$(string.PrivatePublisher.TypeTransparencyComputationEndEventMessage)" />
<event value="182" version="0" level="win:Informational" template="MethodTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="MethodTransparencyComputationStart"
task="TransparencyComputation"
symbol="MethodTransparencyComputationStart" message="$(string.PrivatePublisher.MethodTransparencyComputationStartEventMessage)" />
<event value="183" version="0" level="win:Informational" template="MethodTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="MethodTransparencyComputationEnd"
task="TransparencyComputation"
symbol="MethodTransparencyComputationEnd" message="$(string.PrivatePublisher.MethodTransparencyComputationEndEventMessage)" />
<event value="184" version="0" level="win:Informational" template="FieldTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="FieldTransparencyComputationStart"
task="TransparencyComputation"
symbol="FieldTransparencyComputationStart" message="$(string.PrivatePublisher.FieldTransparencyComputationStartEventMessage)" />
<event value="185" version="0" level="win:Informational" template="FieldTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="FieldTransparencyComputationEnd"
task="TransparencyComputation"
symbol="FieldTransparencyComputationEnd" message="$(string.PrivatePublisher.FieldTransparencyComputationEndEventMessage)" />
<event value="186" version="0" level="win:Informational" template="TokenTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="TokenTransparencyComputationStart"
task="TransparencyComputation"
symbol="TokenTransparencyComputationStart" message="$(string.PrivatePublisher.TokenTransparencyComputationStartEventMessage)" />
<event value="187" version="0" level="win:Informational" template="TokenTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="TokenTransparencyComputationEnd"
task="TransparencyComputation"
symbol="TokenTransparencyComputationEnd" message="$(string.PrivatePublisher.TokenTransparencyComputationEndEventMessage)" />
<event value="188" version="0" level="win:Informational" template="NgenBindEvent"
keywords="PrivateFusionKeyword" opcode="NgenBind"
task="CLRNgenBinder"
symbol="NgenBindEvent" message="$(string.PrivatePublisher.NgenBinderMessage)"/>
<!-- CLR FailFast events -->
<event value="191" version="0" level="win:Critical" template="FailFast"
opcode="FailFast"
task="CLRFailFast"
symbol="FailFast" message="$(string.PrivatePublisher.FailFastEventMessage)"/>
<event value="192" version="0" level="win:Verbose" template="PrvFinalizeObject"
keywords ="GCPrivateKeyword"
opcode="PrvFinalizeObject"
task="GarbageCollectionPrivate"
symbol="PrvFinalizeObject" message="$(string.PrivatePublisher.FinalizeObjectEventMessage)"/>
<event value="193" version="0" level="win:Verbose" template="CCWRefCountChangeAnsi"
keywords="InteropPrivateKeyword"
opcode="CCWRefCountChange"
task="GarbageCollectionPrivate"
symbol="CCWRefCountChangeAnsi" message="$(string.PrivatePublisher.CCWRefCountChangeEventMessage)"/>
<event value="194" version="0" level="win:Verbose" template="PrvSetGCHandle"
keywords="GCHandlePrivateKeyword"
opcode="SetGCHandle"
task="GarbageCollectionPrivate"
symbol="PrvSetGCHandle" message="$(string.PrivatePublisher.SetGCHandleEventMessage)"/>
<event value="195" version="0" level="win:Verbose" template="PrvDestroyGCHandle"
keywords="GCHandlePrivateKeyword"
opcode="DestroyGCHandle"
task="GarbageCollectionPrivate"
symbol="PrvDestroyGCHandle" message="$(string.PrivatePublisher.DestroyGCHandleEventMessage)"/>
<event value="196" version="0" level="win:Informational" template="FusionMessage"
keywords="BindingKeyword" opcode="FusionMessage"
task="Binding"
symbol="FusionMessageEvent" message="$(string.PrivatePublisher.FusionMessageEventMessage)"/>
<event value="197" version="0" level="win:Informational" template="FusionErrorCode"
keywords="BindingKeyword" opcode="FusionErrorCode"
task="Binding"
symbol="FusionErrorCodeEvent" message="$(string.PrivatePublisher.FusionErrorCodeEventMessage)"/>
<event value="199" version="0" level="win:Verbose" template="PinPlugAtGCTime"
keywords="GCPrivateKeyword"
opcode="PinPlugAtGCTime"
task="GarbageCollectionPrivate"
symbol="PinPlugAtGCTime" message="$(string.PrivatePublisher.PinPlugAtGCTimeEventMessage)"/>
<event value="200" version="0" level="win:Verbose" template="CCWRefCountChange"
keywords="InteropPrivateKeyword"
opcode="CCWRefCountChange"
task="GarbageCollectionPrivate"
symbol="CCWRefCountChange" message="$(string.PrivatePublisher.CCWRefCountChangeEventMessage)"/>
<event value="310" version="0" level="win:Verbose" template="LoaderHeapPrivate"
keywords="LoaderHeapPrivateKeyword" opcode="AllocRequest"
task="LoaderHeapAllocation" symbol="AllocRequest" message="$(string.PrivatePublisher.AllocRequestEventMessage)" />
<!-- CLR Private Multicore JIT events -->
<event value="201" version="0" level="win:Informational" template="MulticoreJitPrivate"
keywords="MulticoreJitPrivateKeyword" opcode="Common"
task="CLRMulticoreJit" symbol="MulticoreJit" message="$(string.PrivatePublisher.MulticoreJitCommonEventMessage)" />
<event value="202" version="0" level="win:Informational" template="MulticoreJitMethodCodeReturnedPrivate"
keywords="MulticoreJitPrivateKeyword" opcode="MethodCodeReturned"
task="CLRMulticoreJit" symbol="MulticoreJitMethodCodeReturned" message="$(string.PrivatePublisher.MulticoreJitMethodCodeReturnedMessage)" />
<!-- CLR Private Dynamic Type Usage events NOTE: These are not used anymore. They are kept around for backcompat with traces that might have already contained these -->
<event value="400" version="0" level="win:Informational" template="DynamicTypeUsePrivate"
keywords="DynamicTypeUsageKeyword"
symbol="IInspectableRuntimeClassName"
task="DynamicTypeUsage"
opcode="IInspectableRuntimeClassName"
message="$(string.PrivatePublisher.IInspectableRuntimeClassNameMessage)" />
<event value="401" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="WinRTUnbox"
task="DynamicTypeUsage"
opcode="WinRTUnbox"
message="$(string.PrivatePublisher.WinRTUnboxMessage)" />
<event value="402" version="0" level="win:Informational" template="DynamicTypeUsePrivate"
keywords="DynamicTypeUsageKeyword"
symbol="CreateRCW"
task="DynamicTypeUsage"
opcode="CreateRCW"
message="$(string.PrivatePublisher.CreateRcwMessage)" />
<event value="403" version="0" level="win:Informational" template="DynamicTypeUsePrivateVariance"
keywords="DynamicTypeUsageKeyword"
symbol="RCWVariance"
task="DynamicTypeUsage"
opcode="RCWVariance"
message="$(string.PrivatePublisher.RcwVarianceMessage)" />
<event value="404" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="RCWIEnumerableCasting"
task="DynamicTypeUsage"
opcode="RCWIEnumerableCasting"
message="$(string.PrivatePublisher.RCWIEnumerableCastingMessage)" />
<event value="405" version="0" level="win:Informational" template="DynamicTypeUsePrivate"
keywords="DynamicTypeUsageKeyword"
symbol="CreateCCW"
task="DynamicTypeUsage"
opcode="CreateCCW"
message="$(string.PrivatePublisher.CreateCCWMessage)" />
<event value="406" version="0" level="win:Informational" template="DynamicTypeUsePrivateVariance"
keywords="DynamicTypeUsageKeyword"
symbol="CCWVariance"
task="DynamicTypeUsage"
opcode="CCWVariance"
message="$(string.PrivatePublisher.CCWVarianceMessage)" />
<event value="407" version="0" level="win:Informational" template="DynamicTypeUseStringAndIntPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="ObjectVariantMarshallingToNative"
task="DynamicTypeUsage"
opcode="ObjectVariantMarshallingToNative"
message="$(string.PrivatePublisher.ObjectVariantMarshallingMessage)" />
<event value="408" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="GetTypeFromGUID"
task="DynamicTypeUsage"
opcode="GetTypeFromGUID"
message="$(string.PrivatePublisher.GetTypeFromGUIDMessage)" />
<event value="409" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="GetTypeFromProgID"
task="DynamicTypeUsage"
opcode="GetTypeFromProgID"
message="$(string.PrivatePublisher.GetTypeFromProgIDMessage)" />
<event value="410" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="ConvertToCallbackEtw"
task="DynamicTypeUsage"
opcode="ConvertToCallbackEtw"
message="$(string.PrivatePublisher.ConvertToCallbackMessage)" />
<event value="411" version="0" level="win:Informational" template="DynamicTypeUseNoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="BeginCreateManagedReference"
task="DynamicTypeUsage"
opcode="BeginCreateManagedReference"
message="$(string.PrivatePublisher.BeginCreateManagedReferenceMessage)" />
<event value="412" version="0" level="win:Informational" template="DynamicTypeUseNoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="EndCreateManagedReference"
task="DynamicTypeUsage"
opcode="EndCreateManagedReference"
message="$(string.PrivatePublisher.EndCreateManagedReferenceMessage)" />
<event value="413" version="0" level="win:Informational" template="DynamicTypeUseStringAndIntPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="ObjectVariantMarshallingToManaged"
task="DynamicTypeUsage"
opcode="ObjectVariantMarshallingToManaged"
message="$(string.PrivatePublisher.ObjectVariantMarshallingMessage)" />
</events>
</provider>
<!-- Mono Profiler Publisher-->
<provider name="Microsoft-DotNETRuntimeMonoProfiler"
guid="{7F442D82-0F1D-5155-4B8C-1529EB2E31C2}"
symbol="MICROSOFT_DOTNETRUNTIME_MONO_PROFILER_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--Keywords-->
<keywords>
<keyword name="GCKeyword" mask="0x1"
message="$(string.MonoProfilerPublisher.GCKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_KEYWORD" />
<keyword name="GCHandleKeyword" mask="0x2"
message="$(string.MonoProfilerPublisher.GCHandleKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_HANDLE_KEYWORD" />
<keyword name="LoaderKeyword" mask="0x8"
message="$(string.MonoProfilerPublisher.LoaderKeywordMessage)" symbol="CLR_MONO_PROFILER_LOADER_KEYWORD" />
<keyword name="JitKeyword" mask="0x10"
message="$(string.MonoProfilerPublisher.JitKeywordMessage)" symbol="CLR_MONO_PROFILER_JIT_KEYWORD" />
<keyword name="ContentionKeyword" mask="0x4000"
message="$(string.MonoProfilerPublisher.ContentionKeywordMessage)" symbol="CLR_MONO_PROFILER_CONTENTION_KEYWORD"/>
<keyword name="ExceptionKeyword" mask="0x8000"
message="$(string.MonoProfilerPublisher.ExceptionKeywordMessage)" symbol="CLR_MONO_PROFILER_EXCEPTION_KEYWORD" />
<keyword name="ThreadingKeyword" mask="0x10000"
message="$(string.MonoProfilerPublisher.ThreadingKeywordMessage)" symbol="CLR_MONO_PROFILER_THREADING_KEYWORD"/>
<keyword name="GCHeapDumpKeyword" mask="0x100000"
message="$(string.MonoProfilerPublisher.GCHeapDumpKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_HEAPDUMP_KEYWORD" />
<keyword name="GCAllocationKeyword" mask="0x200000"
message="$(string.MonoProfilerPublisher.GCAllocationKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_ALLOCATION_KEYWORD" />
<keyword name="GCMovesKeyword" mask="0x400000"
message="$(string.MonoProfilerPublisher.GCMovesKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_MOVES_KEYWORD" />
<keyword name="GCHeapCollectKeyword" mask="0x800000"
message="$(string.MonoProfilerPublisher.GCHeapCollectKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_HEAPCOLLECT_KEYWORD" />
<keyword name="GCFinalizationKeyword" mask="0x1000000"
message="$(string.MonoProfilerPublisher.GCFinalizationKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZATION_KEYWORD" />
<keyword name="GCResizeKeyword" mask="0x2000000"
message="$(string.MonoProfilerPublisher.GCResizeKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_RESIZE_KEYWORD" />
<keyword name="GCRootKeyword" mask="0x4000000"
message="$(string.MonoProfilerPublisher.GCRootKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_ROOT_KEYWORD" />
<keyword name="GCHeapDumpVTableClassReferenceKeyword" mask="0x8000000"
message="$(string.MonoProfilerPublisher.GCHeapDumpVTableClassReferenceKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_HEAPDUMP_VTABLE_CLASS_REFERENCE_KEYWORD" />
<keyword name="MethodTracingKeyword" mask="0x20000000"
message="$(string.MonoProfilerPublisher.MethodTracingKeywordMessage)" symbol="CLR_MONO_PROFILER_METHOD_TRACING_KEYWORD" />
<keyword name="TypeLoadingKeyword" mask="0x8000000000"
message="$(string.MonoProfilerPublisher.TypeLoadingKeywordMessage)" symbol="CLR_MONO_PROFILER_TYPE_LOADING_KEYWORD" />
<keyword name="MonitorKeyword" mask="0x10000000000"
message="$(string.MonoProfilerPublisher.MonitorKeywordMessage)" symbol="CLR_MONO_PROFILER_MONITOR_KEYWORD" />
</keywords>
<!--Tasks-->
<tasks>
<task name="MonoProfiler" symbol="CLR_MONO_PROFILER_TASK"
value="1" eventGUID="{7EC39CC6-C9E3-4328-9B32-CA6C5EC0EF31}"
message="$(string.MonoProfilerPublisher.MonoProfilerTaskMessage)">
<opcodes>
<opcode name="ContextLoaded" message="$(string.MonoProfilerPublisher.ContextLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_CONTEXT_LOADED_OPCODE" value="18" />
<opcode name="ContextUnloaded" message="$(string.MonoProfilerPublisher.ContextUnloadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_CONTEXT_UNLOADED_OPCODE" value="19" />
<opcode name="AppDomainLoading" message="$(string.MonoProfilerPublisher.AppDomainLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_LOADING_OPCODE" value="20" />
<opcode name="AppDomainLoaded" message="$(string.MonoProfilerPublisher.AppDomainLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_LOADED_OPCODE" value="21" />
<opcode name="AppDomainUnloading" message="$(string.MonoProfilerPublisher.AppDomainUnloadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_UNLOADING_OPCODE" value="22" />
<opcode name="AppDomainUnloaded" message="$(string.MonoProfilerPublisher.AppDomainUnloadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_UNLOADED_OPCODE" value="23" />
<opcode name="AppDomainName" message="$(string.MonoProfilerPublisher.AppDomainNameOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_NAME_OPCODE" value="24" />
<opcode name="JitBegin" message="$(string.MonoProfilerPublisher.JitBeginOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_BEGIN_OPCODE" value="25" />
<opcode name="JitFailed" message="$(string.MonoProfilerPublisher.JitFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_FAILED_OPCODE" value="26" />
<opcode name="JitDone" message="$(string.MonoProfilerPublisher.JitDoneOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_DONE_OPCODE" value="27" />
<opcode name="JitChunkCreated" message="$(string.MonoProfilerPublisher.JitChunkCreatedOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_CHUNK_CREATED_OPCODE" value="28" />
<opcode name="JitChunkDestroyed" message="$(string.MonoProfilerPublisher.JitChunkDestroyedOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_CHUNK_DESTROYED_OPCODE" value="29" />
<opcode name="JitCodeBuffer" message="$(string.MonoProfilerPublisher.JitCodeBufferOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_CODE_BUFFER_OPCODE" value="30" />
<opcode name="ClassLoading" message="$(string.MonoProfilerPublisher.ClassLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_CLASS_LOADING_OPCODE" value="31" />
<opcode name="ClassFailed" message="$(string.MonoProfilerPublisher.ClassFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_CLASS_FAILED_OPCODE" value="32" />
<opcode name="ClassLoaded" message="$(string.MonoProfilerPublisher.ClassLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_CLASS_LOADED_OPCODE" value="33" />
<opcode name="VTableLoading" message="$(string.MonoProfilerPublisher.VTableLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_VTABLE_LOADING_OPCODE" value="34" />
<opcode name="VTableFailed" message="$(string.MonoProfilerPublisher.VTableFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_VTABLE_FAILED_OPCODE" value="35" />
<opcode name="VTableLoaded" message="$(string.MonoProfilerPublisher.VTableLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_VTABLE_LOADED_OPCODE" value="36" />
<opcode name="ModuleLoading" message="$(string.MonoProfilerPublisher.ModuleLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_LOADING_OPCODE" value="37" />
<opcode name="ModuleFailed" message="$(string.MonoProfilerPublisher.ModuleFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_FAILED_OPCODE" value="38" />
<opcode name="ModuleLoaded" message="$(string.MonoProfilerPublisher.ModuleLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_LOADED_OPCODE" value="39" />
<opcode name="ModuleUnloading" message="$(string.MonoProfilerPublisher.ModuleUnloadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_UNLOADING_OPCODE" value="40" />
<opcode name="ModuleUnloaded" message="$(string.MonoProfilerPublisher.ModuleUnloadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_UNLOADED_OPCODE" value="41" />
<opcode name="AssemblyLoading" message="$(string.MonoProfilerPublisher.AssemblyLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_ASSEMBLY_LOADING_OPCODE" value="42" />
<opcode name="AssemblyLoaded" message="$(string.MonoProfilerPublisher.AssemblyLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_ASSEMBLY_LOADED_OPCODE" value="43" />
<opcode name="AssemblyUnloading" message="$(string.MonoProfilerPublisher.AssemblyUnloadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_ASSEMBLY_UNLOADING_OPCODE" value="44" />
<opcode name="AssemblyUnloaded" message="$(string.MonoProfilerPublisher.AssemblyUnloadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_ASSEMBLY_UNLOADED_OPCODE" value="45" />
<opcode name="MethodEnter" message="$(string.MonoProfilerPublisher.MethodEnterOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_ENTER_OPCODE" value="46" />
<opcode name="MethodLeave" message="$(string.MonoProfilerPublisher.MethodLeaveOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_LEAVE_OPCODE" value="47" />
<opcode name="MethodTailCall" message="$(string.MonoProfilerPublisher.MethodTailCallOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_TAIL_CALL_OPCODE" value="48" />
<opcode name="MethodExceptionLeave" message="$(string.MonoProfilerPublisher.MethodExceptionLeaveOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_EXCEPTION_LEAVE_OPCODE" value="49" />
<opcode name="MethodFree" message="$(string.MonoProfilerPublisher.MethodFreeOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_FREE_OPCODE" value="50" />
<opcode name="MethodBeginInvoke" message="$(string.MonoProfilerPublisher.MethodBeginInvokeOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_BEGIN_INVOKE_OPCODE" value="51" />
<opcode name="MethodEndInvoke" message="$(string.MonoProfilerPublisher.MethodEndInvokeOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_END_INVOKE_OPCODE" value="52" />
<opcode name="ExceptionThrow" message="$(string.MonoProfilerPublisher.ExceptionThrowOpcodeMessage)" symbol="CLR_MONO_PROFILER_EXCEPTION_THROW_OPCODE" value="53" />
<opcode name="ExceptionClause" message="$(string.MonoProfilerPublisher.ExceptionClauseOpcodeMessage)" symbol="CLR_MONO_PROFILER_EXCEPTION_CLAUSE_OPCODE" value="54" />
<opcode name="GCEvent" message="$(string.MonoProfilerPublisher.GCEventOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_EVENT_OPCODE" value="55" />
<opcode name="GCAllocation" message="$(string.MonoProfilerPublisher.GCAllocationOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_ALLOCATION_OPCODE" value="56" />
<opcode name="GCMoves" message="$(string.MonoProfilerPublisher.GCMovesOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_MOVES_OPCODE" value="57" />
<opcode name="GCResize" message="$(string.MonoProfilerPublisher.GCResizeOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_RESIZE_OPCODE" value="58" />
<opcode name="GCHandleCreated" message="$(string.MonoProfilerPublisher.GCHandleCreatedOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HANDLE_CREATED_OPCODE" value="59" />
<opcode name="GCHandleDeleted" message="$(string.MonoProfilerPublisher.GCHandleDeletedOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HANDLE_DELETED_OPCODE" value="60" />
<opcode name="GCFinalizing" message="$(string.MonoProfilerPublisher.GCFinalizingOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZING_OPCODE" value="61" />
<opcode name="GCFinalized" message="$(string.MonoProfilerPublisher.GCFinalizedOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZED_OPCODE" value="62" />
<opcode name="GCFinalizingObject" message="$(string.MonoProfilerPublisher.GCFinalizingObjectOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZING_OBJECT_OPCODE" value="63" />
<opcode name="GCFinalizedObject" message="$(string.MonoProfilerPublisher.GCFinalizedObjectOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZED_OBJECT_OPCODE" value="64" />
<opcode name="GCRootRegister" message="$(string.MonoProfilerPublisher.GCRootRegisterOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_ROOT_REGISTER_OPCODE" value="65" />
<opcode name="GCRootUnregister" message="$(string.MonoProfilerPublisher.GCRootUnregisterOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_ROOT_UNREGISTER_OPCODE" value="66" />
<opcode name="GCRoots" message="$(string.MonoProfilerPublisher.GCRootsOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_ROOTS_OPCODE" value="67" />
<opcode name="GCHeapDumpStart" message="$(string.MonoProfilerPublisher.GCHeapDumpStartOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_START_OPCODE" value="68" />
<opcode name="GCHeapDumpStop" message="$(string.MonoProfilerPublisher.GCHeapDumpStopOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_STOP_OPCODE" value="69" />
<opcode name="GCHeapDumpObjectReference" message="$(string.MonoProfilerPublisher.GCHeapDumpObjectReferenceOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_OBJECT_REFERENCE_OPCODE" value="70" />
<opcode name="MonitorContention" message="$(string.MonoProfilerPublisher.MonitorContentionOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_CONTENTION_OPCODE" value="71" />
<opcode name="MonitorFailed" message="$(string.MonoProfilerPublisher.MonitorFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_FAILED_OPCODE" value="72" />
<opcode name="MonitorAquired" message="$(string.MonoProfilerPublisher.MonitorAquiredOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_AQUIRED_OPCODE" value="73" />
<opcode name="ThreadStarted" message="$(string.MonoProfilerPublisher.ThreadStartedOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_STARTED_OPCODE" value="74" />
<opcode name="ThreadStopping" message="$(string.MonoProfilerPublisher.ThreadStoppingOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_STOPPING_OPCODE" value="75" />
<opcode name="ThreadStopped" message="$(string.MonoProfilerPublisher.ThreadStoppedOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_STOPPED_OPCODE" value="76" />
<opcode name="ThreadExited" message="$(string.MonoProfilerPublisher.ThreadExitedOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_EXITED_OPCODE" value="77" />
<opcode name="ThreadName" message="$(string.MonoProfilerPublisher.ThreadNameOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_NAME_OPCODE" value="78" />
<opcode name="JitDoneVerbose" message="$(string.MonoProfilerPublisher.JitDoneVerboseOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_DONE_VERBOSE_OPCODE" value="79" />
<opcode name="GCHeapDumpVTableClassReference" message="$(string.MonoProfilerPublisher.GCHeapDumpVTableClassReferenceOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_VTABLE_CLASS_REFERENCE_OPCODE" value="80" />
</opcodes>
</task>
</tasks>
<maps>
<valueMap name="JitCodeBufferTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.MethodMessage)"/>
<map value="0x1" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.MethodTrampolineMessage)"/>
<map value="0x2" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.UnboxTrampolineMessage)"/>
<map value="0x3" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.IMTTrampolineMessage)"/>
<map value="0x4" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.GenericsTrampolineMessage)"/>
<map value="0x5" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.SpecificTrampolineMessage)"/>
<map value="0x6" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.HelperMessage)"/>
</valueMap>
<valueMap name="ExceptionClauseTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.ExceptionClauseTypeMap.NoneMessage)"/>
<map value="0x1" message="$(string.MonoProfilerPublisher.ExceptionClauseTypeMap.FilterMessage)"/>
<map value="0x2" message="$(string.MonoProfilerPublisher.ExceptionClauseTypeMap.FinallyMessage)"/>
<map value="0x3" message="$(string.MonoProfilerPublisher.ExceptionClauseTypeMap.FaultMessage)"/>
</valueMap>
<valueMap name="GCEventTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.GCEventTypeMap.StartMessage)"/>
<map value="0x5" message="$(string.MonoProfilerPublisher.GCEventTypeMap.EndMessage)"/>
<map value="0x6" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PreStopWorldMessage)"/>
<map value="0x7" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PostStopWorldMessage)"/>
<map value="0x8" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PreStartWorldMessage)"/>
<map value="0x9" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PostStartWorldMessage)"/>
<map value="0xA" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PreStopWorldLockedMessage)"/>
<map value="0xB" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PostStartWorldUnlockedMessage)"/>
</valueMap>
<valueMap name="GCHandleTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.GCHandleTypeMap.WeakMessage)"/>
<map value="0x1" message="$(string.MonoProfilerPublisher.GCHandleTypeMap.WeakTrackResurrectionMessage)"/>
<map value="0x2" message="$(string.MonoProfilerPublisher.GCHandleTypeMap.NormalMessage)"/>
<map value="0x3" message="$(string.MonoProfilerPublisher.GCHandleTypeMap.PinnedMessage)"/>
</valueMap>
<valueMap name="GCRootTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ExternalMessage)"/>
<map value="0x1" message="$(string.MonoProfilerPublisher.GCRootTypeMap.StackMessage)"/>
<map value="0x2" message="$(string.MonoProfilerPublisher.GCRootTypeMap.FinalizerQueueMessage)"/>
<map value="0x3" message="$(string.MonoProfilerPublisher.GCRootTypeMap.StaticMessage)"/>
<map value="0x4" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ThreadStaticMessage)"/>
<map value="0x5" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ContextStaticMessage)"/>
<map value="0x6" message="$(string.MonoProfilerPublisher.GCRootTypeMap.GCHandleMessage)"/>
<map value="0x7" message="$(string.MonoProfilerPublisher.GCRootTypeMap.JitMessage)"/>
<map value="0x8" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ThreadingMessage)"/>
<map value="0x9" message="$(string.MonoProfilerPublisher.GCRootTypeMap.DomainMessage)"/>
<map value="0xA" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ReflectionMessage)"/>
<map value="0xB" message="$(string.MonoProfilerPublisher.GCRootTypeMap.MarshalMessage)"/>
<map value="0xC" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ThreadPoolMessage)"/>
<map value="0xD" message="$(string.MonoProfilerPublisher.GCRootTypeMap.DebuggerMessage)"/>
<map value="0xE" message="$(string.MonoProfilerPublisher.GCRootTypeMap.HandleMessage)"/>
<map value="0xF" message="$(string.MonoProfilerPublisher.GCRootTypeMap.EphemeronMessage)"/>
<map value="0x10" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ToggleRefMessage)"/>
</valueMap>
</maps>
<templates>
<template tid="ContextLoadedUnloaded">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ContextID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<ContextLoadedUnloaded xmlns="myNs">
<ObjectID> %1 </ObjectID>
<AppDomainID> %2 </AppDomainID>
<ContextID> %3 </ContextID>
</ContextLoadedUnloaded>
</UserData>
</template>
<template tid="AppDomainLoadUnload">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<AppDomainLoadUnload xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
</AppDomainLoadUnload>
</UserData>
</template>
<template tid="AppDomainName">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainName" inType="win:UnicodeString" />
<UserData>
<AppDomainName xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainName> %2 </AppDomainName>
</AppDomainName>
</UserData>
</template>
<template tid="JitBeginFailedDone">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<UserData>
<JitBeginFailedDone xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodToken> %3 </MethodToken>
</JitBeginFailedDone>
</UserData>
</template>
<template tid="JitChunkCreated">
<data name="ChunkID" inType="win:Pointer" outType="win:HexInt64" />
<data name="ChunkSize" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<JitChunkCreated xmlns="myNs">
<ChunkID> %1 </ChunkID>
<ChunkSize> %2 </ChunkSize>
</JitChunkCreated>
</UserData>
</template>
<template tid="JitChunkDestroyed">
<data name="ChunkID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<JitChunkDestroyed xmlns="myNs">
<ChunkID> %1 </ChunkID>
</JitChunkDestroyed>
</UserData>
</template>
<template tid="JitCodeBuffer">
<data name="BufferID" inType="win:Pointer" outType="win:HexInt64" />
<data name="BufferSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="BufferType" inType="win:UInt8" map="JitCodeBufferTypeMap" />
<UserData>
<JitCodeBuffer xmlns="myNs">
<BufferID> %1 </BufferID>
<BufferSize> %2 </BufferSize>
<BufferType> %3 </BufferType>
</JitCodeBuffer>
</UserData>
</template>
<template tid="ClassLoadingFailed">
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<ClassLoadingFailed xmlns="myNs">
<ClassID> %1 </ClassID>
<ModuleID> %2 </ModuleID>
</ClassLoadingFailed>
</UserData>
</template>
<template tid="ClassLoaded">
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:UnicodeString" />
<UserData>
<ClassLoaded xmlns="myNs">
<ClassID> %1 </ClassID>
<ModuleID> %2 </ModuleID>
<ClassName> %3 </ClassName>
</ClassLoaded>
</UserData>
</template>
<template tid="VTableLoadingFailedLoaded">
<data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<VTableLoadingFailedLoaded xmlns="myNs">
<VTableID> %1 </VTableID>
<ClassID> %2 </ClassID>
<AppDomainID> %3 </AppDomainID>
</VTableLoadingFailedLoaded>
</UserData>
</template>
<template tid="ModuleLoadingUnloadingFailed">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<ModuleLoadingUnloadingFailed xmlns="myNs">
<ModuleID> %1 </ModuleID>
</ModuleLoadingUnloadingFailed>
</UserData>
</template>
<template tid="ModuleLoadedUnloaded">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleName" inType="win:UnicodeString" />
<data name="ModuleSignature" inType="win:UnicodeString" />
<UserData>
<ModuleLoadedUnloaded xmlns="myNs">
<ModuleID> %1 </ModuleID>
<ModuleName> %2 </ModuleName>
<ModuleSignature> %3 </ModuleSignature>
</ModuleLoadedUnloaded>
</UserData>
</template>
<template tid="AssemblyLoadingUnloading">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<AssemblyLoadingUnloading xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<ModuleID> %2 </ModuleID>
</AssemblyLoadingUnloading>
</UserData>
</template>
<template tid="AssemblyLoadedUnloaded">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyName" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadedUnloaded xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<ModuleID> %2 </ModuleID>
<AssemblyName> %3 </AssemblyName>
</AssemblyLoadedUnloaded>
</UserData>
</template>
<template tid="MethodTracing">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodTracing xmlns="myNs">
<MethodID> %1 </MethodID>
</MethodTracing>
</UserData>
</template>
<template tid="ExceptionThrow">
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<ExceptionThrow xmlns="myNs">
<TypeID> %1 </TypeID>
<ObjectID> %2 </ObjectID>
</ExceptionThrow>
</UserData>
</template>
<template tid="ExceptionClause">
<data name="ClauseType" inType="win:UInt8" map="ExceptionClauseTypeMap" />
<data name="ClauseIdx" inType="win:UInt32" />
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<ExceptionClause xmlns="myNs">
<ClauseType> %1 </ClauseType>
<ClauseIdx> %2 </ClauseIdx>
<MethodID> %3 </MethodID>
<TypeID> %4 </TypeID>
<ObjectID> %5 </ObjectID>
</ExceptionClause>
</UserData>
</template>
<template tid="GCEvent">
<data name="GCEventType" inType="win:UInt8" map="GCEventTypeMap" />
<data name="GCGeneration" inType="win:UInt32" />
<UserData>
<GCEvent xmlns="myNs">
<GCEventType> %1 </GCEventType>
<GCGeneration> %2 </GCGeneration>
</GCEvent>
</UserData>
</template>
<template tid="GCAllocation">
<data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="ObjectSize" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCAllocation xmlns="myNs">
<VTableID> %1 </VTableID>
<ObjectID> %2 </ObjectID>
<ObjectSize> %3 </ObjectSize>
</GCAllocation>
</UserData>
</template>
<template tid="GCMoves">
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="AddressID" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCMoves xmlns="myNs">
<Count> %1 </Count>
</GCMoves>
</UserData>
</template>
<template tid="GCResize">
<data name="NewSize" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCResize xmlns="myNs">
<NewSize> %1 </NewSize>
</GCResize>
</UserData>
</template>
<template tid="GCHandleCreated">
<data name="HandleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="HandleType" inType="win:UInt8" map="GCHandleTypeMap" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<GCHandleCreated xmlns="myNs">
<HandleID> %1 </HandleID>
<HandleType> %2 </HandleType>
<ObjectID> %3 </ObjectID>
</GCHandleCreated>
</UserData>
</template>
<template tid="GCHandleDeleted">
<data name="HandleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="HandleType" inType="win:UInt8" map="GCHandleTypeMap" />
<UserData>
<GCHandleDeleted xmlns="myNs">
<HandleID> %1 </HandleID>
<HandleType> %2 </HandleType>
</GCHandleDeleted>
</UserData>
</template>
<template tid="GCFinalizingFinalizedObject">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<GCFinalizingFinalizedObject xmlns="myNs">
<ObjectID> %1 </ObjectID>
</GCFinalizingFinalizedObject>
</UserData>
</template>
<template tid="GCRootRegister">
<data name="RootID" inType="win:Pointer" outType="win:HexInt64" />
<data name="RootSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="RootType" inType="win:UInt8" map="GCRootTypeMap" />
<data name="RootKeyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="RootKeyName" inType="win:UnicodeString" />
<UserData>
<GCRootRegister xmlns="myNs">
<RootID> %1 </RootID>
<RootSize> %2 </RootSize>
<RootType> %3 </RootType>
<RootKeyID> %4 </RootKeyID>
<RootKeyName> %5 </RootKeyName>
</GCRootRegister>
</UserData>
</template>
<template tid="GCRootUnregister">
<data name="RootID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<GCRootUnregister xmlns="myNs">
<RootID> %1 </RootID>
</GCRootUnregister>
</UserData>
</template>
<template tid="GCRoots">
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="AddressID" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCRoots xmlns="myNs">
<Count> %1 </Count>
</GCRoots>
</UserData>
</template>
<template tid="GCHeapDumpStart">
<data name="HeapCollectParam" inType="win:UnicodeString" />
<UserData>
<GCHeapDumpStart xmlns="myNs">
<HeapCollectParam> %1 </HeapCollectParam>
</GCHeapDumpStart>
</UserData>
</template>
<template tid="GCHeapDumpObjectReference">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectGeneration" inType="win:UInt8" />
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="ReferenceOffset" inType="win:UInt32" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCHeapDumpObjectReference xmlns="myNs">
<ObjectID> %1 </ObjectID>
<VTableID> %2 </VTableID>
<ObjectSize> %3 </ObjectSize>
<ObjectGeneration> %4 </ObjectGeneration>
<Count> %5 </Count>
</GCHeapDumpObjectReference>
</UserData>
</template>
<template tid="MonitorContentionFailedAcquired">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<MonitorContentionFailedAcquired xmlns="myNs">
<ObjectID> %1 </ObjectID>
</MonitorContentionFailedAcquired>
</UserData>
</template>
<template tid="ThreadStartedStoppingStoppedExited">
<data name="ThreadID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<ThreadStartedStoppingStoppedExited xmlns="myNs">
<ThreadID> %1 </ThreadID>
</ThreadStartedStoppingStoppedExited>
</UserData>
</template>
<template tid="ThreadName">
<data name="ThreadID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ThreadName" inType="win:UnicodeString" />
<UserData>
<ThreadName xmlns="myNs">
<ThreadID> %1 </ThreadID>
<ThreadName> %2 </ThreadName>
</ThreadName>
</UserData>
</template>
<template tid="JitDoneVerbose">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<UserData>
<JitDoneVerbose xmlns="myNs">
<MethodID> %1 </MethodID>
<MethodNamespace> %2 </MethodNamespace>
<MethodName> %3 </MethodName>
<MethodSignature> %4 </MethodSignature>
</JitDoneVerbose>
</UserData>
</template>
<template tid="JitDone_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="Type" inType="win:UInt8" />
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
</struct>
<UserData>
<JitDone_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodToken> %3 </MethodToken>
<Count> %4 </Count>
</JitDone_V1>
</UserData>
</template>
<template tid="ClassLoaded_V1">
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:UnicodeString" />
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="Type" inType="win:UInt8" />
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
</struct>
<UserData>
<ClassLoaded_V1 xmlns="myNs">
<ClassID> %1 </ClassID>
<ModuleID> %2 </ModuleID>
<ClassName> %3 </ClassName>
<Count> %4 </Count>
</ClassLoaded_V1>
</UserData>
</template>
<template tid="GCHeapDumpVTableClassReference">
<data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:UnicodeString" />
<UserData>
<GCHeapDumpVTableClassReference xmlns="myNs">
<VTableID> %1 </VTableID>
<ClassID> %2 </ClassID>
<ModuleID> %3 </ModuleID>
<ClassName> %4 </ClassName>
</GCHeapDumpVTableClassReference>
</UserData>
</template>
</templates>
<events>
<event value="1" version="0" level="win:Informational" template="ContextLoadedUnloaded"
keywords ="LoaderKeyword" opcode="ContextLoaded"
task="MonoProfiler"
symbol="MonoProfilerContextLoaded" message="$(string.MonoProfilerPublisher.ContextLoadedUnloadedEventMessage)" />
<event value="2" version="0" level="win:Informational" template="ContextLoadedUnloaded"
keywords ="LoaderKeyword" opcode="ContextUnloaded"
task="MonoProfiler"
symbol="MonoProfilerContextUnloaded" message="$(string.MonoProfilerPublisher.ContextLoadedUnloadedEventMessage)" />
<event value="3" version="0" level="win:Verbose" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainLoading"
task="MonoProfiler"
symbol="MonoProfilerAppDomainLoading" message="$(string.MonoProfilerPublisher.AppDomainLoadUnloadEventMessage)" />
<event value="4" version="0" level="win:Informational" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainLoaded"
task="MonoProfiler"
symbol="MonoProfilerAppDomainLoaded" message="$(string.MonoProfilerPublisher.AppDomainLoadUnloadEventMessage)" />
<event value="5" version="0" level="win:Verbose" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainUnloading"
task="MonoProfiler"
symbol="MonoProfilerAppDomainUnloading" message="$(string.MonoProfilerPublisher.AppDomainLoadUnloadEventMessage)" />
<event value="6" version="0" level="win:Informational" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainUnloaded"
task="MonoProfiler"
symbol="MonoProfilerAppDomainUnloaded" message="$(string.MonoProfilerPublisher.AppDomainLoadUnloadEventMessage)" />
<event value="7" version="0" level="win:Verbose" template="AppDomainName"
keywords ="LoaderKeyword" opcode="AppDomainName"
task="MonoProfiler"
symbol="MonoProfilerAppDomainName" message="$(string.MonoProfilerPublisher.AppDomainNameEventMessage)" />
<event value="8" version="0" level="win:Informational" template="JitBeginFailedDone"
keywords ="JitKeyword" opcode="JitBegin"
task="MonoProfiler"
symbol="MonoProfilerJitBegin" message="$(string.MonoProfilerPublisher.JitBeginFailedDoneEventMessage)" />
<event value="9" version="0" level="win:Informational" template="JitBeginFailedDone"
keywords ="JitKeyword" opcode="JitFailed"
task="MonoProfiler"
symbol="MonoProfilerJitFailed" message="$(string.MonoProfilerPublisher.JitBeginFailedDoneEventMessage)" />
<event value="10" version="0" level="win:Informational" template="JitBeginFailedDone"
keywords ="JitKeyword" opcode="JitDone"
task="MonoProfiler"
symbol="MonoProfilerJitDone" message="$(string.MonoProfilerPublisher.JitBeginFailedDoneEventMessage)" />
<event value="10" version="1" level="win:Informational" template="JitDone_V1"
keywords ="JitKeyword" opcode="JitDone"
task="MonoProfiler"
symbol="MonoProfilerJitDone_V1" message="$(string.MonoProfilerPublisher.JitDone_V1EventMessage)" />
<event value="11" version="0" level="win:Informational" template="JitChunkCreated"
keywords ="JitKeyword" opcode="JitChunkCreated"
task="MonoProfiler"
symbol="MonoProfilerJitChunkCreated" message="$(string.MonoProfilerPublisher.JitChunkCreatedEventMessage)" />
<event value="12" version="0" level="win:Informational" template="JitChunkDestroyed"
keywords ="JitKeyword" opcode="JitChunkDestroyed"
task="MonoProfiler"
symbol="MonoProfilerJitChunkDestroyed" message="$(string.MonoProfilerPublisher.JitChunkDestroyedEventMessage)" />
<event value="13" version="0" level="win:Informational" template="JitCodeBuffer"
keywords ="JitKeyword" opcode="JitCodeBuffer"
task="MonoProfiler"
symbol="MonoProfilerJitCodeBuffer" message="$(string.MonoProfilerPublisher.JitCodeBufferEventMessage)" />
<event value="14" version="0" level="win:Verbose" template="ClassLoadingFailed"
keywords ="TypeLoadingKeyword" opcode="ClassLoading"
task="MonoProfiler"
symbol="MonoProfilerClassLoading" message="$(string.MonoProfilerPublisher.ClassLoadingFailedEventMessage)" />
<event value="15" version="0" level="win:Informational" template="ClassLoadingFailed"
keywords ="TypeLoadingKeyword" opcode="ClassFailed"
task="MonoProfiler"
symbol="MonoProfilerClassFailed" message="$(string.MonoProfilerPublisher.ClassLoadingFailedEventMessage)" />
<event value="16" version="0" level="win:Informational" template="ClassLoaded"
keywords ="TypeLoadingKeyword" opcode="ClassLoaded"
task="MonoProfiler"
symbol="MonoProfilerClassLoaded" message="$(string.MonoProfilerPublisher.ClassLoadedEventMessage)" />
<event value="16" version="1" level="win:Informational" template="ClassLoaded_V1"
keywords ="TypeLoadingKeyword" opcode="ClassLoaded"
task="MonoProfiler"
symbol="MonoProfilerClassLoaded_V1" message="$(string.MonoProfilerPublisher.ClassLoaded_V1EventMessage)" />
<event value="17" version="0" level="win:Verbose" template="VTableLoadingFailedLoaded"
keywords ="TypeLoadingKeyword" opcode="VTableLoading"
task="MonoProfiler"
symbol="MonoProfilerVTableLoading" message="$(string.MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage)" />
<event value="18" version="0" level="win:Informational" template="VTableLoadingFailedLoaded"
keywords ="TypeLoadingKeyword" opcode="VTableFailed"
task="MonoProfiler"
symbol="MonoProfilerVTableFailed" message="$(string.MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage)" />
<event value="19" version="0" level="win:Informational" template="VTableLoadingFailedLoaded"
keywords ="TypeLoadingKeyword" opcode="VTableLoaded"
task="MonoProfiler"
symbol="MonoProfilerVTableLoaded" message="$(string.MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage)" />
<event value="20" version="0" level="win:Verbose" template="ModuleLoadingUnloadingFailed"
keywords ="LoaderKeyword" opcode="ModuleLoading"
task="MonoProfiler"
symbol="MonoProfilerModuleLoading" message="$(string.MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage)" />
<event value="21" version="0" level="win:Informational" template="ModuleLoadingUnloadingFailed"
keywords ="LoaderKeyword" opcode="ModuleFailed"
task="MonoProfiler"
symbol="MonoProfilerModuleFailed" message="$(string.MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage)" />
<event value="22" version="0" level="win:Informational" template="ModuleLoadedUnloaded"
keywords ="LoaderKeyword" opcode="ModuleLoaded"
task="MonoProfiler"
symbol="MonoProfilerModuleLoaded" message="$(string.MonoProfilerPublisher.ModuleLoadedUnloadedEventMessage)" />
<event value="23" version="0" level="win:Verbose" template="ModuleLoadingUnloadingFailed"
keywords ="LoaderKeyword" opcode="ModuleUnloading"
task="MonoProfiler"
symbol="MonoProfilerModuleUnloading" message="$(string.MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage)" />
<event value="24" version="0" level="win:Informational" template="ModuleLoadedUnloaded"
keywords ="LoaderKeyword" opcode="ModuleUnloaded"
task="MonoProfiler"
symbol="MonoProfilerModuleUnloaded" message="$(string.MonoProfilerPublisher.ModuleLoadedUnloadedEventMessage)" />
<event value="25" version="0" level="win:Verbose" template="AssemblyLoadingUnloading"
keywords ="LoaderKeyword" opcode="AssemblyLoading"
task="MonoProfiler"
symbol="MonoProfilerAssemblyLoading" message="$(string.MonoProfilerPublisher.AssemblyLoadingUnloadingEventMessage)" />
<event value="26" version="0" level="win:Informational" template="AssemblyLoadedUnloaded"
keywords ="LoaderKeyword" opcode="AssemblyLoaded"
task="MonoProfiler"
symbol="MonoProfilerAssemblyLoaded" message="$(string.MonoProfilerPublisher.AssemblyLoadedUnloadedEventMessage)" />
<event value="27" version="0" level="win:Verbose" template="AssemblyLoadingUnloading"
keywords ="LoaderKeyword" opcode="AssemblyUnloading"
task="MonoProfiler"
symbol="MonoProfilerAssemblyUnloading" message="$(string.MonoProfilerPublisher.AssemblyLoadingUnloadingEventMessage)" />
<event value="28" version="0" level="win:Informational" template="AssemblyLoadedUnloaded"
keywords ="LoaderKeyword" opcode="AssemblyUnloaded"
task="MonoProfiler"
symbol="MonoProfilerAssemblyUnloaded" message="$(string.MonoProfilerPublisher.AssemblyLoadedUnloadedEventMessage)" />
<event value="29" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodEnter"
task="MonoProfiler"
symbol="MonoProfilerMethodEnter" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="30" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodLeave"
task="MonoProfiler"
symbol="MonoProfilerMethodLeave" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="31" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodTailCall"
task="MonoProfiler"
symbol="MonoProfilerMethodTailCall" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="32" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodExceptionLeave"
task="MonoProfiler"
symbol="MonoProfilerMethodExceptionLeave" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="33" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodFree"
task="MonoProfiler"
symbol="MonoProfilerMethodFree" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="34" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodBeginInvoke"
task="MonoProfiler"
symbol="MonoProfilerMethodBeginInvoke" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="35" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodEndInvoke"
task="MonoProfiler"
symbol="MonoProfilerMethodEndInvoke" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="36" version="0" level="win:Informational" template="ExceptionThrow"
keywords ="ExceptionKeyword" opcode="ExceptionThrow"
task="MonoProfiler"
symbol="MonoProfilerExceptionThrow" message="$(string.MonoProfilerPublisher.ExceptionThrowEventMessage)" />
<event value="37" version="0" level="win:Informational" template="ExceptionClause"
keywords ="ExceptionKeyword" opcode="ExceptionClause"
task="MonoProfiler"
symbol="MonoProfilerExceptionClause" message="$(string.MonoProfilerPublisher.ExceptionClauseEventMessage)" />
<event value="38" version="0" level="win:Informational" template="GCEvent"
keywords ="GCKeyword" opcode="GCEvent"
task="MonoProfiler"
symbol="MonoProfilerGCEvent" message="$(string.MonoProfilerPublisher.GCEventEventMessage)" />
<event value="39" version="0" level="win:Informational" template="GCAllocation"
keywords ="GCAllocationKeyword" opcode="GCAllocation"
task="MonoProfiler"
symbol="MonoProfilerGCAllocation" message="$(string.MonoProfilerPublisher.GCAllocationEventMessage)" />
<event value="40" version="0" level="win:Informational" template="GCMoves"
keywords ="GCMovesKeyword" opcode="GCMoves"
task="MonoProfiler"
symbol="MonoProfilerGCMoves" message="$(string.MonoProfilerPublisher.GCMovesEventMessage)" />
<event value="41" version="0" level="win:Informational" template="GCResize"
keywords ="GCResizeKeyword" opcode="GCResize"
task="MonoProfiler"
symbol="MonoProfilerGCResize" message="$(string.MonoProfilerPublisher.GCResizeEventMessage)" />
<event value="42" version="0" level="win:Informational" template="GCHandleCreated"
keywords ="GCHandleKeyword" opcode="GCHandleCreated"
task="MonoProfiler"
symbol="MonoProfilerGCHandleCreated" message="$(string.MonoProfilerPublisher.GCHandleCreatedEventMessage)" />
<event value="43" version="0" level="win:Informational" template="GCHandleDeleted"
keywords ="GCHandleKeyword" opcode="GCHandleDeleted"
task="MonoProfiler"
symbol="MonoProfilerGCHandleDeleted" message="$(string.MonoProfilerPublisher.GCHandleDeletedEventMessage)" />
<event value="44" version="0" level="win:Informational"
keywords ="GCFinalizationKeyword" opcode="GCFinalizing"
task="MonoProfiler"
symbol="MonoProfilerGCFinalizing" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedEventMessage)" />
<event value="45" version="0" level="win:Informational"
keywords ="GCFinalizationKeyword" opcode="GCFinalized"
task="MonoProfiler"
symbol="MonoProfilerGCFinalized" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedEventMessage)" />
<event value="46" version="0" level="win:Informational" template="GCFinalizingFinalizedObject"
keywords ="GCFinalizationKeyword" opcode="GCFinalizingObject"
task="MonoProfiler"
symbol="MonoProfilerGCFinalizingObject" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedObjectEventMessage)" />
<event value="47" version="0" level="win:Informational" template="GCFinalizingFinalizedObject"
keywords ="GCFinalizationKeyword" opcode="GCFinalizedObject"
task="MonoProfiler"
symbol="MonoProfilerGCFinalizedObject" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedObjectEventMessage)" />
<event value="48" version="0" level="win:Informational" template="GCRootRegister"
keywords ="GCRootKeyword" opcode="GCRootRegister"
task="MonoProfiler"
symbol="MonoProfilerGCRootRegister" message="$(string.MonoProfilerPublisher.GCRootRegisterEventMessage)" />
<event value="49" version="0" level="win:Informational" template="GCRootUnregister"
keywords ="GCRootKeyword" opcode="GCRootUnregister"
task="MonoProfiler"
symbol="MonoProfilerGCRootUnregister" message="$(string.MonoProfilerPublisher.GCRootUnregisterEventMessage)" />
<event value="50" version="0" level="win:Informational" template="GCRoots"
keywords ="GCRootKeyword" opcode="GCRoots"
task="MonoProfiler"
symbol="MonoProfilerGCRoots" message="$(string.MonoProfilerPublisher.GCRootsEventMessage)" />
<event value="51" version="0" level="win:Informational"
keywords ="GCHeapDumpKeyword" opcode="GCHeapDumpStart" template="GCHeapDumpStart"
task="MonoProfiler"
symbol="MonoProfilerGCHeapDumpStart" message="$(string.MonoProfilerPublisher.GCHeapDumpStartEventMessage)" />
<event value="52" version="0" level="win:Informational"
keywords ="GCHeapDumpKeyword" opcode="GCHeapDumpStop"
task="MonoProfiler"
symbol="MonoProfilerGCHeapDumpStop" message="$(string.MonoProfilerPublisher.GCHeapDumpStopEventMessage)" />
<event value="53" version="0" level="win:Informational" template="GCHeapDumpObjectReference"
keywords ="GCHeapDumpKeyword" opcode="GCHeapDumpObjectReference"
task="MonoProfiler"
symbol="MonoProfilerGCHeapDumpObjectReference" message="$(string.MonoProfilerPublisher.GCHeapDumpObjectReferenceEventMessage)" />
<event value="54" version="0" level="win:Informational" template="MonitorContentionFailedAcquired"
keywords ="MonitorKeyword ContentionKeyword" opcode="MonitorContention"
task="MonoProfiler"
symbol="MonoProfilerMonitorContention" message="$(string.MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage)" />
<event value="55" version="0" level="win:Informational" template="MonitorContentionFailedAcquired"
keywords ="MonitorKeyword" opcode="MonitorFailed"
task="MonoProfiler"
symbol="MonoProfilerMonitorFailed" message="$(string.MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage)" />
<event value="56" version="0" level="win:Informational" template="MonitorContentionFailedAcquired"
keywords ="MonitorKeyword" opcode="MonitorAquired"
task="MonoProfiler"
symbol="MonoProfilerMonitorAcquired" message="$(string.MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage)" />
<event value="57" version="0" level="win:Informational" template="ThreadStartedStoppingStoppedExited"
keywords ="ThreadingKeyword" opcode="ThreadStarted"
task="MonoProfiler"
symbol="MonoProfilerThreadStarted" message="$(string.MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage)" />
<event value="58" version="0" level="win:Verbose" template="ThreadStartedStoppingStoppedExited"
keywords ="ThreadingKeyword" opcode="ThreadStopping"
task="MonoProfiler"
symbol="MonoProfilerThreadStopping" message="$(string.MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage)" />
<event value="59" version="0" level="win:Informational" template="ThreadStartedStoppingStoppedExited"
keywords ="ThreadingKeyword" opcode="ThreadStopped"
task="MonoProfiler"
symbol="MonoProfilerThreadStopped" message="$(string.MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage)" />
<event value="60" version="0" level="win:Informational" template="ThreadStartedStoppingStoppedExited"
keywords ="ThreadingKeyword" opcode="ThreadExited"
task="MonoProfiler"
symbol="MonoProfilerThreadExited" message="$(string.MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage)" />
<event value="61" version="0" level="win:Verbose" template="ThreadName"
keywords ="ThreadingKeyword" opcode="ThreadName"
task="MonoProfiler"
symbol="MonoProfilerThreadName" message="$(string.MonoProfilerPublisher.ThreadNameEventMessage)" />
<event value="62" version="0" level="win:Verbose" template="JitDoneVerbose"
keywords ="JitKeyword" opcode="JitDoneVerbose"
task="MonoProfiler"
symbol="MonoProfilerJitDoneVerbose" message="$(string.MonoProfilerPublisher.JitDoneVerboseEventMessage)" />
<event value="63" version="0" level="win:Informational" template="GCHeapDumpVTableClassReference"
keywords ="GCHeapDumpVTableClassReferenceKeyword" opcode="GCHeapDumpVTableClassReference"
task="MonoProfiler"
symbol="MonoProfilerGCHeapDumpVTableClassReference" message="$(string.MonoProfilerPublisher.GCHeapDumpVTableClassReferenceEventMessage)" />
</events>
</provider>
</events>
</instrumentation>
<localization>
<resources culture="en-US">
<stringTable>
<!--Message Strings-->
<!-- Event Messages -->
<string id="RuntimePublisher.GCStartEventMessage" value="Count=%1;%nReason=%2" />
<string id="RuntimePublisher.GCStart_V1EventMessage" value="Count=%1;%nDepth=%2;%nReason=%3;%nType=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.GCStart_V2EventMessage" value="Count=%1;%nDepth=%2;%nReason=%3;%nType=%4;%nClrInstanceID=%5;%nClientSequenceNumber=%6" />
<string id="RuntimePublisher.GCEndEventMessage" value="Count=%1;%nDepth=%2" />
<string id="RuntimePublisher.GCEnd_V1EventMessage" value="Count=%1;%nDepth=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.GCHeapStatsEventMessage" value="GenerationSize0=%1;%nTotalPromotedSize0=%2;%nGenerationSize1=%3;%nTotalPromotedSize1=%4;%nGenerationSize2=%5;%nTotalPromotedSize2=%6;%nGenerationSize3=%7;%nTotalPromotedSize3=%8;%nFinalizationPromotedSize=%9;%nFinalizationPromotedCount=%10;%nPinnedObjectCount=%11;%nSinkBlockCount=%12;%nGCHandleCount=%13" />
<string id="RuntimePublisher.GCHeapStats_V1EventMessage" value="GenerationSize0=%1;%nTotalPromotedSize0=%2;%nGenerationSize1=%3;%nTotalPromotedSize1=%4;%nGenerationSize2=%5;%nTotalPromotedSize2=%6;%nGenerationSize3=%7;%nTotalPromotedSize3=%8;%nFinalizationPromotedSize=%9;%nFinalizationPromotedCount=%10;%nPinnedObjectCount=%11;%nSinkBlockCount=%12;%nGCHandleCount=%13;%nClrInstanceID=%14" />
<string id="RuntimePublisher.GCHeapStats_V2EventMessage" value="GenerationSize0=%1;%nTotalPromotedSize0=%2;%nGenerationSize1=%3;%nTotalPromotedSize1=%4;%nGenerationSize2=%5;%nTotalPromotedSize2=%6;%nGenerationSize3=%7;%nTotalPromotedSize3=%8;%nFinalizationPromotedSize=%9;%nFinalizationPromotedCount=%10;%nPinnedObjectCount=%11;%nSinkBlockCount=%12;%nGCHandleCount=%13;%nClrInstanceID=%14;%nGenerationSize4=%15;%nTotalPromotedSize4=%16" />
<string id="RuntimePublisher.GCCreateSegmentEventMessage" value="Address=%1;%nSize=%2;%nType=%3" />
<string id="RuntimePublisher.GCCreateSegment_V1EventMessage" value="Address=%1;%nSize=%2;%nType=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.GCFreeSegmentEventMessage" value="Address=%1" />
<string id="RuntimePublisher.GCFreeSegment_V1EventMessage" value="Address=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.GCRestartEEBeginEventMessage" value="NONE" />
<string id="RuntimePublisher.GCRestartEEBegin_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCRestartEEEndEventMessage" value="NONE" />
<string id="RuntimePublisher.GCRestartEEEnd_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCSuspendEEEventMessage" value="Reason=%1" />
<string id="RuntimePublisher.GCSuspendEE_V1EventMessage" value="Reason=%1;%nCount=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.GCSuspendEEEndEventMessage" value="NONE" />
<string id="RuntimePublisher.GCSuspendEEEnd_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCAllocationTickEventMessage" value="Amount=%1;%nKind=%2" />
<string id="RuntimePublisher.GCAllocationTick_V1EventMessage" value="Amount=%1;%nKind=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.GCAllocationTick_V2EventMessage" value="Amount=%1;%nKind=%2;%nClrInstanceID=%3;Amount64=%4;%nTypeID=%5;%nTypeName=%6;%nHeapIndex=%7" />
<string id="RuntimePublisher.GCAllocationTick_V3EventMessage" value="Amount=%1;%nKind=%2;%nClrInstanceID=%3;Amount64=%4;%nTypeID=%5;%nTypeName=%6;%nHeapIndex=%7;%nAddress=%8" />
<string id="RuntimePublisher.GCAllocationTick_V4EventMessage" value="Amount=%1;%nKind=%2;%nClrInstanceID=%3;Amount64=%4;%nTypeID=%5;%nTypeName=%6;%nHeapIndex=%7;%nAddress=%8;%nObjectSize=%9" />
<string id="RuntimePublisher.GCCreateConcurrentThreadEventMessage" value="NONE" />
<string id="RuntimePublisher.GCCreateConcurrentThread_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCTerminateConcurrentThreadEventMessage" value="NONE" />
<string id="RuntimePublisher.GCTerminateConcurrentThread_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCFinalizersEndEventMessage" value="Count=%1" />
<string id="RuntimePublisher.GCFinalizersEnd_V1EventMessage" value="Count=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.GCFinalizersBeginEventMessage" value="NONE" />
<string id="RuntimePublisher.GCFinalizersBegin_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.BulkTypeEventMessage" value="Count=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.GCBulkRootEdgeEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkRootCCWEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkRCWEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkRootStaticVarEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCDynamicEventMessage" value="ClrInstanceID=%1;Data=%2;Size=%3" />
<string id="RuntimePublisher.GCBulkRootConditionalWeakTableElementEdgeEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkNodeEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkEdgeEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCSampledObjectAllocationHighEventMessage" value="High:ClrInstanceID=%1;%nAddress=%2;%nTypeID=%3;%nObjectCountForTypeSample=%4;%nTotalSizeForTypeSample=%5" />
<string id="RuntimePublisher.GCSampledObjectAllocationLowEventMessage" value="Low:ClrInstanceID=%1;%nAddress=%2;%nTypeID=%3;%nObjectCountForTypeSample=%4;%nTotalSizeForTypeSample=%5" />
<string id="RuntimePublisher.GCBulkSurvivingObjectRangesEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkMovedObjectRangesEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCGenerationRangeEventMessage" value="ClrInstanceID=%1;%nGeneration=%2;%nRangeStart=%3;%nRangeUsedLength=%4;%nRangeReservedLength=%5" />
<string id="RuntimePublisher.GCMarkStackRootsEventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.GCMarkFinalizeQueueRootsEventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.GCMarkHandlesEventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.GCMarkOlderGenerationRootsEventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.GCMarkWithTypeEventMessage" value="HeapNum=%1;%nClrInstanceID=%2;%nType=%3;%nBytes=%4"/>
<string id="RuntimePublisher.GCJoin_V2EventMessage" value="Heap=%1;%nJoinTime=%2;%nJoinType=%3;%nClrInstanceID=%4;%nJoinID=%5"/>
<string id="RuntimePublisher.GCPerHeapHistory_V3EventMessage" value="ClrInstanceID=%1;%nFreeListAllocated=%2;%nFreeListRejected=%3;%nEndOfSegAllocated=%4;%nCondemnedAllocated=%5;%nPinnedAllocated=%6;%nPinnedAllocatedAdvance=%7;%nRunningFreeListEfficiency=%8;%nCondemnReasons0=%9;%nCondemnReasons1=%10;%nCompactMechanisms=%11;%nExpandMechanisms=%12;%nHeapIndex=%13;%nExtraGen0Commit=%14;%nCount=%15"/>
<string id="RuntimePublisher.GCGlobalHeap_V2EventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCountD=%4;%nReason=%5;%nGlobalMechanisms=%6;%nClrInstanceID=%7;%nPauseMode=%8;%nMemoryPressure=%9"/>
<string id="RuntimePublisher.GCGlobalHeap_V3EventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCountD=%4;%nReason=%5;%nGlobalMechanisms=%6;%nClrInstanceID=%7;%nPauseMode=%8;%nMemoryPressure=%9;%nCondemnReasons0=%10;%nCondemnReasons1=%11"/>
<string id="RuntimePublisher.GCGlobalHeap_V4EventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCountD=%4;%nReason=%5;%nGlobalMechanisms=%6;%nClrInstanceID=%7;%nPauseMode=%8;%nMemoryPressure=%9;%nCondemnReasons0=%10;%nCondemnReasons1=%11;%nCount=%12"/>
<string id="RuntimePublisher.GCLOHCompactEventMessage" value="ClrInstanceID=%1;%nCount=%2" />
<string id="RuntimePublisher.GCFitBucketInfoEventMessage" value="ClrInstanceID=%1;%nBucketKind=%2;%nTotalSize=%3;%nCount=%4" />
<string id="RuntimePublisher.FinalizeObjectEventMessage" value="TypeID=%1;%nObjectID=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.GCTriggeredEventMessage" value="Reason=%1" />
<string id="RuntimePublisher.PinObjectAtGCTimeEventMessage" value="HandleID=%1;%nObjectID=%2;%nObjectSize=%3;%nTypeName=%4;%n;%nClrInstanceID=%5" />
<string id="RuntimePublisher.IncreaseMemoryPressureEventMessage" value="BytesAllocated=%1;%n;%nClrInstanceID=%2" />
<string id="RuntimePublisher.DecreaseMemoryPressureEventMessage" value="BytesFreed=%1;%n;%nClrInstanceID=%2" />
<string id="RuntimePublisher.WorkerThreadCreateEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreads=%2" />
<string id="RuntimePublisher.WorkerThreadTerminateEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreads=%2" />
<string id="RuntimePublisher.WorkerThreadRetirementRetireThreadEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreads=%2" />
<string id="RuntimePublisher.WorkerThreadRetirementUnretireThreadEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreads=%2" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreadCount=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.YieldProcessorMeasurementEventMessage" value="ClrInstanceID=%1;%nNsPerYield=%2;%nEstablishedNsPerYield=%3" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadAdjustmentSampleEventMessage" value="Throughput=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadAdjustmentAdjustmentEventMessage" value="AverageThroughput=%1;%nNewWorkerThreadCount=%2;%nReason=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadAdjustmentStatsEventMessage" value="Duration=%1;%nThroughput=%2;%nThreadWave=%3;%nThroughputWave=%4;%nThroughputErrorEstimate=%5;%nAverageThroughputErrorEstimate=%6;%nThroughputRatio=%7;%nConfidence=%8;%nNewControlSetting=%9;%nNewThreadWaveMagnitude=%10;%nClrInstanceID=%11" />
<string id="RuntimePublisher.IOThreadCreateEventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2" />
<string id="RuntimePublisher.IOThreadCreate_V1EventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.IOThreadTerminateEventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2" />
<string id="RuntimePublisher.IOThreadTerminate_V1EventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.IOThreadRetirementRetireThreadEventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2" />
<string id="RuntimePublisher.IOThreadRetirementRetireThread_V1EventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.IOThreadRetirementUnretireThreadEventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2" />
<string id="RuntimePublisher.IOThreadRetirementUnretireThread_V1EventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadPoolSuspendSuspendThreadEventMessage" value="ClrThreadID=%1;%nCPUUtilization=%2" />
<string id="RuntimePublisher.ThreadPoolSuspendResumeThreadEventMessage" value="ClrThreadID=%1;%nCPUUtilization=%2" />
<string id="RuntimePublisher.ThreadPoolWorkingThreadCountEventMessage" value="Count=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.ThreadPoolEnqueueEventMessage" value="WorkID=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.ThreadPoolDequeueEventMessage" value="WorkID=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.ThreadPoolIOEnqueueEventMessage" value="WorkID=%1;%nMultiDequeues=%4%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadPoolIOEnqueue_V1EventMessage" value="WorkID=%1;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadPoolIODequeueEventMessage" value="WorkID=%1;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadPoolIOPackEventMessage" value="WorkID=%1;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadCreatingEventMessage" value="ID=%1;%nClrInstanceID=%s" />
<string id="RuntimePublisher.ThreadRunningEventMessage" value="ID=%1;%nClrInstanceID=%s" />
<string id="RuntimePublisher.MethodDetailsEventMessage" value="MethodID=%1;%TypeID=%2;MethodToken=%3;TypeParameterCount=%4;LoaderModuleID=%5" />
<string id="RuntimePublisher.TypeLoadStartEventMessage" value="TypeLoadStartID=%1;ClrInstanceID=%2" />
<string id="RuntimePublisher.TypeLoadStopEventMessage" value="TypeLoadStartID=%1;ClrInstanceID=%2;LoadLevel=%3;TypeID=%4;TypeName=%5" />
<string id="RuntimePublisher.ExceptionExceptionThrownEventMessage" value="NONE" />
<string id="RuntimePublisher.ExceptionExceptionThrown_V1EventMessage" value="ExceptionType=%1;%nExceptionMessage=%2;%nExceptionEIP=%3;%nExceptionHRESULT=%4;%nExceptionFlags=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.ExceptionExceptionHandlingEventMessage" value="EntryEIP=%1;%nMethodID=%2;%nMethodName=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage" value="NONE" />
<string id="RuntimePublisher.ContentionStartEventMessage" value="NONE" />
<string id="RuntimePublisher.ContentionStart_V1EventMessage" value="ContentionFlags=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.ContentionStopEventMessage" value="ContentionFlags=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.ContentionStop_V1EventMessage" value="ContentionFlags=%1;%nClrInstanceID=%2;DurationNs=%3"/>
<string id="RuntimePublisher.DCStartCompleteEventMessage" value="NONE" />
<string id="RuntimePublisher.DCEndCompleteEventMessage" value="NONE" />
<string id="RuntimePublisher.MethodDCStartEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RuntimePublisher.MethodDCEndEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RuntimePublisher.MethodDCStartVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RuntimePublisher.MethodDCEndVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RuntimePublisher.MethodLoadEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RuntimePublisher.MethodLoad_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.MethodLoad_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7;%nReJITID=%8" />
<string id="RuntimePublisher.R2RGetEntryPointEventMessage" value="MethodID=%1;%nMethodName=%2;%nEntryPoint=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.R2RGetEntryPointStartEventMessage" value="MethodID=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.MethodLoadVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RuntimePublisher.MethodLoadVerbose_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10" />
<string id="RuntimePublisher.MethodLoadVerbose_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10;%nReJITID=%11" />
<string id="RuntimePublisher.MethodUnloadEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RuntimePublisher.MethodUnload_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.MethodUnload_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7;%nReJITID=%8" />
<string id="RuntimePublisher.MethodUnloadVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RuntimePublisher.MethodUnloadVerbose_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10" />
<string id="RuntimePublisher.MethodUnloadVerbose_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10;%nReJITID=%11" />
<string id="RuntimePublisher.MethodJittingStartedEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodToken=%3;%nMethodILSize=%4;%nMethodNamespace=%5;%nMethodName=%6;%nMethodSignature=%7" />
<string id="RuntimePublisher.MethodJittingStarted_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodToken=%3;%nMethodILSize=%4;%nMethodNamespace=%5;%nMethodName=%6;%nMethodSignature=%7;%nClrInstanceID=%8" />
<string id="RuntimePublisher.MethodILToNativeMapEventMessage" value="MethodID=%1;%nReJITID=%2;%nMethodExtent=%3;%nCountOfMapEntries=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.DomainModuleLoadEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;%nModuleILPath=%5;ModuleNativePath=%6" />
<string id="RuntimePublisher.DomainModuleLoad_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;%nModuleILPath=%5;ModuleNativePath=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.DomainModuleUnloadEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;%nModuleILPath=%5;ModuleNativePath=%6" />
<string id="RuntimePublisher.DomainModuleUnload_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;%nModuleILPath=%5;ModuleNativePath=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.ModuleDCStartEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;%nModuleNativePath=%5" />
<string id="RuntimePublisher.ModuleDCEndEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;%nModuleNativePath=%5" />
<string id="RuntimePublisher.ModuleLoadEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;%nModuleNativePath=%5" />
<string id="RuntimePublisher.ModuleLoad_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.ModuleLoad_V2EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6;%nManagedPdbSignature=%7;%nManagedPdbAge=%8;%nManagedPdbBuildPath=%9;%nNativePdbSignature=%10;%nNativePdbAge=%11;%nNativePdbBuildPath=%12" />
<string id="RuntimePublisher.ModuleUnloadEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;%nModuleNativePath=%5" />
<string id="RuntimePublisher.ModuleUnload_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.ModuleUnload_V2EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6;%nManagedPdbSignature=%7;%nManagedPdbAge=%8;%nManagedPdbBuildPath=%9;%nNativePdbSignature=%10;%nNativePdbAge=%11;%nNativePdbBuildPath=%12" />
<string id="RuntimePublisher.AssemblyLoadEventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;%nFullyQualifiedAssemblyName=%4" />
<string id="RuntimePublisher.AssemblyLoad_V1EventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;%nFullyQualifiedAssemblyName=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.AssemblyUnloadEventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;%nFullyQualifiedAssemblyName=%4" />
<string id="RuntimePublisher.AssemblyUnload_V1EventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;%nFullyQualifiedAssemblyName=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.AppDomainLoadEventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3" />
<string id="RuntimePublisher.AppDomainLoad_V1EventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3;%nAppDomainIndex=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.AppDomainUnloadEventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3" />
<string id="RuntimePublisher.AppDomainUnload_V1EventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3;%nAppDomainIndex=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.AssemblyLoadStartEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nAssemblyPath=%3;%nRequestingAssembly=%4;%nAssemblyLoadContext=%5;%nRequestingAssemblyLoadContext=%6" />
<string id="RuntimePublisher.AssemblyLoadStopEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nAssemblyPath=%3;%nRequestingAssembly=%4;%nAssemblyLoadContext=%5;%nRequestingAssemblyLoadContext=%6;%nSuccess=%7;%nResultAssemblyName=%8;%nResultAssemblyPath=%9;%nCached=%10" />
<string id="RuntimePublisher.AssemblyLoadContextResolvingHandlerInvokedEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nHandlerName=%3;%nAssemblyLoadContext=%4;%nResultAssemblyName=%5;%nResultAssemblyPath=%6" />
<string id="RuntimePublisher.AppDomainAssemblyResolveHandlerInvokedEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nHandlerName=%3;%nResultAssemblyName=%4;%nResultAssemblyPath=%5" />
<string id="RuntimePublisher.AssemblyLoadFromResolveHandlerInvokedEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nIsTrackedLoad=%3;%nRequestingAssemblyPath=%4;%nComputedRequestedAssemblyPath=%5" />
<string id="RuntimePublisher.KnownPathProbedEventMessage" value="ClrInstanceID=%1;%nFilePath=%2;%nSource=%3;%nResult=%4" />
<string id="RuntimePublisher.JitInstrumentationDataEventMessage" value="%MethodId=%4" />
<string id="RuntimePublisher.ProfilerEventMessage" value="%Message=%2" />
<string id="RuntimePublisher.ResolutionAttemptedEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nStage=%3;%nAssemblyLoadContext=%4;%nResult=%5;%nResultAssemblyName=%6;%nResultAssemblyPath=%7;%nErrorMessage=%8" />
<string id="RuntimePublisher.StackEventMessage" value="ClrInstanceID=%1;%nReserved1=%2;%nReserved2=%3;%nFrameCount=%4;%nStack=%5" />
<string id="RuntimePublisher.AppDomainMemAllocatedEventMessage" value="AppDomainID=%1;%nAllocated=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.AppDomainMemSurvivedEventMessage" value="AppDomainID=%1;%nSurvived=%2;%nProcessSurvived=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.ThreadCreatedEventMessage" value="ManagedThreadID=%1;%nAppDomainID=%2;%nFlags=%3;%nManagedThreadIndex=%4;%nOSThreadID=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.ThreadTerminatedEventMessage" value="ManagedThreadID=%1;%nAppDomainID=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadDomainEnterEventMessage" value="ManagedThreadID=%1;%nAppDomainID=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ILStubGeneratedEventMessage" value="ClrInstanceID=%1;%nModuleID=%2;%nStubMethodID=%3;%nStubFlags=%4;%nManagedInteropMethodToken=%5;%nManagedInteropMethodNamespace=%6;%nManagedInteropMethodName=%7;%nManagedInteropMethodSignature=%8;%nNativeMethodSignature=%9;%nStubMethodSignature=%10;%nStubMethodILCode=%11" />
<string id="RuntimePublisher.ILStubCacheHitEventMessage" value="ClrInstanceID=%1;%nModuleID=%2;%nStubMethodID=%3;%nManagedInteropMethodToken=%4;%nManagedInteropMethodNamespace=%5;%nManagedInteropMethodName=%6;%nManagedInteropMethodSignature=%7" />
<string id="RuntimePublisher.StrongNameVerificationStartEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nFullyQualifiedAssemblyName=%3"/>
<string id="RuntimePublisher.StrongNameVerificationStart_V1EventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nFullyQualifiedAssemblyName=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.StrongNameVerificationEndEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nFullyQualifiedAssemblyName=%3"/>
<string id="RuntimePublisher.StrongNameVerificationEnd_V1EventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nFullyQualifiedAssemblyName=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.AuthenticodeVerificationStartEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3"/>
<string id="RuntimePublisher.AuthenticodeVerificationStart_V1EventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.AuthenticodeVerificationEndEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3"/>
<string id="RuntimePublisher.AuthenticodeVerificationEnd_V1EventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.EEStartupStartEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.RuntimeInformationEventMessage" value="ClrInstanceID=%1;%nSKU=%2;%nBclMajorVersion=%3;%nBclMinorVersion=%4;%nBclBuildNumber=%5;%nBclQfeNumber=%6;%nVMMajorVersion=%7;%nVMMinorVersion=%8;%nVMBuildNumber=%9;%nVMQfeNumber=%10;%nStartupFlags=%11;%nStartupMode=%12;%nCommandLine=%13;%nComObjectGUID=%14;%nRuntimeDllPath=%15"/>
<string id="RuntimePublisher.MethodJitInliningFailedEventMessage" value="MethodBeingCompiledNamespace=%1;%nMethodBeingCompiledName=%2;%nMethodBeingCompiledNameSignature=%3;%nInlinerNamespace=%4;%nInlinerName=%5;%nInlinerNameSignature=%6;%nInlineeNamespace=%7;%nInlineeName=%8;%nInlineeNameSignature=%9;%nFailAlways=%10;%nFailReason=%11;%nClrInstanceID=%12" />
<string id="RuntimePublisher.MethodJitInliningSucceededEventMessage" value="MethodBeingCompiledNamespace=%1;%nMethodBeingCompiledName=%2;%nMethodBeingCompiledNameSignature=%3;%nInlinerNamespace=%4;%nInlinerName=%5;%nInlinerNameSignature=%6;%nInlineeNamespace=%7;%nInlineeName=%8;%nInlineeNameSignature=%9;%nClrInstanceID=%10" />
<string id="RuntimePublisher.MethodJitTailCallFailedEventMessage" value="MethodBeingCompiledNamespace=%1;%nMethodBeingCompiledName=%2;%nMethodBeingCompiledNameSignature=%3;%nCallerNamespace=%4;%nCallerName=%5;%nCallerNameSignature=%6;%nCalleeNamespace=%7;%nCalleeName=%8;%nCalleeNameSignature=%9;%nTailPrefix=%10;%nFailReason=%11;%nClrInstanceID=%12" />
<string id="RuntimePublisher.MethodJitTailCallSucceededEventMessage" value="MethodBeingCompiledNamespace=%1;%nMethodBeingCompiledName=%2;%nMethodBeingCompiledNameSignature=%3;%nCallerNamespace=%4;%nCallerName=%5;%nCallerNameSignature=%6;%nCalleeNamespace=%7;%nCalleeName=%8;%nCalleeNameSignature=%9;%nTailPrefix=%10;%nTailCallType=%11;%nClrInstanceID=%12" />
<string id="RuntimePublisher.MethodJitMemoryAllocatedForCodeEventMessage" value="MethodID=%1;%nModuleID=%2;%nJitHotCodeRequestSize=%3;%nJitRODataRequestSize=%4;%nAllocatedSizeForJitCode=%5;%nJitAllocFlag=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.SetGCHandleEventMessage" value="HandleID=%1;%nObjectID=%2;%nKind=%3;%nGeneration=%4;%nAppDomainID=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.DestroyGCHandleEventMessage" value="HandleID=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.CodeSymbolsEventMessage" value="%nClrInstanceId=%1;%nModuleId=%2;%nTotalChunks=%3;%nChunkNumber=%4;%nChunkLength=%5;%nChunk=%6" />
<string id="RuntimePublisher.TieredCompilationSettingsEventMessage" value="ClrInstanceID=%1;%nFlags=%2" />
<string id="RuntimePublisher.TieredCompilationPauseEventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.TieredCompilationResumeEventMessage" value="ClrInstanceID=%1;%nNewMethodCount=%2" />
<string id="RuntimePublisher.TieredCompilationBackgroundJitStartEventMessage" value="ClrInstanceID=%1;%nPendingMethodCount=%2" />
<string id="RuntimePublisher.TieredCompilationBackgroundJitStopEventMessage" value="ClrInstanceID=%1;%nPendingMethodCount=%2;%nJittedMethodCount=%3" />
<string id="RuntimePublisher.ExecutionCheckpointEventMessage" value="ClrInstanceID=%1;Checkpoint=%2;Timestamp=%3"/>
<string id="RundownPublisher.MethodDCStartEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RundownPublisher.MethodDCStart_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" />
<string id="RundownPublisher.MethodDCStart_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7;%nReJITID=%8" />
<string id="RuntimePublisher.ModuleRangeLoadEventMessage" value="ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5" />
<string id="RundownPublisher.MethodDCEndEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RundownPublisher.MethodDCEnd_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" />
<string id="RundownPublisher.MethodDCEnd_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7;%nReJITID=%8" />
<string id="RundownPublisher.MethodDCStartVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RundownPublisher.MethodDCStartVerbose_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10" />
<string id="RundownPublisher.MethodDCStartVerbose_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10;%nReJITID=%11" />
<string id="RundownPublisher.MethodDCEndVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RundownPublisher.MethodDCEndVerbose_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10" />
<string id="RundownPublisher.MethodDCEndVerbose_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10;%nReJITID=%11" />
<string id="RundownPublisher.MethodDCStartILToNativeMapEventMessage" value="MethodID=%1;%nReJITID=%2;%nMethodExtent=%3;%nCountOfMapEntries=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.MethodDCEndILToNativeMapEventMessage" value="MethodID=%1;%nReJITID=%2;%nMethodExtent=%3;%nCountOfMapEntries=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.DomainModuleDCStartEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;ModuleILPath=%5;ModuleNativePath=%6" />
<string id="RundownPublisher.DomainModuleDCStart_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;ModuleILPath=%5;ModuleNativePath=%6;%nClrInstanceID=%7" />
<string id="RundownPublisher.DomainModuleDCEndEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;ModuleILPath=%5;ModuleNativePath=%6" />
<string id="RundownPublisher.DomainModuleDCEnd_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;ModuleILPath=%5;ModuleNativePath=%6;%nClrInstanceID=%7" />
<string id="RundownPublisher.ModuleDCStartEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;ModuleNativePath=%5" />
<string id="RundownPublisher.ModuleDCStart_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;ModuleNativePath=%5;%nClrInstanceID=%6" />
<string id="RundownPublisher.ModuleDCStart_V2EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6;%nManagedPdbSignature=%7;%nManagedPdbAge=%8;%nManagedPdbBuildPath=%9;%nNativePdbSignature=%10;%nNativePdbAge=%11;%nNativePdbBuildPath=%12" />
<string id="RundownPublisher.ModuleDCEndEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;ModuleNativePath=%5" />
<string id="RundownPublisher.ModuleDCEnd_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;ModuleNativePath=%5;%nClrInstanceID=%6" />
<string id="RundownPublisher.ModuleDCEnd_V2EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6;%nManagedPdbSignature=%7;%nManagedPdbAge=%8;%nManagedPdbBuildPath=%9;%nNativePdbSignature=%10;%nNativePdbAge=%11;%nNativePdbBuildPath=%12" />
<string id="RundownPublisher.AssemblyDCStartEventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;FullyQualifiedAssemblyName=%4" />
<string id="RundownPublisher.AssemblyDCStart_V1EventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;FullyQualifiedAssemblyName=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.AssemblyDCEndEventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;FullyQualifiedAssemblyName=%4" />
<string id="RundownPublisher.AssemblyDCEnd_V1EventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;FullyQualifiedAssemblyName=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.AppDomainDCStartEventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3" />
<string id="RundownPublisher.AppDomainDCStart_V1EventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3;%nAppDomainIndex=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.AppDomainDCEndEventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3" />
<string id="RundownPublisher.AppDomainDCEnd_V1EventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3;%nAppDomainIndex=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.DCStartCompleteEventMessage" value="ClrInstanceID=%1" />
<string id="RundownPublisher.DCEndCompleteEventMessage" value="ClrInstanceID=%1" />
<string id="RundownPublisher.DCStartInitEventMessage" value="ClrInstanceID=%1" />
<string id="RundownPublisher.DCEndInitEventMessage" value="ClrInstanceID=%1" />
<string id="RundownPublisher.ThreadCreatedEventMessage" value="ManagedThreadID=%1;%nAppDomainID=%2;%nFlags=%3;%nManagedThreadIndex=%4;%nOSThreadID=%5;%nClrInstanceID=%6" />
<string id="RundownPublisher.RuntimeInformationEventMessage" value="ClrInstanceID=%1;%nSKU=%2;%nBclMajorVersion=%3;%nBclMinorVersion=%4;%nBclBuildNumber=%5;%nBclQfeNumber=%6;%nVMMajorVersion=%7;%nVMMinorVersion=%8;%nVMBuildNumber=%9;%nVMQfeNumber=%10;%nStartupFlags=%11;%nStartupMode=%12;%nCommandLine=%13;%nComObjectGUID=%14;%nRuntimeDllPath=%15"/>
<string id="RundownPublisher.StackEventMessage" value="ClrInstanceID=%1;%nReserved1=%2;%nReserved2=%3;%nFrameCount=%4;%nStack=%5" />
<string id="RundownPublisher.GCSettingsRundownEventMessage" value="HardLimit=%1;%nLOHThreshold=%2;%nPhysicalMemoryConfig=%3;%nGen0MinBudgetConfig=%4;%nGen0MaxBudgetConfig=%5;%nHighMemPercentConfig=%6;%nBitSettings=%7;%nClrInstanceID=%8" />
<string id="RundownPublisher.ModuleRangeDCStartEventMessage" value="ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5" />
<string id="RundownPublisher.ModuleRangeDCEndEventMessage" value= "ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5" />
<string id="RundownPublisher.TieredCompilationSettingsDCStartEventMessage" value="ClrInstanceID=%1;%nFlags=%2" />
<string id="RundownPublisher.ExecutionCheckpointDCEndEventMessage" value="ClrInstanceID=%1;Checkpoint=%2;Timestamp=%3"/>
<string id="StressPublisher.StressLogEventMessage" value="Facility=%1;%nLevel=%2;%nMessage=%3" />
<string id="StressPublisher.StressLog_V1EventMessage" value="Facility=%1;%nLevel=%2;%nMessage=%3;%nClrInstanceID=%4" />
<string id="StressPublisher.StackEventMessage" value="ClrInstanceID=%1;%nReserved1=%2;%nReserved2=%3;%nFrameCount=%4;%nStack=%5" />
<string id="PrivatePublisher.FailFastEventMessage" value="FailFastUserMessage=%1;%nFailedEIP=%2;%nOSExitCode=%3;%nClrExitCode=%4;%nClrInstanceID=%5" />
<string id="PrivatePublisher.FinalizeObjectEventMessage" value="TypeName=%1;%nTypeID=%2;%nObjectID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.SetGCHandleEventMessage" value="HandleID=%1;%nObjectID=%2;%n;%nClrInstanceID=%3" />
<string id="PrivatePublisher.DestroyGCHandleEventMessage" value="HandleID=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.PinPlugAtGCTimeEventMessage" value="PlugStart=%1;%nPlugEnd=%2;%n;%nClrInstanceID=%3" />
<string id="PrivatePublisher.CCWRefCountChangeEventMessage" value="HandleID=%1;%nObjectID=%2;%nCOMInterfacePointer=%3;%nNewRefCount=%4;%nTypeName=%5;%nOperation=%6;%nClrInstanceID=%7" />
<string id="PrivatePublisher.GCDecisionEventMessage" value="DoCompact=%1" />
<string id="PrivatePublisher.GCDecision_V1EventMessage" value="DoCompact=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.GCSettingsEventMessage" value="SegmentSize=%1;%nLargeObjectSegmentSize=%2;%nServerGC=%3"/>
<string id="PrivatePublisher.GCSettings_V1EventMessage" value="SegmentSize=%1;%nLargeObjectSegmentSize=%2;%nServerGC=%3;%nClrInstanceID=%4"/>
<string id="PrivatePublisher.GCOptimizedEventMessage" value="DesiredAllocation=%1;%nNewAllocation=%2;%nGenerationNumber=%3"/>
<string id="PrivatePublisher.GCOptimized_V1EventMessage" value="DesiredAllocation=%1;%nNewAllocation=%2;%nGenerationNumber=%3;%nClrInstanceID=%4"/>
<string id="PrivatePublisher.GCPerHeapHistoryEventMessage" value="NONE"/>
<string id="PrivatePublisher.GCPerHeapHistory_V1EventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.GCGlobalHeapEventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCount=%4;%nReason=%5;%nGlobalMechanisms=%6"/>
<string id="PrivatePublisher.GCGlobalHeap_V1EventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCount=%4;%nReason=%5;%nGlobalMechanisms=%6;%nClrInstanceID=%7"/>
<string id="PrivatePublisher.GCJoinEventMessage" value="Heap=%1;%nJoinTime=%2;%nJoinType=%3"/>
<string id="PrivatePublisher.GCJoin_V1EventMessage" value="Heap=%1;%nJoinTime=%2;%nJoinType=%3;%nClrInstanceID=%4"/>
<string id="PrivatePublisher.GCMarkStackRootsEventMessage" value="HeapNum=%1"/>
<string id="PrivatePublisher.GCMarkStackRoots_V1EventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.GCMarkFinalizeQueueRootsEventMessage" value="HeapNum=%1"/>
<string id="PrivatePublisher.GCMarkFinalizeQueueRoots_V1EventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.GCMarkHandlesEventMessage" value="HeapNum=%1"/>
<string id="PrivatePublisher.GCMarkHandles_V1EventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.GCMarkCardsEventMessage" value="HeapNum=%1"/>
<string id="PrivatePublisher.GCMarkCards_V1EventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.BGCBeginEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC1stNonConEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC1stConEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC2ndNonConBeginEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC2ndNonConEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC2ndConBeginEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC1stSweepEndEventMessage" value="GenNumber=%1;ClrInstanceID=%2"/>
<string id="PrivatePublisher.BGC2ndConEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGCPlanEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGCSweepEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGCDrainMarkEventMessage" value="Objects=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.BGCRevisitEventMessage" value="Pages=%1;%nObjects=%2;%nIsLarge=%3;%nClrInstanceID=%4"/>
<string id="PrivatePublisher.BGCOverflowEventMessage" value="Min=%1;%nMax=%2;%Objects=%3;%nIsLarge=%4;%nClrInstanceID=%5"/>
<string id="PrivatePublisher.BGCOverflow_V1EventMessage" value="Min=%1;%nMax=%2;%Objects=%3;%nIsLarge=%4;%nClrInstanceID=%5;%GenNumber=%6"/>
<string id="PrivatePublisher.BGCAllocWaitEventMessage" value="Reason=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.GCFullNotifyEventMessage" value="GenNumber=%1;%nIsAlloc=%2"/>
<string id="PrivatePublisher.GCFullNotify_V1EventMessage" value="GenNumber=%1;%nIsAlloc=%2;%nClrInstanceID=%3"/>
<string id="PrivatePublisher.StartupEventMessage" value="NONE"/>
<string id="PrivatePublisher.Startup_V1EventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.StackEventMessage" value="ClrInstanceID=%1;%nReserved1=%2;%nReserved2=%3;%nFrameCount=%4;%nStack=%5" />
<string id="PrivatePublisher.BindingEventMessage" value="%AppDomainID=%1;%nLoadContextID=%2;%nFromLoaderCache=%3;%nDynamicLoad=%4;%nAssemblyCodebase=%5;%nAssemblyName=%6;%nClrInstanceID=%6"/>
<string id="PrivatePublisher.EvidenceGeneratedEventMessage" value="EvidenceType=%1;%nAppDomainID=%2;%nILImage=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.NgenBinderMessage" value="ClrInstanceID=%1;%nBindingID=%2;%nReason=%3;%nAssembly=%4" />
<string id="PrivatePublisher.FusionMessageEventMessage" value="ClrInstanceID=%1;%nMessage=%2;" />
<string id="PrivatePublisher.FusionErrorCodeEventMessage" value="ClrInstanceID=%1;%nCategory=%2%nErrorCode=%3" />
<string id="PrivatePublisher.ModuleTransparencyComputationStartEventMessage" value="Module=%1;%nAppDomainID=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.ModuleTransparencyComputationEndEventMessage" value="Module=%1;%nAppDomainID=%2;%nIsAllCritical=%3;%nIsAllTransparent=%4;%nIsTreatAsSafe=%5;%nIsOpportunisticallyCritical=%6;%nSecurityRuleSet=%7;%nClrInstanceID=%8" />
<string id="PrivatePublisher.TypeTransparencyComputationStartEventMessage" value="Type=%1;%nModule=%2;%nAppDomainID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.TypeTransparencyComputationEndEventMessage" value="Type=%1;%nModule=%2;%nAppDomainID=%3;%nIsAllCritical=%4;%nIsAllTransparent=%5;%nIsCritical=%6;%nIsTreatAsSafe=%7;%nClrInstanceID=%8" />
<string id="PrivatePublisher.MethodTransparencyComputationStartEventMessage" value="Method=%1;%nModule=%2;%nAppDomainID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.MethodTransparencyComputationEndEventMessage" value="Method=%1;%nModule=%2;%nAppDomainID=%3;%nIsCritical=%4;%nIsTreatAsSafe=%5;%nClrInstanceID=%6" />
<string id="PrivatePublisher.FieldTransparencyComputationStartEventMessage" value="Field=%1;%nModule=%2;%nAppDomainID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.FieldTransparencyComputationEndEventMessage" value="Field=%1;%nModule=%2;%nAppDomainID=%3;%nIsCritical=%4;%nIsTreatAsSafe=%5;%nClrInstanceID=%6" />
<string id="PrivatePublisher.TokenTransparencyComputationStartEventMessage" value="Token=%1;%nModule=%2;%nAppDomainID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.TokenTransparencyComputationEndEventMessage" value="Token=%1;%nModule=%2;%nAppDomainID=%3;%nIsCritical=%4;%nIsTreatAsSafe=%5;%nClrInstanceID=%6" />
<string id="PrivatePublisher.AllocRequestEventMessage" value="LoaderHeapPtr=%1;%nMemoryAddress=%2;%nRequestSize=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.ModuleRangeLoadEventMessage" value="ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5;%nIBCType=%6;%nSectionType=%7" />
<string id="PrivatePublisher.MulticoreJitCommonEventMessage" value="ClrInstanceID=%1;%String1=%2;%nString2=%3;%nInt1=%4;%nInt2=%5;%nInt3=%6" />
<string id="PrivatePublisher.MulticoreJitMethodCodeReturnedMessage" value="ClrInstanceID=%1;%nModuleID=%2;%nMethodID=%3" />
<string id="PrivatePublisher.IInspectableRuntimeClassNameMessage" value="TypeName=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.WinRTUnboxMessage" value="TypeName=%1;%nObject=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.CreateRcwMessage" value="TypeName=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.RcwVarianceMessage" value="RcwTypeName=%1;%nInterface=%2;%nVariantInterface=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.RCWIEnumerableCastingMessage" value="TypeName=%1;%nSecondType=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.CreateCCWMessage" value="TypeName=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.CCWVarianceMessage" value="RcwTypeName=%1;%nInterface=%2;%nVariantInterface=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.ObjectVariantMarshallingMessage" value="TypeName=%1;%nInt1=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.GetTypeFromGUIDMessage" value="TypeName=%1;%nSecondType=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.GetTypeFromProgIDMessage" value="TypeName=%1;%nSecondType=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.ConvertToCallbackMessage" value="TypeName=%1;%nSecondType=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.BeginCreateManagedReferenceMessage" value="ClrInstanceID=%1" />
<string id="PrivatePublisher.EndCreateManagedReferenceMessage" value="ClrInstanceID=%1" />
<!-- Task Messages -->
<string id="RuntimePublisher.GarbageCollectionTaskMessage" value="GC" />
<string id="RuntimePublisher.WorkerThreadCreationTaskMessage" value="WorkerThreadCreationV2" />
<string id="RuntimePublisher.WorkerThreadRetirementTaskMessage" value="WorkerThreadRetirementV2" />
<string id="RuntimePublisher.IOThreadCreationTaskMessage" value="IOThreadCreation" />
<string id="RuntimePublisher.IOThreadRetirementTaskMessage" value="IOThreadRetirement" />
<string id="RuntimePublisher.ThreadpoolSuspensionTaskMessage" value="ThreadpoolSuspensionV2" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadTaskMessage" value="ThreadPoolWorkerThread" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadRetirementTaskMessage" value="ThreadPoolWorkerThreadRetirement" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadAdjustmentTaskMessage" value="ThreadPoolWorkerThreadAdjustment" />
<string id="RuntimePublisher.ExceptionTaskMessage" value="Exception" />
<string id="RuntimePublisher.ExceptionCatchTaskMessage" value="ExceptionCatch" />
<string id="RuntimePublisher.ExceptionFinallyTaskMessage" value="ExceptionFinally" />
<string id="RuntimePublisher.ExceptionFilterTaskMessage" value="ExceptionFilter" />
<string id="RuntimePublisher.ContentionTaskMessage" value="Contention" />
<string id="RuntimePublisher.MethodTaskMessage" value="Method" />
<string id="RuntimePublisher.LoaderTaskMessage" value="Loader" />
<string id="RuntimePublisher.StackTaskMessage" value="ClrStack" />
<string id="RuntimePublisher.StrongNameVerificationTaskMessage" value="StrongNameVerification" />
<string id="RuntimePublisher.AuthenticodeVerificationTaskMessage" value="AuthenticodeVerification" />
<string id="RuntimePublisher.AppDomainResourceManagementTaskMessage" value="AppDomainResourceManagement" />
<string id="RuntimePublisher.ILStubTaskMessage" value="ILStub" />
<string id="RuntimePublisher.EEStartupTaskMessage" value="Runtime" />
<string id="RuntimePublisher.PerfTrackTaskMessage" value="ClrPerfTrack" />
<string id="RuntimePublisher.TypeTaskMessage" value="Type" />
<string id="RuntimePublisher.ThreadPoolWorkingThreadCountTaskMessage" value="ThreadPoolWorkingThreadCount" />
<string id="RuntimePublisher.ThreadPoolTaskMessage" value="ThreadPool" />
<string id="RuntimePublisher.ThreadTaskMessage" value="Thread" />
<string id="RuntimePublisher.DebugIPCEventTaskMessage" value="DebugIPCEvent" />
<string id="RuntimePublisher.DebugExceptionProcessingTaskMessage" value="DebugExceptionProcessing" />
<string id="RuntimePublisher.CodeSymbolsTaskMessage" value="CodeSymbols" />
<string id="RuntimePublisher.TieredCompilationTaskMessage" value="TieredCompilation" />
<string id="RuntimePublisher.AssemblyLoaderTaskMessage" value="AssemblyLoader" />
<string id="RuntimePublisher.TypeLoadTaskMessage" value="TypeLoad" />
<string id="RuntimePublisher.JitInstrumentationDataTaskMessage" value="JitInstrumentationData" />
<string id="RuntimePublisher.ExecutionCheckpointTaskMessage" value="ExecutionCheckpoint" />
<string id="RuntimePublisher.ProfilerTaskMessage" value="Profiler" />
<string id="RuntimePublisher.YieldProcessorMeasurementTaskMessage" value="YieldProcessorMeasurement" />
<string id="RundownPublisher.GCTaskMessage" value="GC" />
<string id="RundownPublisher.EEStartupTaskMessage" value="Runtime" />
<string id="RundownPublisher.MethodTaskMessage" value="Method" />
<string id="RundownPublisher.LoaderTaskMessage" value="Loader" />
<string id="RundownPublisher.StackTaskMessage" value="ClrStack" />
<string id="RundownPublisher.PerfTrackTaskMessage" value="ClrPerfTrack" />
<string id="RundownPublisher.TieredCompilationTaskMessage" value="TieredCompilation" />
<string id="RundownPublisher.ExecutionCheckpointTaskMessage" value="ExecutionCheckpoint" />
<string id="PrivatePublisher.GarbageCollectionTaskMessage" value="GC" />
<string id="PrivatePublisher.StartupTaskMessage" value="Startup"/>
<string id="PrivatePublisher.StackTaskMessage" value="ClrStack" />
<string id="PrivatePublisher.BindingTaskMessage" value="Binding"/>
<string id="PrivatePublisher.EvidenceGeneratedTaskMessage" value="EvidenceGeneration"/>
<string id="PrivatePublisher.TransparencyComputationMessage" value="Transparency"/>
<string id="PrivatePublisher.NgenBinderTaskMessage" value="NgenBinder" />
<string id="PrivatePublisher.FailFastTaskMessage" value="FailFast" />
<string id="PrivatePublisher.LoaderHeapAllocationPrivateTaskMessage" value="LoaderHeap" />
<string id="PrivatePublisher.PerfTrackTaskMessage" value="ClrPerfTrack" />
<string id="PrivatePublisher.MulticoreJitTaskMessage" value="ClrMulticoreJit" />
<string id="PrivatePublisher.DynamicTypeUsageTaskMessage" value="ClrDynamicTypeUsage" />
<string id="StressPublisher.StressTaskMessage" value="StressLog" />
<string id="StressPublisher.StackTaskMessage" value="ClrStack" />
<!-- Map Messages -->
<string id="RuntimePublisher.AppDomain.DefaultMapMessage" value="Default" />
<string id="RuntimePublisher.AppDomain.ExecutableMapMessage" value="Executable" />
<string id="RuntimePublisher.AppDomain.SharedMapMessage" value="Shared" />
<string id="RuntimePublisher.Assembly.DomainNeutralMapMessage" value="DomainNeutral" />
<string id="RuntimePublisher.Assembly.DynamicMapMessage" value="Dynamic" />
<string id="RuntimePublisher.Assembly.NativeMapMessage" value="Native" />
<string id="RuntimePublisher.Assembly.CollectibleMapMessage" value="Collectible" />
<string id="RuntimePublisher.Module.DomainNeutralMapMessage" value="DomainNeutral" />
<string id="RuntimePublisher.Module.NativeMapMessage" value="Native" />
<string id="RuntimePublisher.Module.DynamicMapMessage" value="Dynamic" />
<string id="RuntimePublisher.Module.ManifestMapMessage" value="Manifest" />
<string id="RuntimePublisher.Module.IbcOptimizedMapMessage" value="IbcOptimized" />
<string id="RuntimePublisher.Module.ReadyToRunModuleMapMessage" value="ReadyToRunModule" />
<string id="RuntimePublisher.Module.PartialReadyToRunModuleMapMessage" value="PartialReadyToRunModule" />
<string id="RuntimePublisher.Method.DynamicMapMessage" value="Dynamic" />
<string id="RuntimePublisher.Method.GenericMapMessage" value="Generic" />
<string id="RuntimePublisher.Method.HasSharedGenericCodeMapMessage" value="HasSharedGenericCode" />
<string id="RuntimePublisher.Method.JittedMapMessage" value="Jitted" />
<string id="RuntimePublisher.Method.JitHelperMapMessage" value="JitHelper" />
<string id="RuntimePublisher.Method.ProfilerRejectedPrecompiledCodeMapMessage" value="ProfilerRejectedPrecompiledCode" />
<string id="RuntimePublisher.Method.ReadyToRunRejectedPrecompiledCodeMapMessage" value="ReadyToRunRejectedPrecompiledCode" />
<string id="RuntimePublisher.GCSegment.SmallObjectHeapMapMessage" value="SmallObjectHeap" />
<string id="RuntimePublisher.GCSegment.LargeObjectHeapMapMessage" value="LargeObjectHeap" />
<string id="RuntimePublisher.GCSegment.ReadOnlyHeapMapMessage" value="ReadOnlyHeap" />
<string id="RuntimePublisher.GCSegment.PinnedObjectHeapMapMessage" value="PinnedHeap" />
<string id="RuntimePublisher.GCAllocation.SmallMapMessage" value="Small" />
<string id="RuntimePublisher.GCAllocation.LargeMapMessage" value="Large" />
<string id="RuntimePublisher.GCAllocation.PinnedMapMessage" value="Pinned" />
<string id="RuntimePublisher.GCBucket.FLItemMapMessage" value="FLItem" />
<string id="RuntimePublisher.GCBucket.PlugMessage" value="Plug" />
<string id="RuntimePublisher.GCType.NonConcurrentGCMapMessage" value="NonConcurrentGC" />
<string id="RuntimePublisher.GCType.BackgroundGCMapMessage" value="BackgroundGC" />
<string id="RuntimePublisher.GCType.ForegroundGCMapMessage" value="ForegroundGC" />
<string id="RuntimePublisher.GCReason.AllocSmallMapMessage" value="AllocSmall" />
<string id="RuntimePublisher.GCReason.InducedMapMessage" value="Induced" />
<string id="RuntimePublisher.GCReason.LowMemoryMapMessage" value="LowMemory" />
<string id="RuntimePublisher.GCReason.EmptyMapMessage" value="Empty" />
<string id="RuntimePublisher.GCReason.AllocLargeMapMessage" value="AllocLarge" />
<string id="RuntimePublisher.GCReason.OutOfSpaceSmallObjectHeapMapMessage" value="OutOfSpaceSmallObjectHeap" />
<string id="RuntimePublisher.GCReason.OutOfSpaceLargeObjectHeapMapMessage" value="OutOfSpaceLargeObjectHeap" />
<string id="RuntimePublisher.GCReason.InducedNoForceMapMessage" value="InducedNoForce" />
<string id="RuntimePublisher.GCReason.StressMapMessage" value="Stress" />
<string id="RuntimePublisher.GCReason.InducedLowMemoryMapMessage" value="InducedLowMemory" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendOtherMapMessage" value="SuspendOther" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForGCMapMessage" value="SuspendForGC" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForAppDomainShutdownMapMessage" value="SuspendForAppDomainShutdown" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForCodePitchingMapMessage" value="SuspendForCodePitching" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForShutdownMapMessage" value="SuspendForShutdown" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForDebuggerMapMessage" value="SuspendForDebugger" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForGCPrepMapMessage" value="SuspendForGCPrep" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForDebuggerSweepMapMessage" value="SuspendForDebuggerSweep" />
<string id="RuntimePublisher.StartupMode.ManagedExeMapMessage" value="ManagedExe" />
<string id="RuntimePublisher.StartupMode.HostedCLRMapMessage" value="HostedClr" />
<string id="RuntimePublisher.StartupMode.IjwDllMapMessage" value="IjwDll" />
<string id="RuntimePublisher.StartupMode.ComActivatedMapMessage" value="ComActivated" />
<string id="RuntimePublisher.StartupMode.OtherMapMessage" value="Other" />
<string id="RuntimePublisher.RuntimeSku.DesktopCLRMapMessage" value="DesktopClr" />
<string id="RuntimePublisher.RuntimeSku.CoreCLRMapMessage" value="CoreClr" />
<string id="RuntimePublisher.ExceptionThrown.HasInnerExceptionMapMessage" value="HasInnerException" />
<string id="RuntimePublisher.ExceptionThrown.NestedMapMessage" value="Nested" />
<string id="RuntimePublisher.ExceptionThrown.ReThrownMapMessage" value="ReThrown" />
<string id="RuntimePublisher.ExceptionThrown.CorruptedStateMapMessage" value="CorruptedState" />
<string id="RuntimePublisher.ExceptionThrown.CLSCompliantMapMessage" value="CLSCompliant" />
<string id="RuntimePublisher.ILStubGenerated.ReverseInteropMapMessage" value="ReverseInterop" />
<string id="RuntimePublisher.ILStubGenerated.COMInteropMapMessage" value="ComInterop" />
<string id="RuntimePublisher.ILStubGenerated.NGenedStubMapMessage" value="NGenedStub" />
<string id="RuntimePublisher.ILStubGenerated.DelegateMapMessage" value="Delegate" />
<string id="RuntimePublisher.ILStubGenerated.VarArgMapMessage" value="VarArg" />
<string id="RuntimePublisher.ILStubGenerated.UnmanagedCalleeMapMessage" value="UnmanagedCallee" />
<string id="RuntimePublisher.ILStubGenerated.StructStubMapMessage" value="StructMarshal" />
<string id="RuntimePublisher.Contention.ManagedMapMessage" value="Managed" />
<string id="RuntimePublisher.Contention.NativeMapMessage" value="Native" />
<string id="RuntimePublisher.TailCallType.OptimizedMapMessage" value="OptimizedTailCall" />
<string id="RuntimePublisher.TailCallType.RecursiveMapMessage" value="RecursiveLoop" />
<string id="RuntimePublisher.TailCallType.HelperMapMessage" value="HelperAssistedTailCall" />
<string id="RuntimePublisher.ThreadAdjustmentReason.WarmupMapMessage" value="Warmup" />
<string id="RuntimePublisher.ThreadAdjustmentReason.InitializingMapMessage" value="Initializing" />
<string id="RuntimePublisher.ThreadAdjustmentReason.RandomMoveMapMessage" value="RandomMove" />
<string id="RuntimePublisher.ThreadAdjustmentReason.ClimbingMoveMapMessage" value="ClimbingMove" />
<string id="RuntimePublisher.ThreadAdjustmentReason.ChangePointMapMessage" value="ChangePoint" />
<string id="RuntimePublisher.ThreadAdjustmentReason.StabilizingMapMessage" value="Stabilizing" />
<string id="RuntimePublisher.ThreadAdjustmentReason.StarvationMapMessage" value="Starvation" />
<string id="RuntimePublisher.ThreadAdjustmentReason.ThreadTimedOutMapMessage" value="ThreadTimedOut" />
<string id="RuntimePublisher.GCRootKind.Stack" value="Stack" />
<string id="RuntimePublisher.GCRootKind.Finalizer" value="Finalizer" />
<string id="RuntimePublisher.GCRootKind.Handle" value="Handle" />
<string id="RuntimePublisher.GCRootKind.Older" value="Older" />
<string id="RuntimePublisher.GCRootKind.SizedRef" value="SizedRef" />
<string id="RuntimePublisher.GCRootKind.Overflow" value="Overflow" />
<string id="RuntimePublisher.GCRootKind.DependentHandle" value="DependentHandle" />
<string id="RuntimePublisher.GCRootKind.NewFQ" value="NewFQ" />
<string id="RuntimePublisher.GCRootKind.Steal" value="Steal" />
<string id="RuntimePublisher.GCRootKind.BGC" value="BGC" />
<string id="RuntimePublisher.Startup.CONCURRENT_GCMapMessage" value="CONCURRENT_GC" />
<string id="RuntimePublisher.Startup.LOADER_OPTIMIZATION_SINGLE_DOMAINMapMessage" value="LOADER_OPTIMIZATION_SINGLE_DOMAIN" />
<string id="RuntimePublisher.Startup.LOADER_OPTIMIZATION_MULTI_DOMAINMapMessage" value="LOADER_OPTIMIZATION_MULTI_DOMAIN" />
<string id="RuntimePublisher.Startup.LOADER_SAFEMODEMapMessage" value="LOADER_SAFEMODE" />
<string id="RuntimePublisher.Startup.LOADER_SETPREFERENCEMapMessage" value="LOADER_SETPREFERENCE" />
<string id="RuntimePublisher.Startup.SERVER_GCMapMessage" value="SERVER_GC" />
<string id="RuntimePublisher.Startup.HOARD_GC_VMMapMessage" value="HOARD_GC_VM" />
<string id="RuntimePublisher.Startup.SINGLE_VERSION_HOSTING_INTERFACEMapMessage" value="SINGLE_VERSION_HOSTING_INTERFACE" />
<string id="RuntimePublisher.Startup.LEGACY_IMPERSONATIONMapMessage" value="LEGACY_IMPERSONATION" />
<string id="RuntimePublisher.Startup.DISABLE_COMMITTHREADSTACKMapMessage" value="DISABLE_COMMITTHREADSTACK" />
<string id="RuntimePublisher.Startup.ALWAYSFLOW_IMPERSONATIONMapMessage" value="ALWAYSFLOW_IMPERSONATION" />
<string id="RuntimePublisher.Startup.TRIM_GC_COMMITMapMessage" value="TRIM_GC_COMMIT" />
<string id="RuntimePublisher.Startup.ETWMapMessage" value="ETW" />
<string id="RuntimePublisher.Startup.SERVER_BUILDMapMessage" value="SERVER_BUILD" />
<string id="RuntimePublisher.Startup.ARMMapMessage" value="ARM" />
<string id="RuntimePublisher.ModuleRangeTypeMap.ColdRangeMessage" value="ColdRange"/>
<string id="RuntimePublisher.TypeFlags.Delegate" value="Delegate"/>
<string id="RuntimePublisher.TypeFlags.Finalizable" value="Finalizable"/>
<string id="RuntimePublisher.TypeFlags.ExternallyImplementedCOMObject" value="ExternallyImplementedCOMObject"/>
<string id="RuntimePublisher.TypeFlags.Array" value="Array"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit0" value="ArrayRankBit0"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit1" value="ArrayRankBit1"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit2" value="ArrayRankBit2"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit3" value="ArrayRankBit3"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit4" value="ArrayRankBit4"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit5" value="ArrayRankBit5"/>
<string id="RuntimePublisher.GCRootFlags.Pinning" value="Pinning"/>
<string id="RuntimePublisher.GCRootFlags.WeakRef" value="WeakRef"/>
<string id="RuntimePublisher.GCRootFlags.Interior" value="Interior"/>
<string id="RuntimePublisher.GCRootFlags.RefCounted" value="RefCounted"/>
<string id="RuntimePublisher.GCRootStaticVarFlags.ThreadLocal" value="ThreadLocal"/>
<string id="RuntimePublisher.GCRootCCWFlags.Strong" value="Strong"/>
<string id="RuntimePublisher.GCRootCCWFlags.Pegged" value="Pegged"/>
<string id="RundownPublisher.AppDomain.DefaultMapMessage" value="Default" />
<string id="RuntimePublisher.ThreadFlags.GCSpecial" value="GCSpecial"/>
<string id="RuntimePublisher.ThreadFlags.Finalizer" value="Finalizer"/>
<string id="RuntimePublisher.ThreadFlags.ThreadPoolWorker" value="ThreadPoolWorker"/>
<string id="RuntimePublisher.GCHandleKind.WeakShortMessage" value="WeakShort" />
<string id="RuntimePublisher.GCHandleKind.WeakLongMessage" value="WeakLong" />
<string id="RuntimePublisher.GCHandleKind.StrongMessage" value="Strong" />
<string id="RuntimePublisher.GCHandleKind.PinnedMessage" value="Pinned" />
<string id="RuntimePublisher.GCHandleKind.VariableMessage" value="Variable" />
<string id="RuntimePublisher.GCHandleKind.RefCountedMessage" value="RefCounted" />
<string id="RuntimePublisher.GCHandleKind.DependentMessage" value="Dependent" />
<string id="RuntimePublisher.GCHandleKind.AsyncPinnedMessage" value="AsyncPinned" />
<string id="RuntimePublisher.GCHandleKind.SizedRefMessage" value="SizedRef" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.NoneMapMessage" value="None" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.QuickJitMapMessage" value="QuickJit" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage" value="QuickJitForLoops" />
<string id="RuntimePublisher.KnownPathSource.ApplicationAssembliesMessage" value="ApplicationAssemblies" />
<string id="RuntimePublisher.KnownPathSource.UnusedMessage" value="Unused" />
<string id="RuntimePublisher.KnownPathSource.AppPathsMessage" value="AppPaths" />
<string id="RuntimePublisher.KnownPathSource.PlatformResourceRootsMessage" value="PlatformResourceRoots" />
<string id="RuntimePublisher.KnownPathSource.SatelliteSubdirectoryMessage" value="SatelliteSubdirectory" />
<string id="RuntimePublisher.ResolutionAttempted.FindInLoadContext" value="FindInLoadContext" />
<string id="RuntimePublisher.ResolutionAttempted.AssemblyLoadContextLoad" value="AssemblyLoadContextLoad"/>
<string id="RuntimePublisher.ResolutionAttempted.ApplicationAssemblies" value="ApplicationAssemblies" />
<string id="RuntimePublisher.ResolutionAttempted.DefaultAssemblyLoadContextFallback" value="DefaultAssemblyLoadContextFallback" />
<string id="RuntimePublisher.ResolutionAttempted.ResolveSatelliteAssembly" value="ResolveSatelliteAssembly" />
<string id="RuntimePublisher.ResolutionAttempted.AssemblyLoadContextResolvingEvent" value="AssemblyLoadContextResolvingEvent" />
<string id="RuntimePublisher.ResolutionAttempted.AppDomainAssemblyResolveEvent" value="AppDomainAssemblyResolveEvent" />
<string id="RuntimePublisher.ResolutionAttempted.Success" value="Success" />
<string id="RuntimePublisher.ResolutionAttempted.AssemblyNotFound" value="AssemblyNotFound" />
<string id="RuntimePublisher.ResolutionAttempted.MismatchedAssemblyName" value="MismatchedAssemblyName" />
<string id="RuntimePublisher.ResolutionAttempted.IncompatibleVersion" value="IncompatibleVersion" />
<string id="RuntimePublisher.ResolutionAttempted.Failure" value="Failure" />
<string id="RuntimePublisher.ResolutionAttempted.Exception" value="Exception" />
<string id="RundownPublisher.AppDomain.ExecutableMapMessage" value="Executable" />
<string id="RundownPublisher.AppDomain.SharedMapMessage" value="Shared" />
<string id="RundownPublisher.Assembly.DomainNeutralMapMessage" value="DomainNeutral" />
<string id="RundownPublisher.Assembly.DynamicMapMessage" value="Dynamic" />
<string id="RundownPublisher.Assembly.NativeMapMessage" value="Native" />
<string id="RundownPublisher.Assembly.CollectibleMapMessage" value="Collectible" />
<string id="RundownPublisher.Module.DomainNeutralMapMessage" value="DomainNeutral" />
<string id="RundownPublisher.Module.NativeMapMessage" value="Native" />
<string id="RundownPublisher.Module.DynamicMapMessage" value="Dynamic" />
<string id="RundownPublisher.Module.ManifestMapMessage" value="Manifest" />
<string id="RundownPublisher.Module.IbcOptimizedMapMessage" value="IbcOptimized" />
<string id="RundownPublisher.Module.ReadyToRunModuleMapMessage" value="ReadyToRunModule" />
<string id="RundownPublisher.Module.PartialReadyToRunModuleMapMessage" value="PartialReadyToRunModule" />
<string id="RundownPublisher.Method.DynamicMapMessage" value="Dynamic" />
<string id="RundownPublisher.Method.GenericMapMessage" value="Generic" />
<string id="RundownPublisher.Method.HasSharedGenericCodeMapMessage" value="HasSharedGenericCode" />
<string id="RundownPublisher.Method.JittedMapMessage" value="Jitted" />
<string id="RundownPublisher.Method.JitHelperMapMessage" value="JitHelper" />
<string id="RundownPublisher.Method.ProfilerRejectedPrecompiledCodeMapMessage" value="ProfilerRejectedPrecompiledCode" />
<string id="RundownPublisher.Method.ReadyToRunRejectedPrecompiledCodeMapMessage" value="ReadyToRunRejectedPrecompiledCode" />
<string id="RundownPublisher.StartupMode.ManagedExeMapMessage" value="ManagedExe" />
<string id="RundownPublisher.StartupMode.HostedCLRMapMessage" value="HostedClr" />
<string id="RundownPublisher.StartupMode.IjwDllMapMessage" value="IjwDll" />
<string id="RundownPublisher.StartupMode.ComActivatedMapMessage" value="ComActivated" />
<string id="RundownPublisher.StartupMode.OtherMapMessage" value="Other" />
<string id="RundownPublisher.RuntimeSku.DesktopCLRMapMessage" value="DesktopClr" />
<string id="RundownPublisher.RuntimeSku.CoreCLRMapMessage" value="CoreClr" />
<string id="RundownPublisher.Startup.CONCURRENT_GCMapMessage" value="CONCURRENT_GC" />
<string id="RundownPublisher.Startup.LOADER_OPTIMIZATION_SINGLE_DOMAINMapMessage" value="LOADER_OPTIMIZATION_SINGLE_DOMAIN" />
<string id="RundownPublisher.Startup.LOADER_OPTIMIZATION_MULTI_DOMAINMapMessage" value="LOADER_OPTIMIZATION_MULTI_DOMAIN" />
<string id="RundownPublisher.Startup.LOADER_SAFEMODEMapMessage" value="LOADER_SAFEMODE" />
<string id="RundownPublisher.Startup.LOADER_SETPREFERENCEMapMessage" value="LOADER_SETPREFERENCE" />
<string id="RundownPublisher.Startup.SERVER_GCMapMessage" value="SERVER_GC" />
<string id="RundownPublisher.Startup.HOARD_GC_VMMapMessage" value="HOARD_GC_VM" />
<string id="RundownPublisher.Startup.SINGLE_VERSION_HOSTING_INTERFACEMapMessage" value="SINGLE_VERSION_HOSTING_INTERFACE" />
<string id="RundownPublisher.Startup.LEGACY_IMPERSONATIONMapMessage" value="LEGACY_IMPERSONATION" />
<string id="RundownPublisher.Startup.DISABLE_COMMITTHREADSTACKMapMessage" value="DISABLE_COMMITTHREADSTACK" />
<string id="RundownPublisher.Startup.ALWAYSFLOW_IMPERSONATIONMapMessage" value="ALWAYSFLOW_IMPERSONATION" />
<string id="RundownPublisher.Startup.TRIM_GC_COMMITMapMessage" value="TRIM_GC_COMMIT" />
<string id="RundownPublisher.Startup.ETWMapMessage" value="ETW" />
<string id="RundownPublisher.Startup.SERVER_BUILDMapMessage" value="SERVER_BUILD" />
<string id="RundownPublisher.Startup.ARMMapMessage" value="ARM" />
<string id="RundownPublisher.ModuleRangeTypeMap.ColdRangeMessage" value="ColdRange"/>
<string id="RundownPublisher.ThreadFlags.GCSpecial" value="GCSpecial"/>
<string id="RundownPublisher.ThreadFlags.Finalizer" value="Finalizer"/>
<string id="RundownPublisher.ThreadFlags.ThreadPoolWorker" value="ThreadPoolWorker"/>
<string id="RundownPublisher.TieredCompilationSettingsFlags.NoneMapMessage" value="None" />
<string id="RundownPublisher.TieredCompilationSettingsFlags.QuickJitMapMessage" value="QuickJit" />
<string id="RundownPublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage" value="QuickJitForLoops" />
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ModuleSection" value="ModuleSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.EETableSection" value="EETableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.WriteDataSection" value="WriteDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.WriteableDataSection" value="WriteableDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DataSection" value="DataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.RVAStaticsSection" value="RVAStaticsSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.EEDataSection" value="EEDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoTableEagerSection" value="DelayLoadInfoTableEagerSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoTableSection" value="DelayLoadInfoTableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.EEReadonlyData" value="EEReadonlyData"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlyData" value="ReadonlyData"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ClassSection" value="ClassSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CrossDomainInfoSection" value="CrossDomainInfoSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodDescSection" value="MethodDescSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodDescWriteableSection" value="MethodDescWriteableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ExceptionSection" value="ExceptionSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.InstrumentSection" value="InstrumentSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.VirtualImportThunkSection" value="VirtualImportThunkSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ExternalMethodThunkSection" value="ExternalMethodThunkSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.HelperTableSection" value="HelperTableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeWriteableSection" value="MethodPrecodeWriteableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeWriteSection" value="MethodPrecodeWriteSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeSection" value="MethodPrecodeSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.Win32ResourcesSection" value="Win32ResourcesSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.HeaderSection" value="HeaderSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MetadataSection" value="MetadataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoSection" value="DelayLoadInfoSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ImportTableSection" value="ImportTableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CodeSection" value="CodeSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CodeHeaderSection" value="CodeHeaderSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CodeManagerSection" value="CodeManagerSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.UnwindDataSection" value="UnwindDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.RuntimeFunctionSection" value="RuntimeFunctionSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.StubsSection" value="StubsSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.StubDispatchDataSection" value="StubDispatchDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ExternalMethodDataSection" value="ExternalMethodDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoDelayListSection" value="DelayLoadInfoDelayListSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlySharedSection" value="ReadonlySharedSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlySection" value="ReadonlySection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ILSection" value="ILSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.GCInfoSection" value="GCInfoSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ILMetadataSection" value="ILMetadataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ResourcesSection" value="ResourcesSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CompressedMapsSection" value="CompressedMapsSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DebugSection" value="DebugSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.BaseRelocsSection" value="BaseRelocsSection"/>
<string id="PrivatePublisher.ModuleRangeIBCTypeMap.IBCUnprofiledSectionMessage" value="IBCUnprofiledSection"/>
<string id="PrivatePublisher.ModuleRangeIBCTypeMap.IBCProfiledSectionMessage" value="IBCProfiledSection"/>
<string id="PrivatePublisher.ModuleRangeTypeMap.HotRangeMessage" value="HotRange"/>
<string id="PrivatePublisher.ModuleRangeTypeMap.WarmRangeMessage" value="WarmRange"/>
<string id="PrivatePublisher.ModuleRangeTypeMap.ColdRangeMessage" value="ColdRange"/>
<string id="PrivatePublisher.ModuleRangeTypeMap.HotColdRangeMessage" value="HotColdSortedRange"/>
<string id="PrivatePublisher.GCHandleKind.WeakShortMessage" value="WeakShort" />
<string id="PrivatePublisher.GCHandleKind.WeakLongMessage" value="WeakLong" />
<string id="PrivatePublisher.GCHandleKind.StrongMessage" value="Strong" />
<string id="PrivatePublisher.GCHandleKind.PinnedMessage" value="Pinned" />
<string id="PrivatePublisher.GCHandleKind.VariableMessage" value="Variable" />
<string id="PrivatePublisher.GCHandleKind.RefCountedMessage" value="RefCounted" />
<string id="PrivatePublisher.GCHandleKind.DependentMessage" value="Dependent" />
<string id="PrivatePublisher.GCHandleKind.AsyncPinnedMessage" value="AsyncPinned" />
<string id="PrivatePublisher.GCHandleKind.SizedRefMessage" value="SizedRef" />
<!-- Keyword Messages -->
<string id="RuntimePublisher.GCKeywordMessage" value="GC" />
<string id="RuntimePublisher.ThreadingKeywordMessage" value="Threading" />
<string id="RuntimePublisher.AssemblyLoaderKeywordMessage" value="AssemblyLoader" />
<string id="RuntimePublisher.LoaderKeywordMessage" value="Loader" />
<string id="RuntimePublisher.JitKeywordMessage" value="Jit" />
<string id="RuntimePublisher.JittedMethodILToNativeMapKeywordMessage" value="JittedMethodILToNativeMap" />
<string id="RuntimePublisher.NGenKeywordMessage" value="NGen" />
<string id="RuntimePublisher.StartEnumerationKeywordMessage" value="StartEnumeration" />
<string id="RuntimePublisher.EndEnumerationKeywordMessage" value="StopEnumeration" />
<string id="RuntimePublisher.SecurityKeywordMessage" value="Security" />
<string id="RuntimePublisher.AppDomainResourceManagementKeywordMessage" value="AppDomainResourceManagement" />
<string id="RuntimePublisher.InteropKeywordMessage" value="Interop" />
<string id="RuntimePublisher.ContentionKeywordMessage" value="Contention" />
<string id="RuntimePublisher.ExceptionKeywordMessage" value="Exception" />
<string id="RuntimePublisher.PerfTrackKeywordMessage" value="PerfTrack" />
<string id="RuntimePublisher.StackKeywordMessage" value="Stack" />
<string id="RuntimePublisher.JitTracingKeywordMessage" value="JitTracing" />
<string id="RuntimePublisher.OverrideAndSuppressNGenEventsKeywordMessage" value="OverrideAndSuppressNGenEvents" />
<string id="RuntimePublisher.TypeKeywordMessage" value="Type" />
<string id="RuntimePublisher.GCHeapDumpKeywordMessage" value="GCHeapDump" />
<string id="RuntimePublisher.GCSampledObjectAllocationHighKeywordMessage" value="GCSampledObjectAllocationHigh" />
<string id="RuntimePublisher.GCSampledObjectAllocationLowKeywordMessage" value="GCSampledObjectAllocationLow" />
<string id="RuntimePublisher.GCHeapSurvivalAndMovementKeywordMessage" value="GCHeapSurvivalAndMovement" />
<string id="RuntimePublisher.GCHeapCollectKeyword" value="GCHeapCollect" />
<string id="RuntimePublisher.GCHeapAndTypeNamesKeyword" value="GCHeapAndTypeNames" />
<string id="RuntimePublisher.GCHandleKeywordMessage" value="GCHandle" />
<string id="RuntimePublisher.ThreadTransferKeywordMessage" value="ThreadTransfer" />
<string id="RuntimePublisher.DebuggerKeywordMessage" value="Debugger" />
<string id="RuntimePublisher.MonitoringKeywordMessage" value="Monitoring" />
<string id="RuntimePublisher.CodeSymbolsKeywordMessage" value="CodeSymbols" />
<string id="RuntimePublisher.EventSourceKeywordMessage" value="EventSource" />
<string id="RuntimePublisher.CompilationKeywordMessage" value="Compilation" />
<string id="RuntimePublisher.CompilationDiagnosticKeywordMessage" value="CompilationDiagnostic" />
<string id="RuntimePublisher.MethodDiagnosticKeywordMessage" value="MethodDiagnostic" />
<string id="RuntimePublisher.TypeDiagnosticKeywordMessage" value="TypeDiagnostic" />
<string id="RuntimePublisher.JitInstrumentationDataKeywordMessage" value="JitInstrumentationData" />
<string id="RuntimePublisher.ProfilerKeywordMessage" value="Profiler" />
<string id="RuntimePublisher.GenAwareBeginEventMessage" value="NONE" />
<string id="RuntimePublisher.GenAwareEndEventMessage" value="NONE" />
<string id="RundownPublisher.GCKeywordMessage" value="GC" />
<string id="RundownPublisher.LoaderKeywordMessage" value="Loader" />
<string id="RundownPublisher.JitKeywordMessage" value="Jit" />
<string id="RundownPublisher.JittedMethodILToNativeMapRundownKeywordMessage" value="JittedMethodILToNativeMapRundown" />
<string id="RundownPublisher.NGenKeywordMessage" value="NGen" />
<string id="RundownPublisher.StartRundownKeywordMessage" value="Start" />
<string id="RundownPublisher.EndRundownKeywordMessage" value="End" />
<string id="RuntimePublisher.AppDomainResourceManagementRundownKeywordMessage" value="AppDomainResourceManagement" />
<string id="RundownPublisher.ThreadingKeywordMessage" value="Threading" />
<string id="RundownPublisher.OverrideAndSuppressNGenEventsRundownKeywordMessage" value="OverrideAndSuppressNGenEvents" />
<string id="RundownPublisher.PerfTrackRundownKeywordMessage" value="PerfTrack" />
<string id="RundownPublisher.StackKeywordMessage" value="Stack" />
<string id="RundownPublisher.CompilationKeywordMessage" value="Compilation" />
<string id="PrivatePublisher.GCPrivateKeywordMessage" value="GC" />
<string id="PrivatePublisher.StartupKeywordMessage" value="Startup" />
<string id="PrivatePublisher.StackKeywordMessage" value="Stack" />
<string id="PrivatePublisher.BindingKeywordMessage" value="Binding" />
<string id="PrivatePublisher.NGenForceRestoreKeywordMessage" value="NGenForceRestore" />
<string id="PrivatePublisher.SecurityPrivateKeywordMessage" value="Security" />
<string id="PrivatePublisher.PrivateFusionKeywordMessage" value="Fusion" />
<string id="PrivatePublisher.LoaderHeapPrivateKeywordMessage" value="LoaderHeap" />
<string id="PrivatePublisher.PerfTrackKeywordMessage" value="PerfTrack" />
<string id="PrivatePublisher.DynamicTypeUsageMessage" value="DynamicTypeUsage" />
<string id="PrivatePublisher.MulticoreJitPrivateKeywordMessage" value="MulticoreJit" />
<string id="PrivatePublisher.InteropPrivateKeywordMessage" value="Interop" />
<string id="PrivatePublisher.GCHandlePrivateKeywordMessage" value="GCHandle" />
<string id="StressPublisher.StackKeywordMessage" value="Stack" />
<!-- Opcode messages -->
<string id="RuntimePublisher.GCRestartEEEndOpcodeMessage" value="RestartEEStop" />
<string id="RuntimePublisher.GCHeapStatsOpcodeMessage" value="HeapStats" />
<string id="RuntimePublisher.GCCreateSegmentOpcodeMessage" value="CreateSegment" />
<string id="RuntimePublisher.GCFreeSegmentOpcodeMessage" value="FreeSegment" />
<string id="RuntimePublisher.GCRestartEEBeginOpcodeMessage" value="RestartEEStart" />
<string id="RuntimePublisher.GCSuspendEEEndOpcodeMessage" value="SuspendEEStop" />
<string id="RuntimePublisher.GCSuspendEEBeginOpcodeMessage" value="SuspendEEStart" />
<string id="RuntimePublisher.GCAllocationTickOpcodeMessage" value="AllocationTick" />
<string id="RuntimePublisher.GCCreateConcurrentThreadOpcodeMessage" value="CreateConcurrentThread" />
<string id="RuntimePublisher.GCTerminateConcurrentThreadOpcodeMessage" value="TerminateConcurrentThread" />
<string id="RuntimePublisher.GCFinalizersEndOpcodeMessage" value="FinalizersStop" />
<string id="RuntimePublisher.GCFinalizersBeginOpcodeMessage" value="FinalizersStart" />
<string id="RuntimePublisher.GCBulkRootEdgeOpcodeMessage" value="GCBulkRootEdge" />
<string id="RuntimePublisher.GCBulkRootCCWOpcodeMessage" value="GCBulkRootCCW" />
<string id="RuntimePublisher.GCBulkRCWOpcodeMessage" value="GCBulkRCW" />
<string id="RuntimePublisher.GCBulkRootStaticVarOpcodeMessage" value="GCBulkRootStaticVar" />
<string id="RuntimePublisher.GCDynamicEventOpcodeMessage" value="GCDynamicEvent" />
<string id="RuntimePublisher.GCBulkRootConditionalWeakTableElementEdgeOpcodeMessage" value="GCBulkRootConditionalWeakTableElementEdge" />
<string id="RuntimePublisher.GCBulkNodeOpcodeMessage" value="GCBulkNode" />
<string id="RuntimePublisher.GCBulkEdgeOpcodeMessage" value="GCBulkEdge" />
<string id="RuntimePublisher.GCSampledObjectAllocationOpcodeMessage" value="GCSampledObjectAllocation" />
<string id="RuntimePublisher.GCBulkSurvivingObjectRangesOpcodeMessage" value="GCBulkSurvivingObjectRanges" />
<string id="RuntimePublisher.GCBulkMovedObjectRangesOpcodeMessage" value="GCBulkMovedObjectRanges" />
<string id="RuntimePublisher.GCGenerationRangeOpcodeMessage" value="GCGenerationRange" />
<string id="RuntimePublisher.GCMarkStackRootsOpcodeMessage" value="MarkStackRoots" />
<string id="RuntimePublisher.GCMarkHandlesOpcodeMessage" value="MarkHandles" />
<string id="RuntimePublisher.GCMarkFinalizeQueueRootsOpcodeMessage" value="MarkFinalizeQueueRoots" />
<string id="RuntimePublisher.GCMarkOlderGenerationRootsOpcodeMessage" value="MarkCards" />
<string id="RuntimePublisher.GCMarkOpcodeMessage" value="Mark" />
<string id="RuntimePublisher.GCJoinOpcodeMessage" value="GCJoin" />
<string id="RuntimePublisher.GCPerHeapHistoryOpcodeMessage" value="PerHeapHistory" />
<string id="RuntimePublisher.GCLOHCompactOpcodeMessage" value="GCLOHCompact" />
<string id="RuntimePublisher.GCFitBucketInfoOpcodeMessage" value="GCFitBucketInfo" />
<string id="RuntimePublisher.GCGlobalHeapHistoryOpcodeMessage" value="GlobalHeapHistory" />
<string id="RuntimePublisher.GenAwareBeginOpcodeMessage" value="GenAwareBegin" />
<string id="RuntimePublisher.GenAwareEndOpcodeMessage" value="GenAwareEnd" />
<string id="RuntimePublisher.FinalizeObjectOpcodeMessage" value="FinalizeObject" />
<string id="RuntimePublisher.BulkTypeOpcodeMessage" value="BulkType" />
<string id="RuntimePublisher.MethodDetailsOpcodeMessage" value="MethodDetails" />
<string id="RuntimePublisher.MethodLoadOpcodeMessage" value="Load" />
<string id="RuntimePublisher.MethodUnloadOpcodeMessage" value="Unload" />
<string id="RuntimePublisher.MethodLoadVerboseOpcodeMessage" value="LoadVerbose" />
<string id="RuntimePublisher.MethodUnloadVerboseOpcodeMessage" value="UnloadVerbose" />
<string id="RuntimePublisher.DCStartCompleteOpcodeMessage" value="DCStartCompleteV2" />
<string id="RuntimePublisher.DCEndCompleteOpcodeMessage" value="DCEndCompleteV2" />
<string id="RuntimePublisher.MethodDCStartOpcodeMessage" value="DCStartV2" />
<string id="RuntimePublisher.MethodDCEndOpcodeMessage" value="DCStopV2" />
<string id="RuntimePublisher.MethodDCStartVerboseOpcodeMessage" value="DCStartVerboseV2" />
<string id="RuntimePublisher.MethodDCEndVerboseOpcodeMessage" value="DCStopVerboseV2" />
<string id="RuntimePublisher.MethodJittingStartedOpcodeMessage" value="JittingStarted" />
<string id="RuntimePublisher.JitInliningSucceededOpcodeMessage" value="InliningSucceeded" />
<string id="RuntimePublisher.JitInliningFailedOpcodeMessage" value="InliningFailed" />
<string id="RuntimePublisher.JitTailCallSucceededOpcodeMessage" value="TailCallSucceeded" />
<string id="RuntimePublisher.JitTailCallFailedOpcodeMessage" value="TailCallFailed" />
<string id="RuntimePublisher.MemoryAllocatedForJitCodeOpcodeMessage" value="MemoryAllocatedForJitCode" />
<string id="RuntimePublisher.MethodILToNativeMapOpcodeMessage" value="MethodILToNativeMap" />
<string id="RuntimePublisher.DomainModuleLoadOpcodeMessage" value="DomainModuleLoad" />
<string id="RuntimePublisher.ModuleLoadOpcodeMessage" value="ModuleLoad" />
<string id="RuntimePublisher.ModuleUnloadOpcodeMessage" value="ModuleUnload" />
<string id="RuntimePublisher.ModuleDCStartOpcodeMessage" value="ModuleDCStartV2" />
<string id="RuntimePublisher.ModuleDCEndOpcodeMessage" value="ModuleDCStopV2" />
<string id="RuntimePublisher.AssemblyLoadOpcodeMessage" value="AssemblyLoad" />
<string id="RuntimePublisher.AssemblyUnloadOpcodeMessage" value="AssemblyUnload" />
<string id="RuntimePublisher.AppDomainLoadOpcodeMessage" value="AppDomainLoad" />
<string id="RuntimePublisher.AppDomainUnloadOpcodeMessage" value="AppDomainUnload" />
<string id="RuntimePublisher.CLRStackWalkOpcodeMessage" value="Walk" />
<string id="RuntimePublisher.AppDomainMemAllocatedOpcodeMessage" value="MemAllocated" />
<string id="RuntimePublisher.AppDomainMemSurvivedOpcodeMessage" value="MemSurvived" />
<string id="RuntimePublisher.ThreadCreatedOpcodeMessage" value="ThreadCreated" />
<string id="RuntimePublisher.ThreadTerminatedOpcodeMessage" value="ThreadTerminated" />
<string id="RuntimePublisher.ThreadDomainEnterOpcodeMessage" value="DomainEnter" />
<string id="RuntimePublisher.ILStubGeneratedOpcodeMessage" value="StubGenerated" />
<string id="RuntimePublisher.ILStubCacheHitOpcodeMessage" value="StubCacheHit" />
<string id="RuntimePublisher.WaitOpcodeMessage" value="Wait" />
<string id="RuntimePublisher.SampleOpcodeMessage" value="Sample" />
<string id="RuntimePublisher.AdjustmentOpcodeMessage" value="Adjustment" />
<string id="RuntimePublisher.StatsOpcodeMessage" value="Stats" />
<string id="RuntimePublisher.ModuleRangeLoadOpcodeMessage" value="ModuleRangeLoad" />
<string id="RuntimePublisher.SetGCHandleOpcodeMessage" value="SetGCHandle" />
<string id="RuntimePublisher.DestroyGCHandleOpcodeMessage" value="DestoryGCHandle" />
<string id="RuntimePublisher.TriggeredOpcodeMessage" value="Triggered" />
<string id="RuntimePublisher.PinObjectAtGCTimeOpcodeMessage" value="PinObjectAtGCTime" />
<string id="RuntimePublisher.IncreaseMemoryPressureOpcodeMessage" value="IncreaseMemoryPressure" />
<string id="RuntimePublisher.DecreaseMemoryPressureOpcodeMessage" value="DecreaseMemoryPressure" />
<string id="RuntimePublisher.EnqueueOpcodeMessage" value="Enqueue" />
<string id="RuntimePublisher.DequeueOpcodeMessage" value="Dequeue" />
<string id="RuntimePublisher.IOEnqueueOpcodeMessage" value="IOEnqueue" />
<string id="RuntimePublisher.IODequeueOpcodeMessage" value="IODequeue" />
<string id="RuntimePublisher.IOPackOpcodeMessage" value="IOPack" />
<string id="RuntimePublisher.ThreadCreatingOpcodeMessage" value="Creating" />
<string id="RuntimePublisher.ThreadRunningOpcodeMessage" value="Running" />
<string id="RuntimePublisher.DebugIPCEventStartOpcodeMessage" value="IPCEventStart" />
<string id="RuntimePublisher.DebugIPCEventEndOpcodeMessage" value="IPCEventEnd" />
<string id="RuntimePublisher.DebugExceptionProcessingStartOpcodeMessage" value="ExceptionProcessingStart" />
<string id="RuntimePublisher.DebugExceptionProcessingEndOpcodeMessage" value="ExceptionProcessingEnd" />
<string id="RuntimePublisher.TieredCompilationSettingsOpcodeMessage" value="Settings" />
<string id="RuntimePublisher.TieredCompilationPauseOpcodeMessage" value="Pause" />
<string id="RuntimePublisher.TieredCompilationResumeOpcodeMessage" value="Resume" />
<string id="RuntimePublisher.AssemblyLoadContextResolvingHandlerInvokedOpcodeMessage" value="AssemblyLoadContextResolvingHandlerInvoked" />
<string id="RuntimePublisher.AppDomainAssemblyResolveHandlerInvokedOpcodeMessage" value="AppDomainAssemblyResolveHandlerInvoked" />
<string id="RuntimePublisher.AssemblyLoadFromResolveHandlerInvokedOpcodeMessage" value="AssemblyLoadFromResolveHandlerInvoked" />
<string id="RuntimePublisher.KnownPathProbedOpcodeMessage" value="KnownPathProbed" />
<string id="RuntimePublisher.ResolutionAttemptedOpcodeMessage" value="ResolutionAttempted" />
<string id="RuntimePublisher.InstrumentationDataOpcodeMessage" value="InstrumentationData" />
<string id="RuntimePublisher.ExecutionCheckpointOpcodeMessage" value="ExecutionCheckpoint" />
<string id="RuntimePublisher.ProfilerOpcodeMessage" value="ProfilerMessage" />
<string id="RundownPublisher.GCSettingsOpcodeMessage" value="GCSettingsRundown" />
<string id="RundownPublisher.MethodDCStartOpcodeMessage" value="DCStart" />
<string id="RundownPublisher.MethodDCEndOpcodeMessage" value="DCStop" />
<string id="RundownPublisher.MethodDCStartVerboseOpcodeMessage" value="DCStartVerbose" />
<string id="RundownPublisher.MethodDCEndVerboseOpcodeMessage" value="DCStopVerbose" />
<string id="RundownPublisher.MethodDCStartILToNativeMapOpcodeMessage" value="MethodDCStartILToNativeMap" />
<string id="RundownPublisher.MethodDCEndILToNativeMapOpcodeMessage" value="MethodDCEndILToNativeMap" />
<string id="RundownPublisher.DCStartCompleteOpcodeMessage" value="DCStartComplete" />
<string id="RundownPublisher.DCEndCompleteOpcodeMessage" value="DCStopComplete" />
<string id="RundownPublisher.DCStartInitOpcodeMessage" value="DCStartInit" />
<string id="RundownPublisher.DCEndInitOpcodeMessage" value="DCStopInit" />
<string id="RundownPublisher.ModuleDCStartOpcodeMessage" value="ModuleDCStart" />
<string id="RundownPublisher.ModuleDCEndOpcodeMessage" value="ModuleDCStop" />
<string id="RundownPublisher.AssemblyDCStartOpcodeMessage" value="AssemblyDCStart" />
<string id="RundownPublisher.AssemblyDCEndOpcodeMessage" value="AssemblyDCStop" />
<string id="RundownPublisher.AppDomainDCStartOpcodeMessage" value="AppDomainDCStart" />
<string id="RundownPublisher.AppDomainDCEndOpcodeMessage" value="AppDomainDCStop" />
<string id="RundownPublisher.DomainModuleDCStartOpcodeMessage" value="DomainModuleDCStart" />
<string id="RundownPublisher.DomainModuleDCEndOpcodeMessage" value="DomainModuleDCStop" />
<string id="RundownPublisher.ThreadDCOpcodeMessage" value="ThreadDCStop" />
<string id="RundownPublisher.CLRStackWalkOpcodeMessage" value="Walk" />
<string id="RundownPublisher.ModuleRangeDCStartOpcodeMessage" value="ModuleRangeDCStart" />
<string id="RundownPublisher.ModuleRangeDCEndOpcodeMessage" value="ModuleRangeDCEnd" />
<string id="RundownPublisher.TieredCompilationSettingsDCStartOpcodeMessage" value="SettingsDCStart" />
<string id="RundownPublisher.ExecutionCheckpointDCEndOpcodeMessage" value="ExecutionCheckpointDCEnd" />
<string id="PrivatePublisher.FailFastOpcodeMessage" value="FailFast" />
<string id="PrivatePublisher.GCDecisionOpcodeMessage" value="Decision" />
<string id="PrivatePublisher.GCSettingsOpcodeMessage" value="Settings" />
<string id="PrivatePublisher.GCOptimizedOpcodeMessage" value="Optimized" />
<string id="PrivatePublisher.GCPerHeapHistoryOpcodeMessage" value="PerHeapHistory" />
<string id="PrivatePublisher.GCGlobalHeapHistoryOpcodeMessage" value="GlobalHeapHistory" />
<string id="PrivatePublisher.GCFullNotifyOpcodeMessage" value="FullNotify" />
<string id="PrivatePublisher.GCJoinOpcodeMessage" value="Join" />
<string id="PrivatePublisher.GCMarkStackRootsOpcodeMessage" value="MarkStackRoots" />
<string id="PrivatePublisher.GCMarkHandlesOpcodeMessage" value="MarkHandles" />
<string id="PrivatePublisher.GCMarkFinalizeQueueRootsOpcodeMessage" value="MarkFinalizeQueueRoots" />
<string id="PrivatePublisher.GCMarkCardsOpcodeMessage" value="MarkCards" />
<string id="PrivatePublisher.BGCBeginOpcodeMessage" value="BGCStart" />
<string id="PrivatePublisher.BGC1stNonCondEndOpcodeMessage" value="BGC1stNonCondStop" />
<string id="PrivatePublisher.BGC2ndNonConBeginOpcodeMessage" value="BGC2ndNonConStart" />
<string id="PrivatePublisher.BGC1stConEndOpcodeMessage" value="BGC1stConStop" />
<string id="PrivatePublisher.BGC2ndNonConEndOpcodeMessage" value="BGC2ndNonConStop" />
<string id="PrivatePublisher.BGC2ndConBeginOpcodeMessage" value="BGC2ndConStart" />
<string id="PrivatePublisher.BGC1stSweepEndOpcodeMessage" value="BGC1stSweepEnd" />
<string id="PrivatePublisher.BGC2ndConEndOpcodeMessage" value="BGC2ndConStop" />
<string id="PrivatePublisher.BGCPlanEndOpcodeMessage" value="BGCPlanStop" />
<string id="PrivatePublisher.BGCSweepEndOpcodeMessage" value="BGCSweepStop" />
<string id="PrivatePublisher.BGCDrainMarkOpcodeMessage" value="BGCDrainMark" />
<string id="PrivatePublisher.BGCRevisitOpcodeMessage" value="BGCRevisit" />
<string id="PrivatePublisher.BGCOverflowOpcodeMessage" value="BGCOverflow" />
<string id="PrivatePublisher.BGCAllocWaitBeginOpcodeMessage" value="BGCAllocWaitStart" />
<string id="PrivatePublisher.BGCAllocWaitEndOpcodeMessage" value="BGCAllocWaitStop" />
<string id="PrivatePublisher.FinalizeObjectOpcodeMessage" value="FinalizeObject" />
<string id="PrivatePublisher.SetGCHandleOpcodeMessage" value="SetGCHandle" />
<string id="PrivatePublisher.DestroyGCHandleOpcodeMessage" value="DestoryGCHandle" />
<string id="PrivatePublisher.PinPlugAtGCTimeOpcodeMessage" value="PinPlugAtGCTime" />
<string id="PrivatePublisher.CCWRefCountChangeOpcodeMessage" value="CCWRefCountChange" />
<string id="PrivatePublisher.EEStartupStartOpcodeMessage" value="EEStartupStart" />
<string id="PrivatePublisher.EEStartupEndOpcodeMessage" value="EEStartupStop" />
<string id="PrivatePublisher.EEConfigSetupOpcodeMessage" value="EEConfigSetupStart" />
<string id="PrivatePublisher.EEConfigSetupEndOpcodeMessage" value="EEConfigSetupStop" />
<string id="PrivatePublisher.LoadSystemBasesOpcodeMessage" value="LoadSystemBasesStart" />
<string id="PrivatePublisher.LoadSystemBasesEndOpcodeMessage" value="LoadSystemBasesStop" />
<string id="PrivatePublisher.ExecExeOpcodeMessage" value="ExecExeStart" />
<string id="PrivatePublisher.ExecExeEndOpcodeMessage" value="ExecExeStop" />
<string id="PrivatePublisher.MainOpcodeMessage" value="MainStart" />
<string id="PrivatePublisher.MainEndOpcodeMessage" value="MainStop" />
<string id="PrivatePublisher.ApplyPolicyStartOpcodeMessage" value="ApplyPolicyStart" />
<string id="PrivatePublisher.ApplyPolicyEndOpcodeMessage" value="ApplyPolicyStop" />
<string id="PrivatePublisher.LdLibShFolderOpcodeMessage" value="LdLibShFolderStart" />
<string id="PrivatePublisher.LdLibShFolderEndOpcodeMessage" value="LdLibShFolderStop" />
<string id="PrivatePublisher.PrestubWorkerOpcodeMessage" value="PrestubWorkerStart" />
<string id="PrivatePublisher.PrestubWorkerEndOpcodeMessage" value="PrestubWorkerStop" />
<string id="PrivatePublisher.GetInstallationStartOpcodeMessage" value="GetInstallationStart" />
<string id="PrivatePublisher.GetInstallationEndOpcodeMessage" value="GetInstallationStop" />
<string id="PrivatePublisher.OpenHModuleOpcodeMessage" value="OpenHModuleStart" />
<string id="PrivatePublisher.OpenHModuleEndOpcodeMessage" value="OpenHModuleStop" />
<string id="PrivatePublisher.ExplicitBindStartOpcodeMessage" value="ExplicitBindStart" />
<string id="PrivatePublisher.ExplicitBindEndOpcodeMessage" value="ExplicitBindStop" />
<string id="PrivatePublisher.ParseXmlOpcodeMessage" value="ParseXmlStart" />
<string id="PrivatePublisher.ParseXmlEndOpcodeMessage" value="ParseXmlStop" />
<string id="PrivatePublisher.InitDefaultDomainOpcodeMessage" value="InitDefaultDomainStart" />
<string id="PrivatePublisher.InitDefaultDomainEndOpcodeMessage" value="InitDefaultDomainStop" />
<string id="PrivatePublisher.InitSecurityOpcodeMessage" value="InitSecurityStart" />
<string id="PrivatePublisher.InitSecurityEndOpcodeMessage" value="InitSecurityStop" />
<string id="PrivatePublisher.AllowBindingRedirsOpcodeMessage" value="AllowBindingRedirsStart" />
<string id="PrivatePublisher.AllowBindingRedirsEndOpcodeMessage" value="AllowBindingRedirsStop" />
<string id="PrivatePublisher.EEConfigSyncOpcodeMessage" value="EEConfigSyncStart" />
<string id="PrivatePublisher.EEConfigSyncEndOpcodeMessage" value="EEConfigSyncStop" />
<string id="PrivatePublisher.FusionBindingOpcodeMessage" value="BindingStart" />
<string id="PrivatePublisher.FusionBindingEndOpcodeMessage" value="BindingStop" />
<string id="PrivatePublisher.LoaderCatchCallOpcodeMessage" value="LoaderCatchCallStart" />
<string id="PrivatePublisher.LoaderCatchCallEndOpcodeMessage" value="LoaderCatchCallStop" />
<string id="PrivatePublisher.FusionInitOpcodeMessage" value="FusionInitStart" />
<string id="PrivatePublisher.FusionInitEndOpcodeMessage" value="FusionInitStop" />
<string id="PrivatePublisher.FusionAppCtxOpcodeMessage" value="FusionAppCtxStart" />
<string id="PrivatePublisher.FusionAppCtxEndOpcodeMessage" value="FusionAppCtxStop" />
<string id="PrivatePublisher.Fusion2EEOpcodeMessage" value="Fusion2EEStart" />
<string id="PrivatePublisher.Fusion2EEEndOpcodeMessage" value="Fusion2EEStop" />
<string id="PrivatePublisher.SecurityCatchCallOpcodeMessage" value="SecurityCatchCallStart" />
<string id="PrivatePublisher.SecurityCatchCallEndOpcodeMessage" value="SecurityCatchCallStop" />
<string id="PrivatePublisher.BindingPolicyPhaseStartOpcodeMessage" value="PolicyPhaseStart" />
<string id="PrivatePublisher.BindingPolicyPhaseEndOpcodeMessage" value="PolicyPhaseStop" />
<string id="PrivatePublisher.BindingNgenPhaseStartOpcodeMessage" value="NgenPhaseStart" />
<string id="PrivatePublisher.BindingNgenPhaseEndOpcodeMessage" value="NgenPhaseStop" />
<string id="PrivatePublisher.BindingLoopupAndProbingPhaseStartOpcodeMessage" value="LoopupAndProbingPhaseStart" />
<string id="PrivatePublisher.BindingLookupAndProbingPhaseEndOpcodeMessage" value="LookupAndProbingPhaseStop" />
<string id="PrivatePublisher.LoaderPhaseStartOpcodeMessage" value="LoaderPhaseStart" />
<string id="PrivatePublisher.LoaderPhaseEndOpcodeMessage" value="LoaderPhaseStop" />
<string id="PrivatePublisher.BindingPhaseStartOpcodeMessage" value="PhaseStart" />
<string id="PrivatePublisher.BindingPhaseEndOpcodeMessage" value="PhaseStop" />
<string id="PrivatePublisher.BindingDownloadPhaseStartOpcodeMessage" value="DownloadPhaseStart" />
<string id="PrivatePublisher.BindingDownloadPhaseEndOpcodeMessage" value="DownloadPhaseStop" />
<string id="PrivatePublisher.LoaderAssemblyInitPhaseStartOpcodeMessage" value="LoaderAssemblyInitPhaseStart" />
<string id="PrivatePublisher.LoaderAssemblyInitPhaseEndOpcodeMessage" value="LoaderAssemblyInitPhaseStop" />
<string id="PrivatePublisher.LoaderMappingPhaseStartOpcodeMessage" value="LoaderMappingPhaseStart" />
<string id="PrivatePublisher.LoaderMappingPhaseEndOpcodeMessage" value="LoaderMappingPhaseStop" />
<string id="PrivatePublisher.NgenBindOpcodeMessage" value="NgenBind" />
<string id="PrivatePublisher.LoaderDeliverEventPhaseStartOpcodeMessage" value="LoaderDeliverEventPhaseStart" />
<string id="PrivatePublisher.LoaderDeliverEventsPhaseEndOpcodeMessage" value="LoaderDeliverEventsPhaseStop" />
<string id="PrivatePublisher.FusionMessageOpcodeMessage" value="FusionMessage" />
<string id="PrivatePublisher.FusionErrorCodeOpcodeMessage" value="FusionErrorCode" />
<string id="PrivatePublisher.IInspectableRuntimeClassNameOpcodeMessage" value="IInspectableRuntimeClassName" />
<string id="PrivatePublisher.WinRTUnboxOpcodeMessage" value="WinRTUnbox" />
<string id="PrivatePublisher.CreateRCWOpcodeMessage" value="CreateRCW" />
<string id="PrivatePublisher.RCWVarianceOpcodeMessage" value="RCWVariance" />
<string id="PrivatePublisher.RCWIEnumerableCastingOpcodeMessage" value="RCWIEnumerableCasting" />
<string id="PrivatePublisher.CreateCCWOpcodeMessage" value="CreateCCW" />
<string id="PrivatePublisher.CCWVarianceOpcodeMessage" value="CCWVariance" />
<string id="PrivatePublisher.ObjectVariantMarshallingToNativeOpcodeMessage" value="ObjectVariantMarshallingToNative" />
<string id="PrivatePublisher.GetTypeFromGUIDOpcodeMessage" value="GetTypeFromGUID" />
<string id="PrivatePublisher.GetTypeFromProgIDOpcodeMessage" value="GetTypeFromProgID" />
<string id="PrivatePublisher.ConvertToCallbackEtwOpcodeMessage" value="ConvertToCallbackEtw" />
<string id="PrivatePublisher.BeginCreateManagedReferenceOpcodeMessage" value="BeginCreateManagedReference" />
<string id="PrivatePublisher.EndCreateManagedReferenceOpcodeMessage" value="EndCreateManagedReference" />
<string id="PrivatePublisher.ObjectVariantMarshallingToManagedOpcodeMessage" value="ObjectVariantMarshallingToManaged" />
<string id="PrivatePublisher.CLRStackWalkOpcodeMessage" value="Walk" />
<string id="PrivatePublisher.MulticoreJitOpcodeMessage" value="Common" />
<string id="PrivatePublisher.MulticoreJitOpcodeMethodCodeReturnedMessage" value="MethodCodeReturned" />
<string id="StressPublisher.CLRStackWalkOpcodeMessage" value="Walk" />
<string id="PrivatePublisher.EvidenceGeneratedMessage" value="EvidenceGenerated" />
<string id="PrivatePublisher.ModuleTransparencyComputationStartMessage" value="ModuleTransparencyComputationStart" />
<string id="PrivatePublisher.ModuleTransparencyComputationEndMessage" value="ModuleTransparencyComputationStop" />
<string id="PrivatePublisher.TypeTransparencyComputationStartMessage" value="TypeTransparencyComputationStart" />
<string id="PrivatePublisher.TypeTransparencyComputationEndMessage" value="TypeTransparencyComputationStop" />
<string id="PrivatePublisher.MethodTransparencyComputationStartMessage" value="MethodTransparencyComputationStart" />
<string id="PrivatePublisher.MethodTransparencyComputationEndMessage" value="MethodTransparencyComputationStop" />
<string id="PrivatePublisher.FieldTransparencyComputationStartMessage" value="FieldTransparencyComputationStart" />
<string id="PrivatePublisher.FieldTransparencyComputationEndMessage" value="FieldTransparencyComputationStop" />
<string id="PrivatePublisher.TokenTransparencyComputationStartMessage" value="TokenTransparencyComputationStart" />
<string id="PrivatePublisher.TokenTransparencyComputationEndMessage" value="TokenTransparencyComputationStop" />
<string id="PrivatePublisher.LoaderHeapPrivateAllocRequestMessage" value="LoaderHeapAllocRequest" />
<string id="PrivatePublisher.ModuleRangeLoadOpcodeMessage" value="ModuleRangeLoad" />
<string id="MonoProfilerPublisher.MonoProfilerTaskMessage" value="MonoProfiler" />
<string id="MonoProfilerPublisher.GCKeywordMessage" value="GC" />
<string id="MonoProfilerPublisher.GCHandleKeywordMessage" value="GCHandle" />
<string id="MonoProfilerPublisher.LoaderKeywordMessage" value="Loader" />
<string id="MonoProfilerPublisher.JitKeywordMessage" value="Jit" />
<string id="MonoProfilerPublisher.ContentionKeywordMessage" value="Contention" />
<string id="MonoProfilerPublisher.ExceptionKeywordMessage" value="Exception" />
<string id="MonoProfilerPublisher.ThreadingKeywordMessage" value="Threading" />
<string id="MonoProfilerPublisher.GCHeapDumpKeywordMessage" value="GCHeapDump" />
<string id="MonoProfilerPublisher.GCAllocationKeywordMessage" value="GCAllocation" />
<string id="MonoProfilerPublisher.GCMovesKeywordMessage" value="GCMoves" />
<string id="MonoProfilerPublisher.GCHeapCollectKeywordMessage" value="GCHeapCollect" />
<string id="MonoProfilerPublisher.GCResizeKeywordMessage" value="GCResize" />
<string id="MonoProfilerPublisher.GCRootKeywordMessage" value="GCRoot" />
<string id="MonoProfilerPublisher.GCHeapDumpVTableClassReferenceKeywordMessage" value="GCHeapDumpVTableClassReference" />
<string id="MonoProfilerPublisher.GCFinalizationKeywordMessage" value="GCFinalization" />
<string id="MonoProfilerPublisher.MethodTracingKeywordMessage" value="PerfTrack" />
<string id="MonoProfilerPublisher.TypeLoadingKeywordMessage" value="TypeLoading" />
<string id="MonoProfilerPublisher.MonitorKeywordMessage" value="Monitor" />
<string id="MonoProfilerPublisher.ContextLoadedOpcodeMessage" value="ContextLoaded" />
<string id="MonoProfilerPublisher.ContextUnloadedOpcodeMessage" value="ContextUnloaded" />
<string id="MonoProfilerPublisher.AppDomainLoadingOpcodeMessage" value="AppDomainLoading" />
<string id="MonoProfilerPublisher.AppDomainLoadedOpcodeMessage" value="AppDomainLoaded" />
<string id="MonoProfilerPublisher.AppDomainUnloadingOpcodeMessage" value="AppDomainUnloading" />
<string id="MonoProfilerPublisher.AppDomainUnloadedOpcodeMessage" value="AppDomainUnloaded" />
<string id="MonoProfilerPublisher.AppDomainNameOpcodeMessage" value="AppDomainName" />
<string id="MonoProfilerPublisher.JitBeginOpcodeMessage" value="JitBegin" />
<string id="MonoProfilerPublisher.JitFailedOpcodeMessage" value="JitFailed" />
<string id="MonoProfilerPublisher.JitDoneOpcodeMessage" value="JitDone" />
<string id="MonoProfilerPublisher.JitChunkCreatedOpcodeMessage" value="JitChunkCreated" />
<string id="MonoProfilerPublisher.JitChunkDestroyedOpcodeMessage" value="JitChunkDestroyed" />
<string id="MonoProfilerPublisher.JitCodeBufferOpcodeMessage" value="JitCodeBuffer" />
<string id="MonoProfilerPublisher.ClassLoadingOpcodeMessage" value="ClassLoading" />
<string id="MonoProfilerPublisher.ClassFailedOpcodeMessage" value="ClassFailed" />
<string id="MonoProfilerPublisher.ClassLoadedOpcodeMessage" value="ClassLoaded" />
<string id="MonoProfilerPublisher.VTableLoadingOpcodeMessage" value="VTableLoading" />
<string id="MonoProfilerPublisher.VTableFailedOpcodeMessage" value="VTableFailed" />
<string id="MonoProfilerPublisher.VTableLoadedOpcodeMessage" value="VTableLoaded" />
<string id="MonoProfilerPublisher.ModuleLoadingOpcodeMessage" value="ModuleLoading" />
<string id="MonoProfilerPublisher.ModuleFailedOpcodeMessage" value="ModuleFailed" />
<string id="MonoProfilerPublisher.ModuleLoadedOpcodeMessage" value="ModuleLoaded" />
<string id="MonoProfilerPublisher.ModuleUnloadingOpcodeMessage" value="ModuleUnloading" />
<string id="MonoProfilerPublisher.ModuleUnloadedOpcodeMessage" value="ModuleUnloaded" />
<string id="MonoProfilerPublisher.AssemblyLoadingOpcodeMessage" value="AssemblyLoading" />
<string id="MonoProfilerPublisher.AssemblyLoadedOpcodeMessage" value="AssemblyLoaded" />
<string id="MonoProfilerPublisher.AssemblyUnloadingOpcodeMessage" value="AssemblyUnloading" />
<string id="MonoProfilerPublisher.AssemblyUnloadedOpcodeMessage" value="AssemblyUnloaded" />
<string id="MonoProfilerPublisher.MethodEnterOpcodeMessage" value="MethodEnter" />
<string id="MonoProfilerPublisher.MethodLeaveOpcodeMessage" value="MethodLeave" />
<string id="MonoProfilerPublisher.MethodTailCallOpcodeMessage" value="MethodTailCall" />
<string id="MonoProfilerPublisher.MethodExceptionLeaveOpcodeMessage" value="MethodExceptionLeave" />
<string id="MonoProfilerPublisher.MethodFreeOpcodeMessage" value="MethodFree" />
<string id="MonoProfilerPublisher.MethodBeginInvokeOpcodeMessage" value="MethodBeginInvoke" />
<string id="MonoProfilerPublisher.MethodEndInvokeOpcodeMessage" value="MethodEndInvoke" />
<string id="MonoProfilerPublisher.ExceptionThrowOpcodeMessage" value="ExceptionThrow" />
<string id="MonoProfilerPublisher.ExceptionClauseOpcodeMessage" value="ExceptionClause" />
<string id="MonoProfilerPublisher.GCEventOpcodeMessage" value="GCEvent" />
<string id="MonoProfilerPublisher.GCAllocationOpcodeMessage" value="GCAllocation" />
<string id="MonoProfilerPublisher.GCMovesOpcodeMessage" value="GCMoves" />
<string id="MonoProfilerPublisher.GCResizeOpcodeMessage" value="GCResize" />
<string id="MonoProfilerPublisher.GCHandleCreatedOpcodeMessage" value="GCHandleCreated" />
<string id="MonoProfilerPublisher.GCHandleDeletedOpcodeMessage" value="GCHandleDeleted" />
<string id="MonoProfilerPublisher.GCFinalizingOpcodeMessage" value="GCFinalizing" />
<string id="MonoProfilerPublisher.GCFinalizedOpcodeMessage" value="GCFinalized" />
<string id="MonoProfilerPublisher.GCFinalizingObjectOpcodeMessage" value="GCFinalizingObject" />
<string id="MonoProfilerPublisher.GCFinalizedObjectOpcodeMessage" value="GCFinalizedObject" />
<string id="MonoProfilerPublisher.GCRootRegisterOpcodeMessage" value="GCRootRegister" />
<string id="MonoProfilerPublisher.GCRootUnregisterOpcodeMessage" value="GCRootUnregister" />
<string id="MonoProfilerPublisher.GCRootsOpcodeMessage" value="GCRoots" />
<string id="MonoProfilerPublisher.GCHeapDumpStartOpcodeMessage" value="GCHeapDumpStart" />
<string id="MonoProfilerPublisher.GCHeapDumpStopOpcodeMessage" value="GCHeapDumpStop" />
<string id="MonoProfilerPublisher.GCHeapDumpObjectReferenceOpcodeMessage" value="GCHeapDumpObjectReference" />
<string id="MonoProfilerPublisher.MonitorContentionOpcodeMessage" value="MonitorContention" />
<string id="MonoProfilerPublisher.MonitorFailedOpcodeMessage" value="MonitorFailed" />
<string id="MonoProfilerPublisher.MonitorAquiredOpcodeMessage" value="MonitorAquired" />
<string id="MonoProfilerPublisher.ThreadStartedOpcodeMessage" value="ThreadStarted" />
<string id="MonoProfilerPublisher.ThreadStoppingOpcodeMessage" value="ThreadStopping" />
<string id="MonoProfilerPublisher.ThreadStoppedOpcodeMessage" value="ThreadStopped" />
<string id="MonoProfilerPublisher.ThreadExitedOpcodeMessage" value="ThreadExited" />
<string id="MonoProfilerPublisher.ThreadNameOpcodeMessage" value="ThreadName" />
<string id="MonoProfilerPublisher.JitDoneVerboseOpcodeMessage" value="JitDoneVerbose" />
<string id="MonoProfilerPublisher.GCHeapDumpVTableClassReferenceOpcodeMessage" value="GCHeapDumpVTableClassReference" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.MethodMessage" value="Method" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.MethodTrampolineMessage" value="MethodTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.UnboxTrampolineMessage" value="UnboxTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.IMTTrampolineMessage" value="IMTTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.GenericsTrampolineMessage" value="GenericsTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.SpecificTrampolineMessage" value="SpecificTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.HelperMessage" value="Helper" />
<string id="MonoProfilerPublisher.ExceptionClauseTypeMap.NoneMessage" value="None" />
<string id="MonoProfilerPublisher.ExceptionClauseTypeMap.FilterMessage" value="Filter" />
<string id="MonoProfilerPublisher.ExceptionClauseTypeMap.FinallyMessage" value="Finally" />
<string id="MonoProfilerPublisher.ExceptionClauseTypeMap.FaultMessage" value="Fault" />
<string id="MonoProfilerPublisher.GCEventTypeMap.StartMessage" value="Start" />
<string id="MonoProfilerPublisher.GCEventTypeMap.EndMessage" value="End" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PreStopWorldMessage" value="PreStopWorld" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PostStopWorldMessage" value="PostStopWorld" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PreStartWorldMessage" value="PreStartWorld" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PostStartWorldMessage" value="PostStartWorld" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PreStopWorldLockedMessage" value="PreStopWorldLocked" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PostStartWorldUnlockedMessage" value="PostStartWorldUnlocked" />
<string id="MonoProfilerPublisher.GCHandleTypeMap.WeakMessage" value="Weak" />
<string id="MonoProfilerPublisher.GCHandleTypeMap.WeakTrackResurrectionMessage" value="WeakTrackResurrection" />
<string id="MonoProfilerPublisher.GCHandleTypeMap.NormalMessage" value="Normal" />
<string id="MonoProfilerPublisher.GCHandleTypeMap.PinnedMessage" value="Pinned" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ExternalMessage" value="External" />
<string id="MonoProfilerPublisher.GCRootTypeMap.StackMessage" value="Stack" />
<string id="MonoProfilerPublisher.GCRootTypeMap.FinalizerQueueMessage" value="FinalizerQueue" />
<string id="MonoProfilerPublisher.GCRootTypeMap.StaticMessage" value="Static" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ThreadStaticMessage" value="ThreadStatic" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ContextStaticMessage" value="ContextStatic" />
<string id="MonoProfilerPublisher.GCRootTypeMap.GCHandleMessage" value="GCHandle" />
<string id="MonoProfilerPublisher.GCRootTypeMap.JitMessage" value="Jit" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ThreadingMessage" value="Threading" />
<string id="MonoProfilerPublisher.GCRootTypeMap.DomainMessage" value="Domain" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ReflectionMessage" value="Reflection" />
<string id="MonoProfilerPublisher.GCRootTypeMap.MarshalMessage" value="Marshal" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ThreadPoolMessage" value="ThreadPool" />
<string id="MonoProfilerPublisher.GCRootTypeMap.DebuggerMessage" value="Debugger" />
<string id="MonoProfilerPublisher.GCRootTypeMap.HandleMessage" value="Handle" />
<string id="MonoProfilerPublisher.GCRootTypeMap.EphemeronMessage" value="Ephemeron" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ToggleRefMessage" value="ToggleRef" />
<string id="MonoProfilerPublisher.ContextLoadedUnloadedEventMessage" value="ObjectID=%1;%nAppDomainId=%2;%nContextID=%3" />
<string id="MonoProfilerPublisher.AppDomainLoadUnloadEventMessage" value="AppDomainId=%1" />
<string id="MonoProfilerPublisher.AppDomainNameEventMessage" value="AppDomainId=%1;%nAppDomainName=%2" />
<string id="MonoProfilerPublisher.JitBeginFailedDoneEventMessage" value="MethodId=%1;%nModuleID=%2;%nMethodToken=%3" />
<string id="MonoProfilerPublisher.JitDone_V1EventMessage" value="MethodId=%1;%nModuleID=%2;%nMethodToken=%3;%nCount=%4" />
<string id="MonoProfilerPublisher.JitChunkCreatedEventMessage" value="ChunkID=%1;%nChunkSize=%2" />
<string id="MonoProfilerPublisher.JitChunkDestroyedEventMessage" value="ChunkID=%1" />
<string id="MonoProfilerPublisher.JitCodeBufferEventMessage" value="BufferID=%1;%nBufferSize=%2;%nBufferType=%3" />
<string id="MonoProfilerPublisher.ClassLoadingFailedEventMessage" value="ClassID=%1;%nModuleID=%2" />
<string id="MonoProfilerPublisher.ClassLoadedEventMessage" value="ClassID=%1;%nModuleID=%2;%nClassName=%3" />
<string id="MonoProfilerPublisher.ClassLoaded_V1EventMessage" value="ClassID=%1;%nModuleID=%2;%nClassName=%3;%nCount=%4" />
<string id="MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage" value="VTableID=%1;%nClassID=%2;%nAppDomainID=%3" />
<string id="MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage" value="ModuleID=%1" />
<string id="MonoProfilerPublisher.ModuleLoadedUnloadedEventMessage" value="ModuleID=%1;%nModuleName=%2;%nModuleSignature=%3" />
<string id="MonoProfilerPublisher.AssemblyLoadingUnloadingEventMessage" value="AssemblyID=%1;%nModuleID=%2" />
<string id="MonoProfilerPublisher.AssemblyLoadedUnloadedEventMessage" value="%nAssemblyID=%1;%nModuleID=%2;%nAssemblyName=%3" />
<string id="MonoProfilerPublisher.MethodTracingEventMessage" value="MethodID=%1" />
<string id="MonoProfilerPublisher.ExceptionThrowEventMessage" value="TypeID=%1;%nObjectID=%2" />
<string id="MonoProfilerPublisher.ExceptionClauseEventMessage" value="ClauseType=%1;%nClauseID=%2;%nMethodID=%3;%nTypeID=%4;%nObjectID=%5" />
<string id="MonoProfilerPublisher.GCEventEventMessage" value="GCEventType=%1;%nGCGeneration=%2" />
<string id="MonoProfilerPublisher.GCAllocationEventMessage" value="VTableID=%1;%nObjectID=%2;%nObjectSize=%3" />
<string id="MonoProfilerPublisher.GCMovesEventMessage" value="Count=%1" />
<string id="MonoProfilerPublisher.GCResizeEventMessage" value="NewSize=%1" />
<string id="MonoProfilerPublisher.GCHandleCreatedEventMessage" value="HandleID=%1;%nHandleType=%2;%nObjectID=%3" />
<string id="MonoProfilerPublisher.GCHandleDeletedEventMessage" value="HandleID=%1;%nHandleType=%2" />
<string id="MonoProfilerPublisher.GCFinalizingFinalizedEventMessage" value="NONE" />
<string id="MonoProfilerPublisher.GCFinalizingFinalizedObjectEventMessage" value="ObjectID=%1" />
<string id="MonoProfilerPublisher.GCRootRegisterEventMessage" value="RootID=%1;%nRootSize=%2;%nRootType=%3;%nRootKeyID=%4;%nRootKeyName=%5" />
<string id="MonoProfilerPublisher.GCRootUnregisterEventMessage" value="RootID=%1" />
<string id="MonoProfilerPublisher.GCRootsEventMessage" value="Count=%1" />
<string id="MonoProfilerPublisher.GCHeapDumpStartEventMessage" value="HeapCollectParam=%1" />
<string id="MonoProfilerPublisher.GCHeapDumpStopEventMessage" value="NONE" />
<string id="MonoProfilerPublisher.GCHeapDumpObjectReferenceEventMessage" value="ObjectID=%1;%nVTableID=%2;%nObjectSize=%3;%nObjectGeneration=%4;%nCount=%5" />
<string id="MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage" value="ObjectID=%1" />
<string id="MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage" value="ThreadID=%1" />
<string id="MonoProfilerPublisher.ThreadNameEventMessage" value="ThreadID=%1;%nThreadName=%2" />
<string id="MonoProfilerPublisher.JitDoneVerboseEventMessage" value="MethodId=%1;%nMethodNamespace=%2;%nMethodName=%3;%nMethodSignature=%4" />
<string id="MonoProfilerPublisher.GCHeapDumpVTableClassReferenceEventMessage" value="VTableID=%1;%nClassID=%2;%nModuleID=%3;%nClassName=%4" />
</stringTable>
</resources>
</localization>
</instrumentationManifest>
|
<instrumentationManifest xmlns="http://schemas.microsoft.com/win/2004/08/events">
<instrumentation xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events">
<events xmlns="http://schemas.microsoft.com/win/2004/08/events">
<!--CLR Runtime Publisher-->
<provider name="Microsoft-Windows-DotNETRuntime"
guid="{e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}"
symbol="MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--Keywords-->
<keywords>
<keyword name="GCKeyword" mask="0x1"
message="$(string.RuntimePublisher.GCKeywordMessage)" symbol="CLR_GC_KEYWORD"/>
<keyword name="GCHandleKeyword" mask="0x2"
message="$(string.RuntimePublisher.GCHandleKeywordMessage)" symbol="CLR_GCHANDLE_KEYWORD"/>
<keyword name="AssemblyLoaderKeyword" mask="0x4"
message="$(string.RuntimePublisher.AssemblyLoaderKeywordMessage)" symbol="CLR_ASSEMBLY_LOADER_KEYWORD"/>
<keyword name="LoaderKeyword" mask="0x8"
message="$(string.RuntimePublisher.LoaderKeywordMessage)" symbol="CLR_LOADER_KEYWORD"/>
<keyword name="JitKeyword" mask="0x10"
message="$(string.RuntimePublisher.JitKeywordMessage)" symbol="CLR_JIT_KEYWORD"/>
<keyword name="NGenKeyword" mask="0x20"
message="$(string.RuntimePublisher.NGenKeywordMessage)" symbol="CLR_NGEN_KEYWORD"/>
<keyword name="StartEnumerationKeyword" mask="0x40"
message="$(string.RuntimePublisher.StartEnumerationKeywordMessage)" symbol="CLR_STARTENUMERATION_KEYWORD"/>
<keyword name="EndEnumerationKeyword" mask="0x80"
message="$(string.RuntimePublisher.EndEnumerationKeywordMessage)" symbol="CLR_ENDENUMERATION_KEYWORD"/>
<!-- Keyword mask 0x100 is now defunct -->
<!-- Keyword mask 0x200 is now defunct -->
<keyword name="SecurityKeyword" mask="0x400"
message="$(string.RuntimePublisher.SecurityKeywordMessage)" symbol="CLR_SECURITY_KEYWORD"/>
<keyword name="AppDomainResourceManagementKeyword" mask="0x800"
message="$(string.RuntimePublisher.AppDomainResourceManagementKeywordMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_KEYWORD"/>
<keyword name="JitTracingKeyword" mask="0x1000"
message="$(string.RuntimePublisher.JitTracingKeywordMessage)" symbol="CLR_JITTRACING_KEYWORD"/>
<keyword name="InteropKeyword" mask="0x2000"
message="$(string.RuntimePublisher.InteropKeywordMessage)" symbol="CLR_INTEROP_KEYWORD"/>
<keyword name="ContentionKeyword" mask="0x4000"
message="$(string.RuntimePublisher.ContentionKeywordMessage)" symbol="CLR_CONTENTION_KEYWORD"/>
<keyword name="ExceptionKeyword" mask="0x8000"
message="$(string.RuntimePublisher.ExceptionKeywordMessage)" symbol="CLR_EXCEPTION_KEYWORD"/>
<keyword name="ThreadingKeyword" mask="0x10000"
message="$(string.RuntimePublisher.ThreadingKeywordMessage)" symbol="CLR_THREADING_KEYWORD"/>
<keyword name="JittedMethodILToNativeMapKeyword" mask="0x20000"
message="$(string.RuntimePublisher.JittedMethodILToNativeMapKeywordMessage)" symbol="CLR_JITTEDMETHODILTONATIVEMAP_KEYWORD"/>
<keyword name="OverrideAndSuppressNGenEventsKeyword" mask="0x40000"
message="$(string.RuntimePublisher.OverrideAndSuppressNGenEventsKeywordMessage)" symbol="CLR_OVERRIDEANDSUPPRESSNGENEVENTS_KEYWORD"/>
<keyword name="TypeKeyword" mask="0x80000"
message="$(string.RuntimePublisher.TypeKeywordMessage)" symbol="CLR_TYPE_KEYWORD"/>
<keyword name="GCHeapDumpKeyword" mask="0x100000"
message="$(string.RuntimePublisher.GCHeapDumpKeywordMessage)" symbol="CLR_GCHEAPDUMP_KEYWORD"/>
<keyword name="GCSampledObjectAllocationHighKeyword" mask="0x200000"
message="$(string.RuntimePublisher.GCSampledObjectAllocationHighKeywordMessage)" symbol="CLR_GCHEAPALLOCHIGH_KEYWORD"/>
<keyword name="GCHeapSurvivalAndMovementKeyword" mask="0x400000"
message="$(string.RuntimePublisher.GCHeapSurvivalAndMovementKeywordMessage)" symbol="CLR_GCHEAPSURVIVALANDMOVEMENT_KEYWORD"/>
<keyword name="GCHeapCollectKeyword" mask="0x800000"
message="$(string.RuntimePublisher.GCHeapCollectKeyword)" symbol="CLR_GCHEAPCOLLECT_KEYWORD"/>
<keyword name="GCHeapAndTypeNamesKeyword" mask="0x1000000"
message="$(string.RuntimePublisher.GCHeapAndTypeNamesKeyword)" symbol="CLR_GCHEAPANDTYPENAMES_KEYWORD"/>
<keyword name="GCSampledObjectAllocationLowKeyword" mask="0x2000000"
message="$(string.RuntimePublisher.GCSampledObjectAllocationLowKeywordMessage)" symbol="CLR_GCHEAPALLOCLOW_KEYWORD"/>
<keyword name="PerfTrackKeyword" mask="0x20000000"
message="$(string.RuntimePublisher.PerfTrackKeywordMessage)" symbol="CLR_PERFTRACK_KEYWORD"/>
<keyword name="StackKeyword" mask="0x40000000"
message="$(string.RuntimePublisher.StackKeywordMessage)" symbol="CLR_STACK_KEYWORD"/>
<keyword name="ThreadTransferKeyword" mask="0x80000000"
message="$(string.RuntimePublisher.ThreadTransferKeywordMessage)" symbol="CLR_THREADTRANSFER_KEYWORD"/>
<keyword name="DebuggerKeyword" mask="0x100000000"
message="$(string.RuntimePublisher.DebuggerKeywordMessage)" symbol="CLR_DEBUGGER_KEYWORD" />
<keyword name="MonitoringKeyword" mask="0x200000000"
message="$(string.RuntimePublisher.MonitoringKeywordMessage)" symbol="CLR_MONITORING_KEYWORD" />
<keyword name="CodeSymbolsKeyword" mask="0x400000000"
message="$(string.RuntimePublisher.CodeSymbolsKeywordMessage)" symbol="CLR_CODESYMBOLS_KEYWORD" />
<keyword name="EventSourceKeyword" mask="0x800000000"
message="$(string.RuntimePublisher.EventSourceKeywordMessage)" symbol="CLR_EVENTSOURCE_KEYWORD" />
<keyword name="CompilationKeyword" mask="0x1000000000"
message="$(string.RuntimePublisher.CompilationKeywordMessage)" symbol="CLR_COMPILATION_KEYWORD" />
<keyword name="CompilationDiagnosticKeyword" mask="0x2000000000"
message="$(string.RuntimePublisher.CompilationDiagnosticKeywordMessage)" symbol="CLR_COMPILATIONDIAGNOSTIC_KEYWORD" />
<keyword name="MethodDiagnosticKeyword" mask="0x4000000000"
message="$(string.RuntimePublisher.MethodDiagnosticKeywordMessage)" symbol="CLR_METHODDIAGNOSTIC_KEYWORD" />
<keyword name="TypeDiagnosticKeyword" mask="0x8000000000"
message="$(string.RuntimePublisher.TypeDiagnosticKeywordMessage)" symbol="CLR_TYPEDIAGNOSTIC_KEYWORD" />
<keyword name="JitInstrumentationDataKeyword" mask="0x10000000000"
message="$(string.RuntimePublisher.JitInstrumentationDataKeywordMessage)" symbol="CLR_JITINSTRUMENTEDDATA_KEYWORD" />
<keyword name="ProfilerKeyword" mask="0x20000000000"
message="$(string.RuntimePublisher.ProfilerKeywordMessage)" symbol="CLR_PROFILER_KEYWORD" />
</keywords>
<!--Tasks-->
<tasks>
<task name="GarbageCollection" symbol="CLR_GC_TASK"
value="1" eventGUID="{044973cd-251f-4dff-a3e9-9d6307286b05}"
message="$(string.RuntimePublisher.GarbageCollectionTaskMessage)">
<opcodes>
<!-- These opcode use to be 4 through 9 but we added 128 to them to avoid using the reserved range 0-10 -->
<opcode name="GCRestartEEEnd" message="$(string.RuntimePublisher.GCRestartEEEndOpcodeMessage)" symbol="CLR_GC_RESTARTEEEND_OPCODE" value="132"> </opcode>
<opcode name="GCHeapStats" message="$(string.RuntimePublisher.GCHeapStatsOpcodeMessage)" symbol="CLR_GC_HEAPSTATS_OPCODE" value="133"> </opcode>
<opcode name="GCCreateSegment" message="$(string.RuntimePublisher.GCCreateSegmentOpcodeMessage)" symbol="CLR_GC_CREATESEGMENT_OPCODE" value="134"> </opcode>
<opcode name="GCFreeSegment" message="$(string.RuntimePublisher.GCFreeSegmentOpcodeMessage)" symbol="CLR_GC_FREESEGMENT_OPCODE" value="135"> </opcode>
<opcode name="GCRestartEEBegin" message="$(string.RuntimePublisher.GCRestartEEBeginOpcodeMessage)" symbol="CLR_GC_RESTARTEEBEING_OPCODE" value="136"> </opcode>
<opcode name="GCSuspendEEEnd" message="$(string.RuntimePublisher.GCSuspendEEEndOpcodeMessage)" symbol="CLR_GC_SUSPENDEEND_OPCODE" value="137"> </opcode>
<opcode name="GCSuspendEEBegin" message="$(string.RuntimePublisher.GCSuspendEEBeginOpcodeMessage)" symbol="CLR_GC_SUSPENDEEBEGIN_OPCODE" value="10"> </opcode>
<opcode name="GCAllocationTick" message="$(string.RuntimePublisher.GCAllocationTickOpcodeMessage)" symbol="CLR_GC_ALLOCATIONTICK_OPCODE" value="11"> </opcode>
<opcode name="GCCreateConcurrentThread" message="$(string.RuntimePublisher.GCCreateConcurrentThreadOpcodeMessage)" symbol="CLR_GC_CREATECONCURRENTTHREAD_OPCODE" value="12"> </opcode>
<opcode name="GCTerminateConcurrentThread" message="$(string.RuntimePublisher.GCTerminateConcurrentThreadOpcodeMessage)" symbol="CLR_GC_TERMINATECONCURRENTTHREAD_OPCODE" value="13"> </opcode>
<opcode name="GCFinalizersEnd" message="$(string.RuntimePublisher.GCFinalizersEndOpcodeMessage)" symbol="CLR_GC_FINALIZERSEND_OPCODE" value="15"> </opcode>
<opcode name="GCFinalizersBegin" message="$(string.RuntimePublisher.GCFinalizersBeginOpcodeMessage)" symbol="CLR_GC_FINALIZERSBEGIN_OPCODE" value="19"> </opcode>
<opcode name="GCBulkRootEdge" message="$(string.RuntimePublisher.GCBulkRootEdgeOpcodeMessage)" symbol="CLR_GC_BULKROOTEDGE_OPCODE" value="20"> </opcode>
<opcode name="GCBulkRootConditionalWeakTableElementEdge" message="$(string.RuntimePublisher.GCBulkRootConditionalWeakTableElementEdgeOpcodeMessage)" symbol="CLR_GC_BULKROOTCONDITIONALWEAKTABLEELEMENTEDGE_OPCODE" value="21"> </opcode>
<opcode name="GCBulkNode" message="$(string.RuntimePublisher.GCBulkNodeOpcodeMessage)" symbol="CLR_GC_BULKNODE_OPCODE" value="22"> </opcode>
<opcode name="GCBulkEdge" message="$(string.RuntimePublisher.GCBulkEdgeOpcodeMessage)" symbol="CLR_GC_BULKEDGE_OPCODE" value="23"> </opcode>
<opcode name="GCSampledObjectAllocation" message="$(string.RuntimePublisher.GCSampledObjectAllocationOpcodeMessage)" symbol="CLR_GC_OBJECTALLOCATION_OPCODE" value="24"> </opcode>
<opcode name="GCBulkSurvivingObjectRanges" message="$(string.RuntimePublisher.GCBulkSurvivingObjectRangesOpcodeMessage)" symbol="CLR_GC_BULKSURVIVINGOBJECTRANGES_OPCODE" value="25"> </opcode>
<opcode name="GCBulkMovedObjectRanges" message="$(string.RuntimePublisher.GCBulkMovedObjectRangesOpcodeMessage)" symbol="CLR_GC_BULKMOVEDOBJECTRANGES_OPCODE" value="26"> </opcode>
<opcode name="GCGenerationRange" message="$(string.RuntimePublisher.GCGenerationRangeOpcodeMessage)" symbol="CLR_GC_GENERATIONRANGE_OPCODE" value="27"> </opcode>
<opcode name="GCMarkStackRoots" message="$(string.RuntimePublisher.GCMarkStackRootsOpcodeMessage)" symbol="CLR_GC_MARKSTACKROOTS_OPCODE" value="28"> </opcode>
<opcode name="GCMarkFinalizeQueueRoots" message="$(string.RuntimePublisher.GCMarkFinalizeQueueRootsOpcodeMessage)" symbol="CLR_GC_MARKFINALIZEQUEUEROOTS_OPCODE" value="29"> </opcode>
<opcode name="GCMarkHandles" message="$(string.RuntimePublisher.GCMarkHandlesOpcodeMessage)" symbol="CLR_GC_MARKHANDLES_OPCODE" value="30"> </opcode>
<opcode name="GCMarkOlderGenerationRoots" message="$(string.RuntimePublisher.GCMarkOlderGenerationRootsOpcodeMessage)" symbol="CLR_GC_MARKCARDS_OPCODE" value="31"> </opcode>
<opcode name="FinalizeObject" message="$(string.RuntimePublisher.FinalizeObjectOpcodeMessage)" symbol="CLR_GC_FINALIZEOBJECT_OPCODE" value="32"> </opcode>
<opcode name="SetGCHandle" message="$(string.RuntimePublisher.SetGCHandleOpcodeMessage)" symbol="CLR_GC_SETGCHANDLE_OPCODE" value="33"> </opcode>
<opcode name="DestroyGCHandle" message="$(string.RuntimePublisher.DestroyGCHandleOpcodeMessage)" symbol="CLR_GC_DESTROYGCHANDLE_OPCODE" value="34"> </opcode>
<opcode name="Triggered" message="$(string.RuntimePublisher.TriggeredOpcodeMessage)" symbol="CLR_GC_TRIGGERED_OPCODE" value="35"> </opcode>
<opcode name="PinObjectAtGCTime" message="$(string.RuntimePublisher.PinObjectAtGCTimeOpcodeMessage)" symbol="CLR_GC_PINGCOBJECT_OPCODE" value="36"> </opcode>
<opcode name="GCBulkRootCCW" message="$(string.RuntimePublisher.GCBulkRootCCWOpcodeMessage)" symbol="CLR_GC_BULKROOTCCW_OPCODE" value="38"> </opcode>
<opcode name="GCBulkRCW" message="$(string.RuntimePublisher.GCBulkRCWOpcodeMessage)" symbol="CLR_GC_BULKRCW_OPCODE" value="39"> </opcode>
<opcode name="GCBulkRootStaticVar" message="$(string.RuntimePublisher.GCBulkRootStaticVarOpcodeMessage)" symbol="CLR_GC_BULKROOTSTATICVAR_OPCODE" value="40"> </opcode>
<opcode name="GCDynamicEvent" message="$(string.RuntimePublisher.GCDynamicEventOpcodeMessage)" symbol="CLR_GC_DYNAMICEVENT_OPCODE" value="41"> </opcode>
<opcode name="IncreaseMemoryPressure" message="$(string.RuntimePublisher.IncreaseMemoryPressureOpcodeMessage)" symbol="CLR_GC_INCREASEMEMORYPRESSURE_OPCODE" value="200"> </opcode>
<opcode name="DecreaseMemoryPressure" message="$(string.RuntimePublisher.DecreaseMemoryPressureOpcodeMessage)" symbol="CLR_GC_DECREASEMEMORYPRESSURE_OPCODE" value="201"> </opcode>
<opcode name="GCMarkWithType" message="$(string.RuntimePublisher.GCMarkOpcodeMessage)" symbol="CLR_GC_MARK_OPCODE" value="202"> </opcode>
<opcode name="GCJoin" message="$(string.RuntimePublisher.GCJoinOpcodeMessage)" symbol="CLR_GC_JOIN_OPCODE" value="203"> </opcode>
<opcode name="GCPerHeapHistory" message="$(string.RuntimePublisher.GCPerHeapHistoryOpcodeMessage)" symbol="CLR_GC_GCPERHEAPHISTORY_OPCODE" value="204"> </opcode>
<opcode name="GCGlobalHeapHistory" message="$(string.RuntimePublisher.GCGlobalHeapHistoryOpcodeMessage)" symbol="CLR_GC_GCGLOBALHEAPHISTORY_OPCODE" value="205"> </opcode>
<opcode name="GenAwareBegin" message="$(string.RuntimePublisher.GenAwareBeginOpcodeMessage)" symbol="CLR_GC_GENAWAREBEGIN_OPCODE" value="206"> </opcode>
<opcode name="GenAwareEnd" message="$(string.RuntimePublisher.GenAwareEndOpcodeMessage)" symbol="CLR_GC_GENAWAREEND_OPCODE" value="207"> </opcode>
<opcode name="GCLOHCompact" message="$(string.RuntimePublisher.GCLOHCompactOpcodeMessage)" symbol="CLR_GC_GCLOHCOMPACT_OPCODE" value="208"> </opcode>
<opcode name="GCFitBucketInfo" message="$(string.RuntimePublisher.GCFitBucketInfoOpcodeMessage)" symbol="CLR_GC_GCFITBUCKETINFO_OPCODE" value="209"> </opcode>
</opcodes>
</task>
<task name="WorkerThreadCreation" symbol="CLR_WORKERTHREADCREATE_TASK"
value="2" eventGUID="{cfc4ba53-fb42-4757-8b70-5f5d51fee2f4}"
message="$(string.RuntimePublisher.WorkerThreadCreationTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="IOThreadCreation" symbol="CLR_IOTHREADCREATE_TASK"
value="3" eventGUID="{c71408de-42cc-4f81-9c93-b8912abf2a0f}"
message="$(string.RuntimePublisher.IOThreadCreationTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="WorkerThreadRetirement" symbol="CLR_WORKERTHREADRETIRE_TASK"
value="4" eventGUID="{efdf1eac-1d5d-4e84-893a-19b80f692176}"
message="$(string.RuntimePublisher.WorkerThreadRetirementTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="IOThreadRetirement" symbol="CLR_IOTHREADRETIRE_TASK"
value="5" eventGUID="{840c8456-6457-4eb7-9cd0-d28f01c64f5e}"
message="$(string.RuntimePublisher.IOThreadRetirementTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ThreadpoolSuspension" symbol="CLR_THREADPOOLSUSPEND_TASK"
value="6" eventGUID="{c424b3e3-2ae0-416e-a039-410c5d8e5f14}"
message="$(string.RuntimePublisher.ThreadpoolSuspensionTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="Exception" symbol="CLR_EXCEPTION_TASK"
value="7" eventGUID="{300ce105-86d1-41f8-b9d2-83fcbff32d99}"
message="$(string.RuntimePublisher.ExceptionTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ExceptionCatch" symbol="CLR_EXCEPTION_CATCH_TASK"
value="27" eventGUID="{5BBF9499-1715-4658-88DC-AFD7690A8711}"
message="$(string.RuntimePublisher.ExceptionCatchTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ExceptionFinally" symbol="CLR_EXCEPTION_FINALLY_TASK"
value="28" eventGUID="{9565BC31-300F-4EA2-A532-30BCE9A14199}"
message="$(string.RuntimePublisher.ExceptionFinallyTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ExceptionFilter" symbol="CLR_EXCEPTION_FILTER_TASK"
value="29" eventGUID="{72E72606-BB71-4290-A242-D5F36CE5312E}"
message="$(string.RuntimePublisher.ExceptionFilterTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="Contention" symbol="CLR_CONTENTION_TASK"
value="8" eventGUID="{561410f5-a138-4ab3-945e-516483cddfbc}"
message="$(string.RuntimePublisher.ContentionTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRMethod" symbol="CLR_METHOD_TASK"
value="9" eventGUID="{3044F61A-99B0-4c21-B203-D39423C73B00}"
message="$(string.RuntimePublisher.MethodTaskMessage)">
<opcodes>
<!-- The following 2 opcodes are now defunct -->
<opcode name="DCStartComplete" message="$(string.RuntimePublisher.DCStartCompleteOpcodeMessage)" symbol="CLR_METHOD_DCSTARTCOMPLETE_OPCODE" value="14"> </opcode>
<opcode name="DCEndComplete" message="$(string.RuntimePublisher.DCEndCompleteOpcodeMessage)" symbol="CLR_METHOD_DCENDCOMPLETE_OPCODE" value="15"> </opcode>
<opcode name="MethodLoad" message="$(string.RuntimePublisher.MethodLoadOpcodeMessage)" symbol="CLR_METHOD_METHODLOAD_OPCODE" value="33"> </opcode>
<opcode name="MethodUnload" message="$(string.RuntimePublisher.MethodUnloadOpcodeMessage)" symbol="CLR_METHOD_METHODUNLOAD_OPCODE" value="34"> </opcode>
<!-- The following 2 opcodes are now defunct -->
<opcode name="MethodDCStart" message="$(string.RuntimePublisher.MethodDCStartOpcodeMessage)" symbol="CLR_METHOD_METHODDCSTART_OPCODE" value="35"> </opcode>
<opcode name="MethodDCEnd" message="$(string.RuntimePublisher.MethodDCEndOpcodeMessage)" symbol="CLR_METHOD_METHODDCEND_OPCODE" value="36"> </opcode>
<opcode name="MethodLoadVerbose" message="$(string.RuntimePublisher.MethodLoadVerboseOpcodeMessage)" symbol="CLR_METHOD_METHODLOADVERBOSE_OPCODE" value="37"> </opcode>
<opcode name="MethodUnloadVerbose" message="$(string.RuntimePublisher.MethodUnloadVerboseOpcodeMessage)" symbol="CLR_METHOD_METHODUNLOADVERBOSE_OPCODE" value="38"> </opcode>
<opcode name="MethodDetails" message="$(string.RuntimePublisher.MethodDetailsOpcodeMessage)" symbol="CLR_METHODDETAILS_OPCODE" value="43"> </opcode>
<!-- The following 2 opcodes are now defunct -->
<opcode name="MethodDCStartVerbose" message="$(string.RuntimePublisher.MethodDCStartVerboseOpcodeMessage)" symbol="CLR_METHOD_METHODDCSTARTVERBOSE_OPCODE" value="39"> </opcode>
<opcode name="MethodDCEndVerbose" message="$(string.RuntimePublisher.MethodDCEndVerboseOpcodeMessage)" symbol="CLR_METHOD_METHODDCENDVERBOSE_OPCODE" value="40"> </opcode>
<opcode name="MethodJittingStarted" message="$(string.RuntimePublisher.MethodJittingStartedOpcodeMessage)" symbol="CLR_METHOD_METHODJITTINGSTARTED_OPCODE" value="42"> </opcode>
<opcode name="MemoryAllocatedForJitCode" message="$(string.RuntimePublisher.MemoryAllocatedForJitCodeOpcodeMessage)" symbol="CLR_METHOD_MEMORY_ALLOCATED_FOR_JIT_CODE_OPCODE" value="103"> </opcode>
<opcode name="JitInliningSucceeded" message="$(string.RuntimePublisher.JitInliningSucceededOpcodeMessage)" symbol="CLR_JITINLININGSUCCEEDED_OPCODE" value="83"> </opcode>
<opcode name="JitInliningFailed" message="$(string.RuntimePublisher.JitInliningFailedOpcodeMessage)" symbol="CLR_JITINLININGFAILED_OPCODE" value="84"> </opcode>
<opcode name="JitTailCallSucceeded" message="$(string.RuntimePublisher.JitTailCallSucceededOpcodeMessage)" symbol="CLR_JITTAILCALLSUCCEEDED_OPCODE" value="85"> </opcode>
<opcode name="JitTailCallFailed" message="$(string.RuntimePublisher.JitTailCallFailedOpcodeMessage)" symbol="CLR_JITTAILCALLFAILED_OPCODE" value="86"> </opcode>
<opcode name="MethodILToNativeMap" message="$(string.RuntimePublisher.MethodILToNativeMapOpcodeMessage)" symbol="CLR_METHODILTONATIVEMAP_OPCODE" value="87"> </opcode>
</opcodes>
</task>
<task name="CLRLoader" symbol="CLR_LOADER_TASK"
value="10" eventGUID="{D00792DA-07B7-40f5-97EB-5D974E054740}"
message="$(string.RuntimePublisher.LoaderTaskMessage)">
<opcodes>
<opcode name="DomainModuleLoad" message="$(string.RuntimePublisher.DomainModuleLoadOpcodeMessage)" symbol="CLR_DOMAINMODULELOAD_OPCODE" value="45"> </opcode>
<opcode name="ModuleLoad" message="$(string.RuntimePublisher.ModuleLoadOpcodeMessage)" symbol="CLR_MODULELOAD_OPCODE" value="33"> </opcode>
<opcode name="ModuleUnload" message="$(string.RuntimePublisher.ModuleUnloadOpcodeMessage)" symbol="CLR_MODULEUNLOAD_OPCODE" value="34"> </opcode>
<!-- The following 2 opcodes are now defunct -->
<opcode name="ModuleDCStart" message="$(string.RuntimePublisher.ModuleDCStartOpcodeMessage)" symbol="CLR_MODULEDCSTART_OPCODE" value="35"> </opcode>
<opcode name="ModuleDCEnd" message="$(string.RuntimePublisher.ModuleDCEndOpcodeMessage)" symbol="CLR_MODULEDCEND_OPCODE" value="36"> </opcode>
<opcode name="AssemblyLoad" message="$(string.RuntimePublisher.AssemblyLoadOpcodeMessage)" symbol="CLR_ASSEMBLYLOAD_OPCODE" value="37"> </opcode>
<opcode name="AssemblyUnload" message="$(string.RuntimePublisher.AssemblyUnloadOpcodeMessage)" symbol="CLR_ASSEMBLYUNLOAD_OPCODE" value="38"> </opcode>
<opcode name="AppDomainLoad" message="$(string.RuntimePublisher.AppDomainLoadOpcodeMessage)" symbol="CLR_APPDOMAINLOAD_OPCODE" value="41"> </opcode>
<opcode name="AppDomainUnload" message="$(string.RuntimePublisher.AppDomainUnloadOpcodeMessage)" symbol="CLR_APPDOMAINUNLOAD_OPCODE" value="42"> </opcode>
</opcodes>
</task>
<task name="CLRStack" symbol="CLR_STACK_TASK"
value="11" eventGUID="{d3363dc0-243a-4620-a4d0-8a07d772f533}"
message="$(string.RuntimePublisher.StackTaskMessage)" >
<opcodes>
<opcode name="CLRStackWalk" message="$(string.RuntimePublisher.CLRStackWalkOpcodeMessage)" symbol="CLR_STACK_STACKWALK_OPCODE" value="82"> </opcode>
</opcodes>
</task>
<task name="CLRStrongNameVerification" symbol="CLR_STRONGNAMEVERIFICATION_TASK"
value="12" eventGUID="{15447A14-B523-46ae-B75B-023F900B4393}"
message="$(string.RuntimePublisher.StrongNameVerificationTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRAuthenticodeVerification" symbol="CLR_AUTHENTICODEVERIFICATION_TASK"
value="13" eventGUID="{B17304D9-5AFA-4da6-9F7B-5A4FA73129B6}"
message="$(string.RuntimePublisher.AuthenticodeVerificationTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="AppDomainResourceManagement" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_TASK"
value="14" eventGUID="{88e83959-6185-4e0b-95b8-0e4a35df6122}"
message="$(string.RuntimePublisher.AppDomainResourceManagementTaskMessage)">
<opcodes>
<opcode name="AppDomainMemAllocated" message="$(string.RuntimePublisher.AppDomainMemAllocatedOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_APPDOMAINMEMALLOCATED_OPCODE" value="48"> </opcode>
<opcode name="AppDomainMemSurvived" message="$(string.RuntimePublisher.AppDomainMemSurvivedOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_APPDOMAINMEMSURVIVED_OPCODE" value="49"> </opcode>
<opcode name="ThreadCreated" message="$(string.RuntimePublisher.ThreadCreatedOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_THREADCREATED_OPCODE" value="50"> </opcode>
<opcode name="ThreadTerminated" message="$(string.RuntimePublisher.ThreadTerminatedOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_THREADTERMINATED_OPCODE" value="51"> </opcode>
<opcode name="ThreadDomainEnter" message="$(string.RuntimePublisher.ThreadDomainEnterOpcodeMessage)" symbol="CLR_APPDOMAINRESOURCEMANAGEMENT_THREADDOMAINENTER_OPCODE" value="52"> </opcode>
</opcodes>
</task>
<task name="CLRILStub" symbol="CLR_IL_STUB"
value="15" eventGUID="{D00792DA-07B7-40f5-0000-5D974E054740}"
message="$(string.RuntimePublisher.ILStubTaskMessage)">
<opcodes>
<opcode name="ILStubGenerated" message="$(string.RuntimePublisher.ILStubGeneratedOpcodeMessage)" symbol="CLR_ILSTUB_ILSTUBGENERATED_OPCODE" value="88"> </opcode>
<opcode name="ILStubCacheHit" message="$(string.RuntimePublisher.ILStubCacheHitOpcodeMessage)" symbol="CLR_ILSTUB_ILSTUBCACHEHIT_OPCODE" value="89"> </opcode>
</opcodes>
</task>
<task name="ThreadPoolWorkerThread" symbol="CLR_THREADPOOLWORKERTHREAD_TASK"
value="16" eventGUID="{8a9a44ab-f681-4271-8810-830dab9f5621}"
message="$(string.RuntimePublisher.ThreadPoolWorkerThreadTaskMessage)">
<opcodes>
<opcode name="Wait" message="$(string.RuntimePublisher.WaitOpcodeMessage)" symbol="CLR_WAIT_OPCODE" value="90"> </opcode>
</opcodes>
</task>
<task name="ThreadPoolWorkerThreadRetirement" symbol="CLR_THREADPOOLWORKERTHREADRETIREMENT_TASK"
value="17" eventGUID="{402ee399-c137-4dc0-a5ab-3c2dea64ac9c}"
message="$(string.RuntimePublisher.ThreadPoolWorkerThreadRetirementTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ThreadPoolWorkerThreadAdjustment" symbol="CLR_THREADPOOLWORKERTHREADADJUSTMENT_TASK"
value="18" eventGUID="{94179831-e99a-4625-8824-23ca5e00ca7d}"
message="$(string.RuntimePublisher.ThreadPoolWorkerThreadAdjustmentTaskMessage)">
<opcodes>
<opcode name="Sample" message="$(string.RuntimePublisher.SampleOpcodeMessage)" symbol="CLR_THREADPOOL_WORKERTHREADADJUSTMENT_SAMPLE_OPCODE" value="100"> </opcode>
<opcode name="Adjustment" message="$(string.RuntimePublisher.AdjustmentOpcodeMessage)" symbol="CLR_THREADPOOL_WORKERTHREADADJUSTMENT_ADJUSTMENT_OPCODE" value="101"> </opcode>
<opcode name="Stats" message="$(string.RuntimePublisher.StatsOpcodeMessage)" symbol="CLR_THREADPOOL_WORKERTHREADADJUSTMENT_STATS_OPCODE" value="102"> </opcode>
</opcodes>
</task>
<task name="CLRRuntimeInformation" symbol="CLR_EEStartup_TASK"
value="19" eventGUID="{CD7D3E32-65FE-40cd-9225-A2577D203FC3}"
message="$(string.RuntimePublisher.EEStartupTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRPerfTrack" symbol="CLR_PERFTRACK_TASK"
value="20" eventGUID="{EAC685F6-2104-4dec-88FD-91E4254221EC}"
message="$(string.RuntimePublisher.PerfTrackTaskMessage)">
<opcodes>
<opcode name="ModuleRangeLoad" message="$(string.RuntimePublisher.ModuleRangeLoadOpcodeMessage)" symbol="CLR_PERFTRACK_MODULERANGELOAD_OPCODE" value="10"> </opcode>
</opcodes>
</task>
<task name="Type" symbol="CLR_TYPE_TASK"
value="21" eventGUID="{003E5A9B-4757-4d3e-B4A1-E47BFB489408}"
message="$(string.RuntimePublisher.TypeTaskMessage)">
<opcodes>
<opcode name="BulkType" message="$(string.RuntimePublisher.BulkTypeOpcodeMessage)" symbol="CLR_BULKTYPE_OPCODE" value="10"> </opcode>
</opcodes>
</task>
<task name="ThreadPoolWorkingThreadCount" symbol="CLR_THREADPOOLWORKINGTHREADCOUNT_TASK"
value="22" eventGUID="{1b032b96-767c-42e4-8481-cb528a66d7bd}"
message="$(string.RuntimePublisher.ThreadPoolWorkingThreadCountTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="ThreadPool" symbol="CLR_THREADPOOL_TASK"
value="23" eventGUID="{EAD685F6-2104-4dec-88FD-91E4254221E9}"
message="$(string.RuntimePublisher.ThreadPoolTaskMessage)">
<opcodes>
<opcode name="Enqueue" message="$(string.RuntimePublisher.EnqueueOpcodeMessage)" symbol="CLR_ENQUEUE_OPCODE" value="11"> </opcode>
<opcode name="Dequeue" message="$(string.RuntimePublisher.DequeueOpcodeMessage)" symbol="CLR_DEQUEUE_OPCODE" value="12"> </opcode>
<opcode name="IOEnqueue" message="$(string.RuntimePublisher.IOEnqueueOpcodeMessage)" symbol="CLR_IOENQUEUE_OPCODE" value="13"> </opcode>
<opcode name="IODequeue" message="$(string.RuntimePublisher.IODequeueOpcodeMessage)" symbol="CLR_IODEQUEUE_OPCODE" value="14"> </opcode>
<opcode name="IOPack" message="$(string.RuntimePublisher.IOPackOpcodeMessage)" symbol="CLR_IOPACK_OPCODE" value="15"> </opcode>
</opcodes>
</task>
<task name="Thread" symbol="CLR_THREADING_TASK"
value="24" eventGUID="{641994C5-16F2-4123-91A7-A2999DD7BFC3}"
message="$(string.RuntimePublisher.ThreadTaskMessage)">
<opcodes>
<opcode name="Creating" message="$(string.RuntimePublisher.ThreadCreatingOpcodeMessage)" symbol="CLR_THREAD_CREATING_OPCODE" value="11"> </opcode>
<opcode name="Running" message="$(string.RuntimePublisher.ThreadRunningOpcodeMessage)" symbol="CLR_THREAD_RUNNING_OPCODE" value="12"> </opcode>
</opcodes>
</task>
<task name="DebugIPCEvent" symbol="CLR_DEBUG_IPC_EVENT_TASK"
value="25" eventGUID="{EC2F3703-8321-4301-BD51-2CB9A09F31B1}"
message="$(string.RuntimePublisher.DebugIPCEventTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="DebugExceptionProcessing" symbol="CLR_EXCEPTION_PROCESSING_TASK"
value="26" eventGUID="{C4412198-EF03-47F1-9BD1-11C6637A2062}"
message="$(string.RuntimePublisher.DebugExceptionProcessingTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CodeSymbols" symbol="CLR_CODE_SYMBOLS_TASK"
value="30" eventGUID="{53aedf69-2049-4f7d-9345-d3018b5c4d80}"
message="$(string.RuntimePublisher.CodeSymbolsTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="TieredCompilation" symbol="CLR_TIERED_COMPILATION_TASK"
value="31" eventGUID="{A77F474D-9D0D-4311-B98E-CFBCF84B9E0F}"
message="$(string.RuntimePublisher.TieredCompilationTaskMessage)">
<opcodes>
<opcode name="Settings" message="$(string.RuntimePublisher.TieredCompilationSettingsOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_SETTINGS_OPCODE" value="11"/>
<opcode name="Pause" message="$(string.RuntimePublisher.TieredCompilationPauseOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_PAUSE_OPCODE" value="12"/>
<opcode name="Resume" message="$(string.RuntimePublisher.TieredCompilationResumeOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_RESUME_OPCODE" value="13"/>
</opcodes>
</task>
<task name="AssemblyLoader" symbol="CLR_ASSEMBLY_LOADER_TASK"
value="32" eventGUID="{BCF2339E-B0A6-452D-966C-33AC9DD82573}"
message="$(string.RuntimePublisher.AssemblyLoaderTaskMessage)">
<opcodes>
<opcode name="ResolutionAttempted" message="$(string.RuntimePublisher.ResolutionAttemptedOpcodeMessage)" symbol="CLR_RESOLUTION_ATTEMPTED_OPCODE" value="11"/>
<opcode name="AssemblyLoadContextResolvingHandlerInvoked" message="$(string.RuntimePublisher.AssemblyLoadContextResolvingHandlerInvokedOpcodeMessage)" symbol="CLR_ALC_RESOLVING_HANDLER_INVOKED_OPCODE" value="12"/>
<opcode name="AppDomainAssemblyResolveHandlerInvoked" message="$(string.RuntimePublisher.AppDomainAssemblyResolveHandlerInvokedOpcodeMessage)" symbol="CLR_APPDOMAIN_ASSEMBLY_RESOLVE_HANDLER_INVOKED_OPCODE" value="13"/>
<opcode name="AssemblyLoadFromResolveHandlerInvoked" message="$(string.RuntimePublisher.AssemblyLoadFromResolveHandlerInvokedOpcodeMessage)" symbol="CLR_ASSEMBLY_LOAD_FROM_RESOLVE_HANDLER_INVOKED_OPCODE" value="14"/>
<opcode name="KnownPathProbed" message="$(string.RuntimePublisher.KnownPathProbedOpcodeMessage)" symbol="CLR_BINDING_PATH_PROBED_OPCODE" value="15"/>
</opcodes>
</task>
<task name="TypeLoad" symbol="CLR_TYPELOAD_TASK"
value="33" eventGUID="{9DB1562B-512F-475D-8D4C-0C6D97C1E73C}"
message="$(string.RuntimePublisher.TypeLoadTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="JitInstrumentationData" symbol="CLR_JITINSTRUMENTATIONDATA_TASK"
value="34" eventGUID="{F8666925-22C8-4B70-A131-0738137E7F25}"
message="$(string.RuntimePublisher.JitInstrumentationDataTaskMessage)">
<opcodes>
<opcode name="InstrumentationData" message="$(string.RuntimePublisher.InstrumentationDataOpcodeMessage)" symbol="CLR_INSTRUMENTATION_DATA_OPCODE" value="11"/>
<opcode name="InstrumentationDataVerbose" message="$(string.RuntimePublisher.InstrumentationDataOpcodeMessage)" symbol="CLR_INSTRUMENTATION_DATA_VERBOSE_OPCODE" value="12"/>
</opcodes>
</task>
<task name="ExecutionCheckpoint" symbol="CLR_EXECUTION_CHECKPOINT_TASK"
value="35" eventGUID="{598832C8-DF4D-4E9E-ABE6-2C7BF0BA2DA2}"
message="$(string.RuntimePublisher.ExecutionCheckpointTaskMessage)">
<opcodes>
<opcode name="ExecutionCheckpoint" message="$(string.RuntimePublisher.ExecutionCheckpointOpcodeMessage)" symbol="CLR_EXECUTIONCHECKPOINT_OPCODE" value="11"> </opcode>
</opcodes>
</task>
<task name="Profiler" symbol="CLR_PROFILER_TASK"
value="36" eventGUID="{68895E46-FD03-4528-89D2-5E1FBB1D3BCF}"
message="$(string.RuntimePublisher.ProfilerTaskMessage)">
<opcodes>
<opcode name="Profiler" message="$(string.RuntimePublisher.ProfilerOpcodeMessage)" symbol="CLR_PROFILER_OPCODE" value="11"/>
</opcodes>
</task>
<task name="YieldProcessorMeasurement" symbol="CLR_YIELD_PROCESSOR_MEASUREMENT_TASK"
value="37" eventGUID="{B4AFC324-DECE-4B02-86DC-AAB8F22BC1B1}"
message="$(string.RuntimePublisher.YieldProcessorMeasurementTaskMessage)">
<opcodes>
</opcodes>
</task>
<!--Next available ID is 38-->
</tasks>
<!--Maps-->
<maps>
<!-- ValueMaps -->
<valueMap name="GCSegmentTypeMap">
<map value="0x0" message="$(string.RuntimePublisher.GCSegment.SmallObjectHeapMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCSegment.LargeObjectHeapMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCSegment.ReadOnlyHeapMapMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.GCSegment.PinnedObjectHeapMapMessage)"/>
</valueMap>
<valueMap name="GCAllocationKindMap">
<map value="0x0" message="$(string.RuntimePublisher.GCAllocation.SmallMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCAllocation.LargeMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCAllocation.PinnedMapMessage)"/>
</valueMap>
<valueMap name="GCBucketKindMap">
<map value="0x0" message="$(string.RuntimePublisher.GCBucket.FLItemMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCBucket.PlugMessage)"/>
</valueMap>
<valueMap name="GCTypeMap">
<map value="0x0" message="$(string.RuntimePublisher.GCType.NonConcurrentGCMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCType.BackgroundGCMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCType.ForegroundGCMapMessage)"/>
</valueMap>
<valueMap name="GCReasonMap">
<map value="0x0" message="$(string.RuntimePublisher.GCReason.AllocSmallMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCReason.InducedMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCReason.LowMemoryMapMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.GCReason.EmptyMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.GCReason.AllocLargeMapMessage)"/>
<map value="0x5" message="$(string.RuntimePublisher.GCReason.OutOfSpaceSmallObjectHeapMapMessage)"/>
<map value="0x6" message="$(string.RuntimePublisher.GCReason.OutOfSpaceLargeObjectHeapMapMessage)"/>
<map value="0x7" message="$(string.RuntimePublisher.GCReason.InducedNoForceMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.GCReason.StressMapMessage)"/>
<map value="0x9" message="$(string.RuntimePublisher.GCReason.InducedLowMemoryMapMessage)"/>
</valueMap>
<valueMap name="GCSuspendEEReasonMap">
<map value="0x0" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendOtherMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForGCMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForAppDomainShutdownMapMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForCodePitchingMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForShutdownMapMessage)"/>
<map value="0x5" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForDebuggerMapMessage)"/>
<map value="0x6" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForGCPrepMapMessage)"/>
<map value="0x7" message="$(string.RuntimePublisher.GCSuspendEEReason.SuspendForDebuggerSweepMapMessage)"/>
</valueMap>
<valueMap name="ContentionFlagsMap">
<map value="0x0" message="$(string.RuntimePublisher.Contention.ManagedMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.Contention.NativeMapMessage)"/>
</valueMap>
<valueMap name="TailCallTypeMap">
<map value="0x0" message="$(string.RuntimePublisher.TailCallType.OptimizedMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.TailCallType.RecursiveMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.TailCallType.HelperMapMessage)"/>
</valueMap>
<valueMap name="ThreadAdjustmentReasonMap">
<map value="0x0" message="$(string.RuntimePublisher.ThreadAdjustmentReason.WarmupMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.ThreadAdjustmentReason.InitializingMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.ThreadAdjustmentReason.RandomMoveMapMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.ThreadAdjustmentReason.ClimbingMoveMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.ThreadAdjustmentReason.ChangePointMapMessage)"/>
<map value="0x5" message="$(string.RuntimePublisher.ThreadAdjustmentReason.StabilizingMapMessage)"/>
<map value="0x6" message="$(string.RuntimePublisher.ThreadAdjustmentReason.StarvationMapMessage)"/>
<map value="0x7" message="$(string.RuntimePublisher.ThreadAdjustmentReason.ThreadTimedOutMapMessage)"/>
</valueMap>
<valueMap name="GCRootKindMap">
<map value="0" message="$(string.RuntimePublisher.GCRootKind.Stack)"/>
<map value="1" message="$(string.RuntimePublisher.GCRootKind.Finalizer)"/>
<map value="2" message="$(string.RuntimePublisher.GCRootKind.Handle)"/>
<map value="3" message="$(string.RuntimePublisher.GCRootKind.Older)"/>
<map value="4" message="$(string.RuntimePublisher.GCRootKind.SizedRef)"/>
<map value="5" message="$(string.RuntimePublisher.GCRootKind.Overflow)"/>
<map value="6" message="$(string.RuntimePublisher.GCRootKind.DependentHandle)"/>
<map value="7" message="$(string.RuntimePublisher.GCRootKind.NewFQ)"/>
<map value="8" message="$(string.RuntimePublisher.GCRootKind.Steal)"/>
<map value="9" message="$(string.RuntimePublisher.GCRootKind.BGC)"/>
</valueMap>
<valueMap name="GCHandleKindMap">
<map value="0x0" message="$(string.RuntimePublisher.GCHandleKind.WeakShortMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.GCHandleKind.WeakLongMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCHandleKind.StrongMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.GCHandleKind.PinnedMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.GCHandleKind.VariableMessage)"/>
<map value="0x5" message="$(string.RuntimePublisher.GCHandleKind.RefCountedMessage)"/>
<map value="0x6" message="$(string.RuntimePublisher.GCHandleKind.DependentMessage)"/>
<map value="0x7" message="$(string.RuntimePublisher.GCHandleKind.AsyncPinnedMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.GCHandleKind.SizedRefMessage)"/>
</valueMap>
<valueMap name="KnownPathSourceMap">
<map value="0x0" message="$(string.RuntimePublisher.KnownPathSource.ApplicationAssembliesMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.KnownPathSource.UnusedMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.KnownPathSource.AppPathsMessage)"/>
<map value="0x3" message="$(string.RuntimePublisher.KnownPathSource.PlatformResourceRootsMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.KnownPathSource.SatelliteSubdirectoryMessage)"/>
</valueMap>
<valueMap name="ResolutionAttemptedStageMap">
<map value="0x0" message="$(string.RuntimePublisher.ResolutionAttempted.FindInLoadContext)"/>
<map value="0x1" message="$(string.RuntimePublisher.ResolutionAttempted.AssemblyLoadContextLoad)"/>
<map value="0x2" message="$(string.RuntimePublisher.ResolutionAttempted.ApplicationAssemblies)"/>
<map value="0x3" message="$(string.RuntimePublisher.ResolutionAttempted.DefaultAssemblyLoadContextFallback)"/>
<map value="0x4" message="$(string.RuntimePublisher.ResolutionAttempted.ResolveSatelliteAssembly)"/>
<map value="0x5" message="$(string.RuntimePublisher.ResolutionAttempted.AssemblyLoadContextResolvingEvent)"/>
<map value="0x6" message="$(string.RuntimePublisher.ResolutionAttempted.AppDomainAssemblyResolveEvent)"/>
</valueMap>
<valueMap name="ResolutionAttemptedResultMap">
<map value="0x0" message="$(string.RuntimePublisher.ResolutionAttempted.Success)"/>
<map value="0x1" message="$(string.RuntimePublisher.ResolutionAttempted.AssemblyNotFound)"/>
<map value="0x2" message="$(string.RuntimePublisher.ResolutionAttempted.MismatchedAssemblyName)"/>
<map value="0x3" message="$(string.RuntimePublisher.ResolutionAttempted.IncompatibleVersion)"/>
<map value="0x4" message="$(string.RuntimePublisher.ResolutionAttempted.Failure)"/>
<map value="0x5" message="$(string.RuntimePublisher.ResolutionAttempted.Exception)"/>
</valueMap>
<!-- BitMaps -->
<bitMap name="ModuleRangeTypeMap">
<map value="0x4" message="$(string.RuntimePublisher.ModuleRangeTypeMap.ColdRangeMessage)"/>
</bitMap>
<bitMap name="AppDomainFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.AppDomain.DefaultMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.AppDomain.ExecutableMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.AppDomain.SharedMapMessage)"/>
</bitMap>
<bitMap name="AssemblyFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.Assembly.DomainNeutralMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.Assembly.DynamicMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.Assembly.NativeMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.Assembly.CollectibleMapMessage)"/>
</bitMap>
<bitMap name="ModuleFlagsMap">
<map value= "0x1" message="$(string.RuntimePublisher.Module.DomainNeutralMapMessage)"/>
<map value= "0x2" message="$(string.RuntimePublisher.Module.NativeMapMessage)"/>
<map value= "0x4" message="$(string.RuntimePublisher.Module.DynamicMapMessage)"/>
<map value= "0x8" message="$(string.RuntimePublisher.Module.ManifestMapMessage)"/>
<map value= "0x10" message="$(string.RuntimePublisher.Module.IbcOptimizedMapMessage)"/>
<map value= "0x20" message="$(string.RuntimePublisher.Module.ReadyToRunModuleMapMessage)"/>
<map value= "0x40" message="$(string.RuntimePublisher.Module.PartialReadyToRunModuleMapMessage)"/>
</bitMap>
<bitMap name="MethodFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.Method.DynamicMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.Method.GenericMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.Method.HasSharedGenericCodeMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.Method.JittedMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.Method.JitHelperMapMessage)"/>
<map value="0x20" message="$(string.RuntimePublisher.Method.ProfilerRejectedPrecompiledCodeMapMessage)"/>
<map value="0x40" message="$(string.RuntimePublisher.Method.ReadyToRunRejectedPrecompiledCodeMapMessage)"/>
<!-- 0x80 to 0x200 are used for the optimization tier -->
</bitMap>
<bitMap name="StartupModeMap">
<map value="0x1" message="$(string.RuntimePublisher.StartupMode.ManagedExeMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.StartupMode.HostedCLRMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.StartupMode.IjwDllMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.StartupMode.ComActivatedMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.StartupMode.OtherMapMessage)"/>
</bitMap>
<bitMap name="RuntimeSkuMap">
<map value="0x1" message="$(string.RuntimePublisher.RuntimeSku.DesktopCLRMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.RuntimeSku.CoreCLRMapMessage)"/>
</bitMap>
<bitMap name="ExceptionThrownFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.ExceptionThrown.HasInnerExceptionMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.ExceptionThrown.NestedMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.ExceptionThrown.ReThrownMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.ExceptionThrown.CorruptedStateMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.ExceptionThrown.CLSCompliantMapMessage)"/>
</bitMap>
<bitMap name="ILStubGeneratedFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.ILStubGenerated.ReverseInteropMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.ILStubGenerated.COMInteropMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.ILStubGenerated.NGenedStubMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.ILStubGenerated.DelegateMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.ILStubGenerated.VarArgMapMessage)"/>
<map value="0x20" message="$(string.RuntimePublisher.ILStubGenerated.UnmanagedCalleeMapMessage)"/>
<map value="0x40" message="$(string.RuntimePublisher.ILStubGenerated.StructStubMapMessage)"/>
</bitMap>
<bitMap name="StartupFlagsMap">
<map value="0x000001" message="$(string.RuntimePublisher.Startup.CONCURRENT_GCMapMessage)"/>
<map value="0x000002" message="$(string.RuntimePublisher.Startup.LOADER_OPTIMIZATION_SINGLE_DOMAINMapMessage)"/>
<map value="0x000004" message="$(string.RuntimePublisher.Startup.LOADER_OPTIMIZATION_MULTI_DOMAINMapMessage)"/>
<map value="0x000010" message="$(string.RuntimePublisher.Startup.LOADER_SAFEMODEMapMessage)"/>
<map value="0x000100" message="$(string.RuntimePublisher.Startup.LOADER_SETPREFERENCEMapMessage)"/>
<map value="0x001000" message="$(string.RuntimePublisher.Startup.SERVER_GCMapMessage)"/>
<map value="0x002000" message="$(string.RuntimePublisher.Startup.HOARD_GC_VMMapMessage)"/>
<map value="0x004000" message="$(string.RuntimePublisher.Startup.SINGLE_VERSION_HOSTING_INTERFACEMapMessage)"/>
<map value="0x010000" message="$(string.RuntimePublisher.Startup.LEGACY_IMPERSONATIONMapMessage)"/>
<map value="0x020000" message="$(string.RuntimePublisher.Startup.DISABLE_COMMITTHREADSTACKMapMessage)"/>
<map value="0x040000" message="$(string.RuntimePublisher.Startup.ALWAYSFLOW_IMPERSONATIONMapMessage)"/>
<map value="0x080000" message="$(string.RuntimePublisher.Startup.TRIM_GC_COMMITMapMessage)"/>
<map value="0x100000" message="$(string.RuntimePublisher.Startup.ETWMapMessage)"/>
<map value="0x200000" message="$(string.RuntimePublisher.Startup.SERVER_BUILDMapMessage)"/>
<map value="0x400000" message="$(string.RuntimePublisher.Startup.ARMMapMessage)"/>
</bitMap>
<bitMap name="TypeFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.TypeFlags.Delegate)"/>
<map value="0x2" message="$(string.RuntimePublisher.TypeFlags.Finalizable)"/>
<map value="0x4" message="$(string.RuntimePublisher.TypeFlags.ExternallyImplementedCOMObject)"/>
<map value="0x8" message="$(string.RuntimePublisher.TypeFlags.Array)"/>
<map value="0x100" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit0)"/>
<map value="0x200" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit1)"/>
<map value="0x400" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit2)"/>
<map value="0x800" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit3)"/>
<map value="0x1000" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit4)"/>
<map value="0x2000" message="$(string.RuntimePublisher.TypeFlags.ArrayRankBit5)"/>
</bitMap>
<bitMap name="GCRootFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.GCRootFlags.Pinning)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCRootFlags.WeakRef)"/>
<map value="0x4" message="$(string.RuntimePublisher.GCRootFlags.Interior)"/>
<map value="0x8" message="$(string.RuntimePublisher.GCRootFlags.RefCounted)"/>
</bitMap>
<bitMap name="GCRootStaticVarFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.GCRootStaticVarFlags.ThreadLocal)"/>
</bitMap>
<bitMap name="GCRootCCWFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.GCRootCCWFlags.Strong)"/>
<map value="0x2" message="$(string.RuntimePublisher.GCRootCCWFlags.Pegged)"/>
</bitMap>
<bitMap name="ThreadFlagsMap">
<map value="0x1" message="$(string.RuntimePublisher.ThreadFlags.GCSpecial)"/>
<map value="0x2" message="$(string.RuntimePublisher.ThreadFlags.Finalizer)"/>
<map value="0x4" message="$(string.RuntimePublisher.ThreadFlags.ThreadPoolWorker)"/>
</bitMap>
<bitMap name="TieredCompilationSettingsFlagsMap">
<map value="0x0" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.NoneMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.QuickJitMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage)"/>
</bitMap>
</maps>
<!--Templates-->
<templates>
<template tid="EventSource">
<data name="EventID" inType="win:Int32" />
<data name="EventName" inType="win:UnicodeString" />
<data name="EventSourceName" inType="win:UnicodeString" />
<data name="Payload" inType="win:UnicodeString" />
<UserData>
<EventSource xmlns="myNs">
<EventID> %1 </EventID>
<EventName> %2 </EventName>
<EventSourceName> %3 </EventSourceName>
<Payload> %4 </Payload>
</EventSource>
</UserData>
</template>
<template tid="StrongNameVerification">
<data name="VerificationFlags" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ErrorCode" inType="win:UInt32" outType="win:HexInt32"/>
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<UserData>
<StrongNameVerification xmlns="myNs">
<VerificationFlags> %1 </VerificationFlags>
<ErrorCode> %2 </ErrorCode>
<FullyQualifiedAssemblyName> %3 </FullyQualifiedAssemblyName>
</StrongNameVerification>
</UserData>
</template>
<template tid="StrongNameVerification_V1">
<data name="VerificationFlags" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ErrorCode" inType="win:UInt32" outType="win:HexInt32"/>
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<StrongNameVerification_V1 xmlns="myNs">
<VerificationFlags> %1 </VerificationFlags>
<ErrorCode> %2 </ErrorCode>
<FullyQualifiedAssemblyName> %3 </FullyQualifiedAssemblyName>
<ClrInstanceID> %4 </ClrInstanceID>
</StrongNameVerification_V1>
</UserData>
</template>
<template tid="AuthenticodeVerification">
<data name="VerificationFlags" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ErrorCode" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ModulePath" inType="win:UnicodeString" />
<UserData>
<AuthenticodeVerification xmlns="myNs">
<VerificationFlags> %1 </VerificationFlags>
<ErrorCode> %2 </ErrorCode>
<ModulePath> %3 </ModulePath>
</AuthenticodeVerification>
</UserData>
</template>
<template tid="AuthenticodeVerification_V1">
<data name="VerificationFlags" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ErrorCode" inType="win:UInt32" outType="win:HexInt32"/>
<data name="ModulePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AuthenticodeVerification_V1 xmlns="myNs">
<VerificationFlags> %1 </VerificationFlags>
<ErrorCode> %2 </ErrorCode>
<ModulePath> %3 </ModulePath>
<ClrInstanceID> %4 </ClrInstanceID>
</AuthenticodeVerification_V1>
</UserData>
</template>
<template tid="RuntimeInformation">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Sku" inType="win:UInt16" map="RuntimeSkuMap" />
<data name="BclMajorVersion" inType="win:UInt16" />
<data name="BclMinorVersion" inType="win:UInt16" />
<data name="BclBuildNumber" inType="win:UInt16" />
<data name="BclQfeNumber" inType="win:UInt16" />
<data name="VMMajorVersion" inType="win:UInt16" />
<data name="VMMinorVersion" inType="win:UInt16" />
<data name="VMBuildNumber" inType="win:UInt16" />
<data name="VMQfeNumber" inType="win:UInt16" />
<data name="StartupFlags" inType="win:UInt32" map="StartupFlagsMap" />
<data name="StartupMode" inType="win:UInt8" map="StartupModeMap" />
<data name="CommandLine" inType="win:UnicodeString" />
<data name="ComObjectGuid" inType="win:GUID" />
<data name="RuntimeDllPath" inType="win:UnicodeString" />
<UserData>
<RuntimeInformation xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Sku> %2 </Sku>
<BclMajorVersion> %3 </BclMajorVersion>
<BclMinorVersion> %4 </BclMinorVersion>
<BclBuildNumber> %5 </BclBuildNumber>
<BclQfeNumber> %6 </BclQfeNumber>
<VMMajorVersion> %7 </VMMajorVersion>
<VMMinorVersion> %8 </VMMinorVersion>
<VMBuildNumber> %9 </VMBuildNumber>
<VMQfeNumber> %10 </VMQfeNumber>
<StartupFlags> %11 </StartupFlags>
<StartupMode> %12 </StartupMode>
<CommandLine> %13 </CommandLine>
<ComObjectGuid> %14 </ComObjectGuid>
<RuntimeDllPath> %15 </RuntimeDllPath>
</RuntimeInformation>
</UserData>
</template>
<template tid="GCStart">
<data name="Count" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Reason" inType="win:UInt32" map="GCReasonMap" />
<UserData>
<GCStart xmlns="myNs">
<Count> %1 </Count>
<Reason> %2 </Reason>
</GCStart>
</UserData>
</template>
<template tid="GCStart_V1">
<data name="Count" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Depth" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Reason" inType="win:UInt32" map="GCReasonMap" />
<data name="Type" inType="win:UInt32" map="GCTypeMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCStart_V1 xmlns="myNs">
<Count> %1 </Count>
<Depth> %2 </Depth>
<Reason> %3 </Reason>
<Type> %4 </Type>
<ClrInstanceID> %5 </ClrInstanceID>
</GCStart_V1>
</UserData>
</template>
<template tid="GCStart_V2">
<data name="Count" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Depth" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="Reason" inType="win:UInt32" map="GCReasonMap" />
<data name="Type" inType="win:UInt32" map="GCTypeMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ClientSequenceNumber" inType="win:UInt64" />
<UserData>
<GCStart_V1 xmlns="myNs">
<Count> %1 </Count>
<Depth> %2 </Depth>
<Reason> %3 </Reason>
<Type> %4 </Type>
<ClrInstanceID> %5 </ClrInstanceID>
<ClientSequenceNumber> %6 </ClientSequenceNumber>
</GCStart_V1>
</UserData>
</template>
<template tid="GCEnd">
<data name="Count" inType="win:UInt32" />
<data name="Depth" inType="win:UInt16" />
<UserData>
<GCEnd xmlns="myNs">
<Count> %1 </Count>
<Depth> %2 </Depth>
</GCEnd>
</UserData>
</template>
<template tid="GCEnd_V1">
<data name="Count" inType="win:UInt32" />
<data name="Depth" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCEnd_V1 xmlns="myNs">
<Count> %1 </Count>
<Depth> %2 </Depth>
<ClrInstanceID> %3 </ClrInstanceID>
</GCEnd_V1>
</UserData>
</template>
<template tid="GCHeapStats">
<data name="GenerationSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedCount" inType="win:UInt64" />
<data name="PinnedObjectCount" inType="win:UInt32" />
<data name="SinkBlockCount" inType="win:UInt32" />
<data name="GCHandleCount" inType="win:UInt32" />
<UserData>
<GCHeapStats xmlns="myNs">
<GenerationSize0> %1 </GenerationSize0>
<TotalPromotedSize0> %2 </TotalPromotedSize0>
<GenerationSize1> %3 </GenerationSize1>
<TotalPromotedSize1> %4 </TotalPromotedSize1>
<GenerationSize2> %5 </GenerationSize2>
<TotalPromotedSize2> %6 </TotalPromotedSize2>
<GenerationSize3> %7 </GenerationSize3>
<TotalPromotedSize3> %8 </TotalPromotedSize3>
<FinalizationPromotedSize> %9 </FinalizationPromotedSize>
<FinalizationPromotedCount> %10 </FinalizationPromotedCount>
<PinnedObjectCount> %11 </PinnedObjectCount>
<SinkBlockCount> %12 </SinkBlockCount>
<GCHandleCount> %13 </GCHandleCount>
</GCHeapStats>
</UserData>
</template>
<template tid="GCHeapStats_V1">
<data name="GenerationSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedCount" inType="win:UInt64" />
<data name="PinnedObjectCount" inType="win:UInt32" />
<data name="SinkBlockCount" inType="win:UInt32" />
<data name="GCHandleCount" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCHeapStats_V1 xmlns="myNs">
<GenerationSize0> %1 </GenerationSize0>
<TotalPromotedSize0> %2 </TotalPromotedSize0>
<GenerationSize1> %3 </GenerationSize1>
<TotalPromotedSize1> %4 </TotalPromotedSize1>
<GenerationSize2> %5 </GenerationSize2>
<TotalPromotedSize2> %6 </TotalPromotedSize2>
<GenerationSize3> %7 </GenerationSize3>
<TotalPromotedSize3> %8 </TotalPromotedSize3>
<FinalizationPromotedSize> %9 </FinalizationPromotedSize>
<FinalizationPromotedCount> %10 </FinalizationPromotedCount>
<PinnedObjectCount> %11 </PinnedObjectCount>
<SinkBlockCount> %12 </SinkBlockCount>
<GCHandleCount> %13 </GCHandleCount>
<ClrInstanceID> %14 </ClrInstanceID>
</GCHeapStats_V1>
</UserData>
</template>
<template tid="GCHeapStats_V2">
<data name="GenerationSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize0" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize1" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize2" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize3" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="FinalizationPromotedCount" inType="win:UInt64" />
<data name="PinnedObjectCount" inType="win:UInt32" />
<data name="SinkBlockCount" inType="win:UInt32" />
<data name="GCHandleCount" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="GenerationSize4" inType="win:UInt64" outType="win:HexInt64" />
<data name="TotalPromotedSize4" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCHeapStats_V2 xmlns="myNs">
<GenerationSize0> %1 </GenerationSize0>
<TotalPromotedSize0> %2 </TotalPromotedSize0>
<GenerationSize1> %3 </GenerationSize1>
<TotalPromotedSize1> %4 </TotalPromotedSize1>
<GenerationSize2> %5 </GenerationSize2>
<TotalPromotedSize2> %6 </TotalPromotedSize2>
<GenerationSize3> %7 </GenerationSize3>
<TotalPromotedSize3> %8 </TotalPromotedSize3>
<FinalizationPromotedSize> %9 </FinalizationPromotedSize>
<FinalizationPromotedCount> %10 </FinalizationPromotedCount>
<PinnedObjectCount> %11 </PinnedObjectCount>
<SinkBlockCount> %12 </SinkBlockCount>
<GCHandleCount> %13 </GCHandleCount>
<ClrInstanceID> %14 </ClrInstanceID>
<GenerationSize4> %15 </GenerationSize4>
<TotalPromotedSize4> %16 </TotalPromotedSize4>
</GCHeapStats_V2>
</UserData>
</template>
<template tid="GCCreateSegment">
<data name="Address" inType="win:UInt64" outType="win:HexInt64" />
<data name="Size" inType="win:UInt64" outType="win:HexInt64" />
<data name="Type" inType="win:UInt32" map="GCSegmentTypeMap" />
<UserData>
<GCCreateSegment xmlns="myNs">
<Address> %1 </Address>
<Size> %2 </Size>
<Type> %3 </Type>
</GCCreateSegment>
</UserData>
</template>
<template tid="GCCreateSegment_V1">
<data name="Address" inType="win:UInt64" outType="win:HexInt64" />
<data name="Size" inType="win:UInt64" outType="win:HexInt64" />
<data name="Type" inType="win:UInt32" map="GCSegmentTypeMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCCreateSegment_V1 xmlns="myNs">
<Address> %1 </Address>
<Size> %2 </Size>
<Type> %3 </Type>
<ClrInstanceID> %4 </ClrInstanceID>
</GCCreateSegment_V1>
</UserData>
</template>
<template tid="GCFreeSegment">
<data name="Address" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCFreeSegment xmlns="myNs">
<Address> %1 </Address>
</GCFreeSegment>
</UserData>
</template>
<template tid="GCFreeSegment_V1">
<data name="Address" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCFreeSegment_V1 xmlns="myNs">
<Address> %1 </Address>
<ClrInstanceID> %2 </ClrInstanceID>
</GCFreeSegment_V1>
</UserData>
</template>
<template tid="GCNoUserData">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCNoUserData xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCNoUserData>
</UserData>
</template>
<template tid="GenAwareTemplate">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GenAwareTemplate xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</GenAwareTemplate>
</UserData>
</template>
<template tid="GCSuspendEE">
<data name="Reason" inType="win:UInt16" map="GCSuspendEEReasonMap" />
<UserData>
<GCSuspendEE xmlns="myNs">
<Reason> %1 </Reason>
</GCSuspendEE>
</UserData>
</template>
<template tid="GCSuspendEE_V1">
<data name="Reason" inType="win:UInt32" map="GCSuspendEEReasonMap" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCSuspendEE_V1 xmlns="myNs">
<Reason> %1 </Reason>
<Count> %2 </Count>
<ClrInstanceID> %3 </ClrInstanceID>
</GCSuspendEE_V1>
</UserData>
</template>
<template tid="GCAllocationTick">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<UserData>
<GCAllocationTick xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
</GCAllocationTick>
</UserData>
</template>
<template tid="GCAllocationTick_V1">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCAllocationTick_V1 xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
<ClrInstanceID> %3 </ClrInstanceID>
</GCAllocationTick_V1>
</UserData>
</template>
<template tid="GCAllocationTick_V2">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AllocationAmount64" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:Pointer" />
<data name="TypeName" inType="win:UnicodeString" />
<data name="HeapIndex" inType="win:UInt32" />
<UserData>
<GCAllocationTick_V2 xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
<ClrInstanceID> %3 </ClrInstanceID>
<AllocationAmount64> %4 </AllocationAmount64>
<TypeID> %5 </TypeID>
<TypeName> %6 </TypeName>
<HeapIndex> %7 </HeapIndex>
</GCAllocationTick_V2>
</UserData>
</template>
<template tid="GCAllocationTick_V3">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AllocationAmount64" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:Pointer" />
<data name="TypeName" inType="win:UnicodeString" />
<data name="HeapIndex" inType="win:UInt32" />
<data name="Address" inType="win:Pointer" />
<UserData>
<GCAllocationTick_V3 xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
<ClrInstanceID> %3 </ClrInstanceID>
<AllocationAmount64> %4 </AllocationAmount64>
<TypeID> %5 </TypeID>
<TypeName> %6 </TypeName>
<HeapIndex> %7 </HeapIndex>
<Address> %8 </Address>
</GCAllocationTick_V3>
</UserData>
</template>
<template tid="GCAllocationTick_V4">
<data name="AllocationAmount" inType="win:UInt32" outType="win:HexInt32" />
<data name="AllocationKind" inType="win:UInt32" map="GCAllocationKindMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AllocationAmount64" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:Pointer" />
<data name="TypeName" inType="win:UnicodeString" />
<data name="HeapIndex" inType="win:UInt32" />
<data name="Address" inType="win:Pointer" />
<data name="ObjectSize" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCAllocationTick_V4 xmlns="myNs">
<AllocationAmount> %1 </AllocationAmount>
<AllocationKind> %2 </AllocationKind>
<ClrInstanceID> %3 </ClrInstanceID>
<AllocationAmount64> %4 </AllocationAmount64>
<TypeID> %5 </TypeID>
<TypeName> %6 </TypeName>
<HeapIndex> %7 </HeapIndex>
<Address> %8 </Address>
<ObjectSize> %9 </ObjectSize>
</GCAllocationTick_V4>
</UserData>
</template>
<template tid="GCCreateConcurrentThread">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCCreateConcurrentThread xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCCreateConcurrentThread>
</UserData>
</template>
<template tid="GCTerminateConcurrentThread">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCTerminateConcurrentThread xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCTerminateConcurrentThread>
</UserData>
</template>
<template tid="GCFinalizersEnd">
<data name="Count" inType="win:UInt32" />
<UserData>
<GCFinalizersEnd xmlns="myNs">
<Count> %1 </Count>
</GCFinalizersEnd>
</UserData>
</template>
<template tid="GCFinalizersEnd_V1">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCFinalizersEnd_V1 xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</GCFinalizersEnd_V1>
</UserData>
</template>
<template tid="GCMark">
<data name="HeapNum" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCMark xmlns="myNs">
<HeapNum> %1 </HeapNum>
<ClrInstanceID> %2 </ClrInstanceID>
</GCMark>
</UserData>
</template>
<template tid="GCMarkWithType">
<data name="HeapNum" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Type" inType="win:UInt32" map="GCRootKindMap" />
<data name="Bytes" inType="win:UInt64" />
<UserData>
<GCMarkWithType xmlns="myNs">
<HeapNum> %1 </HeapNum>
<ClrInstanceID> %2 </ClrInstanceID>
<Type> %3 </Type>
<Bytes> %4 </Bytes>
</GCMarkWithType>
</UserData>
</template>
<template tid="GCJoin_V2">
<data name="Heap" inType="win:UInt32" />
<data name="JoinTime" inType="win:UInt32" />
<data name="JoinType" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="JoinID" inType="win:UInt32" />
<UserData>
<GCJoin_V2 xmlns="myNs">
<Heap> %1 </Heap>
<JoinTime> %2 </JoinTime>
<JoinType> %3 </JoinType>
<ClrInstanceID> %4 </ClrInstanceID>
<JoinID> %5 </JoinID>
</GCJoin_V2>
</UserData>
</template>
<template tid="GCPerHeapHistory_V3">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="FreeListAllocated" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeListRejected" inType="win:Pointer" outType="win:HexInt64" />
<data name="EndOfSegAllocated" inType="win:Pointer" outType="win:HexInt64" />
<data name="CondemnedAllocated" inType="win:Pointer" outType="win:HexInt64" />
<data name="PinnedAllocated" inType="win:Pointer" outType="win:HexInt64" />
<data name="PinnedAllocatedAdvance" inType="win:Pointer" outType="win:HexInt64" />
<data name="RunningFreeListEfficiency" inType="win:UInt32" />
<data name="CondemnReasons0" inType="win:UInt32" />
<data name="CondemnReasons1" inType="win:UInt32" />
<data name="CompactMechanisms" inType="win:UInt32" />
<data name="ExpandMechanisms" inType="win:UInt32" />
<data name="HeapIndex" inType="win:UInt32" />
<data name="ExtraGen0Commit" inType="win:Pointer" outType="win:HexInt64" />
<data name="Count" inType="win:UInt32" />
<struct name="Values" count="Count" >
<data name="SizeBefore" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeListBefore" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeObjBefore" inType="win:Pointer" outType="win:HexInt64" />
<data name="SizeAfter" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeListAfter" inType="win:Pointer" outType="win:HexInt64" />
<data name="FreeObjAfter" inType="win:Pointer" outType="win:HexInt64" />
<data name="In" inType="win:Pointer" outType="win:HexInt64" />
<data name="PinnedSurv" inType="win:Pointer" outType="win:HexInt64" />
<data name="NonePinnedSurv" inType="win:Pointer" outType="win:HexInt64" />
<data name="NewAllocation" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCPerHeapHistory_V3 xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<FreeListAllocated> %2 </FreeListAllocated>
<FreeListRejected> %3 </FreeListRejected>
<EndOfSegAllocated> %4 </EndOfSegAllocated>
<CondemnedAllocated> %5 </CondemnedAllocated>
<PinnedAllocated> %6 </PinnedAllocated>
<PinnedAllocatedAdvance> %7 </PinnedAllocatedAdvance>
<RunningFreeListEfficiency> %8 </RunningFreeListEfficiency>
<CondemnReasons0> %9 </CondemnReasons0>
<CondemnReasons1> %10 </CondemnReasons1>
<CompactMechanisms> %11 </CompactMechanisms>
<ExpandMechanisms> %12 </ExpandMechanisms>
<HeapIndex> %13 </HeapIndex>
<ExtraGen0Commit> %14 </ExtraGen0Commit>
<Count> %15 </Count>
</GCPerHeapHistory_V3>
</UserData>
</template>
<template tid="GCGlobalHeap_V2">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="PauseMode" inType="win:UInt32" />
<data name="MemoryPressure" inType="win:UInt32" />
<UserData>
<GCGlobalHeap_V2 xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
<ClrInstanceID> %7 </ClrInstanceID>
<PauseMode> %8 </PauseMode>
<MemoryPressure> %9 </MemoryPressure>
</GCGlobalHeap_V2>
</UserData>
</template>
<template tid="GCGlobalHeap_V3">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="PauseMode" inType="win:UInt32" />
<data name="MemoryPressure" inType="win:UInt32" />
<data name="CondemnReasons0" inType="win:UInt32" />
<data name="CondemnReasons1" inType="win:UInt32" />
<UserData>
<GCGlobalHeap_V3 xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
<ClrInstanceID> %7 </ClrInstanceID>
<PauseMode> %8 </PauseMode>
<MemoryPressure> %9 </MemoryPressure>
<CondemnReasons0> %10 </CondemnReasons0>
<CondemnReasons1> %11 </CondemnReasons1>
</GCGlobalHeap_V3>
</UserData>
</template>
<template tid="GCGlobalHeap_V4">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="PauseMode" inType="win:UInt32" />
<data name="MemoryPressure" inType="win:UInt32" />
<data name="CondemnReasons0" inType="win:UInt32" />
<data name="CondemnReasons1" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<struct name="Values" count="Count" >
<data name="Time" inType="win:UInt32" />
</struct>
<UserData>
<GCGlobalHeap_V4 xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
<ClrInstanceID> %7 </ClrInstanceID>
<PauseMode> %8 </PauseMode>
<MemoryPressure> %9 </MemoryPressure>
<CondemnReasons0> %10 </CondemnReasons0>
<CondemnReasons1> %11 </CondemnReasons1>
<Count> %12 </Count>
</GCGlobalHeap_V4>
</UserData>
</template>
<template tid="GCLOHCompact">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Count" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="TimePlan" inType="win:UInt32" />
<data name="TimeCompact" inType="win:UInt32" />
<data name="TimeRelocate" inType="win:UInt32" />
<data name="TotalRefs" inType="win:Pointer" />
<data name="ZeroRefs" inType="win:Pointer" />
</struct>
<UserData>
<GCLOHCompact xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Count> %2 </Count>
</GCLOHCompact>
</UserData>
</template>
<template tid="GCFitBucketInfo">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="BucketKind" inType="win:UInt16" map="GCBucketKindMap" />
<data name="TotalSize" inType="win:UInt64" />
<data name="Count" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="Index" inType="win:UInt16" />
<data name="Count" inType="win:UInt32" />
<data name="Size" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCFitBucketInfo xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<BucketKind> %2 </BucketKind>
<TotalSize> %3 </TotalSize>
<Count> %4 </Count>
</GCFitBucketInfo>
</UserData>
</template>
<template tid="FinalizeObject">
<data name="TypeID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<FinalizeObject xmlns="myNs">
<TypeID> %1 </TypeID>
<ObjectID> %2 </ObjectID>
<ClrInstanceID> %3 </ClrInstanceID>
</FinalizeObject>
</UserData>
</template>
<template tid="DestroyGCHandle">
<data name="HandleID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DestroyGCHandle xmlns="myNs">
<HandleID> %1 </HandleID>
<ClrInstanceID> %2 </ClrInstanceID>
</DestroyGCHandle>
</UserData>
</template>
<template tid="SetGCHandle">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="Kind" map="GCHandleKindMap" inType="win:UInt32" />
<data name="Generation" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<SetGCHandle xmlns="myNs">
<HandleID> %1 </HandleID>
<ObjectID> %2 </ObjectID>
<Kind> %3 </Kind>
<Generation> %4 </Generation>
<AppDomainID> %5 </AppDomainID>
<ClrInstanceID> %6 </ClrInstanceID>
</SetGCHandle>
</UserData>
</template>
<template tid="GCTriggered">
<data name="Reason" inType="win:UInt32" map="GCReasonMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCTriggered xmlns="myNs">
<Reason> %1 </Reason>
<ClrInstanceID> %2 </ClrInstanceID>
</GCTriggered>
</UserData>
</template>
<template tid="PinObjectAtGCTime">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="ObjectSize" inType="win:UInt64" />
<data name="TypeName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="GCDynamicEvent">
<data name="Name" inType="win:UnicodeString" />
<data name="DataSize" inType="win:UInt32" />
<data name="Data" inType="win:Binary" length="DataSize" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="IncreaseMemoryPressure">
<data name="BytesAllocated" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="DecreaseMemoryPressure">
<data name="BytesFreed" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="ClrWorkerThread">
<data name="WorkerThreadCount" inType="win:UInt32" />
<data name="RetiredWorkerThreads" inType="win:UInt32" />
<UserData>
<WorkerThread xmlns="myNs">
<WorkerThreadCount> %1 </WorkerThreadCount>
<RetiredWorkerThreads> %2 </RetiredWorkerThreads>
</WorkerThread>
</UserData>
</template>
<template tid="IOThread">
<data name="IOThreadCount" inType="win:UInt32" />
<data name="RetiredIOThreads" inType="win:UInt32" />
<UserData>
<IOThread xmlns="myNs">
<IOThreadCount> %1 </IOThreadCount>
<RetiredIOThreads> %2 </RetiredIOThreads>
</IOThread>
</UserData>
</template>
<template tid="IOThread_V1">
<data name="IOThreadCount" inType="win:UInt32" />
<data name="RetiredIOThreads" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<IOThread_V1 xmlns="myNs">
<IOThreadCount> %1 </IOThreadCount>
<RetiredIOThreads> %2 </RetiredIOThreads>
<ClrInstanceID> %3 </ClrInstanceID>
</IOThread_V1>
</UserData>
</template>
<template tid="ClrThreadPoolSuspend">
<data name="ClrThreadID" inType="win:UInt32" />
<data name="CpuUtilization" inType="win:UInt32" />
<UserData>
<CLRThreadPoolSuspend xmlns="myNs">
<ClrThreadID> %1 </ClrThreadID>
<CpuUtilization> %2 </CpuUtilization>
</CLRThreadPoolSuspend>
</UserData>
</template>
<template tid="ThreadPoolWorkerThread">
<data name="ActiveWorkerThreadCount" inType="win:UInt32" />
<data name="RetiredWorkerThreadCount" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkerThread xmlns="myNs">
<ActiveWorkerThreadCount> %1 </ActiveWorkerThreadCount>
<RetiredWorkerThreadCount> %2 </RetiredWorkerThreadCount>
<ClrInstanceID> %3 </ClrInstanceID>
</ThreadPoolWorkerThread>
</UserData>
</template>
<template tid="ThreadPoolWorkerThreadAdjustmentSample">
<data name="Throughput" inType="win:Double" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkerThreadAdjustmentSample xmlns="myNs">
<Throughput> %1 </Throughput>
<ClrInstanceID> %2 </ClrInstanceID>
</ThreadPoolWorkerThreadAdjustmentSample>
</UserData>
</template>
<template tid="ThreadPoolWorkerThreadAdjustmentAdjustment">
<data name="AverageThroughput" inType="win:Double" />
<data name="NewWorkerThreadCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" map="ThreadAdjustmentReasonMap"/>
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkerThreadAdjustmentAdjustment xmlns="myNs">
<AverageThroughput> %1 </AverageThroughput>
<NewWorkerThreadCount> %2 </NewWorkerThreadCount>
<Reason> %3 </Reason>
<ClrInstanceID> %4 </ClrInstanceID>
</ThreadPoolWorkerThreadAdjustmentAdjustment>
</UserData>
</template>
<template tid="ThreadPoolWorkerThreadAdjustmentStats">
<data name="Duration" inType="win:Double" />
<data name="Throughput" inType="win:Double" />
<data name="ThreadWave" inType="win:Double"/>
<data name="ThroughputWave" inType="win:Double"/>
<data name="ThroughputErrorEstimate" inType="win:Double"/>
<data name="AverageThroughputErrorEstimate" inType="win:Double"/>
<data name="ThroughputRatio" inType="win:Double" />
<data name="Confidence" inType="win:Double" />
<data name="NewControlSetting" inType="win:Double" />
<data name="NewThreadWaveMagnitude" inType="win:UInt16" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkerThreadAdjustmentStats xmlns="myNs">
<Duration> %1 </Duration>
<Throughput> %2 </Throughput>
<ThreadWave> %3 </ThreadWave>
<ThroughputWave> %4 </ThroughputWave>
<ThroughputErrorEstimate> %5 </ThroughputErrorEstimate>
<AverageThroughputErrorEstimate> %6 </AverageThroughputErrorEstimate>
<ThroughputRatio> %7 </ThroughputRatio>
<Confidence> %8 </Confidence>
<NewControlSetting> %9 </NewControlSetting>
<NewThreadWaveMagnitude> %10 </NewThreadWaveMagnitude>
<ClrInstanceID> %11 </ClrInstanceID>
</ThreadPoolWorkerThreadAdjustmentStats>
</UserData>
</template>
<template tid="ThreadPoolWork">
<data name="WorkID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="ThreadPoolIOWork">
<data name="NativeOverlapped" inType="win:Pointer" />
<data name="Overlapped" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="ThreadPoolIOWorkEnqueue">
<data name="NativeOverlapped" inType="win:Pointer" />
<data name="Overlapped" inType="win:Pointer" />
<data name="MultiDequeues" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="ThreadPoolWorkingThreadCount">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadPoolWorkingThreadCount xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</ThreadPoolWorkingThreadCount>
</UserData>
</template>
<template tid="ThreadStartWork">
<data name="ID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="Exception">
<data name="ExceptionType" inType="win:UnicodeString" />
<data name="ExceptionMessage" inType="win:UnicodeString" />
<data name="ExceptionEIP" inType="win:Pointer" />
<data name="ExceptionHRESULT" inType="win:UInt32" outType="win:HexInt32" />
<data name="ExceptionFlags" inType="win:UInt16" map="ExceptionThrownFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<Exception xmlns="myNs">
<ExceptionType> %1 </ExceptionType>
<ExceptionMessage> %2 </ExceptionMessage>
<ExceptionEIP> %3 </ExceptionEIP>
<ExceptionHRESULT> %4 </ExceptionHRESULT>
<ExceptionFlags> %5 </ExceptionFlags>
<ClrInstanceID> %6 </ClrInstanceID>
</Exception>
</UserData>
</template>
<template tid="ExceptionHandling">
<data name="EntryEIP" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ExceptionHandling xmlns="myNs">
<EntryEIP> %1 </EntryEIP>
<MethodID> %2 </MethodID>
<MethodName> %3 </MethodName>
<ClrInstanceID> %4 </ClrInstanceID>
</ExceptionHandling>
</UserData>
</template>
<template tid="Contention">
<data name="ContentionFlags" inType="win:UInt8" map="ContentionFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<Contention xmlns="myNs">
<ContentionFlags> %1 </ContentionFlags>
<ClrInstanceID> %2 </ClrInstanceID>
</Contention>
</UserData>
</template>
<template tid="ContentionStop_V1">
<data name="ContentionFlags" inType="win:UInt8" map="ContentionFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="DurationNs" inType="win:Double" />
<UserData>
<Contention xmlns="myNs">
<ContentionFlags> %1 </ContentionFlags>
<ClrInstanceID> %2 </ClrInstanceID>
<DurationNs> %3 </DurationNs>
</Contention>
</UserData>
</template>
<template tid="DomainModuleLoadUnload">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<UserData>
<DomainModuleLoadUnload xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<AppDomainID> %3 </AppDomainID>
<ModuleFlags> %4 </ModuleFlags>
<ModuleILPath> %5 </ModuleILPath>
<ModuleNativePath> %6 </ModuleNativePath>
</DomainModuleLoadUnload>
</UserData>
</template>
<template tid="DomainModuleLoadUnload_V1">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DomainModuleLoadUnload_V1 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<AppDomainID> %3 </AppDomainID>
<ModuleFlags> %4 </ModuleFlags>
<ModuleILPath> %5 </ModuleILPath>
<ModuleNativePath> %6 </ModuleNativePath>
<ClrInstanceID> %7 </ClrInstanceID>
</DomainModuleLoadUnload_V1>
</UserData>
</template>
<template tid="ModuleLoadUnload">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<UserData>
<ModuleLoadUnload xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
</ModuleLoadUnload>
</UserData>
</template>
<template tid="ModuleLoadUnload_V1">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ModuleLoadUnload_V1 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
<ClrInstanceID> %6 </ClrInstanceID>
</ModuleLoadUnload_V1>
</UserData>
</template>
<template tid="ModuleLoadUnload_V2">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ManagedPdbSignature" inType="win:GUID" />
<data name="ManagedPdbAge" inType="win:UInt32" />
<data name="ManagedPdbBuildPath" inType="win:UnicodeString" />
<data name="NativePdbSignature" inType="win:GUID" />
<data name="NativePdbAge" inType="win:UInt32" />
<data name="NativePdbBuildPath" inType="win:UnicodeString" />
<UserData>
<ModuleLoadUnload_V2 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
<ClrInstanceID> %6 </ClrInstanceID>
<ManagedPdbSignature> %7 </ManagedPdbSignature>
<ManagedPdbAge> %8 </ManagedPdbAge>
<ManagedPdbBuildPath> %9 </ManagedPdbBuildPath>
<NativePdbSignature> %10 </NativePdbSignature>
<NativePdbAge> %11 </NativePdbAge>
<NativePdbBuildPath> %12 </NativePdbBuildPath>
</ModuleLoadUnload_V2>
</UserData>
</template>
<template tid="AssemblyLoadUnload">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyFlags" inType="win:UInt32" map="AssemblyFlagsMap" />
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadUnload xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<AppDomainID> %2 </AppDomainID>
<AssemblyFlags> %3 </AssemblyFlags>
<FullyQualifiedAssemblyName> %4 </FullyQualifiedAssemblyName>
</AssemblyLoadUnload>
</UserData>
</template>
<template tid="AssemblyLoadUnload_V1">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="BindingID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyFlags" inType="win:UInt32" map="AssemblyFlagsMap" />
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AssemblyLoadUnload_V1 xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<AppDomainID> %2 </AppDomainID>
<BindingID> %3 </BindingID>
<AssemblyFlags> %4 </AssemblyFlags>
<FullyQualifiedAssemblyName> %5 </FullyQualifiedAssemblyName>
<ClrInstanceID> %6 </ClrInstanceID>
</AssemblyLoadUnload_V1>
</UserData>
</template>
<template tid="AppDomainLoadUnload">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainFlags" inType="win:UInt32" map="AppDomainFlagsMap" />
<data name="AppDomainName" inType="win:UnicodeString" />
<UserData>
<AppDomainLoadUnload xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainFlags> %2 </AppDomainFlags>
<AppDomainName> %3 </AppDomainName>
</AppDomainLoadUnload>
</UserData>
</template>
<template tid="AppDomainLoadUnload_V1">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainFlags" inType="win:UInt32" map="AppDomainFlagsMap" />
<data name="AppDomainName" inType="win:UnicodeString" />
<data name="AppDomainIndex" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AppDomainLoadUnload_V1 xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainFlags> %2 </AppDomainFlags>
<AppDomainName> %3 </AppDomainName>
<AppDomainIndex> %4 </AppDomainIndex>
<ClrInstanceID> %5 </ClrInstanceID>
</AppDomainLoadUnload_V1>
</UserData>
</template>
<template tid="AssemblyLoadStart">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="AssemblyPath" inType="win:UnicodeString" />
<data name="RequestingAssembly" inType="win:UnicodeString" />
<data name="AssemblyLoadContext" inType="win:UnicodeString" />
<data name="RequestingAssemblyLoadContext" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadStart xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<AssemblyPath> %3 </AssemblyPath>
<RequestingAssembly> %4 </RequestingAssembly>
<AssemblyLoadContext> %5 </AssemblyLoadContext>
<RequestingAssemblyLoadContext> %6 </RequestingAssemblyLoadContext>
</AssemblyLoadStart>
</UserData>
</template>
<template tid="AssemblyLoadStop">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="AssemblyPath" inType="win:UnicodeString" />
<data name="RequestingAssembly" inType="win:UnicodeString" />
<data name="AssemblyLoadContext" inType="win:UnicodeString" />
<data name="RequestingAssemblyLoadContext" inType="win:UnicodeString" />
<data name="Success" inType="win:Boolean" />
<data name="ResultAssemblyName" inType="win:UnicodeString" />
<data name="ResultAssemblyPath" inType="win:UnicodeString" />
<data name="Cached" inType="win:Boolean" />
<UserData>
<AssemblyLoadStop xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<AssemblyPath> %3 </AssemblyPath>
<RequestingAssembly> %4 </RequestingAssembly>
<AssemblyLoadContext> %5 </AssemblyLoadContext>
<RequestingAssemblyLoadContext> %6 </RequestingAssemblyLoadContext>
<Success> %7 </Success>
<ResultAssemblyName> %8 </ResultAssemblyName>
<ResultAssemblyPath> %9 </ResultAssemblyPath>
<Cached> %10 </Cached>
</AssemblyLoadStop>
</UserData>
</template>
<template tid="ResolutionAttempted">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="Stage" map="ResolutionAttemptedStageMap" inType="win:UInt16" />
<data name="AssemblyLoadContext" inType="win:UnicodeString" />
<data name="Result" map="ResolutionAttemptedResultMap" inType="win:UInt16" />
<data name="ResultAssemblyName" inType="win:UnicodeString" />
<data name="ResultAssemblyPath" inType="win:UnicodeString" />
<data name="ErrorMessage" inType="win:UnicodeString" />
<UserData>
<ResolutionAttempted xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<Stage> %3 </Stage>
<AssemblyLoadContext> %4 </AssemblyLoadContext>
<Result> %5 </Result>
<ResultAssemblyName> %6 </ResultAssemblyName>
<ResultAssemblyPath> %7 </ResultAssemblyPath>
<ErrorMessage> %8 </ErrorMessage>
</ResolutionAttempted>
</UserData>
</template>
<template tid="AssemblyLoadContextResolvingHandlerInvoked">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="HandlerName" inType="win:UnicodeString" />
<data name="AssemblyLoadContext" inType="win:UnicodeString" />
<data name="ResultAssemblyName" inType="win:UnicodeString" />
<data name="ResultAssemblyPath" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadContextResolvingHandlerInvoked xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<HandlerName> %3 </HandlerName>
<AssemblyLoadContext> %4 </AssemblyLoadContext>
<ResultAssemblyName> %5 </ResultAssemblyName>
<ResultAssemblyPath> %6 </ResultAssemblyPath>
</AssemblyLoadContextResolvingHandlerInvoked>
</UserData>
</template>
<template tid="AppDomainAssemblyResolveHandlerInvoked">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="HandlerName" inType="win:UnicodeString" />
<data name="ResultAssemblyName" inType="win:UnicodeString" />
<data name="ResultAssemblyPath" inType="win:UnicodeString" />
<UserData>
<AppDomainAssemblyResolveHandlerInvoked xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<HandlerName> %3 </HandlerName>
<ResultAssemblyName> %4 </ResultAssemblyName>
<ResultAssemblyPath> %5 </ResultAssemblyPath>
</AppDomainAssemblyResolveHandlerInvoked>
</UserData>
</template>
<template tid="AssemblyLoadFromResolveHandlerInvoked">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="IsTrackedLoad" inType="win:Boolean" />
<data name="RequestingAssemblyPath" inType="win:UnicodeString" />
<data name="ComputedRequestedAssemblyPath" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadFromResolveHandlerInvoked xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<AssemblyName> %2 </AssemblyName>
<IsTrackedLoad> %3 </IsTrackedLoad>
<RequestingAssemblyPath> %4 </RequestingAssemblyPath>
<ComputedRequestedAssemblyPath> %5 </ComputedRequestedAssemblyPath>
</AssemblyLoadFromResolveHandlerInvoked>
</UserData>
</template>
<template tid="KnownPathProbed">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="FilePath" inType="win:UnicodeString" />
<data name="Source" inType="win:UInt16" map="KnownPathSourceMap" />
<data name="Result" inType="win:Int32" />
<UserData>
<KnownPathProbed xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<FilePath> %2 </FilePath>
<Source> %3 </Source>
<Result> %4 </Result>
</KnownPathProbed>
</UserData>
</template>
<template tid="MethodDetails">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="TypeParameterCount" inType="win:UInt32" />
<data name="LoaderModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeParameters" count="TypeParameterCount" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodDetails xmlns="myNs">
<MethodID> %1 </MethodID>
<TypeID> %2 </TypeID>
<MethodToken> %3 </MethodToken>
<TypeParameterCount> %4 </TypeParameterCount>
<LoaderModuleID> %5 </LoaderModuleID>
</MethodDetails>
</UserData>
</template>
<template tid="TypeLoadStart">
<data name="TypeLoadStartID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TypeLoadStart xmlns="myNs">
<TypeLoadStartID> %1 </TypeLoadStartID>
<ClrInstanceID> %2 </ClrInstanceID>
</TypeLoadStart>
</UserData>
</template>
<template tid="TypeLoadStop">
<data name="TypeLoadStartID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="LoadLevel" inType="win:UInt16" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeName" inType="win:UnicodeString" />
<UserData>
<TypeLoadStop xmlns="myNs">
<TypeLoadStartID> %1 </TypeLoadStartID>
<ClrInstanceID> %2 </ClrInstanceID>
<LoadLevel> %3 </LoadLevel>
<TypeID> %4 </TypeID>
<TypeName> %5 </TypeName>
</TypeLoadStop>
</UserData>
</template>
<template tid="MethodLoadUnload">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<UserData>
<MethodLoadUnload xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
</MethodLoadUnload>
</UserData>
</template>
<template tid="MethodLoadUnload_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodLoadUnload_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<ClrInstanceID> %7 </ClrInstanceID>
</MethodLoadUnload_V1>
</UserData>
</template>
<template tid="MethodLoadUnload_V2">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodLoadUnload_V2 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<ClrInstanceID> %7 </ClrInstanceID>
<ReJITID> %8 </ReJITID>
</MethodLoadUnload_V2>
</UserData>
</template>
<template tid="R2RGetEntryPoint">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="EntryPoint" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<R2RGetEntryPoint xmlns="myNs">
<MethodID> %1 </MethodID>
<MethodNamespace> %2 </MethodNamespace>
<MethodName> %3 </MethodName>
<MethodSignature> %4 </MethodSignature>
<EntryPoint> %5 </EntryPoint>
<ClrInstanceID> %6 </ClrInstanceID>
</R2RGetEntryPoint>
</UserData>
</template>
<template tid="R2RGetEntryPointStart">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<R2RGetEntryPointStart xmlns="myNs">
<MethodID> %1 </MethodID>
<ClrInstanceID> %2 </ClrInstanceID>
</R2RGetEntryPointStart>
</UserData>
</template>
<template tid="MethodLoadUnloadVerbose">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<UserData>
<MethodLoadUnloadVerbose xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
</MethodLoadUnloadVerbose>
</UserData>
</template>
<template tid="MethodLoadUnloadVerbose_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodLoadUnloadVerbose_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
<ClrInstanceID> %10 </ClrInstanceID>
</MethodLoadUnloadVerbose_V1>
</UserData>
</template>
<template tid="MethodLoadUnloadVerbose_V2">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodLoadUnloadVerbose_V2 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
<ClrInstanceID> %10 </ClrInstanceID>
<ReJITID> %11 </ReJITID>
</MethodLoadUnloadVerbose_V2>
</UserData>
</template>
<template tid="MethodJittingStarted">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodILSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<UserData>
<MethodJittingStarted xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodToken> %3 </MethodToken>
<MethodILSize> %4 </MethodILSize>
<MethodNamespace> %5 </MethodNamespace>
<MethodName> %6 </MethodName>
<MethodSignature> %7 </MethodSignature>
</MethodJittingStarted>
</UserData>
</template>
<template tid="MethodJittingStarted_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodILSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJittingStarted_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodToken> %3 </MethodToken>
<MethodILSize> %4 </MethodILSize>
<MethodNamespace> %5 </MethodNamespace>
<MethodName> %6 </MethodName>
<MethodSignature> %7 </MethodSignature>
<ClrInstanceID> %8 </ClrInstanceID>
</MethodJittingStarted_V1>
</UserData>
</template>
<template tid="MethodJitInliningSucceeded">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="InlinerNamespace" inType="win:UnicodeString" />
<data name="InlinerName" inType="win:UnicodeString" />
<data name="InlinerNameSignature" inType="win:UnicodeString" />
<data name="InlineeNamespace" inType="win:UnicodeString" />
<data name="InlineeName" inType="win:UnicodeString" />
<data name="InlineeNameSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitInliningSucceeded xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<InlinerNamespace> %4 </InlinerNamespace>
<InlinerName> %5 </InlinerName>
<InlinerNameSignature> %6 </InlinerNameSignature>
<InlineeNamespace> %7 </InlineeNamespace>
<InlineeName> %8 </InlineeName>
<InlineeNameSignature> %9 </InlineeNameSignature>
<ClrInstanceID> %10 </ClrInstanceID>
</MethodJitInliningSucceeded>
</UserData>
</template>
<template tid="MethodJitInliningFailed">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="InlinerNamespace" inType="win:UnicodeString" />
<data name="InlinerName" inType="win:UnicodeString" />
<data name="InlinerNameSignature" inType="win:UnicodeString" />
<data name="InlineeNamespace" inType="win:UnicodeString" />
<data name="InlineeName" inType="win:UnicodeString" />
<data name="InlineeNameSignature" inType="win:UnicodeString" />
<data name="FailAlways" inType="win:Boolean" />
<data name="FailReason" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitInliningFailed xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<InlinerNamespace> %4 </InlinerNamespace>
<InlinerName> %5 </InlinerName>
<InlinerNameSignature> %6 </InlinerNameSignature>
<InlineeNamespace> %7 </InlineeNamespace>
<InlineeName> %8 </InlineeName>
<InlineeNameSignature> %9 </InlineeNameSignature>
<FailAlways> %10 </FailAlways>
<FailReason> %11 </FailReason>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitInliningFailed>
</UserData>
</template>
<template tid="MethodJitInliningFailedAnsi">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="InlinerNamespace" inType="win:UnicodeString" />
<data name="InlinerName" inType="win:UnicodeString" />
<data name="InlinerNameSignature" inType="win:UnicodeString" />
<data name="InlineeNamespace" inType="win:UnicodeString" />
<data name="InlineeName" inType="win:UnicodeString" />
<data name="InlineeNameSignature" inType="win:UnicodeString" />
<data name="FailAlways" inType="win:Boolean" />
<data name="FailReason" inType="win:AnsiString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitInliningFailedAnsi xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<InlinerNamespace> %4 </InlinerNamespace>
<InlinerName> %5 </InlinerName>
<InlinerNameSignature> %6 </InlinerNameSignature>
<InlineeNamespace> %7 </InlineeNamespace>
<InlineeName> %8 </InlineeName>
<InlineeNameSignature> %9 </InlineeNameSignature>
<FailAlways> %10 </FailAlways>
<FailReason> %11 </FailReason>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitInliningFailedAnsi>
</UserData>
</template>
<template tid="MethodJitTailCallSucceeded">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="CallerNamespace" inType="win:UnicodeString" />
<data name="CallerName" inType="win:UnicodeString" />
<data name="CallerNameSignature" inType="win:UnicodeString" />
<data name="CalleeNamespace" inType="win:UnicodeString" />
<data name="CalleeName" inType="win:UnicodeString" />
<data name="CalleeNameSignature" inType="win:UnicodeString" />
<data name="TailPrefix" inType="win:Boolean" />
<data name="TailCallType" inType="win:UInt32" map="TailCallTypeMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitTailCallSucceeded xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<CallerNamespace> %4 </CallerNamespace>
<CallerName> %5 </CallerName>
<CallerNameSignature> %6 </CallerNameSignature>
<CalleeNamespace> %7 </CalleeNamespace>
<CalleeName> %8 </CalleeName>
<CalleeNameSignature> %9 </CalleeNameSignature>
<TailPrefix> %10 </TailPrefix>
<TailCallType> %11 </TailCallType>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitTailCallSucceeded>
</UserData>
</template>
<template tid="MethodJitTailCallFailed">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="CallerNamespace" inType="win:UnicodeString" />
<data name="CallerName" inType="win:UnicodeString" />
<data name="CallerNameSignature" inType="win:UnicodeString" />
<data name="CalleeNamespace" inType="win:UnicodeString" />
<data name="CalleeName" inType="win:UnicodeString" />
<data name="CalleeNameSignature" inType="win:UnicodeString" />
<data name="TailPrefix" inType="win:Boolean" />
<data name="FailReason" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitTailCallFailed xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<CallerNamespace> %4 </CallerNamespace>
<CallerName> %5 </CallerName>
<CallerNameSignature> %6 </CallerNameSignature>
<CalleeNamespace> %7 </CalleeNamespace>
<CalleeName> %8 </CalleeName>
<CalleeNameSignature> %9 </CalleeNameSignature>
<TailPrefix> %10 </TailPrefix>
<FailReason> %11 </FailReason>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitTailCallFailed>
</UserData>
</template>
<template tid="MethodJitTailCallFailedAnsi">
<data name="MethodBeingCompiledNamespace" inType="win:UnicodeString" />
<data name="MethodBeingCompiledName" inType="win:UnicodeString" />
<data name="MethodBeingCompiledNameSignature" inType="win:UnicodeString" />
<data name="CallerNamespace" inType="win:UnicodeString" />
<data name="CallerName" inType="win:UnicodeString" />
<data name="CallerNameSignature" inType="win:UnicodeString" />
<data name="CalleeNamespace" inType="win:UnicodeString" />
<data name="CalleeName" inType="win:UnicodeString" />
<data name="CalleeNameSignature" inType="win:UnicodeString" />
<data name="TailPrefix" inType="win:Boolean" />
<data name="FailReason" inType="win:AnsiString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitTailCallFailedAnsi xmlns="myNs">
<MethodBeingCompiledNamespace> %1 </MethodBeingCompiledNamespace>
<MethodBeingCompiledName> %2 </MethodBeingCompiledName>
<MethodBeingCompiledNameSignature> %3 </MethodBeingCompiledNameSignature>
<CallerNamespace> %4 </CallerNamespace>
<CallerName> %5 </CallerName>
<CallerNameSignature> %6 </CallerNameSignature>
<CalleeNamespace> %7 </CalleeNamespace>
<CalleeName> %8 </CalleeName>
<CalleeNameSignature> %9 </CalleeNameSignature>
<TailPrefix> %10 </TailPrefix>
<FailReason> %11 </FailReason>
<ClrInstanceID> %12 </ClrInstanceID>
</MethodJitTailCallFailedAnsi>
</UserData>
</template>
<template tid="MethodJitMemoryAllocatedForCode">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="JitHotCodeRequestSize" inType="win:UInt64" />
<data name="JitRODataRequestSize" inType="win:UInt64" />
<data name="AllocatedSizeForJitCode" inType="win:UInt64" />
<data name="JitAllocFlag" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodJitMemoryAllocatedForCode xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<JitHotCodeRequestSize> %3 </JitHotCodeRequestSize>
<JitRODataRequestSize> %4 </JitRODataRequestSize>
<AllocatedSizeForJitCode> %5 </AllocatedSizeForJitCode>
<JitAllocFlag> %6 </JitAllocFlag>
<ClrInstanceID> %7 </ClrInstanceID>
</MethodJitMemoryAllocatedForCode>
</UserData>
</template>
<template tid="MethodILToNativeMap">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodExtent" inType="win:UInt8" />
<data name="CountOfMapEntries" inType="win:UInt16" />
<data name="ILOffsets" count="CountOfMapEntries" inType="win:UInt32" />
<data name="NativeOffsets" count="CountOfMapEntries" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodILToNativeMap xmlns="myNs">
<MethodID> %1 </MethodID>
<ReJITID> %2 </ReJITID>
<MethodExtent> %3 </MethodExtent>
<CountOfMapEntries> %4 </CountOfMapEntries>
<ClrInstanceID> %5 </ClrInstanceID>
</MethodILToNativeMap>
</UserData>
</template>
<template tid="ClrStackWalk">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Reserved1" inType="win:UInt8" />
<data name="Reserved2" inType="win:UInt8" />
<data name="FrameCount" inType="win:UInt32" />
<data name="Stack" count="2" inType="win:Pointer" />
</template>
<template tid="AppDomainMemAllocated">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Allocated" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AppDomainMemAllocated xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<Allocated> %2 </Allocated>
<ClrInstanceID> %3 </ClrInstanceID>
</AppDomainMemAllocated>
</UserData>
</template>
<template tid="AppDomainMemSurvived">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Survived" inType="win:UInt64" outType="win:HexInt64" />
<data name="ProcessSurvived" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AppDomainMemSurvived xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<Survived> %2 </Survived>
<ProcessSurvived> %3 </ProcessSurvived>
<ClrInstanceID> %4 </ClrInstanceID>
</AppDomainMemSurvived>
</UserData>
</template>
<template tid="ThreadCreated">
<data name="ManagedThreadID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Flags" inType="win:UInt32" map="ThreadFlagsMap" />
<data name="ManagedThreadIndex" inType="win:UInt32" />
<data name="OSThreadID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadCreated xmlns="myNs">
<ManagedThreadID> %1 </ManagedThreadID>
<AppDomainID> %2 </AppDomainID>
<Flags> %3 </Flags>
<ManagedThreadIndex> %4 </ManagedThreadIndex>
<OSThreadID> %5 </OSThreadID>
<ClrInstanceID> %6 </ClrInstanceID>
</ThreadCreated>
</UserData>
</template>
<template tid="ThreadTerminatedOrTransition">
<data name="ManagedThreadID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadTerminatedOrTransition xmlns="myNs">
<ManagedThreadID> %1 </ManagedThreadID>
<AppDomainID> %2 </AppDomainID>
<ClrInstanceID> %3 </ClrInstanceID>
</ThreadTerminatedOrTransition>
</UserData>
</template>
<template tid="ILStubGenerated">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="StubMethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="StubFlags" inType="win:UInt32" map="ILStubGeneratedFlagsMap" />
<data name="ManagedInteropMethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="ManagedInteropMethodNamespace" inType="win:UnicodeString" />
<data name="ManagedInteropMethodName" inType="win:UnicodeString" />
<data name="ManagedInteropMethodSignature" inType="win:UnicodeString" />
<data name="NativeMethodSignature" inType="win:UnicodeString" />
<data name="StubMethodSignature" inType="win:UnicodeString" />
<data name="StubMethodILCode" inType="win:UnicodeString" />
<UserData>
<ILStubGenerated xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<StubMethodID> %3 </StubMethodID>
<StubFlags> %4 </StubFlags>
<ManagedInteropMethodToken> %5 </ManagedInteropMethodToken>
<ManagedInteropMethodNamespace> %6 </ManagedInteropMethodNamespace>
<ManagedInteropMethodName> %7 </ManagedInteropMethodName>
<ManagedInteropMethodSignature> %8 </ManagedInteropMethodSignature>
<NativeMethodSignature> %9 </NativeMethodSignature>
<StubMethodSignature> %10 </StubMethodSignature>
<StubMethodILCode> %11 </StubMethodILCode>
</ILStubGenerated>
</UserData>
</template>
<template tid="ILStubCacheHit">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="StubMethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ManagedInteropMethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="ManagedInteropMethodNamespace" inType="win:UnicodeString" />
<data name="ManagedInteropMethodName" inType="win:UnicodeString" />
<data name="ManagedInteropMethodSignature" inType="win:UnicodeString" />
<UserData>
<ILStubCacheHit xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<StubMethodID> %3 </StubMethodID>
<ManagedInteropMethodToken> %4 </ManagedInteropMethodToken>
<ManagedInteropMethodNamespace> %5 </ManagedInteropMethodNamespace>
<ManagedInteropMethodName> %6 </ManagedInteropMethodName>
<ManagedInteropMethodSignature> %7 </ManagedInteropMethodSignature>
</ILStubCacheHit>
</UserData>
</template>
<template tid="ModuleRange">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64"/>
<data name="RangeBegin" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeSize" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeType" map="ModuleRangeTypeMap" inType="win:UInt8"/>
<UserData>
<ModuleRange xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<RangeBegin> %3 </RangeBegin>
<RangeSize> %4 </RangeSize>
<RangeType> %5 </RangeType>
</ModuleRange>
</UserData>
</template>
<template tid="BulkType">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeNameID" inType="win:UInt32" />
<data name="Flags" inType="win:UInt32" map="TypeFlagsMap"/>
<data name="CorElementType" inType="win:UInt8" />
<data name="Name" inType="win:UnicodeString" />
<data name="TypeParameterCount" inType="win:UInt32" />
<data name="TypeParameters" count="TypeParameterCount" inType="win:UInt64" outType="win:HexInt64" />
</struct>
<UserData>
<Type xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</Type>
</UserData>
</template>
<template tid="GCBulkRootEdge">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="RootedNodeAddress" inType="win:Pointer" />
<data name="GCRootKind" inType="win:UInt8" map="GCRootKindMap" />
<data name="GCRootFlag" inType="win:UInt32" map="GCRootFlagsMap" />
<data name="GCRootID" inType="win:Pointer" />
</struct>
<UserData>
<GCBulkRootEdge xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkRootEdge>
</UserData>
</template>
<template tid="GCBulkRootCCW">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="GCRootID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="IUnknown" inType="win:UInt64" outType="win:HexInt64" />
<data name="RefCount" inType="win:UInt32"/>
<data name="PeggedRefCount" inType="win:UInt32"/>
<data name="Flags" inType="win:UInt32" map="GCRootCCWFlagsMap"/>
</struct>
<UserData>
<Type xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</Type>
</UserData>
</template>
<template tid="GCBulkRCW">
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="ObjectID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="IUnknown" inType="win:UInt64" outType="win:HexInt64" />
<data name="VTable" inType="win:UInt64" outType="win:HexInt64" />
<data name="RefCount" inType="win:UInt32"/>
<data name="Flags" inType="win:UInt32"/>
</struct>
<UserData>
<Type xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</Type>
</UserData>
</template>
<template tid="GCBulkRootStaticVar">
<data name="Count" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="GCRootID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Flags" inType="win:UInt32" map="GCRootStaticVarFlagsMap" />
<data name="FieldName" inType="win:UnicodeString" />
</struct>
<UserData>
<Type xmlns="myNs">
<Count> %1 </Count>
<ClrInstanceID> %2 </ClrInstanceID>
</Type>
</UserData>
</template>
<template tid="GCBulkRootConditionalWeakTableElementEdge">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="GCKeyNodeID" inType="win:Pointer" />
<data name="GCValueNodeID" inType="win:Pointer" />
<data name="GCRootID" inType="win:Pointer" />
</struct>
<UserData>
<GCBulkRootConditionalWeakTableElementEdge xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkRootConditionalWeakTableElementEdge>
</UserData>
</template>
<template tid="GCBulkNode">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="Address" inType="win:Pointer" />
<data name="Size" inType="win:UInt64" />
<data name="TypeID" inType="win:UInt64" />
<data name="EdgeCount" inType="win:UInt64" />
</struct>
<UserData>
<GCBulkNode xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkNode>
</UserData>
</template>
<template tid="GCBulkEdge">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="Value" inType="win:Pointer" outType="win:HexInt64" />
<data name="ReferencingFieldID" inType="win:UInt32" />
</struct>
<UserData>
<GCBulkEdge xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkEdge>
</UserData>
</template>
<template tid="GCSampledObjectAllocation">
<data name="Address" inType="win:Pointer" />
<data name="TypeID" inType="win:Pointer" />
<data name="ObjectCountForTypeSample" inType="win:UInt32" />
<data name="TotalSizeForTypeSample" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCSampledObjectAllocation xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Address> %2 </Address>
<TypeID> %3 </TypeID>
<ObjectCountForTypeSample> %4 </ObjectCountForTypeSample>
<TotalSizeForTypeSample> %5 </TotalSizeForTypeSample>
</GCSampledObjectAllocation>
</UserData>
</template>
<template tid="GCBulkSurvivingObjectRanges">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="RangeBase" inType="win:Pointer" outType="win:HexInt64" />
<data name="RangeLength" inType="win:UInt64" />
</struct>
<UserData>
<GCBulkSurvivingObjectRanges xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkSurvivingObjectRanges>
</UserData>
</template>
<template tid="GCBulkMovedObjectRanges">
<data name="Index" inType="win:UInt32" />
<data name="Count" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<struct name="Values" count="Count" >
<data name="OldRangeBase" inType="win:Pointer" outType="win:HexInt64" />
<data name="NewRangeBase" inType="win:Pointer" outType="win:HexInt64" />
<data name="RangeLength" inType="win:UInt64" />
</struct>
<UserData>
<GCBulkMovedObjectRanges xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Index> %2 </Index>
<Count> %3 </Count>
</GCBulkMovedObjectRanges>
</UserData>
</template>
<template tid="GCGenerationRange">
<data name="Generation" inType="win:UInt8" />
<data name="RangeStart" inType="win:Pointer" outType="win:HexInt64" />
<data name="RangeUsedLength" inType="win:UInt64" />
<data name="RangeReservedLength" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCGenerationRange xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Generation> %2 </Generation>
<RangeStart> %3 </RangeStart>
<RangeUsedLength> %4 </RangeUsedLength>
<RangeReservedLength> %5 </RangeReservedLength>
</GCGenerationRange>
</UserData>
</template>
<template tid="CodeSymbols">
<data name="ModuleId" inType="win:UInt64" />
<data name="TotalChunks" inType="win:UInt16" />
<data name="ChunkNumber" inType="win:UInt16" />
<data name="ChunkLength" inType="win:UInt32" />
<data name="Chunk" inType="win:Binary" length="ChunkLength"/>
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<CodeSymbols xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleId> %2 </ModuleId>
<TotalChunks> %3 </TotalChunks>
<ChunkNumber> %4 </ChunkNumber>
<ChunkLength> %5 </ChunkLength>
<Chunk> %6 </Chunk>
</CodeSymbols>
</UserData>
</template>
<template tid="TieredCompilationEmpty">
<data name="ClrInstanceID" inType="win:UInt16"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</Settings>
</UserData>
</template>
<template tid="TieredCompilationSettings">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="Flags" inType="win:UInt32" outType="win:HexInt32" map="TieredCompilationSettingsFlagsMap"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Flags> %2 </Flags>
</Settings>
</UserData>
</template>
<template tid="TieredCompilationResume">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="NewMethodCount" inType="win:UInt32"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<NewMethodCount> %2 </NewMethodCount>
</Settings>
</UserData>
</template>
<template tid="TieredCompilationBackgroundJitStart">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="PendingMethodCount" inType="win:UInt32"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<PendingMethodCount> %2 </PendingMethodCount>
</Settings>
</UserData>
</template>
<template tid="TieredCompilationBackgroundJitStop">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="PendingMethodCount" inType="win:UInt32"/>
<data name="JittedMethodCount" inType="win:UInt32"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<PendingMethodCount> %2 </PendingMethodCount>
<JittedMethodCount> %2 </JittedMethodCount>
</Settings>
</UserData>
</template>
<template tid="JitInstrumentationData">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="MethodFlags" inType="win:UInt32" />
<data name="DataSize" inType="win:UInt32" />
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Data" inType="win:Binary" length="DataSize" />
<UserData>
<Settings xmlns="myNs">
<MethodID> %4 </MethodID>
</Settings>
</UserData>
</template>
<template tid="JitInstrumentationDataVerbose">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="MethodFlags" inType="win:UInt32" />
<data name="DataSize" inType="win:UInt32" />
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="Data" inType="win:Binary" length="DataSize" />
<UserData>
<Settings xmlns="myNs">
<MethodID> %4 </MethodID>
<ModuleID> %5 </ModuleID>
<MethodToken> %6 </MethodToken>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
</Settings>
</UserData>
</template>
<template tid="ExecutionCheckpoint">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Name" inType="win:UnicodeString" />
<data name="Timestamp" inType="win:Int64" />
<UserData>
<ExecutionCheckpoint xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Name> %2 </Name>
<Timestamp> %3 </Timestamp>
</ExecutionCheckpoint>
</UserData>
</template>
<template tid="ProfilerMessage">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="Message" inType="win:UnicodeString" />
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Message> %2 </Message>
</Settings>
</UserData>
</template>
<template tid="YieldProcessorMeasurement">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="NsPerYield" inType="win:Double"/>
<data name="EstablishedNsPerYield" inType="win:Double"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<NsPerYield> %2 </NsPerYield>
<EstablishedNsPerYield> %3 </EstablishedNsPerYield>
</Settings>
</UserData>
</template>
</templates>
<events>
<!-- CLR GC events, value reserved from 0 to 39 and 200 to 239 -->
<!-- Note the opcode's for GC events do include 0 to 9 for backward compatibility, even though
they don't mean what those predefined opcodes are supposed to mean -->
<event value="1" version="0" level="win:Informational" template="GCStart"
keywords="GCKeyword" opcode="win:Start"
task="GarbageCollection"
symbol="GCStart" message="$(string.RuntimePublisher.GCStartEventMessage)"/>
<event value="1" version="1" level="win:Informational" template="GCStart_V1"
keywords="GCKeyword" opcode="win:Start"
task="GarbageCollection"
symbol="GCStart_V1" message="$(string.RuntimePublisher.GCStart_V1EventMessage)"/>
<event value="1" version="2" level="win:Informational" template="GCStart_V2"
keywords="GCKeyword" opcode="win:Start"
task="GarbageCollection"
symbol="GCStart_V2" message="$(string.RuntimePublisher.GCStart_V2EventMessage)"/>
<event value="2" version="0" level="win:Informational" template="GCEnd"
keywords="GCKeyword" opcode="win:Stop"
task="GarbageCollection"
symbol="GCEnd" message="$(string.RuntimePublisher.GCEndEventMessage)"/>
<event value="2" version="1" level="win:Informational" template="GCEnd_V1"
keywords ="GCKeyword" opcode="win:Stop"
task="GarbageCollection"
symbol="GCEnd_V1" message="$(string.RuntimePublisher.GCEnd_V1EventMessage)"/>
<event value="3" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCRestartEEEnd"
task="GarbageCollection"
symbol="GCRestartEEEnd" message="$(string.RuntimePublisher.GCRestartEEEndEventMessage)"/>
<event value="3" version="1" level="win:Informational" template="GCNoUserData"
keywords ="GCKeyword" opcode="GCRestartEEEnd"
task="GarbageCollection"
symbol="GCRestartEEEnd_V1" message="$(string.RuntimePublisher.GCRestartEEEnd_V1EventMessage)"/>
<event value="4" version="0" level="win:Informational" template="GCHeapStats"
keywords ="GCKeyword" opcode="GCHeapStats"
task="GarbageCollection"
symbol="GCHeapStats" message="$(string.RuntimePublisher.GCHeapStatsEventMessage)"/>
<event value="4" version="1" level="win:Informational" template="GCHeapStats_V1"
keywords ="GCKeyword" opcode="GCHeapStats"
task="GarbageCollection"
symbol="GCHeapStats_V1" message="$(string.RuntimePublisher.GCHeapStats_V1EventMessage)"/>
<event value="4" version="2" level="win:Informational" template="GCHeapStats_V2"
keywords ="GCKeyword" opcode="GCHeapStats"
task="GarbageCollection"
symbol="GCHeapStats_V2" message="$(string.RuntimePublisher.GCHeapStats_V2EventMessage)"/>
<event value="5" version="0" level="win:Informational" template="GCCreateSegment"
keywords ="GCKeyword" opcode="GCCreateSegment"
task="GarbageCollection"
symbol="GCCreateSegment" message="$(string.RuntimePublisher.GCCreateSegmentEventMessage)"/>
<event value="5" version="1" level="win:Informational" template="GCCreateSegment_V1"
keywords ="GCKeyword" opcode="GCCreateSegment"
task="GarbageCollection"
symbol="GCCreateSegment_V1" message="$(string.RuntimePublisher.GCCreateSegment_V1EventMessage)"/>
<event value="6" version="0" level="win:Informational" template="GCFreeSegment"
keywords ="GCKeyword" opcode="GCFreeSegment"
task="GarbageCollection"
symbol="GCFreeSegment" message="$(string.RuntimePublisher.GCFreeSegmentEventMessage)"/>
<event value="6" version="1" level="win:Informational" template="GCFreeSegment_V1"
keywords ="GCKeyword" opcode="GCFreeSegment"
task="GarbageCollection"
symbol="GCFreeSegment_V1" message="$(string.RuntimePublisher.GCFreeSegment_V1EventMessage)"/>
<event value="7" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCRestartEEBegin"
task="GarbageCollection"
symbol="GCRestartEEBegin" message="$(string.RuntimePublisher.GCRestartEEBeginEventMessage)"/>
<event value="7" version="1" level="win:Informational" template="GCNoUserData"
keywords ="GCKeyword" opcode="GCRestartEEBegin"
task="GarbageCollection"
symbol="GCRestartEEBegin_V1" message="$(string.RuntimePublisher.GCRestartEEBegin_V1EventMessage)"/>
<event value="8" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCSuspendEEEnd"
task="GarbageCollection"
symbol="GCSuspendEEEnd" message="$(string.RuntimePublisher.GCSuspendEEEndEventMessage)"/>
<event value="8" version="1" level="win:Informational" template="GCNoUserData"
keywords ="GCKeyword" opcode="GCSuspendEEEnd"
task="GarbageCollection"
symbol="GCSuspendEEEnd_V1" message="$(string.RuntimePublisher.GCSuspendEEEnd_V1EventMessage)"/>
<event value="9" version="0" level="win:Informational" template="GCSuspendEE"
keywords ="GCKeyword" opcode="GCSuspendEEBegin"
task="GarbageCollection"
symbol="GCSuspendEEBegin" message="$(string.RuntimePublisher.GCSuspendEEEventMessage)"/>
<event value="9" version="1" level="win:Informational" template="GCSuspendEE_V1"
keywords ="GCKeyword" opcode="GCSuspendEEBegin"
task="GarbageCollection"
symbol="GCSuspendEEBegin_V1" message="$(string.RuntimePublisher.GCSuspendEE_V1EventMessage)"/>
<event value="10" version="0" level="win:Verbose" template="GCAllocationTick"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick" message="$(string.RuntimePublisher.GCAllocationTickEventMessage)"/>
<event value="10" version="1" level="win:Verbose" template="GCAllocationTick_V1"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick_V1" message="$(string.RuntimePublisher.GCAllocationTick_V1EventMessage)"/>
<event value="10" version="2" level="win:Verbose" template="GCAllocationTick_V2"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick_V2" message="$(string.RuntimePublisher.GCAllocationTick_V2EventMessage)"/>
<event value="10" version="3" level="win:Verbose" template="GCAllocationTick_V3"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick_V3" message="$(string.RuntimePublisher.GCAllocationTick_V3EventMessage)"/>
<event value="10" version="4" level="win:Verbose" template="GCAllocationTick_V4"
keywords="GCKeyword" opcode="GCAllocationTick"
task="GarbageCollection"
symbol="GCAllocationTick_V4" message="$(string.RuntimePublisher.GCAllocationTick_V4EventMessage)"/>
<event value="11" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCCreateConcurrentThread"
task="GarbageCollection"
symbol="GCCreateConcurrentThread" message="$(string.RuntimePublisher.GCCreateConcurrentThreadEventMessage)"/>
<event value="11" version="1" level="win:Informational" template="GCCreateConcurrentThread"
keywords ="GCKeyword ThreadingKeyword" opcode="GCCreateConcurrentThread"
task="GarbageCollection"
symbol="GCCreateConcurrentThread_V1" message="$(string.RuntimePublisher.GCCreateConcurrentThread_V1EventMessage)"/>
<event value="12" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCTerminateConcurrentThread"
task="GarbageCollection"
symbol="GCTerminateConcurrentThread" message="$(string.RuntimePublisher.GCTerminateConcurrentThreadEventMessage)"/>
<event value="12" version="1" level="win:Informational" template="GCTerminateConcurrentThread"
keywords ="GCKeyword ThreadingKeyword" opcode="GCTerminateConcurrentThread"
task="GarbageCollection"
symbol="GCTerminateConcurrentThread_V1" message="$(string.RuntimePublisher.GCTerminateConcurrentThread_V1EventMessage)"/>
<event value="13" version="0" level="win:Informational" template="GCFinalizersEnd"
keywords ="GCKeyword" opcode="GCFinalizersEnd"
task="GarbageCollection"
symbol="GCFinalizersEnd" message="$(string.RuntimePublisher.GCFinalizersEndEventMessage)"/>
<event value="13" version="1" level="win:Informational" template="GCFinalizersEnd_V1"
keywords ="GCKeyword" opcode="GCFinalizersEnd"
task="GarbageCollection"
symbol="GCFinalizersEnd_V1" message="$(string.RuntimePublisher.GCFinalizersEnd_V1EventMessage)"/>
<event value="14" version="0" level="win:Informational"
keywords ="GCKeyword" opcode="GCFinalizersBegin"
task="GarbageCollection"
symbol="GCFinalizersBegin" message="$(string.RuntimePublisher.GCFinalizersBeginEventMessage)"/>
<event value="14" version="1" level="win:Informational" template="GCNoUserData"
keywords ="GCKeyword" opcode="GCFinalizersBegin"
task="GarbageCollection"
symbol="GCFinalizersBegin_V1" message="$(string.RuntimePublisher.GCFinalizersBegin_V1EventMessage)"/>
<event value="15" version="0" level="win:Informational" template="BulkType"
keywords ="TypeKeyword" opcode="BulkType"
task="Type"
symbol="BulkType" message="$(string.RuntimePublisher.BulkTypeEventMessage)"/>
<event value="16" version="0" level="win:Informational" template="GCBulkRootEdge"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRootEdge"
task="GarbageCollection"
symbol="GCBulkRootEdge" message="$(string.RuntimePublisher.GCBulkRootEdgeEventMessage)"/>
<event value="17" version="0" level="win:Informational" template="GCBulkRootConditionalWeakTableElementEdge"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRootConditionalWeakTableElementEdge"
task="GarbageCollection"
symbol="GCBulkRootConditionalWeakTableElementEdge" message="$(string.RuntimePublisher.GCBulkRootConditionalWeakTableElementEdgeEventMessage)"/>
<event value="18" version="0" level="win:Informational" template="GCBulkNode"
keywords ="GCHeapDumpKeyword" opcode="GCBulkNode"
task="GarbageCollection"
symbol="GCBulkNode" message="$(string.RuntimePublisher.GCBulkNodeEventMessage)"/>
<event value="19" version="0" level="win:Informational" template="GCBulkEdge"
keywords ="GCHeapDumpKeyword" opcode="GCBulkEdge"
task="GarbageCollection"
symbol="GCBulkEdge" message="$(string.RuntimePublisher.GCBulkEdgeEventMessage)"/>
<event value="20" version="0" level="win:Informational" template="GCSampledObjectAllocation"
keywords ="GCSampledObjectAllocationHighKeyword" opcode="GCSampledObjectAllocation"
task="GarbageCollection"
symbol="GCSampledObjectAllocationHigh" message="$(string.RuntimePublisher.GCSampledObjectAllocationHighEventMessage)"/>
<event value="21" version="0" level="win:Informational" template="GCBulkSurvivingObjectRanges"
keywords ="GCHeapSurvivalAndMovementKeyword" opcode="GCBulkSurvivingObjectRanges"
task="GarbageCollection"
symbol="GCBulkSurvivingObjectRanges" message="$(string.RuntimePublisher.GCBulkSurvivingObjectRangesEventMessage)"/>
<event value="22" version="0" level="win:Informational" template="GCBulkMovedObjectRanges"
keywords ="GCHeapSurvivalAndMovementKeyword" opcode="GCBulkMovedObjectRanges"
task="GarbageCollection"
symbol="GCBulkMovedObjectRanges" message="$(string.RuntimePublisher.GCBulkMovedObjectRangesEventMessage)"/>
<event value="23" version="0" level="win:Informational" template="GCGenerationRange"
keywords ="GCHeapSurvivalAndMovementKeyword" opcode="GCGenerationRange"
task="GarbageCollection"
symbol="GCGenerationRange" message="$(string.RuntimePublisher.GCGenerationRangeEventMessage)"/>
<event value="25" version="0" level="win:Informational" template="GCMark"
keywords ="GCKeyword" opcode="GCMarkStackRoots"
task="GarbageCollection"
symbol="GCMarkStackRoots" message="$(string.RuntimePublisher.GCMarkStackRootsEventMessage)"/>
<event value="26" version="0" level="win:Informational" template="GCMark"
keywords ="GCKeyword" opcode="GCMarkFinalizeQueueRoots"
task="GarbageCollection"
symbol="GCMarkFinalizeQueueRoots" message="$(string.RuntimePublisher.GCMarkFinalizeQueueRootsEventMessage)"/>
<event value="27" version="0" level="win:Informational" template="GCMark"
keywords ="GCKeyword" opcode="GCMarkHandles"
task="GarbageCollection"
symbol="GCMarkHandles" message="$(string.RuntimePublisher.GCMarkHandlesEventMessage)"/>
<event value="28" version="0" level="win:Informational" template="GCMark"
keywords ="GCKeyword" opcode="GCMarkOlderGenerationRoots"
task="GarbageCollection"
symbol="GCMarkOlderGenerationRoots" message="$(string.RuntimePublisher.GCMarkOlderGenerationRootsEventMessage)"/>
<event value="29" version="0" level="win:Verbose" template="FinalizeObject"
keywords ="GCKeyword"
opcode="FinalizeObject"
task="GarbageCollection"
symbol="FinalizeObject" message="$(string.RuntimePublisher.FinalizeObjectEventMessage)"/>
<event value="30" version="0" level="win:Informational" template="SetGCHandle"
keywords="GCHandleKeyword"
opcode="SetGCHandle"
task="GarbageCollection"
symbol="SetGCHandle" message="$(string.RuntimePublisher.SetGCHandleEventMessage)"/>
<event value="31" version="0" level="win:Informational" template="DestroyGCHandle"
keywords="GCHandleKeyword"
opcode="DestroyGCHandle"
task="GarbageCollection"
symbol="DestroyGCHandle" message="$(string.RuntimePublisher.DestroyGCHandleEventMessage)"/>
<event value="32" version="0" level="win:Informational" template="GCSampledObjectAllocation"
keywords ="GCSampledObjectAllocationLowKeyword" opcode="GCSampledObjectAllocation"
task="GarbageCollection"
symbol="GCSampledObjectAllocationLow" message="$(string.RuntimePublisher.GCSampledObjectAllocationLowEventMessage)"/>
<event value="33" version="0" level="win:Verbose" template="PinObjectAtGCTime"
keywords="GCKeyword"
opcode="PinObjectAtGCTime"
task="GarbageCollection"
symbol="PinObjectAtGCTime" message="$(string.RuntimePublisher.PinObjectAtGCTimeEventMessage)"/>
<event value="35" version="0" level="win:Informational" template="GCTriggered"
keywords="GCKeyword" opcode="Triggered"
task="GarbageCollection"
symbol="GCTriggered" message="$(string.RuntimePublisher.GCTriggeredEventMessage)"/>
<event value="36" version="0" level="win:Informational" template="GCBulkRootCCW"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRootCCW"
task="GarbageCollection"
symbol="GCBulkRootCCW" message="$(string.RuntimePublisher.GCBulkRootCCWEventMessage)"/>
<event value="37" version="0" level="win:Informational" template="GCBulkRCW"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRCW"
task="GarbageCollection"
symbol="GCBulkRCW" message="$(string.RuntimePublisher.GCBulkRCWEventMessage)"/>
<event value="38" version="0" level="win:Informational" template="GCBulkRootStaticVar"
keywords ="GCHeapDumpKeyword" opcode="GCBulkRootStaticVar"
task="GarbageCollection"
symbol="GCBulkRootStaticVar" message="$(string.RuntimePublisher.GCBulkRootStaticVarEventMessage)"/>
<event value="39" version="0" level="win:LogAlways" template="GCDynamicEvent"
keywords= "GCKeyword GCHandleKeyword GCHeapDumpKeyword GCSampledObjectAllocationHighKeyword GCHeapSurvivalAndMovementKeyword GCHeapCollectKeyword GCHeapAndTypeNamesKeyword GCSampledObjectAllocationLowKeyword"
opcode="GCDynamicEvent"
task="GarbageCollection"
symbol="GCDynamicEvent"/>
<!-- CLR Threading events, value reserved from 40 to 79 -->
<event value="40" version="0" level="win:Informational" template="ClrWorkerThread"
keywords="ThreadingKeyword" opcode="win:Start"
task="WorkerThreadCreation"
symbol="WorkerThreadCreate" message="$(string.RuntimePublisher.WorkerThreadCreateEventMessage)"/>
<event value="41" version="0" level="win:Informational" template="ClrWorkerThread"
keywords="ThreadingKeyword" opcode="win:Stop"
task="WorkerThreadCreation"
symbol="WorkerThreadTerminate" message="$(string.RuntimePublisher.WorkerThreadTerminateEventMessage)"/>
<event value="42" version="0" level="win:Informational" template="ClrWorkerThread"
keywords="ThreadingKeyword" opcode="win:Start"
task="WorkerThreadRetirement"
symbol="WorkerThreadRetire" message="$(string.RuntimePublisher.WorkerThreadRetirementRetireThreadEventMessage)"/>
<event value="43" version="0" level="win:Informational" template="ClrWorkerThread"
keywords="ThreadingKeyword" opcode="win:Stop"
task="WorkerThreadRetirement"
symbol="WorkerThreadUnretire" message="$(string.RuntimePublisher.WorkerThreadRetirementUnretireThreadEventMessage)"/>
<event value="44" version="0" level="win:Informational" template="IOThread"
keywords="ThreadingKeyword" opcode="win:Start"
task="IOThreadCreation"
symbol="IOThreadCreate" message="$(string.RuntimePublisher.IOThreadCreateEventMessage)"/>
<event value="44" version="1" level="win:Informational" template="IOThread_V1"
keywords="ThreadingKeyword" opcode="win:Start"
task="IOThreadCreation"
symbol="IOThreadCreate_V1" message="$(string.RuntimePublisher.IOThreadCreate_V1EventMessage)"/>
<event value="45" version="0" level="win:Informational" template="IOThread"
keywords="ThreadingKeyword" opcode="win:Stop"
task="IOThreadCreation"
symbol="IOThreadTerminate" message="$(string.RuntimePublisher.IOThreadTerminateEventMessage)"/>
<event value="45" version="1" level="win:Informational" template="IOThread_V1"
keywords="ThreadingKeyword" opcode="win:Stop"
task="IOThreadCreation"
symbol="IOThreadTerminate_V1" message="$(string.RuntimePublisher.IOThreadTerminate_V1EventMessage)"/>
<event value="46" version="0" level="win:Informational" template="IOThread"
keywords="ThreadingKeyword" opcode="win:Start"
task="IOThreadRetirement"
symbol="IOThreadRetire" message="$(string.RuntimePublisher.IOThreadRetirementRetireThreadEventMessage)"/>
<event value="46" version="1" level="win:Informational" template="IOThread_V1"
keywords="ThreadingKeyword" opcode="win:Start"
task="IOThreadRetirement"
symbol="IOThreadRetire_V1" message="$(string.RuntimePublisher.IOThreadRetirementRetireThread_V1EventMessage)"/>
<event value="47" version="0" level="win:Informational" template="IOThread"
keywords="ThreadingKeyword" opcode="win:Stop"
task="IOThreadRetirement"
symbol="IOThreadUnretire" message="$(string.RuntimePublisher.IOThreadRetirementUnretireThreadEventMessage)"/>
<event value="47" version="1" level="win:Informational" template="IOThread_V1"
keywords="ThreadingKeyword" opcode="win:Stop"
task="IOThreadRetirement"
symbol="IOThreadUnretire_V1" message="$(string.RuntimePublisher.IOThreadRetirementUnretireThread_V1EventMessage)"/>
<event value="48" version="0" level="win:Informational" template="ClrThreadPoolSuspend"
keywords ="ThreadingKeyword" opcode="win:Start"
task="ThreadpoolSuspension"
symbol="ThreadpoolSuspensionSuspendThread" message="$(string.RuntimePublisher.ThreadPoolSuspendSuspendThreadEventMessage)"/>
<event value="49" version="0" level="win:Informational" template="ClrThreadPoolSuspend"
keywords ="ThreadingKeyword" opcode="win:Stop"
task="ThreadpoolSuspension"
symbol="ThreadpoolSuspensionResumeThread" message="$(string.RuntimePublisher.ThreadPoolSuspendResumeThreadEventMessage)"/>
<event value="50" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="win:Start"
task="ThreadPoolWorkerThread"
symbol="ThreadPoolWorkerThreadStart" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="51" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="win:Stop"
task="ThreadPoolWorkerThread"
symbol="ThreadPoolWorkerThreadStop" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="52" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="win:Start"
task="ThreadPoolWorkerThreadRetirement"
symbol="ThreadPoolWorkerThreadRetirementStart" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="53" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="win:Stop"
task="ThreadPoolWorkerThreadRetirement"
symbol="ThreadPoolWorkerThreadRetirementStop" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="54" version="0" level="win:Informational" template="ThreadPoolWorkerThreadAdjustmentSample"
keywords ="ThreadingKeyword" opcode="Sample"
task="ThreadPoolWorkerThreadAdjustment"
symbol="ThreadPoolWorkerThreadAdjustmentSample" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadAdjustmentSampleEventMessage)"/>
<event value="55" version="0" level="win:Informational" template="ThreadPoolWorkerThreadAdjustmentAdjustment"
keywords ="ThreadingKeyword" opcode="Adjustment"
task="ThreadPoolWorkerThreadAdjustment"
symbol="ThreadPoolWorkerThreadAdjustmentAdjustment" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadAdjustmentAdjustmentEventMessage)"/>
<event value="56" version="0" level="win:Verbose" template="ThreadPoolWorkerThreadAdjustmentStats"
keywords ="ThreadingKeyword" opcode="Stats"
task="ThreadPoolWorkerThreadAdjustment"
symbol="ThreadPoolWorkerThreadAdjustmentStats" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadAdjustmentStatsEventMessage)"/>
<event value="57" version="0" level="win:Informational" template="ThreadPoolWorkerThread"
keywords ="ThreadingKeyword" opcode="Wait"
task="ThreadPoolWorkerThread"
symbol="ThreadPoolWorkerThreadWait" message="$(string.RuntimePublisher.ThreadPoolWorkerThreadEventMessage)"/>
<event value="58" version="0" level="win:Informational" template="YieldProcessorMeasurement"
keywords="ThreadingKeyword" task="YieldProcessorMeasurement" opcode="win:Info"
symbol="YieldProcessorMeasurement" message="$(string.RuntimePublisher.YieldProcessorMeasurementEventMessage)"/>
<!-- CLR private ThreadPool events -->
<event value="60" version="0" level="win:Verbose" template="ThreadPoolWorkingThreadCount"
keywords="ThreadingKeyword"
opcode="win:Start"
task="ThreadPoolWorkingThreadCount"
symbol="ThreadPoolWorkingThreadCount" message="$(string.RuntimePublisher.ThreadPoolWorkingThreadCountEventMessage)"/>
<event value="61" version="0" level="win:Verbose" template="ThreadPoolWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="ThreadPool"
opcode="Enqueue"
symbol="ThreadPoolEnqueue"
message="$(string.RuntimePublisher.ThreadPoolEnqueueEventMessage)"/>
<event value="62" version="0" level="win:Verbose" template="ThreadPoolWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="ThreadPool"
opcode="Dequeue"
symbol="ThreadPoolDequeue"
message="$(string.RuntimePublisher.ThreadPoolDequeueEventMessage)"/>
<event value="63" version="0" level="win:Verbose" template="ThreadPoolIOWorkEnqueue"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="ThreadPool"
opcode="IOEnqueue"
symbol="ThreadPoolIOEnqueue"
message="$(string.RuntimePublisher.ThreadPoolIOEnqueueEventMessage)"/>
<event value="64" version="0" level="win:Verbose" template="ThreadPoolIOWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="ThreadPool"
opcode="IODequeue"
symbol="ThreadPoolIODequeue"
message="$(string.RuntimePublisher.ThreadPoolIODequeueEventMessage)"/>
<event value="65" version="0" level="win:Verbose" template="ThreadPoolIOWork"
keywords="ThreadingKeyword"
task="ThreadPool"
opcode="IOPack"
symbol="ThreadPoolIOPack"
message="$(string.RuntimePublisher.ThreadPoolIOPackEventMessage)"/>
<event value="70" version="0" level="win:Informational" template="ThreadStartWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="Thread"
opcode="Creating"
symbol="ThreadCreating"
message="$(string.RuntimePublisher.ThreadCreatingEventMessage)"/>
<event value="71" version="0" level="win:Informational" template="ThreadStartWork"
keywords="ThreadingKeyword ThreadTransferKeyword"
task="Thread"
opcode="Running"
symbol="ThreadRunning"
message="$(string.RuntimePublisher.ThreadRunningEventMessage)"/>
<event value="72" version="0" level="win:Informational" template="MethodDetails"
keywords="MethodDiagnosticKeyword"
task="CLRMethod"
opcode="MethodDetails"
symbol="MethodDetails"
message="$(string.RuntimePublisher.MethodDetailsEventMessage)"/>
<event value="73" version="0" level="win:Informational" template="TypeLoadStart"
keywords="TypeDiagnosticKeyword"
task="TypeLoad"
opcode="win:Start"
symbol="TypeLoadStart"
message="$(string.RuntimePublisher.TypeLoadStartEventMessage)"/>
<event value="74" version="0" level="win:Informational" template="TypeLoadStop"
keywords="TypeDiagnosticKeyword"
task="TypeLoad"
opcode="win:Stop"
symbol="TypeLoadStop"
message="$(string.RuntimePublisher.TypeLoadStopEventMessage)"/>
<!-- CLR Exception events -->
<event value="80" version="0" level="win:Informational"
opcode="win:Start"
task="Exception"
symbol="ExceptionThrown" message="$(string.RuntimePublisher.ExceptionExceptionThrownEventMessage)"/>
<event value="80" version="1" level="win:Error" template="Exception"
keywords ="ExceptionKeyword MonitoringKeyword" opcode="win:Start"
task="Exception"
symbol="ExceptionThrown_V1" message="$(string.RuntimePublisher.ExceptionExceptionThrown_V1EventMessage)"/>
<event value="250" version="0" level="win:Informational" template="ExceptionHandling"
keywords ="ExceptionKeyword" opcode="win:Start"
task="ExceptionCatch"
symbol="ExceptionCatchStart" message="$(string.RuntimePublisher.ExceptionExceptionHandlingEventMessage)"/>
<event value="251" version="0" level="win:Informational"
keywords ="ExceptionKeyword" opcode="win:Stop"
task="ExceptionCatch"
symbol="ExceptionCatchStop" message="$(string.RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage)"/>
<event value="252" version="0" level="win:Informational" template="ExceptionHandling"
keywords ="ExceptionKeyword" opcode="win:Start"
task="ExceptionFinally"
symbol="ExceptionFinallyStart" message="$(string.RuntimePublisher.ExceptionExceptionHandlingEventMessage)"/>
<event value="253" version="0" level="win:Informational"
keywords ="ExceptionKeyword" opcode="win:Stop"
task="ExceptionFinally"
symbol="ExceptionFinallyStop" message="$(string.RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage)"/>
<event value="254" version="0" level="win:Informational" template="ExceptionHandling"
keywords ="ExceptionKeyword" opcode="win:Start"
task="ExceptionFilter"
symbol="ExceptionFilterStart" message="$(string.RuntimePublisher.ExceptionExceptionHandlingEventMessage)"/>
<event value="255" version="0" level="win:Informational"
keywords ="ExceptionKeyword" opcode="win:Stop"
task="ExceptionFilter"
symbol="ExceptionFilterStop" message="$(string.RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage)"/>
<event value="256" version="0" level="win:Informational"
keywords ="ExceptionKeyword" opcode="win:Stop"
task="Exception"
symbol="ExceptionThrownStop" message="$(string.RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage)"/>
<!-- CLR Contention events -->
<event value="81" version="0" level="win:Informational"
opcode="win:Start"
task="Contention"
symbol="Contention" message="$(string.RuntimePublisher.ContentionStartEventMessage)"/>
<event value="81" version="1" level="win:Informational" template="Contention"
keywords ="ContentionKeyword" opcode="win:Start"
task="Contention"
symbol="ContentionStart_V1" message="$(string.RuntimePublisher.ContentionStart_V1EventMessage)"/>
<event value="91" version="0" level="win:Informational" template="Contention"
keywords ="ContentionKeyword" opcode="win:Stop"
task="Contention"
symbol="ContentionStop" message="$(string.RuntimePublisher.ContentionStopEventMessage)"/>
<event value="91" version="1" level="win:Informational" template="ContentionStop_V1"
keywords ="ContentionKeyword" opcode="win:Stop"
task="Contention"
symbol="ContentionStop_V1" message="$(string.RuntimePublisher.ContentionStop_V1EventMessage)"/>
<!-- CLR Stack events -->
<event value="82" version="0" level="win:LogAlways" template="ClrStackWalk"
keywords ="StackKeyword" opcode="CLRStackWalk"
task="CLRStack"
symbol="CLRStackWalk" message="$(string.RuntimePublisher.StackEventMessage)"/>
<!-- CLR AppDomainResourceManagement events -->
<event value="83" version="0" level="win:Informational" template="AppDomainMemAllocated"
keywords ="AppDomainResourceManagementKeyword" opcode="AppDomainMemAllocated"
task="AppDomainResourceManagement"
symbol="AppDomainMemAllocated" message="$(string.RuntimePublisher.AppDomainMemAllocatedEventMessage)"/>
<event value="84" version="0" level="win:Informational" template="AppDomainMemSurvived"
keywords ="AppDomainResourceManagementKeyword" opcode="AppDomainMemSurvived"
task="AppDomainResourceManagement"
symbol="AppDomainMemSurvived" message="$(string.RuntimePublisher.AppDomainMemSurvivedEventMessage)"/>
<event value="85" version="0" level="win:Informational" template="ThreadCreated"
keywords ="AppDomainResourceManagementKeyword ThreadingKeyword" opcode="ThreadCreated"
task="AppDomainResourceManagement"
symbol="ThreadCreated" message="$(string.RuntimePublisher.ThreadCreatedEventMessage)"/>
<event value="86" version="0" level="win:Informational" template="ThreadTerminatedOrTransition"
keywords ="AppDomainResourceManagementKeyword ThreadingKeyword" opcode="ThreadTerminated"
task="AppDomainResourceManagement"
symbol="ThreadTerminated" message="$(string.RuntimePublisher.ThreadTerminatedEventMessage)"/>
<event value="87" version="0" level="win:Informational" template="ThreadTerminatedOrTransition"
keywords ="AppDomainResourceManagementKeyword ThreadingKeyword" opcode="ThreadDomainEnter"
task="AppDomainResourceManagement"
symbol="ThreadDomainEnter" message="$(string.RuntimePublisher.ThreadDomainEnterEventMessage)"/>
<!-- CLR Interop events -->
<event value="88" version="0" level="win:Informational" template="ILStubGenerated"
keywords ="InteropKeyword" opcode="ILStubGenerated"
task="CLRILStub"
symbol="ILStubGenerated" message="$(string.RuntimePublisher.ILStubGeneratedEventMessage)"/>
<event value="89" version="0" level="win:Informational" template="ILStubCacheHit"
keywords ="InteropKeyword" opcode="ILStubCacheHit"
task="CLRILStub"
symbol="ILStubCacheHit" message="$(string.RuntimePublisher.ILStubCacheHitEventMessage)"/>
<!-- CLR Method events -->
<!-- The following 6 events are now defunct -->
<event value="135" version="0" level="win:Informational"
keywords ="JitKeyword NGenKeyword" opcode="DCStartComplete"
task="CLRMethod"
symbol="DCStartCompleteV2" message="$(string.RuntimePublisher.DCStartCompleteEventMessage)"/>
<event value="136" version="0" level="win:Informational"
keywords ="JitKeyword NGenKeyword" opcode="DCEndComplete"
task="CLRMethod"
symbol="DCEndCompleteV2" message="$(string.RuntimePublisher.DCEndCompleteEventMessage)"/>
<event value="137" version="0" level="win:Informational" template="MethodLoadUnload"
keywords ="JitKeyword NGenKeyword" opcode="MethodDCStart"
task="CLRMethod"
symbol="MethodDCStartV2" message="$(string.RuntimePublisher.MethodDCStartEventMessage)"/>
<event value="138" version="0" level="win:Informational" template="MethodLoadUnload"
keywords ="JitKeyword NGenKeyword" opcode="MethodDCEnd"
task="CLRMethod"
symbol="MethodDCEndV2" message="$(string.RuntimePublisher.MethodDCEndEventMessage)"/>
<event value="139" version="0" level="win:Informational" template="MethodLoadUnloadVerbose"
keywords ="JitKeyword NGenKeyword" opcode="MethodDCStartVerbose"
task="CLRMethod"
symbol="MethodDCStartVerboseV2" message="$(string.RuntimePublisher.MethodDCStartEventMessage)"/>
<event value="140" version="0" level="win:Informational" template="MethodLoadUnloadVerbose"
keywords ="JitKeyword NGenKeyword" opcode="MethodDCEndVerbose"
task="CLRMethod"
symbol="MethodDCEndVerboseV2" message="$(string.RuntimePublisher.MethodDCEndVerboseEventMessage)"/>
<event value="141" version="0" level="win:Informational" template="MethodLoadUnload"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="MethodLoad" message="$(string.RuntimePublisher.MethodLoadEventMessage)"/>
<event value="141" version="1" level="win:Informational" template="MethodLoadUnload_V1"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="MethodLoad_V1" message="$(string.RuntimePublisher.MethodLoad_V1EventMessage)"/>
<event value="141" version="2" level="win:Informational" template="MethodLoadUnload_V2"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="MethodLoad_V2" message="$(string.RuntimePublisher.MethodLoad_V2EventMessage)"/>
<event value="159" version="0" level="win:Informational" template="R2RGetEntryPoint"
keywords ="CompilationDiagnosticKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="R2RGetEntryPoint" message="$(string.RuntimePublisher.R2RGetEntryPointEventMessage)"/>
<event value="160" version="0" level="win:Informational" template="R2RGetEntryPointStart"
keywords ="CompilationDiagnosticKeyword" opcode="MethodLoad"
task="CLRMethod"
symbol="R2RGetEntryPointStart" message="$(string.RuntimePublisher.R2RGetEntryPointStartEventMessage)"/>
<event value="142" version="0" level="win:Informational" template="MethodLoadUnload"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnload"
task="CLRMethod"
symbol="MethodUnload" message="$(string.RuntimePublisher.MethodUnloadEventMessage)"/>
<event value="142" version="1" level="win:Informational" template="MethodLoadUnload_V1"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnload"
task="CLRMethod"
symbol="MethodUnload_V1" message="$(string.RuntimePublisher.MethodUnload_V1EventMessage)"/>
<event value="142" version="2" level="win:Informational" template="MethodLoadUnload_V2"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnload"
task="CLRMethod"
symbol="MethodUnload_V2" message="$(string.RuntimePublisher.MethodUnload_V2EventMessage)"/>
<event value="143" version="0" level="win:Informational" template="MethodLoadUnloadVerbose"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoadVerbose"
task="CLRMethod"
symbol="MethodLoadVerbose" message="$(string.RuntimePublisher.MethodLoadVerboseEventMessage)"/>
<event value="143" version="1" level="win:Informational" template="MethodLoadUnloadVerbose_V1"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoadVerbose"
task="CLRMethod"
symbol="MethodLoadVerbose_V1" message="$(string.RuntimePublisher.MethodLoadVerbose_V1EventMessage)"/>
<event value="143" version="2" level="win:Informational" template="MethodLoadUnloadVerbose_V2"
keywords ="JitKeyword NGenKeyword" opcode="MethodLoadVerbose"
task="CLRMethod"
symbol="MethodLoadVerbose_V2" message="$(string.RuntimePublisher.MethodLoadVerbose_V2EventMessage)"/>
<event value="144" version="0" level="win:Informational" template="MethodLoadUnloadVerbose"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnloadVerbose"
task="CLRMethod"
symbol="MethodUnloadVerbose" message="$(string.RuntimePublisher.MethodUnloadVerboseEventMessage)"/>
<event value="144" version="1" level="win:Informational" template="MethodLoadUnloadVerbose_V1"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnloadVerbose"
task="CLRMethod"
symbol="MethodUnloadVerbose_V1" message="$(string.RuntimePublisher.MethodUnloadVerbose_V1EventMessage)"/>
<event value="144" version="2" level="win:Informational" template="MethodLoadUnloadVerbose_V2"
keywords ="JitKeyword NGenKeyword" opcode="MethodUnloadVerbose"
task="CLRMethod"
symbol="MethodUnloadVerbose_V2" message="$(string.RuntimePublisher.MethodUnloadVerbose_V2EventMessage)"/>
<event value="145" version="0" level="win:Verbose" template="MethodJittingStarted"
keywords ="JitKeyword" opcode="MethodJittingStarted"
task="CLRMethod"
symbol="MethodJittingStarted" message="$(string.RuntimePublisher.MethodJittingStartedEventMessage)"/>
<event value="145" version="1" level="win:Verbose" template="MethodJittingStarted_V1"
keywords ="JitKeyword" opcode="MethodJittingStarted"
task="CLRMethod"
symbol="MethodJittingStarted_V1" message="$(string.RuntimePublisher.MethodJittingStarted_V1EventMessage)"/>
<event value="146" version="0" level="win:Verbose" template="MethodJitMemoryAllocatedForCode"
keywords ="JitKeyword" opcode="MemoryAllocatedForJitCode"
task="CLRMethod"
symbol="MethodJitMemoryAllocatedForCode" message="$(string.RuntimePublisher.MethodJitMemoryAllocatedForCodeEventMessage)"/>
<event value="185" version="0" level="win:Verbose" template="MethodJitInliningSucceeded"
keywords ="JitTracingKeyword" opcode="JitInliningSucceeded"
task="CLRMethod"
symbol="MethodJitInliningSucceeded"
message="$(string.RuntimePublisher.MethodJitInliningSucceededEventMessage)"/>
<event value="186" version="0" level="win:Verbose" template="MethodJitInliningFailedAnsi"
keywords ="JitTracingKeyword" opcode="JitInliningFailed"
task="CLRMethod"
symbol="MethodJitInliningFailedAnsi"
message="$(string.RuntimePublisher.MethodJitInliningFailedEventMessage)"/>
<event value="188" version="0" level="win:Verbose" template="MethodJitTailCallSucceeded"
keywords ="JitTracingKeyword" opcode="JitTailCallSucceeded"
task="CLRMethod"
symbol="MethodJitTailCallSucceeded"
message="$(string.RuntimePublisher.MethodJitTailCallSucceededEventMessage)"/>
<event value="189" version="0" level="win:Verbose" template="MethodJitTailCallFailedAnsi"
keywords ="JitTracingKeyword" opcode="JitTailCallFailed"
task="CLRMethod"
symbol="MethodJitTailCallFailedAnsi"
message="$(string.RuntimePublisher.MethodJitTailCallFailedEventMessage)"/>
<event value="190" version="0" level="win:Verbose" template="MethodILToNativeMap"
keywords ="JittedMethodILToNativeMapKeyword" opcode="MethodILToNativeMap"
task="CLRMethod"
symbol="MethodILToNativeMap"
message="$(string.RuntimePublisher.MethodILToNativeMapEventMessage)"/>
<event value="191" version="0" level="win:Verbose" template="MethodJitTailCallFailed"
keywords ="JitTracingKeyword" opcode="JitTailCallFailed"
task="CLRMethod"
symbol="MethodJitTailCallFailed"
message="$(string.RuntimePublisher.MethodJitTailCallFailedEventMessage)"/>
<event value="192" version="0" level="win:Verbose" template="MethodJitInliningFailed"
keywords ="JitTracingKeyword" opcode="JitInliningFailed"
task="CLRMethod"
symbol="MethodJitInliningFailed"
message="$(string.RuntimePublisher.MethodJitInliningFailedEventMessage)"/>
<!-- CLR Loader events -->
<!-- The following 2 events are now defunct -->
<event value="149" version="0" level="win:Informational" template="ModuleLoadUnload"
keywords ="LoaderKeyword" opcode="ModuleDCStart"
task="CLRLoader"
symbol="ModuleDCStartV2" message="$(string.RuntimePublisher.ModuleDCStartEventMessage)"/>
<event value="150" version="0" level="win:Informational" template="ModuleLoadUnload"
keywords ="LoaderKeyword" opcode="ModuleDCEnd"
task="CLRLoader"
symbol="ModuleDCEndV2" message="$(string.RuntimePublisher.ModuleDCEndEventMessage)"/>
<event value="151" version="0" level="win:Informational" template="DomainModuleLoadUnload"
keywords ="LoaderKeyword" opcode="DomainModuleLoad"
task="CLRLoader"
symbol="DomainModuleLoad" message="$(string.RuntimePublisher.DomainModuleLoadEventMessage)"/>
<event value="151" version="1" level="win:Informational" template="DomainModuleLoadUnload_V1"
keywords ="LoaderKeyword" opcode="DomainModuleLoad"
task="CLRLoader"
symbol="DomainModuleLoad_V1" message="$(string.RuntimePublisher.DomainModuleLoad_V1EventMessage)"/>
<event value="152" version="0" level="win:Informational" template="ModuleLoadUnload"
keywords ="LoaderKeyword" opcode="ModuleLoad"
task="CLRLoader"
symbol="ModuleLoad" message="$(string.RuntimePublisher.ModuleLoadEventMessage)"/>
<event value="152" version="1" level="win:Informational" template="ModuleLoadUnload_V1"
keywords ="LoaderKeyword PerfTrackKeyword" opcode="ModuleLoad"
task="CLRLoader"
symbol="ModuleLoad_V1" message="$(string.RuntimePublisher.ModuleLoad_V1EventMessage)"/>
<event value="152" version="2" level="win:Informational" template="ModuleLoadUnload_V2"
keywords ="LoaderKeyword PerfTrackKeyword" opcode="ModuleLoad"
task="CLRLoader"
symbol="ModuleLoad_V2" message="$(string.RuntimePublisher.ModuleLoad_V2EventMessage)"/>
<event value="153" version="0" level="win:Informational" template="ModuleLoadUnload"
keywords ="LoaderKeyword" opcode="ModuleUnload"
task="CLRLoader"
symbol="ModuleUnload" message="$(string.RuntimePublisher.ModuleUnloadEventMessage)"/>
<event value="153" version="1" level="win:Informational" template="ModuleLoadUnload_V1"
keywords ="LoaderKeyword PerfTrackKeyword" opcode="ModuleUnload"
task="CLRLoader"
symbol="ModuleUnload_V1" message="$(string.RuntimePublisher.ModuleUnload_V1EventMessage)"/>
<event value="153" version="2" level="win:Informational" template="ModuleLoadUnload_V2"
keywords ="LoaderKeyword PerfTrackKeyword" opcode="ModuleUnload"
task="CLRLoader"
symbol="ModuleUnload_V2" message="$(string.RuntimePublisher.ModuleUnload_V2EventMessage)"/>
<event value="154" version="0" level="win:Informational" template="AssemblyLoadUnload"
keywords ="LoaderKeyword" opcode="AssemblyLoad"
task="CLRLoader"
symbol="AssemblyLoad" message="$(string.RuntimePublisher.AssemblyLoadEventMessage)"/>
<event value="154" version="1" level="win:Informational" template="AssemblyLoadUnload_V1"
keywords ="LoaderKeyword" opcode="AssemblyLoad"
task="CLRLoader"
symbol="AssemblyLoad_V1" message="$(string.RuntimePublisher.AssemblyLoad_V1EventMessage)"/>
<event value="155" version="0" level="win:Informational" template="AssemblyLoadUnload"
keywords ="LoaderKeyword" opcode="AssemblyUnload"
task="CLRLoader"
symbol="AssemblyUnload" message="$(string.RuntimePublisher.AssemblyUnloadEventMessage)"/>
<event value="155" version="1" level="win:Informational" template="AssemblyLoadUnload_V1"
keywords ="LoaderKeyword" opcode="AssemblyUnload"
task="CLRLoader"
symbol="AssemblyUnload_V1" message="$(string.RuntimePublisher.AssemblyUnload_V1EventMessage)"/>
<event value="156" version="0" level="win:Informational" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainLoad"
task="CLRLoader"
symbol="AppDomainLoad" message="$(string.RuntimePublisher.AppDomainLoadEventMessage)"/>
<event value="156" version="1" level="win:Informational" template="AppDomainLoadUnload_V1"
keywords ="LoaderKeyword" opcode="AppDomainLoad"
task="CLRLoader"
symbol="AppDomainLoad_V1" message="$(string.RuntimePublisher.AppDomainLoad_V1EventMessage)"/>
<event value="157" version="0" level="win:Informational" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainUnload"
task="CLRLoader"
symbol="AppDomainUnload" message="$(string.RuntimePublisher.AppDomainUnloadEventMessage)"/>
<event value="157" version="1" level="win:Informational" template="AppDomainLoadUnload_V1"
keywords ="LoaderKeyword" opcode="AppDomainUnload"
task="CLRLoader"
symbol="AppDomainUnload_V1" message="$(string.RuntimePublisher.AppDomainUnload_V1EventMessage)"/>
<event value="158" version="0" level="win:Informational" template="ModuleRange"
keywords ="PerfTrackKeyword" opcode="ModuleRangeLoad"
task="CLRPerfTrack"
symbol="ModuleRangeLoad" message="$(string.RuntimePublisher.ModuleRangeLoadEventMessage)"/>
<!-- CLR Security events -->
<event value="181" version="0" level="win:Verbose" template="StrongNameVerification"
keywords ="SecurityKeyword" opcode="win:Start"
task="CLRStrongNameVerification"
symbol="StrongNameVerificationStart" message="$(string.RuntimePublisher.StrongNameVerificationStartEventMessage)"/>
<event value="181" version="1" level="win:Verbose" template="StrongNameVerification_V1"
keywords ="SecurityKeyword" opcode="win:Start"
task="CLRStrongNameVerification"
symbol="StrongNameVerificationStart_V1" message="$(string.RuntimePublisher.StrongNameVerificationStart_V1EventMessage)"/>
<event value="182" version="0" level="win:Informational" template="StrongNameVerification"
keywords ="SecurityKeyword" opcode="win:Stop"
task="CLRStrongNameVerification"
symbol="StrongNameVerificationStop" message="$(string.RuntimePublisher.StrongNameVerificationEndEventMessage)"/>
<event value="182" version="1" level="win:Informational" template="StrongNameVerification_V1"
keywords ="SecurityKeyword" opcode="win:Stop"
task="CLRStrongNameVerification"
symbol="StrongNameVerificationStop_V1" message="$(string.RuntimePublisher.StrongNameVerificationEnd_V1EventMessage)"/>
<event value="183" version="0" level="win:Verbose" template="AuthenticodeVerification"
keywords ="SecurityKeyword" opcode="win:Start"
task="CLRAuthenticodeVerification"
symbol="AuthenticodeVerificationStart" message="$(string.RuntimePublisher.AuthenticodeVerificationStartEventMessage)"/>
<event value="183" version="1" level="win:Verbose" template="AuthenticodeVerification_V1"
keywords ="SecurityKeyword" opcode="win:Start"
task="CLRAuthenticodeVerification"
symbol="AuthenticodeVerificationStart_V1" message="$(string.RuntimePublisher.AuthenticodeVerificationStart_V1EventMessage)"/>
<event value="184" version="0" level="win:Informational" template="AuthenticodeVerification"
keywords ="SecurityKeyword" opcode="win:Stop"
task="CLRAuthenticodeVerification"
symbol="AuthenticodeVerificationStop" message="$(string.RuntimePublisher.AuthenticodeVerificationEndEventMessage)"/>
<event value="184" version="1" level="win:Informational" template="AuthenticodeVerification_V1"
keywords ="SecurityKeyword" opcode="win:Stop"
task="CLRAuthenticodeVerification"
symbol="AuthenticodeVerificationStop_V1" message="$(string.RuntimePublisher.AuthenticodeVerificationEnd_V1EventMessage)"/>
<!-- CLR RuntimeInformation events -->
<event value="187" version="0" level="win:Informational" template="RuntimeInformation"
opcode="win:Start"
task="CLRRuntimeInformation"
symbol="RuntimeInformationStart" message="$(string.RuntimePublisher.RuntimeInformationEventMessage)"/>
<!-- Additional GC events 200-239 -->
<event value="200" version="0" level="win:Verbose" template="IncreaseMemoryPressure"
keywords="GCKeyword" opcode="IncreaseMemoryPressure"
task="GarbageCollection"
symbol="IncreaseMemoryPressure" message="$(string.RuntimePublisher.IncreaseMemoryPressureEventMessage)"/>
<event value="201" version="0" level="win:Verbose" template="DecreaseMemoryPressure"
keywords="GCKeyword" opcode="DecreaseMemoryPressure"
task="GarbageCollection"
symbol="DecreaseMemoryPressure" message="$(string.RuntimePublisher.DecreaseMemoryPressureEventMessage)"/>
<event value="202" version="0" level="win:Informational" template="GCMarkWithType"
keywords ="GCKeyword" opcode="GCMarkWithType"
task="GarbageCollection"
symbol="GCMarkWithType" message="$(string.RuntimePublisher.GCMarkWithTypeEventMessage)"/>
<event value="203" version="2" level="win:Verbose" template="GCJoin_V2"
keywords ="GCKeyword" opcode="GCJoin"
task="GarbageCollection"
symbol="GCJoin_V2" message="$(string.RuntimePublisher.GCJoin_V2EventMessage)"/>
<event value="204" version="3" level="win:Informational" template="GCPerHeapHistory_V3"
keywords ="GCKeyword" opcode="GCPerHeapHistory"
task="GarbageCollection"
symbol="GCPerHeapHistory_V3" message="$(string.RuntimePublisher.GCPerHeapHistory_V3EventMessage)"/>
<event value="205" version="2" level="win:Informational" template="GCGlobalHeap_V2"
keywords ="GCKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollection"
symbol="GCGlobalHeapHistory_V2" message="$(string.RuntimePublisher.GCGlobalHeap_V2EventMessage)"/>
<event value="205" version="3" level="win:Informational" template="GCGlobalHeap_V3"
keywords ="GCKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollection"
symbol="GCGlobalHeapHistory_V3" message="$(string.RuntimePublisher.GCGlobalHeap_V3EventMessage)"/>
<event value="205" version="4" level="win:Informational" template="GCGlobalHeap_V4"
keywords ="GCKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollection"
symbol="GCGlobalHeapHistory_V4" message="$(string.RuntimePublisher.GCGlobalHeap_V4EventMessage)"/>
<event value="206" version="0" level="win:Informational" template="GenAwareTemplate"
keywords ="GCHeapDumpKeyword" opcode="GenAwareBegin"
task="GarbageCollection"
symbol="GenAwareBegin" message="$(string.RuntimePublisher.GenAwareBeginEventMessage)"/>
<event value="207" version="0" level="win:Informational" template="GenAwareTemplate"
keywords ="GCHeapDumpKeyword" opcode="GenAwareEnd"
task="GarbageCollection"
symbol="GenAwareEnd" message="$(string.RuntimePublisher.GenAwareEndEventMessage)"/>
<event value="208" version="0" level="win:Informational" template="GCLOHCompact"
keywords ="GCKeyword" opcode="GCLOHCompact"
task="GarbageCollection"
symbol="GCLOHCompact" message="$(string.RuntimePublisher.GCLOHCompactEventMessage)"/>
<event value="209" version="0" level="win:Verbose" template="GCFitBucketInfo"
keywords ="GCKeyword" opcode="GCFitBucketInfo"
task="GarbageCollection"
symbol="GCFitBucketInfo" message="$(string.RuntimePublisher.GCFitBucketInfoEventMessage)"/>
<!-- CLR Debugger events 240-249 -->
<event value="240" version="0" level="win:Informational"
keywords="DebuggerKeyword" opcode="win:Start"
task="DebugIPCEvent"
symbol="DebugIPCEventStart" />
<event value="241" version="0" level="win:Informational"
keywords="DebuggerKeyword" opcode="win:Stop"
task="DebugIPCEvent"
symbol="DebugIPCEventEnd" />
<event value="242" version="0" level="win:Informational"
keywords="DebuggerKeyword" opcode="win:Start"
task="DebugExceptionProcessing"
symbol="DebugExceptionProcessingStart" />
<event value="243" version="0" level="win:Informational"
keywords="DebuggerKeyword" opcode="win:Stop"
task="DebugExceptionProcessing"
symbol="DebugExceptionProcessingEnd" />
<!-- CLR Code Symbol Emission events 260-269 -->
<event value="260" version="0" level="win:Verbose" template="CodeSymbols"
keywords="CodeSymbolsKeyword" opcode="win:Start"
task="CodeSymbols"
symbol="CodeSymbols" message="$(string.RuntimePublisher.CodeSymbolsEventMessage)"/>
<event value="270" version="0" level="win:Informational" template="EventSource"
keywords="EventSourceKeyword"
symbol="EventSource" />
<!-- Tiered compilation events 280-289 -->
<event value="280" version="0" level="win:Informational" template="TieredCompilationSettings"
keywords="CompilationKeyword" task="TieredCompilation" opcode="Settings"
symbol="TieredCompilationSettings" message="$(string.RuntimePublisher.TieredCompilationSettingsEventMessage)"/>
<event value="281" version="0" level="win:Informational" template="TieredCompilationEmpty"
keywords="CompilationKeyword" task="TieredCompilation" opcode="Pause"
symbol="TieredCompilationPause" message="$(string.RuntimePublisher.TieredCompilationPauseEventMessage)"/>
<event value="282" version="0" level="win:Informational" template="TieredCompilationResume"
keywords="CompilationKeyword" task="TieredCompilation" opcode="Resume"
symbol="TieredCompilationResume" message="$(string.RuntimePublisher.TieredCompilationResumeEventMessage)"/>
<event value="283" version="0" level="win:Informational" template="TieredCompilationBackgroundJitStart"
keywords="CompilationKeyword" task="TieredCompilation" opcode="win:Start"
symbol="TieredCompilationBackgroundJitStart" message="$(string.RuntimePublisher.TieredCompilationBackgroundJitStartEventMessage)"/>
<event value="284" version="0" level="win:Informational" template="TieredCompilationBackgroundJitStop"
keywords="CompilationKeyword" task="TieredCompilation" opcode="win:Stop"
symbol="TieredCompilationBackgroundJitStop" message="$(string.RuntimePublisher.TieredCompilationBackgroundJitStopEventMessage)"/>
<!-- Assembly loader events 290-299 -->
<event value="290" version="0" level="win:Informational" template="AssemblyLoadStart"
keywords ="AssemblyLoaderKeyword" opcode="win:Start"
task="AssemblyLoader"
symbol="AssemblyLoadStart" message="$(string.RuntimePublisher.AssemblyLoadStartEventMessage)"/>
<event value="291" version="0" level="win:Informational" template="AssemblyLoadStop"
keywords ="AssemblyLoaderKeyword" opcode="win:Stop"
task="AssemblyLoader"
symbol="AssemblyLoadStop" message="$(string.RuntimePublisher.AssemblyLoadStopEventMessage)"/>
<event value="292" version="0" level="win:Informational" template="ResolutionAttempted"
keywords ="AssemblyLoaderKeyword" opcode="ResolutionAttempted"
task="AssemblyLoader"
symbol="ResolutionAttempted" message="$(string.RuntimePublisher.ResolutionAttemptedEventMessage)"/>
<event value="293" version="0" level="win:Informational" template="AssemblyLoadContextResolvingHandlerInvoked"
keywords ="AssemblyLoaderKeyword" opcode="AssemblyLoadContextResolvingHandlerInvoked"
task="AssemblyLoader"
symbol="AssemblyLoadContextResolvingHandlerInvoked" message="$(string.RuntimePublisher.AssemblyLoadContextResolvingHandlerInvokedEventMessage)"/>
<event value="294" version="0" level="win:Informational" template="AppDomainAssemblyResolveHandlerInvoked"
keywords ="AssemblyLoaderKeyword" opcode="AppDomainAssemblyResolveHandlerInvoked"
task="AssemblyLoader"
symbol="AppDomainAssemblyResolveHandlerInvoked" message="$(string.RuntimePublisher.AppDomainAssemblyResolveHandlerInvokedEventMessage)"/>
<event value="295" version="0" level="win:Informational" template="AssemblyLoadFromResolveHandlerInvoked"
keywords ="AssemblyLoaderKeyword" opcode="AssemblyLoadFromResolveHandlerInvoked"
task="AssemblyLoader"
symbol="AssemblyLoadFromResolveHandlerInvoked" message="$(string.RuntimePublisher.AssemblyLoadFromResolveHandlerInvokedEventMessage)"/>
<event value="296" version="0" level="win:Informational" template="KnownPathProbed"
keywords ="AssemblyLoaderKeyword" opcode="KnownPathProbed"
task="AssemblyLoader"
symbol="KnownPathProbed" message="$(string.RuntimePublisher.KnownPathProbedEventMessage)"/>
<event value="297" version="0" level="win:Informational" template="JitInstrumentationData"
keywords ="JitInstrumentationDataKeyword" opcode="InstrumentationData"
task="JitInstrumentationData"
symbol="JitInstrumentationData" message="$(string.RuntimePublisher.JitInstrumentationDataEventMessage)"/>
<event value="298" version="0" level="win:Informational" template="JitInstrumentationDataVerbose"
keywords ="JitInstrumentationDataKeyword" opcode="InstrumentationDataVerbose"
task="JitInstrumentationData"
symbol="JitInstrumentationDataVerbose" message="$(string.RuntimePublisher.JitInstrumentationDataEventMessage)"/>
<event value="299" version="0" level="win:Informational" template="ProfilerMessage"
keywords ="ProfilerKeyword" opcode="Profiler"
task="Profiler"
symbol="ProfilerMessage" message="$(string.RuntimePublisher.ProfilerEventMessage)"/>
<!-- Execution Checkpoint event 300 -->
<event value="300" version="0" level="win:Informational" template="ExecutionCheckpoint"
keywords ="PerfTrackKeyword" opcode="ExecutionCheckpoint" task="ExecutionCheckpoint" symbol="ExecutionCheckpoint"
message="$(string.RuntimePublisher.ExecutionCheckpointEventMessage)"/>
</events>
</provider>
<!--CLR Rundown Publisher-->
<provider name="Microsoft-Windows-DotNETRuntimeRundown"
guid="{A669021C-C450-4609-A035-5AF59AF4DF18}"
symbol="MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--Keywords-->
<keywords>
<keyword name="GCRundownKeyword" mask="0x1"
message="$(string.RundownPublisher.GCKeywordMessage)" symbol="CLR_RUNDOWNGC_KEYWORD"/>
<keyword name="LoaderRundownKeyword" mask="0x8"
message="$(string.RundownPublisher.LoaderKeywordMessage)" symbol="CLR_RUNDOWNLOADER_KEYWORD"/>
<keyword name="JitRundownKeyword" mask="0x10"
message="$(string.RundownPublisher.JitKeywordMessage)" symbol="CLR_RUNDOWNJIT_KEYWORD"/>
<keyword name="NGenRundownKeyword" mask="0x20"
message="$(string.RundownPublisher.NGenKeywordMessage)" symbol="CLR_RUNDOWNNGEN_KEYWORD"/>
<keyword name="StartRundownKeyword" mask="0x40"
message="$(string.RundownPublisher.StartRundownKeywordMessage)" symbol="CLR_RUNDOWNSTART_KEYWORD"/>
<keyword name="EndRundownKeyword" mask="0x100"
message="$(string.RundownPublisher.EndRundownKeywordMessage)" symbol="CLR_RUNDOWNEND_KEYWORD"/>
<!-- Keyword mask 0x200 is now defunct -->
<keyword name="AppDomainResourceManagementRundownKeyword" mask="0x800"
message="$(string.RuntimePublisher.AppDomainResourceManagementRundownKeywordMessage)" symbol="CLR_RUNDOWNAPPDOMAINRESOURCEMANAGEMENT_KEYWORD"/>
<keyword name="ThreadingKeyword" mask="0x10000"
message="$(string.RundownPublisher.ThreadingKeywordMessage)" symbol="CLR_RUNDOWNTHREADING_KEYWORD"/>
<keyword name="JittedMethodILToNativeMapRundownKeyword" mask="0x20000"
message="$(string.RundownPublisher.JittedMethodILToNativeMapRundownKeywordMessage)" symbol="CLR_RUNDOWNJITTEDMETHODILTONATIVEMAP_KEYWORD"/>
<keyword name="OverrideAndSuppressNGenEventsRundownKeyword" mask="0x40000"
message="$(string.RundownPublisher.OverrideAndSuppressNGenEventsRundownKeywordMessage)" symbol="CLR_RUNDOWNOVERRIDEANDSUPPRESSNGENEVENTS_KEYWORD"/>
<keyword name="PerfTrackRundownKeyword" mask="0x20000000"
message="$(string.RundownPublisher.PerfTrackRundownKeywordMessage)" symbol="CLR_RUNDOWNPERFTRACK_KEYWORD"/>
<keyword name="StackKeyword" mask="0x40000000"
message="$(string.RundownPublisher.StackKeywordMessage)" symbol="CLR_RUNDOWNSTACK_KEYWORD"/>
<keyword name="CompilationKeyword" mask="0x1000000000"
message="$(string.RundownPublisher.CompilationKeywordMessage)" symbol="CLR_COMPILATION_RUNDOWN_KEYWORD" />
</keywords>
<!--Tasks-->
<tasks>
<task name="CLRMethodRundown" symbol="CLR_METHODRUNDOWN_TASK"
value="1" eventGUID="{0BCD91DB-F943-454a-A662-6EDBCFBB76D2}"
message="$(string.RundownPublisher.MethodTaskMessage)">
<opcodes>
<opcode name="MethodDCStart" message="$(string.RundownPublisher.MethodDCStartOpcodeMessage)" symbol="CLR_METHODDC_METHODDCSTART_OPCODE" value="35"> </opcode>
<opcode name="MethodDCEnd" message="$(string.RundownPublisher.MethodDCEndOpcodeMessage)" symbol="CLR_METHODDC_METHODDCEND_OPCODE" value="36"> </opcode>
<opcode name="MethodDCStartVerbose" message="$(string.RundownPublisher.MethodDCStartVerboseOpcodeMessage)" symbol="CLR_METHODDC_METHODDCSTARTVERBOSE_OPCODE" value="39"> </opcode>
<opcode name="MethodDCEndVerbose" message="$(string.RundownPublisher.MethodDCEndVerboseOpcodeMessage)" symbol="CLR_METHODDC_METHODDCENDVERBOSE_OPCODE" value="40"> </opcode>
<opcode name="MethodDCStartILToNativeMap" message="$(string.RundownPublisher.MethodDCStartILToNativeMapOpcodeMessage)" symbol="CLR_METHODDC_METHODDCSTARTILTONATIVEMAP_OPCODE" value="41"> </opcode>
<opcode name="MethodDCEndILToNativeMap" message="$(string.RundownPublisher.MethodDCEndILToNativeMapOpcodeMessage)" symbol="CLR_METHODDC_METHODDCENDILTONATIVEMAP_OPCODE" value="42"> </opcode>
<opcode name="DCStartComplete" message="$(string.RundownPublisher.DCStartCompleteOpcodeMessage)" symbol="CLR_METHODDC_DCSTARTCOMPLETE_OPCODE" value="14"> </opcode>
<opcode name="DCEndComplete" message="$(string.RundownPublisher.DCEndCompleteOpcodeMessage)" symbol="CLR_METHODDC_DCENDCOMPLETE_OPCODE" value="15"> </opcode>
<opcode name="DCStartInit" message="$(string.RundownPublisher.DCStartInitOpcodeMessage)" symbol="CLR_METHODDC_DCSTARTINIT_OPCODE" value="16"> </opcode>
<opcode name="DCEndInit" message="$(string.RundownPublisher.DCEndInitOpcodeMessage)" symbol="CLR_METHODDC_DCENDINIT_OPCODE" value="17"> </opcode>
</opcodes>
</task>
<task name="CLRLoaderRundown" symbol="CLR_LOADERRUNDOWN_TASK"
value="2" eventGUID="{5A54F4DF-D302-4fee-A211-6C2C0C1DCB1A}"
message="$(string.RundownPublisher.LoaderTaskMessage)">
<opcodes>
<opcode name="ModuleDCStart" message="$(string.RundownPublisher.ModuleDCStartOpcodeMessage)" symbol="CLR_LOADERDC_MODULEDCSTART_OPCODE" value="35"> </opcode>
<opcode name="ModuleDCEnd" message="$(string.RundownPublisher.ModuleDCEndOpcodeMessage)" symbol="CLR_LOADERDC_MODULEDCEND_OPCODE" value="36"> </opcode>
<opcode name="AssemblyDCStart" message="$(string.RundownPublisher.AssemblyDCStartOpcodeMessage)" symbol="CLR_LOADERDC_ASSEMBLYDCSTART_OPCODE" value="39"> </opcode>
<opcode name="AssemblyDCEnd" message="$(string.RundownPublisher.AssemblyDCEndOpcodeMessage)" symbol="CLR_LOADERDC_ASSEMBLYDCEND_OPCODE" value="40"> </opcode>
<opcode name="AppDomainDCStart" message="$(string.RundownPublisher.AppDomainDCStartOpcodeMessage)" symbol="CLR_LOADERDC_APPDOMAINDCSTART_OPCODE" value="43"> </opcode>
<opcode name="AppDomainDCEnd" message="$(string.RundownPublisher.AppDomainDCEndOpcodeMessage)" symbol="CLR_LOADERDC_APPDOMAINDCEND_OPCODE" value="44"> </opcode>
<opcode name="DomainModuleDCStart" message="$(string.RundownPublisher.DomainModuleDCStartOpcodeMessage)" symbol="CLR_LOADERDC_DOMAINMODULEDCSTART_OPCODE" value="46"> </opcode>
<opcode name="DomainModuleDCEnd" message="$(string.RundownPublisher.DomainModuleDCEndOpcodeMessage)" symbol="CLR_LOADERDC_DOMAINMODULEDCEND_OPCODE" value="47"> </opcode>
<opcode name="ThreadDC" message="$(string.RundownPublisher.ThreadDCOpcodeMessage)" symbol="CLR_LOADERDC_THREADDC_OPCODE" value="48"> </opcode>
</opcodes>
</task>
<task name="CLRStackRundown" symbol="CLR_STACKRUNDOWN_TASK"
value="11" eventGUID="{d3363dc0-243a-4620-a4d0-8a07d772f533}"
message="$(string.RundownPublisher.StackTaskMessage)">
<opcodes>
<opcode name="CLRStackWalk" message="$(string.RundownPublisher.CLRStackWalkOpcodeMessage)" symbol="CLR_RUNDOWNSTACK_STACKWALK_OPCODE" value="82"> </opcode>
</opcodes>
</task>
<task name="CLRRuntimeInformationRundown" symbol="CLR_RuntimeInformation_TASK"
value="19" eventGUID="{CD7D3E32-65FE-40cd-9225-A2577D203FC3}"
message="$(string.RundownPublisher.EEStartupTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRPerfTrackRundown" symbol="CLR_PERFTRACKRUNDOWN_TASK"
value="20" eventGUID="{EAC685F6-2104-4dec-88FD-91E4254221EC}"
message="$(string.RundownPublisher.PerfTrackTaskMessage)">
<opcodes>
<opcode name="ModuleRangeDCStart" message="$(string.RundownPublisher.ModuleRangeDCStartOpcodeMessage)" symbol="CLR_PERFTRACKRUNDOWN_MODULERANGEDCSTART_OPCODE" value="10"> </opcode>
<opcode name="ModuleRangeDCEnd" message="$(string.RundownPublisher.ModuleRangeDCEndOpcodeMessage)" symbol="CLR_PERFTRACKRUNDOWN_MODULERANGEDCEND_OPCODE" value="11"> </opcode>
</opcodes>
</task>
<task name="TieredCompilationRundown" symbol="CLR_TIERED_COMPILATION_RUNDOWN_TASK"
value="31" eventGUID="{A1673472-0564-48EA-A95D-B49D4173F105}"
message="$(string.RundownPublisher.TieredCompilationTaskMessage)">
<opcodes>
<opcode name="SettingsDCStart" message="$(string.RundownPublisher.TieredCompilationSettingsDCStartOpcodeMessage)" symbol="CLR_TIERED_COMPILATION_SETTINGS_DCSTART_OPCODE" value="11"/>
</opcodes>
</task>
<task name="ExecutionCheckpointRundown" symbol="CLR_EXECUTION_CHECKPOINT_RUNDOWN_TASK"
value="35" eventGUID="{DFF63ECA-ADAA-431F-8F91-72820C7217DB}"
message="$(string.RundownPublisher.ExecutionCheckpointTaskMessage)">
<opcodes>
<opcode name="ExecutionCheckpointDCEnd" message="$(string.RundownPublisher.ExecutionCheckpointDCEndOpcodeMessage)" symbol="CLR_EXECUTIONCHECKPOINT_DCSTART_OPCODE" value="11"/>
</opcodes>
</task>
<task name="CLRGCRundown" symbol="CLR_GC_RUNDOWN_TASK"
value="40" eventGUID="{51B6C146-777F-4375-A0F8-1349D076E215}"
message="$(string.RundownPublisher.GCTaskMessage)">
<opcodes>
<opcode name="GCSettingsRundown" message="$(string.RundownPublisher.GCSettingsOpcodeMessage)" symbol="CLR_GC_GCSETTINGS_OPCODE" value="10"> </opcode>
</opcodes>
</task>
</tasks>
<maps>
<bitMap name="ModuleRangeTypeMap">
<map value="0x4" message="$(string.RundownPublisher.ModuleRangeTypeMap.ColdRangeMessage)"/>
</bitMap>
<!-- BitMaps -->
<bitMap name="AppDomainFlagsMap">
<map value="0x1" message="$(string.RundownPublisher.AppDomain.DefaultMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.AppDomain.ExecutableMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.AppDomain.SharedMapMessage)"/>
</bitMap>
<bitMap name="AssemblyFlagsMap">
<map value="0x1" message="$(string.RundownPublisher.Assembly.DomainNeutralMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.Assembly.DynamicMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.Assembly.NativeMapMessage)"/>
<map value="0x8" message="$(string.RundownPublisher.Assembly.CollectibleMapMessage)"/>
</bitMap>
<bitMap name="ModuleFlagsMap">
<map value= "0x1" message="$(string.RundownPublisher.Module.DomainNeutralMapMessage)"/>
<map value= "0x2" message="$(string.RundownPublisher.Module.NativeMapMessage)"/>
<map value= "0x4" message="$(string.RundownPublisher.Module.DynamicMapMessage)"/>
<map value= "0x8" message="$(string.RundownPublisher.Module.ManifestMapMessage)"/>
<map value= "0x10" message="$(string.RundownPublisher.Module.IbcOptimizedMapMessage)"/>
<map value= "0x20" message="$(string.RundownPublisher.Module.ReadyToRunModuleMapMessage)"/>
<map value= "0x40" message="$(string.RundownPublisher.Module.PartialReadyToRunModuleMapMessage)"/>
</bitMap>
<bitMap name="MethodFlagsMap">
<map value="0x1" message="$(string.RundownPublisher.Method.DynamicMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.Method.GenericMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.Method.HasSharedGenericCodeMapMessage)"/>
<map value="0x8" message="$(string.RundownPublisher.Method.JittedMapMessage)"/>
<map value="0x10" message="$(string.RuntimePublisher.Method.JitHelperMapMessage)"/>
<map value="0x20" message="$(string.RuntimePublisher.Method.ProfilerRejectedPrecompiledCodeMapMessage)"/>
<map value="0x40" message="$(string.RuntimePublisher.Method.ReadyToRunRejectedPrecompiledCodeMapMessage)"/>
<!-- 0x80 to 0x200 are used for the optimization tier -->
</bitMap>
<bitMap name="StartupModeMap">
<map value="0x1" message="$(string.RundownPublisher.StartupMode.ManagedExeMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.StartupMode.HostedCLRMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.StartupMode.IjwDllMapMessage)"/>
<map value="0x8" message="$(string.RundownPublisher.StartupMode.ComActivatedMapMessage)"/>
<map value="0x10" message="$(string.RundownPublisher.StartupMode.OtherMapMessage)"/>
</bitMap>
<bitMap name="RuntimeSkuMap">
<map value="0x1" message="$(string.RundownPublisher.RuntimeSku.DesktopCLRMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.RuntimeSku.CoreCLRMapMessage)"/>
</bitMap>
<bitMap name="StartupFlagsMap">
<map value="0x000001" message="$(string.RundownPublisher.Startup.CONCURRENT_GCMapMessage)"/>
<map value="0x000002" message="$(string.RundownPublisher.Startup.LOADER_OPTIMIZATION_SINGLE_DOMAINMapMessage)"/>
<map value="0x000004" message="$(string.RundownPublisher.Startup.LOADER_OPTIMIZATION_MULTI_DOMAINMapMessage)"/>
<map value="0x000010" message="$(string.RundownPublisher.Startup.LOADER_SAFEMODEMapMessage)"/>
<map value="0x000100" message="$(string.RundownPublisher.Startup.LOADER_SETPREFERENCEMapMessage)"/>
<map value="0x001000" message="$(string.RundownPublisher.Startup.SERVER_GCMapMessage)"/>
<map value="0x002000" message="$(string.RundownPublisher.Startup.HOARD_GC_VMMapMessage)"/>
<map value="0x004000" message="$(string.RundownPublisher.Startup.SINGLE_VERSION_HOSTING_INTERFACEMapMessage)"/>
<map value="0x010000" message="$(string.RundownPublisher.Startup.LEGACY_IMPERSONATIONMapMessage)"/>
<map value="0x020000" message="$(string.RundownPublisher.Startup.DISABLE_COMMITTHREADSTACKMapMessage)"/>
<map value="0x040000" message="$(string.RundownPublisher.Startup.ALWAYSFLOW_IMPERSONATIONMapMessage)"/>
<map value="0x080000" message="$(string.RundownPublisher.Startup.TRIM_GC_COMMITMapMessage)"/>
<map value="0x100000" message="$(string.RundownPublisher.Startup.ETWMapMessage)"/>
<map value="0x200000" message="$(string.RundownPublisher.Startup.SERVER_BUILDMapMessage)"/>
<map value="0x400000" message="$(string.RundownPublisher.Startup.ARMMapMessage)"/>
</bitMap>
<bitMap name="ThreadFlagsMap">
<map value="0x1" message="$(string.RundownPublisher.ThreadFlags.GCSpecial)"/>
<map value="0x2" message="$(string.RundownPublisher.ThreadFlags.Finalizer)"/>
<map value="0x4" message="$(string.RundownPublisher.ThreadFlags.ThreadPoolWorker)"/>
</bitMap>
<bitMap name="TieredCompilationSettingsFlagsMap">
<map value="0x0" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.NoneMapMessage)"/>
<map value="0x1" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.QuickJitMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage)"/>
</bitMap>
</maps>
<!--Templates-->
<templates>
<template tid="GCSettingsRundown">
<data name="HardLimit" inType="win:UInt64" />
<data name="LOHThreshold" inType="win:UInt64" />
<data name="PhysicalMemoryConfig" inType="win:UInt64" />
<data name="Gen0MinBudgetConfig" inType="win:UInt64" />
<data name="Gen0MaxBudgetConfig" inType="win:UInt64" />
<data name="HighMemPercentConfig" inType="win:UInt32" />
<data name="BitSettings" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCSettingsRundown xmlns="myNs">
<HardLimit> %1 </HardLimit>
<LOHThreshold> %2 </LOHThreshold>
<PhysicalMemoryConfig> %3 </PhysicalMemoryConfig>
<Gen0MinBudgetConfig> %4 </Gen0MinBudgetConfig>
<Gen0MaxBudgetConfig> %5 </Gen0MaxBudgetConfig>
<HighMemPercentConfig> %6 </HighMemPercentConfig>
<BitSettings> %7 </BitSettings>
<ClrInstanceID> %8 </ClrInstanceID>
</GCSettingsRundown>
</UserData>
</template>
<template tid="RuntimeInformationRundown">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Sku" inType="win:UInt16" map="RuntimeSkuMap" />
<data name="BclMajorVersion" inType="win:UInt16" />
<data name="BclMinorVersion" inType="win:UInt16" />
<data name="BclBuildNumber" inType="win:UInt16" />
<data name="BclQfeNumber" inType="win:UInt16" />
<data name="VMMajorVersion" inType="win:UInt16" />
<data name="VMMinorVersion" inType="win:UInt16" />
<data name="VMBuildNumber" inType="win:UInt16" />
<data name="VMQfeNumber" inType="win:UInt16" />
<data name="StartupFlags" inType="win:UInt32" map="StartupFlagsMap" />
<data name="StartupMode" inType="win:UInt8" map="StartupModeMap" />
<data name="CommandLine" inType="win:UnicodeString" />
<data name="ComObjectGuid" inType="win:GUID" />
<data name="RuntimeDllPath" inType="win:UnicodeString" />
<UserData>
<RuntimeInformationRundown xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Sku> %2 </Sku>
<BclMajorVersion> %3 </BclMajorVersion>
<BclMinorVersion> %4 </BclMinorVersion>
<BclBuildNumber> %5 </BclBuildNumber>
<BclQfeNumber> %6 </BclQfeNumber>
<VMMajorVersion> %7 </VMMajorVersion>
<VMMinorVersion> %8 </VMMinorVersion>
<VMBuildNumber> %9 </VMBuildNumber>
<VMQfeNumber> %10 </VMQfeNumber>
<StartupFlags> %11 </StartupFlags>
<StartupMode> %12 </StartupMode>
<CommandLine> %13 </CommandLine>
<ComObjectGuid> %14 </ComObjectGuid>
<RuntimeDllPath> %15 </RuntimeDllPath>
</RuntimeInformationRundown>
</UserData>
</template>
<template tid="DomainModuleLoadUnloadRundown">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<UserData>
<DomainModuleLoadUnloadRundown xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<AppDomainID> %3 </AppDomainID>
<ModuleFlags> %4 </ModuleFlags>
<ModuleILPath> %5 </ModuleILPath>
<ModuleNativePath> %6 </ModuleNativePath>
</DomainModuleLoadUnloadRundown>
</UserData>
</template>
<template tid="DomainModuleLoadUnloadRundown_V1">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DomainModuleLoadUnloadRundown_V1 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<AppDomainID> %3 </AppDomainID>
<ModuleFlags> %4 </ModuleFlags>
<ModuleILPath> %5 </ModuleILPath>
<ModuleNativePath> %6 </ModuleNativePath>
<ClrInstanceID> %7 </ClrInstanceID>
</DomainModuleLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="ModuleLoadUnloadRundown">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<UserData>
<ModuleLoadUnloadRundown xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
</ModuleLoadUnloadRundown>
</UserData>
</template>
<template tid="ModuleLoadUnloadRundown_V1">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ModuleLoadUnloadRundown_V1 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
<ClrInstanceID> %6 </ClrInstanceID>
</ModuleLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="ModuleLoadUnloadRundown_V2">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleFlags" inType="win:UInt32" map="ModuleFlagsMap" />
<data name="Reserved1" inType="win:UInt32" />
<data name="ModuleILPath" inType="win:UnicodeString" />
<data name="ModuleNativePath" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ManagedPdbSignature" inType="win:GUID" />
<data name="ManagedPdbAge" inType="win:UInt32" />
<data name="ManagedPdbBuildPath" inType="win:UnicodeString" />
<data name="NativePdbSignature" inType="win:GUID" />
<data name="NativePdbAge" inType="win:UInt32" />
<data name="NativePdbBuildPath" inType="win:UnicodeString" />
<UserData>
<ModuleLoadUnloadRundown_V2 xmlns="myNs">
<ModuleID> %1 </ModuleID>
<AssemblyID> %2 </AssemblyID>
<ModuleFlags> %3 </ModuleFlags>
<ModuleILPath> %4 </ModuleILPath>
<ModuleNativePath> %5 </ModuleNativePath>
<ClrInstanceID> %6 </ClrInstanceID>
<ManagedPdbSignature> %7 </ManagedPdbSignature>
<ManagedPdbAge> %8 </ManagedPdbAge>
<ManagedPdbBuildPath> %9 </ManagedPdbBuildPath>
<NativePdbSignature> %10 </NativePdbSignature>
<NativePdbAge> %11 </NativePdbAge>
<NativePdbBuildPath> %12 </NativePdbBuildPath>
</ModuleLoadUnloadRundown_V2>
</UserData>
</template>
<template tid="AssemblyLoadUnloadRundown">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyFlags" inType="win:UInt32" map="AssemblyFlagsMap" />
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadUnloadRundown xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<AppDomainID> %2 </AppDomainID>
<AssemblyFlags> %3 </AssemblyFlags>
<FullyQualifiedAssemblyName> %4 </FullyQualifiedAssemblyName>
</AssemblyLoadUnloadRundown>
</UserData>
</template>
<template tid="AssemblyLoadUnloadRundown_V1">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="BindingID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyFlags" inType="win:UInt32" map="AssemblyFlagsMap" />
<data name="FullyQualifiedAssemblyName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AssemblyLoadUnloadRundown_V1 xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<AppDomainID> %2 </AppDomainID>
<BindingID> %3 </BindingID>
<AssemblyFlags> %4 </AssemblyFlags>
<FullyQualifiedAssemblyName> %5 </FullyQualifiedAssemblyName>
<ClrInstanceID> %6 </ClrInstanceID>
</AssemblyLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="AppDomainLoadUnloadRundown">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainFlags" inType="win:UInt32" map="AppDomainFlagsMap" />
<data name="AppDomainName" inType="win:UnicodeString" />
<UserData>
<AppDomainLoadUnloadRundown xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainFlags> %2 </AppDomainFlags>
<AppDomainName> %3 </AppDomainName>
</AppDomainLoadUnloadRundown>
</UserData>
</template>
<template tid="AppDomainLoadUnloadRundown_V1">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainFlags" inType="win:UInt32" map="AppDomainFlagsMap" />
<data name="AppDomainName" inType="win:UnicodeString" />
<data name="AppDomainIndex" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<AppDomainLoadUnloadRundown_V1 xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainFlags> %2 </AppDomainFlags>
<AppDomainName> %3 </AppDomainName>
<AppDomainIndex> %4 </AppDomainIndex>
<ClrInstanceID> %5 </ClrInstanceID>
</AppDomainLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="MethodLoadUnloadRundown">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" />
<data name="MethodToken" inType="win:UInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<UserData>
<MethodLoadUnloadRundown xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
</MethodLoadUnloadRundown>
</UserData>
</template>
<template tid="MethodLoadUnloadRundown_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodLoadUnloadRundown_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<ClrInstanceID> %7 </ClrInstanceID>
</MethodLoadUnloadRundown_V1>
</UserData>
</template>
<template tid="MethodLoadUnloadRundown_V2">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodLoadUnloadRundown_V2 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<ClrInstanceID> %7 </ClrInstanceID>
<ReJITID> %8 </ReJITID>
</MethodLoadUnloadRundown_V2>
</UserData>
</template>
<template tid="MethodLoadUnloadRundownVerbose">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<UserData>
<MethodLoadUnloadRundownVerbose xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
</MethodLoadUnloadRundownVerbose>
</UserData>
</template>
<template tid="MethodLoadUnloadRundownVerbose_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodLoadUnloadRundownVerbose_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
<ClrInstanceID> %10 </ClrInstanceID>
</MethodLoadUnloadRundownVerbose_V1>
</UserData>
</template>
<template tid="MethodLoadUnloadRundownVerbose_V2">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodStartAddress" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodSize" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="MethodFlags" inType="win:UInt32" map="MethodFlagsMap" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodLoadUnloadRundownVerbose_V2 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodStartAddress> %3 </MethodStartAddress>
<MethodSize> %4 </MethodSize>
<MethodToken> %5 </MethodToken>
<MethodFlags> %6 </MethodFlags>
<MethodNamespace> %7 </MethodNamespace>
<MethodName> %8 </MethodName>
<MethodSignature> %9 </MethodSignature>
<ClrInstanceID> %10 </ClrInstanceID>
<ReJITID> %11 </ReJITID>
</MethodLoadUnloadRundownVerbose_V2>
</UserData>
</template>
<template tid="MethodILToNativeMapRundown">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ReJITID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodExtent" inType="win:UInt8" />
<data name="CountOfMapEntries" inType="win:UInt16" />
<data name="ILOffsets" count="CountOfMapEntries" inType="win:UInt32" />
<data name="NativeOffsets" count="CountOfMapEntries" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodILToNativeMap xmlns="myNs">
<MethodID> %1 </MethodID>
<ReJITID> %2 </ReJITID>
<MethodExtent> %3 </MethodExtent>
<CountOfMapEntries> %4 </CountOfMapEntries>
<ClrInstanceID> %5 </ClrInstanceID>
</MethodILToNativeMap>
</UserData>
</template>
<template tid="DCStartEnd">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DCStartEnd xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</DCStartEnd>
</UserData>
</template>
<template tid="ClrStackWalk">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Reserved1" inType="win:UInt8" />
<data name="Reserved2" inType="win:UInt8" />
<data name="FrameCount" inType="win:UInt32" />
<data name="Stack" count="2" inType="win:Pointer" />
</template>
<template tid="ThreadCreatedRundown">
<data name="ManagedThreadID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="Flags" inType="win:UInt32" map="ThreadFlagsMap" />
<data name="ManagedThreadIndex" inType="win:UInt32" />
<data name="OSThreadID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ThreadCreatedRundown xmlns="myNs">
<ManagedThreadID> %1 </ManagedThreadID>
<AppDomainID> %2 </AppDomainID>
<Flags> %3 </Flags>
<ManagedThreadIndex> %4 </ManagedThreadIndex>
<OSThreadID> %5 </OSThreadID>
<ClrInstanceID> %6 </ClrInstanceID>
</ThreadCreatedRundown>
</UserData>
</template>
<template tid="ModuleRangeRundown">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64"/>
<data name="RangeBegin" count="1" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeSize" count="1" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeType" map="ModuleRangeTypeMap" inType="win:UInt8"/>
<UserData>
<ModuleRangeRundown xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<RangeBegin> %3 </RangeBegin>
<RangeSize> %4 </RangeSize>
<RangeType> %5 </RangeType>
</ModuleRangeRundown>
</UserData>
</template>
<template tid="TieredCompilationSettings">
<data name="ClrInstanceID" inType="win:UInt16"/>
<data name="Flags" inType="win:UInt32" outType="win:HexInt32" map="TieredCompilationSettingsFlagsMap"/>
<UserData>
<Settings xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Flags> %2 </Flags>
</Settings>
</UserData>
</template>
<template tid="ExecutionCheckpointRundown">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Name" inType="win:UnicodeString" />
<data name="Timestamp" inType="win:Int64" />
<UserData>
<ExecutionCheckpointRundown xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Name> %2 </Name>
<Timestamp> %3 </Timestamp>
</ExecutionCheckpointRundown>
</UserData>
</template>
</templates>
<events>
<!-- CLR StackWalk Rundown Events -->
<event value="0" version="0" level="win:LogAlways" template="ClrStackWalk"
keywords ="StackKeyword" opcode="CLRStackWalk"
task="CLRStackRundown"
symbol="CLRStackWalkDCStart" message="$(string.RundownPublisher.StackEventMessage)"/>
<!-- CLR GC events for rundown -->
<event value="10" version="0" level="win:Informational" template="GCSettingsRundown"
opcode="GCSettingsRundown"
task="CLRGCRundown"
symbol="GCSettingsRundown" message="$(string.RundownPublisher.GCSettingsRundownEventMessage)"/>
<!-- CLR Method Rundown Events -->
<event value="141" version="0" level="win:Informational" template="MethodLoadUnloadRundown"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStart"
task="CLRMethodRundown"
symbol="MethodDCStart" message="$(string.RundownPublisher.MethodDCStartEventMessage)"/>
<event value="141" version="1" level="win:Informational" template="MethodLoadUnloadRundown_V1"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStart"
task="CLRMethodRundown"
symbol="MethodDCStart_V1" message="$(string.RundownPublisher.MethodDCStart_V1EventMessage)"/>
<event value="141" version="2" level="win:Informational" template="MethodLoadUnloadRundown_V2"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStart"
task="CLRMethodRundown"
symbol="MethodDCStart_V2" message="$(string.RundownPublisher.MethodDCStart_V2EventMessage)"/>
<event value="142" version="0" level="win:Informational" template="MethodLoadUnloadRundown"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEnd"
task="CLRMethodRundown"
symbol="MethodDCEnd" message="$(string.RundownPublisher.MethodDCEndEventMessage)"/>
<event value="142" version="1" level="win:Informational" template="MethodLoadUnloadRundown_V1"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEnd"
task="CLRMethodRundown"
symbol="MethodDCEnd_V1" message="$(string.RundownPublisher.MethodDCEnd_V1EventMessage)"/>
<event value="142" version="2" level="win:Informational" template="MethodLoadUnloadRundown_V2"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEnd"
task="CLRMethodRundown"
symbol="MethodDCEnd_V2" message="$(string.RundownPublisher.MethodDCEnd_V2EventMessage)"/>
<event value="143" version="0" level="win:Informational" template="MethodLoadUnloadRundownVerbose"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStartVerbose"
task="CLRMethodRundown"
symbol="MethodDCStartVerbose" message="$(string.RundownPublisher.MethodDCStartVerboseEventMessage)"/>
<event value="143" version="1" level="win:Informational" template="MethodLoadUnloadRundownVerbose_V1"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStartVerbose"
task="CLRMethodRundown"
symbol="MethodDCStartVerbose_V1" message="$(string.RundownPublisher.MethodDCStartVerbose_V1EventMessage)"/>
<event value="143" version="2" level="win:Informational" template="MethodLoadUnloadRundownVerbose_V2"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCStartVerbose"
task="CLRMethodRundown"
symbol="MethodDCStartVerbose_V2" message="$(string.RundownPublisher.MethodDCStartVerbose_V2EventMessage)"/>
<event value="144" version="0" level="win:Informational" template="MethodLoadUnloadRundownVerbose"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEndVerbose"
task="CLRMethodRundown"
symbol="MethodDCEndVerbose" message="$(string.RundownPublisher.MethodDCEndVerboseEventMessage)"/>
<event value="144" version="1" level="win:Informational" template="MethodLoadUnloadRundownVerbose_V1"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEndVerbose"
task="CLRMethodRundown"
symbol="MethodDCEndVerbose_V1" message="$(string.RundownPublisher.MethodDCEndVerbose_V1EventMessage)"/>
<event value="144" version="2" level="win:Informational" template="MethodLoadUnloadRundownVerbose_V2"
keywords ="JitRundownKeyword NGenRundownKeyword" opcode="MethodDCEndVerbose"
task="CLRMethodRundown"
symbol="MethodDCEndVerbose_V2" message="$(string.RundownPublisher.MethodDCEndVerbose_V2EventMessage)"/>
<event value="145" version="0" level="win:Informational"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCStartComplete"
task="CLRMethodRundown"
symbol="DCStartComplete"/>
<event value="145" version="1" level="win:Informational" template="DCStartEnd"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCStartComplete"
task="CLRMethodRundown"
symbol="DCStartComplete_V1" message="$(string.RundownPublisher.DCStartCompleteEventMessage)"/>
<event value="146" version="0" level="win:Informational"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCEndComplete"
task="CLRMethodRundown"
symbol="DCEndComplete"/>
<event value="146" version="1" level="win:Informational" template="DCStartEnd"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCEndComplete"
task="CLRMethodRundown"
symbol="DCEndComplete_V1" message="$(string.RundownPublisher.DCEndCompleteEventMessage)"/>
<event value="147" version="0" level="win:Informational"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCStartInit"
task="CLRMethodRundown"
symbol="DCStartInit"/>
<event value="147" version="1" level="win:Informational" template="DCStartEnd"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCStartInit"
task="CLRMethodRundown"
symbol="DCStartInit_V1" message="$(string.RundownPublisher.DCStartInitEventMessage)"/>
<event value="148" version="0" level="win:Informational"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCEndInit"
task="CLRMethodRundown"
symbol="DCEndInit"/>
<event value="148" version="1" level="win:Informational" template="DCStartEnd"
keywords ="JitRundownKeyword JittedMethodILToNativeMapRundownKeyword NGenRundownKeyword LoaderRundownKeyword" opcode="DCEndInit"
task="CLRMethodRundown"
symbol="DCEndInit_V1" message="$(string.RundownPublisher.DCEndInitEventMessage)"/>
<event value="149" version="0" level="win:Verbose" template="MethodILToNativeMapRundown"
keywords ="JittedMethodILToNativeMapRundownKeyword" opcode="MethodDCStartILToNativeMap"
task="CLRMethodRundown"
symbol="MethodDCStartILToNativeMap"
message="$(string.RundownPublisher.MethodDCStartILToNativeMapEventMessage)"/>
<event value="150" version="0" level="win:Verbose" template="MethodILToNativeMapRundown"
keywords ="JittedMethodILToNativeMapRundownKeyword" opcode="MethodDCEndILToNativeMap"
task="CLRMethodRundown"
symbol="MethodDCEndILToNativeMap"
message="$(string.RundownPublisher.MethodDCEndILToNativeMapEventMessage)"/>
<!-- CLR Loader Rundown Events -->
<event value="151" version="0" level="win:Informational" template="DomainModuleLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="DomainModuleDCStart"
task="CLRLoaderRundown"
symbol="DomainModuleDCStart" message="$(string.RundownPublisher.DomainModuleDCStartEventMessage)"/>
<event value="151" version="1" level="win:Informational" template="DomainModuleLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="DomainModuleDCStart"
task="CLRLoaderRundown"
symbol="DomainModuleDCStart_V1" message="$(string.RundownPublisher.DomainModuleDCStart_V1EventMessage)"/>
<event value="152" version="0" level="win:Informational" template="DomainModuleLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="DomainModuleDCEnd"
task="CLRLoaderRundown"
symbol="DomainModuleDCEnd" message="$(string.RundownPublisher.DomainModuleDCEndEventMessage)"/>
<event value="152" version="1" level="win:Informational" template="DomainModuleLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="DomainModuleDCEnd"
task="CLRLoaderRundown"
symbol="DomainModuleDCEnd_V1" message="$(string.RundownPublisher.DomainModuleDCEnd_V1EventMessage)"/>
<event value="153" version="0" level="win:Informational" template="ModuleLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="ModuleDCStart"
task="CLRLoaderRundown"
symbol="ModuleDCStart" message="$(string.RundownPublisher.ModuleDCStartEventMessage)"/>
<event value="153" version="1" level="win:Informational" template="ModuleLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword PerfTrackRundownKeyword" opcode="ModuleDCStart"
task="CLRLoaderRundown"
symbol="ModuleDCStart_V1" message="$(string.RundownPublisher.ModuleDCStart_V1EventMessage)"/>
<event value="153" version="2" level="win:Informational" template="ModuleLoadUnloadRundown_V2"
keywords ="LoaderRundownKeyword PerfTrackRundownKeyword" opcode="ModuleDCStart"
task="CLRLoaderRundown"
symbol="ModuleDCStart_V2" message="$(string.RundownPublisher.ModuleDCStart_V2EventMessage)"/>
<event value="154" version="0" level="win:Informational" template="ModuleLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="ModuleDCEnd"
task="CLRLoaderRundown"
symbol="ModuleDCEnd" message="$(string.RundownPublisher.ModuleDCEndEventMessage)"/>
<event value="154" version="1" level="win:Informational" template="ModuleLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword PerfTrackRundownKeyword" opcode="ModuleDCEnd"
task="CLRLoaderRundown"
symbol="ModuleDCEnd_V1" message="$(string.RundownPublisher.ModuleDCEnd_V1EventMessage)"/>
<event value="154" version="2" level="win:Informational" template="ModuleLoadUnloadRundown_V2"
keywords ="LoaderRundownKeyword PerfTrackRundownKeyword" opcode="ModuleDCEnd"
task="CLRLoaderRundown"
symbol="ModuleDCEnd_V2" message="$(string.RundownPublisher.ModuleDCEnd_V2EventMessage)"/>
<event value="155" version="0" level="win:Informational" template="AssemblyLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="AssemblyDCStart"
task="CLRLoaderRundown"
symbol="AssemblyDCStart" message="$(string.RundownPublisher.AssemblyDCStartEventMessage)"/>
<event value="155" version="1" level="win:Informational" template="AssemblyLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="AssemblyDCStart"
task="CLRLoaderRundown"
symbol="AssemblyDCStart_V1" message="$(string.RundownPublisher.AssemblyDCStart_V1EventMessage)"/>
<event value="156" version="0" level="win:Informational" template="AssemblyLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="AssemblyDCEnd"
task="CLRLoaderRundown"
symbol="AssemblyDCEnd" message="$(string.RundownPublisher.AssemblyDCEndEventMessage)"/>
<event value="156" version="1" level="win:Informational" template="AssemblyLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="AssemblyDCEnd"
task="CLRLoaderRundown"
symbol="AssemblyDCEnd_V1" message="$(string.RundownPublisher.AssemblyDCEnd_V1EventMessage)"/>
<event value="157" version="0" level="win:Informational" template="AppDomainLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="AppDomainDCStart"
task="CLRLoaderRundown"
symbol="AppDomainDCStart" message="$(string.RundownPublisher.AppDomainDCStartEventMessage)"/>
<event value="157" version="1" level="win:Informational" template="AppDomainLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="AppDomainDCStart"
task="CLRLoaderRundown"
symbol="AppDomainDCStart_V1" message="$(string.RundownPublisher.AppDomainDCStart_V1EventMessage)"/>
<event value="158" version="0" level="win:Informational" template="AppDomainLoadUnloadRundown"
keywords ="LoaderRundownKeyword" opcode="AppDomainDCEnd"
task="CLRLoaderRundown"
symbol="AppDomainDCEnd" message="$(string.RundownPublisher.AppDomainDCEndEventMessage)"/>
<event value="158" version="1" level="win:Informational" template="AppDomainLoadUnloadRundown_V1"
keywords ="LoaderRundownKeyword" opcode="AppDomainDCEnd"
task="CLRLoaderRundown"
symbol="AppDomainDCEnd_V1" message="$(string.RundownPublisher.AppDomainDCEnd_V1EventMessage)"/>
<event value="159" version="0" level="win:Informational" template="ThreadCreatedRundown"
keywords ="AppDomainResourceManagementRundownKeyword ThreadingKeyword" opcode="ThreadDC"
task="CLRLoaderRundown"
symbol="ThreadDC" message="$(string.RundownPublisher.ThreadCreatedEventMessage)"/>
<event value="160" version="0" level="win:Informational" template="ModuleRangeRundown"
keywords ="PerfTrackRundownKeyword" opcode="ModuleRangeDCStart"
task="CLRPerfTrackRundown"
symbol="ModuleRangeDCStart" message="$(string.RundownPublisher.ModuleRangeDCStartEventMessage)"/>
<event value="161" version="0" level="win:Informational" template="ModuleRangeRundown"
keywords ="PerfTrackRundownKeyword" opcode="ModuleRangeDCEnd"
task="CLRPerfTrackRundown"
symbol="ModuleRangeDCEnd" message="$(string.RundownPublisher.ModuleRangeDCEndEventMessage)"/>
<!-- CLR Runtime Information events for rundown -->
<event value="187" version="0" level="win:Informational" template="RuntimeInformationRundown"
opcode="win:Start"
task="CLRRuntimeInformationRundown"
symbol="RuntimeInformationDCStart" message="$(string.RundownPublisher.RuntimeInformationEventMessage)"/>
<!-- Tiered compilation events 280-289 -->
<event value="280" version="0" level="win:Informational" template="TieredCompilationSettings"
keywords="CompilationKeyword" task="TieredCompilationRundown" opcode="SettingsDCStart"
symbol="TieredCompilationSettingsDCStart" message="$(string.RundownPublisher.TieredCompilationSettingsDCStartEventMessage)"/>
<!-- Execution Checkpoint event 300 -->
<event value="300" version="0" level="win:Informational" template="ExecutionCheckpointRundown"
opcode="ExecutionCheckpointDCEnd" task="ExecutionCheckpointRundown"
symbol="ExecutionCheckpointDCEnd" message="$(string.RundownPublisher.ExecutionCheckpointDCEndEventMessage)"/>
</events>
</provider>
<!-- CLR Stress Publisher-->
<provider name="Microsoft-Windows-DotNETRuntimeStress"
guid="{CC2BCBBA-16B6-4cf3-8990-D74C2E8AF500}"
symbol="MICROSOFT_WINDOWS_DOTNETRUNTIME_STRESS_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--Keywords-->
<keywords>
<!-- Add your keywords here -->
<keyword name="StackKeyword" mask="0x40000000"
message="$(string.StressPublisher.StackKeywordMessage)" symbol="CLR_STRESSSTACK_KEYWORD"/>
</keywords>
<!--Tasks-->
<tasks>
<task name="StressLogTask" symbol="CLR_STRESSLOG_TASK" value="1"
eventGUID="{EA40C74D-4F65-4561-BB26-656231C8967F}"
message="$(string.StressPublisher.StressTaskMessage)">
<opcodes>
</opcodes>
</task>
<task name="CLRStackStress" symbol="CLR_STACKSTRESS_TASK"
value="11" eventGUID="{d3363dc0-243a-4620-a4d0-8a07d772f533}"
message="$(string.StressPublisher.StackTaskMessage)">
<opcodes>
<opcode name="CLRStackWalk" message="$(string.StressPublisher.CLRStackWalkOpcodeMessage)" symbol="CLR_STRESSSTACK_STACKWALK_OPCODE" value="82"> </opcode>
</opcodes>
</task>
</tasks>
<!--Templates-->
<templates>
<template tid="StressLog">
<data name="Facility" inType="win:UInt32" outType="win:HexInt32" />
<data name="LogLevel" inType="win:UInt8" />
<data name="Message" inType="win:AnsiString" />
<UserData>
<StressLog xmlns="myNs">
<Facility> %1 </Facility>
<LogLevel> %2 </LogLevel>
<Message> %3 </Message>
</StressLog>
</UserData>
</template>
<template tid="StressLog_V1">
<data name="Facility" inType="win:UInt32" outType="win:HexInt32" />
<data name="LogLevel" inType="win:UInt8" />
<data name="Message" inType="win:AnsiString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<StressLog_V1 xmlns="myNs">
<Facility> %1 </Facility>
<LogLevel> %2 </LogLevel>
<Message> %3 </Message>
<ClrInstanceID> %4 </ClrInstanceID>
</StressLog_V1>
</UserData>
</template>
<template tid="ClrStackWalk">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Reserved1" inType="win:UInt8" />
<data name="Reserved2" inType="win:UInt8" />
<data name="FrameCount" inType="win:UInt32" />
<data name="Stack" count="2" inType="win:Pointer" />
</template>
</templates>
<!--Events-->
<events>
<event value="0" version="0" level="win:Informational" template="StressLog"
task="StressLogTask"
opcode="win:Start"
symbol="StressLogEvent" message="$(string.StressPublisher.StressLogEventMessage)"/>
<event value="0" version="1" level="win:Informational" template="StressLog_V1"
task="StressLogTask"
opcode="win:Start"
symbol="StressLogEvent_V1" message="$(string.StressPublisher.StressLog_V1EventMessage)"/>
<event value="1" version="0" level="win:LogAlways" template="ClrStackWalk"
keywords ="StackKeyword" opcode="CLRStackWalk"
task="CLRStackStress"
symbol="CLRStackWalkStress" message="$(string.StressPublisher.StackEventMessage)"/>
</events>
</provider>
<!-- CLR Private Publisher-->
<provider name="Microsoft-Windows-DotNETRuntimePrivate"
guid="{763FD754-7086-4dfe-95EB-C01A46FAF4CA}"
symbol="MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--CLR Private Publisher-->
<!--Keywords-->
<keywords>
<keyword name="GCPrivateKeyword" mask="0x00000001"
message="$(string.PrivatePublisher.GCPrivateKeywordMessage)" symbol="CLR_PRIVATEGC_KEYWORD"/>
<keyword name="BindingKeyword" mask="0x00000002"
message="$(string.PrivatePublisher.BindingKeywordMessage)" symbol="CLR_PRIVATEBINDING_KEYWORD"/>
<keyword name="NGenForceRestoreKeyword" mask="0x00000004"
message="$(string.PrivatePublisher.NGenForceRestoreKeywordMessage)" symbol="CLR_PRIVATENGENFORCERESTORE_KEYWORD"/>
<keyword name="PrivateFusionKeyword" mask="0x00000008"
message="$(string.PrivatePublisher.PrivateFusionKeywordMessage)" symbol="CLR_PRIVATEFUSION_KEYWORD"/>
<keyword name="LoaderHeapPrivateKeyword" mask="0x00000010"
message="$(string.PrivatePublisher.LoaderHeapPrivateKeywordMessage)" symbol="CLR_PRIVATELOADERHEAP_KEYWORD"/>
<keyword name="SecurityPrivateKeyword" mask="0x00000400"
message="$(string.PrivatePublisher.SecurityPrivateKeywordMessage)" symbol="CLR_PRIVATESECURITY_KEYWORD"/>
<keyword name="InteropPrivateKeyword" mask="0x2000"
message="$(string.PrivatePublisher.InteropPrivateKeywordMessage)" symbol="CLR_INTEROP_KEYWORD"/>
<keyword name="GCHandlePrivateKeyword" mask="0x4000"
message="$(string.PrivatePublisher.GCHandlePrivateKeywordMessage)" symbol="CLR_PRIVATEGCHANDLE_KEYWORD"/>
<keyword name="MulticoreJitPrivateKeyword" mask="0x20000"
message="$(string.PrivatePublisher.MulticoreJitPrivateKeywordMessage)" symbol="CLR_PRIVATEMULTICOREJIT_KEYWORD"/>
<keyword name="StackKeyword" mask="0x40000000"
message="$(string.PrivatePublisher.StackKeywordMessage)" symbol="CLR_PRIVATESTACK_KEYWORD"/>
<keyword name="StartupKeyword" mask="0x80000000"
message="$(string.PrivatePublisher.StartupKeywordMessage)" symbol="CLR_PRIVATESTARTUP_KEYWORD"/>
<keyword name="PerfTrackPrivateKeyword" mask="0x20000000"
message="$(string.PrivatePublisher.PerfTrackKeywordMessage)" symbol="CLR_PERFTRACK_PRIVATE_KEYWORD"/>
<!-- NOTE: This is not used anymore. They are kept around for backcompat with traces that might have already contained these -->
<keyword name="DynamicTypeUsageKeyword" mask="0x00000020"
message="$(string.PrivatePublisher.DynamicTypeUsageMessage)" symbol="CLR_PRIVATE_DYNAMICTYPEUSAGE_KEYWORD"/>
</keywords>
<!--Tasks-->
<tasks>
<task name="GarbageCollectionPrivate" symbol="CLR_GCPRIVATE_TASK"
value="1" eventGUID="{2f1b6bf6-18ff-4645-9501-15df6c64c2cf}"
message="$(string.PrivatePublisher.GarbageCollectionTaskMessage)">
<opcodes>
<opcode name="GCDecision" message="$(string.PrivatePublisher.GCDecisionOpcodeMessage)" symbol="CLR_PRIVATEGC_GCDECISION_OPCODE" value="132"> </opcode>
<opcode name="GCSettings" message="$(string.PrivatePublisher.GCSettingsOpcodeMessage)" symbol="CLR_PRIVATEGC_GCSETTINGS_OPCODE" value="14"> </opcode>
<opcode name="GCOptimized" message="$(string.PrivatePublisher.GCOptimizedOpcodeMessage)" symbol="CLR_PRIVATEGC_GCOPTIMIZED_OPCODE" value="16"> </opcode>
<opcode name="GCPerHeapHistory" message="$(string.PrivatePublisher.GCPerHeapHistoryOpcodeMessage)" symbol="CLR_PRIVATEGC_GCPERHEAPHISTORY_OPCODE" value="17"> </opcode>
<opcode name="GCGlobalHeapHistory" message="$(string.PrivatePublisher.GCGlobalHeapHistoryOpcodeMessage)" symbol="CLR_PRIVATEGC_GCGLOBALHEAPHISTORY_OPCODE" value="18"> </opcode>
<opcode name="GCFullNotify" message="$(string.PrivatePublisher.GCFullNotifyOpcodeMessage)" symbol="CLR_PRIVATEGC_GCFULLNOTIFY_OPCODE" value="19"> </opcode>
<opcode name="GCJoin" message="$(string.PrivatePublisher.GCJoinOpcodeMessage)" symbol="CLR_PRIVATEGC_JOIN_OPCODE" value="20"> </opcode>
<opcode name="PrvGCMarkStackRoots" message="$(string.PrivatePublisher.GCMarkStackRootsOpcodeMessage)" symbol="CLR_PRIVATEGC_MARKSTACKROOTS_OPCODE" value="21"> </opcode>
<opcode name="PrvGCMarkFinalizeQueueRoots" message="$(string.PrivatePublisher.GCMarkFinalizeQueueRootsOpcodeMessage)" symbol="CLR_PRIVATEGC_MARKFINALIZEQUEUEROOTS_OPCODE" value="22"> </opcode>
<opcode name="PrvGCMarkHandles" message="$(string.PrivatePublisher.GCMarkHandlesOpcodeMessage)" symbol="CLR_PRIVATEGC_MARKHANDLES_OPCODE" value="23"> </opcode>
<opcode name="PrvGCMarkCards" message="$(string.PrivatePublisher.GCMarkCardsOpcodeMessage)" symbol="CLR_PRIVATEGC_MARKCARDS_OPCODE" value="24"> </opcode>
<opcode name="BGCBegin" message="$(string.PrivatePublisher.BGCBeginOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCBEGIN_OPCODE" value="25"> </opcode>
<opcode name="BGC1stNonConEnd" message="$(string.PrivatePublisher.BGC1stNonCondEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC1STNONCONEND_OPCODE" value="26"> </opcode>
<opcode name="BGC1stConEnd" message="$(string.PrivatePublisher.BGC1stConEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC1STCONEND_OPCODE" value="27"> </opcode>
<opcode name="BGC2ndNonConBegin" message="$(string.PrivatePublisher.BGC2ndNonConBeginOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC2NDNONCONBEGIN_OPCODE" value="28"> </opcode>
<opcode name="BGC2ndNonConEnd" message="$(string.PrivatePublisher.BGC2ndNonConEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC2NDNONCONEND_OPCODE" value="29"> </opcode>
<opcode name="BGC2ndConBegin" message="$(string.PrivatePublisher.BGC2ndConBeginOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC2NDCONBEGIN_OPCODE" value="30"> </opcode>
<opcode name="BGC2ndConEnd" message="$(string.PrivatePublisher.BGC2ndConEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC2NDCONEND_OPCODE" value="31"> </opcode>
<opcode name="BGCPlanEnd" message="$(string.PrivatePublisher.BGCPlanEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCPLANEND_OPCODE" value="32"> </opcode>
<opcode name="BGCSweepEnd" message="$(string.PrivatePublisher.BGCSweepEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCSWEEPEND_OPCODE" value="33"> </opcode>
<opcode name="BGCDrainMark" message="$(string.PrivatePublisher.BGCDrainMarkOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCDRAINMARK_OPCODE" value="34"> </opcode>
<opcode name="BGCRevisit" message="$(string.PrivatePublisher.BGCRevisitOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCREVISIT_OPCODE" value="35"> </opcode>
<opcode name="BGCOverflow" message="$(string.PrivatePublisher.BGCOverflowOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCOVERFLOW_OPCODE" value="36"> </opcode>
<opcode name="BGCAllocWaitBegin" message="$(string.PrivatePublisher.BGCAllocWaitBeginOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCALLOCWAITBEGIN_OPCODE" value="37"> </opcode>
<opcode name="BGCAllocWaitEnd" message="$(string.PrivatePublisher.BGCAllocWaitEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGCALLOCWAITEND_OPCODE" value="38"> </opcode>
<opcode name="PrvFinalizeObject" message="$(string.PrivatePublisher.FinalizeObjectOpcodeMessage)" symbol="CLR_PRIVATEGC_FINALIZEOBJECT_OPCODE" value="39"> </opcode>
<opcode name="CCWRefCountChange" message="$(string.PrivatePublisher.CCWRefCountChangeOpcodeMessage)" symbol="CLR_PRIVATEGC_CCWREFCOUNTCHANGE_OPCODE" value="40"> </opcode>
<opcode name="SetGCHandle" message="$(string.PrivatePublisher.SetGCHandleOpcodeMessage)" symbol="CLR_PRIVATEGC_SETGCHANDLE_OPCODE" value="42"> </opcode>
<opcode name="DestroyGCHandle" message="$(string.PrivatePublisher.DestroyGCHandleOpcodeMessage)" symbol="CLR_PRIVATEGC_DESTROYGCHANDLE_OPCODE" value="43"> </opcode>
<opcode name="PinPlugAtGCTime" message="$(string.PrivatePublisher.PinPlugAtGCTimeOpcodeMessage)" symbol="CLR_PRIVATEGC_PINGCPLUG_OPCODE" value="44"> </opcode>
<opcode name="BGC1stSweepEnd" message="$(string.PrivatePublisher.BGC1stSweepEndOpcodeMessage)" symbol="CLR_PRIVATEGC_BGC1STSWEEPEND_OPCODE" value="45"> </opcode>
</opcodes>
</task>
<task name="CLRFailFast" symbol="CLR_FAILFAST_TASK"
value="2" eventGUID="{EE9EDE12-C5F5-4995-81A2-DCFB5F6B80C8}"
message="$(string.PrivatePublisher.FailFastTaskMessage)">
<opcodes>
<opcode name="FailFast" message="$(string.PrivatePublisher.FailFastOpcodeMessage)" symbol="CLR_FAILFAST_FAILFAST_OPCODE" value="52"> </opcode>
</opcodes>
</task>
<task name="Startup" symbol="CLR_STARTUP_TASK"
value="9" eventGUID="{02D08A4F-FD01-4538-989B-03E437B950F4}"
message="$(string.PrivatePublisher.StartupTaskMessage)">
<opcodes>
<opcode name="EEStartupStart" message="$(string.PrivatePublisher.EEStartupStartOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EESTARTUPSTART_OPCODE" value="128"> </opcode>
<opcode name="EEStartupEnd" message="$(string.PrivatePublisher.EEStartupEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EESTARTUPEND_OPCODE" value="129"> </opcode>
<opcode name="EEConfigSetup" message="$(string.PrivatePublisher.EEConfigSetupOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EECONFIGSETUP_OPCODE" value="130"> </opcode>
<opcode name="EEConfigSetupEnd" message="$(string.PrivatePublisher.EEConfigSetupEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EECONFIGSETUPEND_OPCODE" value="131"> </opcode>
<opcode name="LoadSystemBases" message="$(string.PrivatePublisher.LoadSystemBasesOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LOADSYSTEMBASES_OPCODE" value="132"> </opcode>
<opcode name="LoadSystemBasesEnd" message="$(string.PrivatePublisher.LoadSystemBasesEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LOADSYSTEMBASESEND_OPCODE" value="133"> </opcode>
<opcode name="ExecExe" message="$(string.PrivatePublisher.ExecExeOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EXEEXE_OPCODE" value="134"> </opcode>
<opcode name="ExecExeEnd" message="$(string.PrivatePublisher.ExecExeEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EXEEXEEND_OPCODE" value="135"> </opcode>
<opcode name="Main" message="$(string.PrivatePublisher.MainOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_MAIN_OPCODE" value="136"> </opcode>
<opcode name="MainEnd" message="$(string.PrivatePublisher.MainEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_MAINEND_OPCODE" value="137"> </opcode>
<opcode name="ApplyPolicyStart" message="$(string.PrivatePublisher.ApplyPolicyStartOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_APPLYPOLICYSTART_OPCODE" value="10"> </opcode>
<opcode name="ApplyPolicyEnd" message="$(string.PrivatePublisher.ApplyPolicyEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_APPLYPOLICYEND_OPCODE" value="11"> </opcode>
<opcode name="LdLibShFolder" message="$(string.PrivatePublisher.LdLibShFolderOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LDLIBSHFOLDER_OPCODE" value="12"> </opcode>
<opcode name="LdLibShFolderEnd" message="$(string.PrivatePublisher.LdLibShFolderEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LDLIBSHFOLDEREND_OPCODE" value="13"> </opcode>
<opcode name="PrestubWorker" message="$(string.PrivatePublisher.PrestubWorkerOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_PRESTUBWORKER_OPCODE" value="14"> </opcode>
<opcode name="PrestubWorkerEnd" message="$(string.PrivatePublisher.PrestubWorkerEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_PRESTUBWORKEREND_OPCODE" value="15"> </opcode>
<opcode name="GetInstallationStart" message="$(string.PrivatePublisher.GetInstallationStartOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_GETINSTALLATIONSTART_OPCODE" value="16"> </opcode>
<opcode name="GetInstallationEnd" message="$(string.PrivatePublisher.GetInstallationEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_GETINSTALLATIONEND_OPCODE" value="17"> </opcode>
<opcode name="OpenHModule" message="$(string.PrivatePublisher.OpenHModuleOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_OPENHMODULE_OPCODE" value="18"> </opcode>
<opcode name="OpenHModuleEnd" message="$(string.PrivatePublisher.OpenHModuleEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_OPENHMODULEEND_OPCODE" value="19"> </opcode>
<opcode name="ExplicitBindStart" message="$(string.PrivatePublisher.ExplicitBindStartOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EXPLICITBINDSTART_OPCODE" value="20"> </opcode>
<opcode name="ExplicitBindEnd" message="$(string.PrivatePublisher.ExplicitBindEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EXPLICITBINDEND_OPCODE" value="21"> </opcode>
<opcode name="ParseXml" message="$(string.PrivatePublisher.ParseXmlOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_PARSEXML_OPCODE" value="22"> </opcode>
<opcode name="ParseXmlEnd" message="$(string.PrivatePublisher.ParseXmlEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_PARSEXMLEND_OPCODE" value="23"> </opcode>
<opcode name="InitDefaultDomain" message="$(string.PrivatePublisher.InitDefaultDomainOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_INITDEFAULTDOMAIN_OPCODE" value="24"> </opcode>
<opcode name="InitDefaultDomainEnd" message="$(string.PrivatePublisher.InitDefaultDomainEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_INITDEFAULTDOMAINEND_OPCODE" value="25"> </opcode>
<opcode name="InitSecurity" message="$(string.PrivatePublisher.InitSecurityOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_INITSECURITY_OPCODE" value="26"> </opcode>
<opcode name="InitSecurityEnd" message="$(string.PrivatePublisher.InitSecurityEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_INITSECURITYEND_OPCODE" value="27"> </opcode>
<opcode name="AllowBindingRedirs" message="$(string.PrivatePublisher.AllowBindingRedirsOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_ALLOWBINDINGREDIRS_OPCODE" value="28"> </opcode>
<opcode name="AllowBindingRedirsEnd" message="$(string.PrivatePublisher.AllowBindingRedirsEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_ALLOWBINDINGREDIRSEND_OPCODE" value="29"> </opcode>
<opcode name="EEConfigSync" message="$(string.PrivatePublisher.EEConfigSyncOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EECONFIGSYNC_OPCODE" value="30"> </opcode>
<opcode name="EEConfigSyncEnd" message="$(string.PrivatePublisher.EEConfigSyncEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_EECONFIGSYNCEND_OPCODE" value="31"> </opcode>
<opcode name="FusionBinding" message="$(string.PrivatePublisher.FusionBindingOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONBINDING_OPCODE" value="32"> </opcode>
<opcode name="FusionBindingEnd" message="$(string.PrivatePublisher.FusionBindingEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONBINDINGEND_OPCODE" value="33"> </opcode>
<opcode name="LoaderCatchCall" message="$(string.PrivatePublisher.LoaderCatchCallOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LOADERCATCHCALL_OPCODE" value="34"> </opcode>
<opcode name="LoaderCatchCallEnd" message="$(string.PrivatePublisher.LoaderCatchCallEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_LOADERCATCHCALLEND_OPCODE" value="35"> </opcode>
<opcode name="FusionInit" message="$(string.PrivatePublisher.FusionInitOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONINIT_OPCODE" value="36"> </opcode>
<opcode name="FusionInitEnd" message="$(string.PrivatePublisher.FusionInitEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONINITEND_OPCODE" value="37"> </opcode>
<opcode name="FusionAppCtx" message="$(string.PrivatePublisher.FusionAppCtxOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONAPPCTX_OPCODE" value="38"> </opcode>
<opcode name="FusionAppCtxEnd" message="$(string.PrivatePublisher.FusionAppCtxEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSIONAPPCTXEND_OPCODE" value="39"> </opcode>
<opcode name="Fusion2EE" message="$(string.PrivatePublisher.Fusion2EEOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSION2EE_OPCODE" value="40"> </opcode>
<opcode name="Fusion2EEEnd" message="$(string.PrivatePublisher.Fusion2EEEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_FUSION2EEEND_OPCODE" value="41"> </opcode>
<opcode name="SecurityCatchCall" message="$(string.PrivatePublisher.SecurityCatchCallOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_SECURITYCATCHCALL_OPCODE" value="42"> </opcode>
<opcode name="SecurityCatchCallEnd" message="$(string.PrivatePublisher.SecurityCatchCallEndOpcodeMessage)" symbol="CLR_PRIVATESTARTUP_SECURITYCATCHCALLEND_OPCODE" value="43"> </opcode>
</opcodes>
</task>
<task name="Binding" symbol="CLR_BINDING_TASK"
value="10" eventGUID="{E90E32BA-E396-4e6a-A790-0A08C6C925DC}"
message="$(string.PrivatePublisher.BindingTaskMessage)">
<opcodes>
<opcode name="BindingPolicyPhaseStart" message="$(string.PrivatePublisher.BindingPolicyPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGPOLICYPHASESTART_OPCODE" value="51"> </opcode>
<opcode name="BindingPolicyPhaseEnd" message="$(string.PrivatePublisher.BindingPolicyPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGPOLICYPHASEEND_OPCODE" value="52"> </opcode>
<opcode name="BindingNgenPhaseStart" message="$(string.PrivatePublisher.BindingNgenPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGNGENPHASESTART_OPCODE" value="53"> </opcode>
<opcode name="BindingNgenPhaseEnd" message="$(string.PrivatePublisher.BindingNgenPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGNGENPHASEEND_OPCODE" value="54"> </opcode>
<opcode name="BindingLookupAndProbingPhaseStart" message="$(string.PrivatePublisher.BindingLoopupAndProbingPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGLOOKUPANDPROBINGPHASESTART_OPCODE" value="55"> </opcode>
<opcode name="BindingLookupAndProbingPhaseEnd" message="$(string.PrivatePublisher.BindingLookupAndProbingPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGLOOKUPANDPROBINGPHASEEND_OPCODE" value="56"> </opcode>
<opcode name="LoaderPhaseStart" message="$(string.PrivatePublisher.LoaderPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERPHASESTART_OPCODE" value="57"> </opcode>
<opcode name="LoaderPhaseEnd" message="$(string.PrivatePublisher.LoaderPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERPHASEEND_OPCODE" value="58"> </opcode>
<opcode name="BindingPhaseStart" message="$(string.PrivatePublisher.BindingPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGPHASESTART_OPCODE" value="59"> </opcode>
<opcode name="BindingPhaseEnd" message="$(string.PrivatePublisher.BindingPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGPHASEEND_OPCODE" value="60"> </opcode>
<opcode name="BindingDownloadPhaseStart" message="$(string.PrivatePublisher.BindingDownloadPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGDOWNLOADPHASESTART_OPCODE" value="61"> </opcode>
<opcode name="BindingDownloadPhaseEnd" message="$(string.PrivatePublisher.BindingDownloadPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_BINDINGDOWNLOADPHASEEND_OPCODE" value="62"> </opcode>
<opcode name="LoaderAssemblyInitPhaseStart" message="$(string.PrivatePublisher.LoaderAssemblyInitPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERASSEMBLYINITPHASESTART_OPCODE" value="63"> </opcode>
<opcode name="LoaderAssemblyInitPhaseEnd" message="$(string.PrivatePublisher.LoaderAssemblyInitPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERASSEMBLYINITPHASEEND_OPCODE" value="64"> </opcode>
<opcode name="LoaderMappingPhaseStart" message="$(string.PrivatePublisher.LoaderMappingPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERMAPPINGPHASESTART_OPCODE" value="65"> </opcode>
<opcode name="LoaderMappingPhaseEnd" message="$(string.PrivatePublisher.LoaderMappingPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERMAPPINGPHASEEND_OPCODE" value="66"> </opcode>
<opcode name="LoaderDeliverEventsPhaseStart" message="$(string.PrivatePublisher.LoaderDeliverEventPhaseStartOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERDELIVERYEVENTSPHASESTART_OPCODE" value="67"> </opcode>
<opcode name="LoaderDeliverEventsPhaseEnd" message="$(string.PrivatePublisher.LoaderDeliverEventsPhaseEndOpcodeMessage)" symbol="CLR_PRIVATEBINDING_LOADERDELIVERYEVENTSPHASEEND_OPCODE" value="68"> </opcode>
<opcode name="FusionMessage" message="$(string.PrivatePublisher.FusionMessageOpcodeMessage)" symbol="CLR_PRIVATEBINDING_FUSIONMESSAGE_OPCODE" value="70"> </opcode>
<opcode name="FusionErrorCode" message="$(string.PrivatePublisher.FusionErrorCodeOpcodeMessage)" symbol="CLR_PRIVATEBINDING_FUSIONERRORCODE_OPCODE" value="71"> </opcode>
</opcodes>
</task>
<task name="CLRStackPrivate" symbol="CLR_STACKPRIVATE_TASK"
value="11" eventGUID="{d3363dc0-243a-4620-a4d0-8a07d772f533}"
message="$(string.PrivatePublisher.StackTaskMessage)">
<opcodes>
<opcode name="CLRStackWalk" message="$(string.PrivatePublisher.CLRStackWalkOpcodeMessage)" symbol="CLR_PRIVATESTACK_STACKWALK_OPCODE" value="82"> </opcode>
</opcodes>
</task>
<task name="EvidenceGeneratedTask" symbol="CLR_EVIDENCE_GENERATED_TASK"
value="12" eventGUID="{24333617-5ae4-4f9e-a5c5-5ede1bc59207}"
message="$(string.PrivatePublisher.EvidenceGeneratedTaskMessage)">
<opcodes>
<opcode name="EvidenceGenerated" message="$(string.PrivatePublisher.EvidenceGeneratedMessage)" symbol="CLR_EVIDENCEGENERATED_OPCODE" value="10"/>
</opcodes>
</task>
<task name="CLRNgenBinder" symbol="CLR_NGEN_BINDER_TASK"
value="13" eventGUID="{861f5339-19d6-4873-b350-7b03228bda7c}"
message="$(string.PrivatePublisher.NgenBinderTaskMessage)">
<opcodes>
<opcode name="NgenBind" message="$(string.PrivatePublisher.NgenBindOpcodeMessage)" symbol="CLR_NGEN_BINDER_OPCODE" value="69"></opcode>
</opcodes>
</task>
<task name="TransparencyComputation" symbol="CLR_TRANSPARENCY_COMPUTATION_TASK"
value="14" eventGUID="{e2444377-ddf9-4589-a885-08d6092521df}"
message="$(string.PrivatePublisher.TransparencyComputationMessage)">
<opcodes>
<opcode name="ModuleTransparencyComputationStart" message="$(string.PrivatePublisher.ModuleTransparencyComputationStartMessage)" symbol="CLR_MODULE_TRANSPARENCY_COMPUTATION_START_OPCODE" value="83"/>
<opcode name="ModuleTransparencyComputationEnd" message="$(string.PrivatePublisher.ModuleTransparencyComputationEndMessage)" symbol="CLR_MODULE_TRANSPARENCY_COMPUTATION_END_OPCODE" value="84"/>
<opcode name="TypeTransparencyComputationStart" message="$(string.PrivatePublisher.TypeTransparencyComputationStartMessage)" symbol="CLR_TYPE_TRANSPARENCY_COMPUTATION_START_OPCODE" value="85"/>
<opcode name="TypeTransparencyComputationEnd" message="$(string.PrivatePublisher.TypeTransparencyComputationEndMessage)" symbol="CLR_TYPE_TRANSPARENCY_COMPUTATION_END_OPCODE" value="86"/>
<opcode name="MethodTransparencyComputationStart" message="$(string.PrivatePublisher.MethodTransparencyComputationStartMessage)" symbol="CLR_METHOD_TRANSPARENCY_COMPUTATION_START_OPCODE" value="87"/>
<opcode name="MethodTransparencyComputationEnd" message="$(string.PrivatePublisher.MethodTransparencyComputationEndMessage)" symbol="CLR_METHOD_TRANSPARENCY_COMPUTATION_END_OPCODE" value="88"/>
<opcode name="FieldTransparencyComputationStart" message="$(string.PrivatePublisher.FieldTransparencyComputationStartMessage)" symbol="CLR_FIELD_TRANSPARENCY_COMPUTATION_START_OPCODE" value="89"/>
<opcode name="FieldTransparencyComputationEnd" message="$(string.PrivatePublisher.FieldTransparencyComputationEndMessage)" symbol="CLR_FIELD_TRANSPARENCY_COMPUTATION_END_OPCODE" value="90"/>
<opcode name="TokenTransparencyComputationStart" message="$(string.PrivatePublisher.TokenTransparencyComputationStartMessage)" symbol="CLR_TOKEN_TRANSPARENCY_COMPUTATION_START_OPCODE" value="91"/>
<opcode name="TokenTransparencyComputationEnd" message="$(string.PrivatePublisher.TokenTransparencyComputationEndMessage)" symbol="CLR_TOKEN_TRANSPARENCY_COMPUTATION_END_OPCODE" value="92"/>
</opcodes>
</task>
<task name="LoaderHeapAllocation" symbol="CLR_LOADERHEAPALLOCATIONPRIVATE_TASK"
value="16" eventGUID="{87f1e966-d604-41ba-b1ab-183849dff29d}"
message="$(string.PrivatePublisher.LoaderHeapAllocationPrivateTaskMessage)">
<opcodes>
<opcode name="AllocRequest" message="$(string.PrivatePublisher.LoaderHeapPrivateAllocRequestMessage)" symbol="CLR_LOADERHEAP_ALLOCREQUEST_OPCODE" value="97"/>
</opcodes>
</task>
<task name="CLRMulticoreJit" symbol="CLR_MULTICOREJIT_TASK"
value="17" eventGUID="{B85AD9E5-658B-4215-8DDB-834040F4BC10}"
message="$(string.PrivatePublisher.MulticoreJitTaskMessage)">
<opcodes>
<opcode name="Common" message="$(string.PrivatePublisher.MulticoreJitOpcodeMessage)" symbol="CLR_MULTICOREJIT_COMMON_OPCODE" value="10"> </opcode>
<opcode name="MethodCodeReturned" message="$(string.PrivatePublisher.MulticoreJitOpcodeMethodCodeReturnedMessage)" symbol="CLR_MULTICOREJIT_METHODCODERETURNED_OPCODE" value="11"> </opcode>
</opcodes>
</task>
<task name="CLRPerfTrackPrivate" symbol="CLR_PERFTRACK_PRIVATE_TASK"
value="20" eventGUID="{EAC685F6-2104-4dec-88FD-91E4254221EC}"
message="$(string.PrivatePublisher.PerfTrackTaskMessage)">
<opcodes>
<opcode name="ModuleRangeLoadPrivate" message="$(string.PrivatePublisher.ModuleRangeLoadOpcodeMessage)" symbol="CLR_PERFTRACK_PRIVATE_MODULE_RANGE_LOAD_OPCODE" value="10"> </opcode>
</opcodes>
</task>
<!-- NOTE: These are not used anymore. They are kept around for backcompat with traces that might have already contained these -->
<task name="DynamicTypeUsage" symbol="CLR_DYNAMICTYPEUSAGE_TASK"
value="22" eventGUID="{4F67E18D-EEDD-4056-B8CE-DD822FE54553}"
message="$(string.PrivatePublisher.DynamicTypeUsageTaskMessage)">
<opcodes>
<opcode name="IInspectableRuntimeClassName" message="$(string.PrivatePublisher.IInspectableRuntimeClassNameOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_IINSPECTABLERUNTIMECLASSNAME_OPCODE" value="11"> </opcode>
<opcode name="WinRTUnbox" message="$(string.PrivatePublisher.WinRTUnboxOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_WINRTUNBOX_OPCODE" value="12"> </opcode>
<opcode name="CreateRCW" message="$(string.PrivatePublisher.CreateRCWOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_CREATERCW_OPCODE" value="13"> </opcode>
<opcode name="RCWVariance" message="$(string.PrivatePublisher.RCWVarianceOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_RCWVARIANCE_OPCODE" value="14"> </opcode>
<opcode name="RCWIEnumerableCasting" message="$(string.PrivatePublisher.RCWIEnumerableCastingOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_RCWIENUMERABLECASTING_OPCODE" value="15"> </opcode>
<opcode name="CreateCCW" message="$(string.PrivatePublisher.CreateCCWOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_CREATECCW_OPCODE" value="16"> </opcode>
<opcode name="CCWVariance" message="$(string.PrivatePublisher.CCWVarianceOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_CCWVARIANCE_OPCODE" value="17"> </opcode>
<opcode name="ObjectVariantMarshallingToNative" message="$(string.PrivatePublisher.ObjectVariantMarshallingToNativeOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_OBJECTVARIANTMARSHALLINGTONATIVE_OPCODE" value="18"> </opcode>
<opcode name="GetTypeFromGUID" message="$(string.PrivatePublisher.GetTypeFromGUIDOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_GETTYPEFROMGUID_OPCODE" value="19"> </opcode>
<opcode name="GetTypeFromProgID" message="$(string.PrivatePublisher.GetTypeFromProgIDOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_GETTYPEFROMPROGID_OPCODE" value="20"> </opcode>
<opcode name="ConvertToCallbackEtw" message="$(string.PrivatePublisher.ConvertToCallbackEtwOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_CONVERTTOCALLBACKETW_OPCODE" value="21"> </opcode>
<opcode name="BeginCreateManagedReference" message="$(string.PrivatePublisher.BeginCreateManagedReferenceOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_BEGINCREATEMANAGEDREFERENCE_OPCODE" value="22"> </opcode>
<opcode name="EndCreateManagedReference" message="$(string.PrivatePublisher.EndCreateManagedReferenceOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_ENDCREATEMANAGEDREFERENCE_OPCODE" value="23"> </opcode>
<opcode name="ObjectVariantMarshallingToManaged" message="$(string.PrivatePublisher.ObjectVariantMarshallingToManagedOpcodeMessage)" symbol="CLR_DYNAMICTYPEUSAGE_OBJECTVARIANTMARSHALLINGTOMANAGED_OPCODE" value="24"> </opcode>
</opcodes>
</task>
</tasks>
<maps>
<valueMap name="ModuleRangeSectionTypeMap">
<map value="0x1" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ModuleSection)"/>
<map value="0x2" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.EETableSection)"/>
<map value="0x3" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.WriteDataSection)"/>
<map value="0x4" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.WriteableDataSection)"/>
<map value="0x5" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DataSection)"/>
<map value="0x6" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.RVAStaticsSection)"/>
<map value="0x7" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.EEDataSection)"/>
<map value="0x8" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoTableEagerSection)"/>
<map value="0x9" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoTableSection)"/>
<map value="0xA" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.EEReadonlyData)"/>
<map value="0xB" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlyData)"/>
<map value="0xC" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ClassSection)"/>
<map value="0xD" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CrossDomainInfoSection)"/>
<map value="0xE" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodDescSection)"/>
<map value="0xF" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodDescWriteableSection)"/>
<map value="0x10" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ExceptionSection)"/>
<map value="0x11" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.InstrumentSection)"/>
<map value="0x12" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.VirtualImportThunkSection)"/>
<map value="0x13" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ExternalMethodThunkSection)"/>
<map value="0x14" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.HelperTableSection)"/>
<map value="0x15" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeWriteableSection)"/>
<map value="0x16" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeWriteSection)"/>
<map value="0x17" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeSection)"/>
<map value="0x18" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.Win32ResourcesSection)"/>
<map value="0x19" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.HeaderSection)"/>
<map value="0x1A" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.MetadataSection)"/>
<map value="0x1B" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoSection)"/>
<map value="0x1C" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ImportTableSection)"/>
<map value="0x1D" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CodeSection)"/>
<map value="0x1E" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CodeHeaderSection)"/>
<map value="0x1F" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CodeManagerSection)"/>
<map value="0x20" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.UnwindDataSection)"/>
<map value="0x21" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.RuntimeFunctionSection)"/>
<map value="0x22" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.StubsSection)"/>
<map value="0x23" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.StubDispatchDataSection)"/>
<map value="0x24" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ExternalMethodDataSection)"/>
<map value="0x25" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoDelayListSection)"/>
<map value="0x26" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlySharedSection)"/>
<map value="0x27" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlySection)"/>
<map value="0x28" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ILSection)"/>
<map value="0x29" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.GCInfoSection)"/>
<map value="0x2A" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ILMetadataSection)"/>
<map value="0x2B" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.ResourcesSection)"/>
<map value="0x2C" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.CompressedMapsSection)"/>
<map value="0x2D" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.DebugSection)"/>
<map value="0x2E" message="$(string.PrivatePublisher.ModuleRangeSectionTypeMap.BaseRelocsSection)"/>
</valueMap>
<valueMap name="GCHandleKindMap">
<map value="0x0" message="$(string.PrivatePublisher.GCHandleKind.WeakShortMessage)"/>
<map value="0x1" message="$(string.PrivatePublisher.GCHandleKind.WeakLongMessage)"/>
<map value="0x2" message="$(string.PrivatePublisher.GCHandleKind.StrongMessage)"/>
<map value="0x3" message="$(string.PrivatePublisher.GCHandleKind.PinnedMessage)"/>
<map value="0x4" message="$(string.PrivatePublisher.GCHandleKind.VariableMessage)"/>
<map value="0x5" message="$(string.PrivatePublisher.GCHandleKind.RefCountedMessage)"/>
<map value="0x6" message="$(string.PrivatePublisher.GCHandleKind.DependentMessage)"/>
<map value="0x7" message="$(string.PrivatePublisher.GCHandleKind.AsyncPinnedMessage)"/>
<map value="0x8" message="$(string.PrivatePublisher.GCHandleKind.SizedRefMessage)"/>
</valueMap>
<bitMap name="ModuleRangeIBCTypeMap">
<map value="0x1" message="$(string.PrivatePublisher.ModuleRangeIBCTypeMap.IBCUnprofiledSectionMessage)"/>
<map value="0x2" message="$(string.PrivatePublisher.ModuleRangeIBCTypeMap.IBCProfiledSectionMessage)"/>
</bitMap>
<bitMap name="ModuleRangeTypeMap">
<map value="0x1" message="$(string.PrivatePublisher.ModuleRangeTypeMap.HotRangeMessage)"/>
<map value="0x2" message="$(string.PrivatePublisher.ModuleRangeTypeMap.WarmRangeMessage)"/>
<map value="0x4" message="$(string.PrivatePublisher.ModuleRangeTypeMap.ColdRangeMessage)"/>
<map value="0x8" message="$(string.PrivatePublisher.ModuleRangeTypeMap.HotColdRangeMessage)"/>
</bitMap>
</maps>
<!--Templates-->
<templates>
<!--Private Templates-->
<template tid="ClrStackWalk">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Reserved1" inType="win:UInt8" />
<data name="Reserved2" inType="win:UInt8" />
<data name="FrameCount" inType="win:UInt32" />
<data name="Stack" count="2" inType="win:Pointer" />
</template>
<template tid="EvidenceGenerated">
<data name="Type" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="AppDomain" inType="win:UInt32" outType="xs:unsignedInt"/>
<data name="ILImage" inType="win:UnicodeString"/>
<data name="ClrInstanceID" inType="win:UInt16"/>
<UserData>
<EvidenceGenerated xmlns="myNs">
<Type> %1 </Type>
<AppDomain> %2 </AppDomain>
<ILImage> %3 </ILImage>
</EvidenceGenerated>
</UserData>
</template>
<template tid="GCDecision">
<data name="DoCompact" inType="win:Boolean" />
<UserData>
<GCDecision xmlns="myNs">
<DoCompact> %1 </DoCompact>
</GCDecision>
</UserData>
</template>
<template tid="GCDecision_V1">
<data name="DoCompact" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCDecision_V1 xmlns="myNs">
<DoCompact> %1 </DoCompact>
<ClrInstanceID> %2 </ClrInstanceID>
</GCDecision_V1>
</UserData>
</template>
<template tid="PrvGCMark">
<data name="HeapNum" inType="win:UInt32" />
<UserData>
<PrvGCMark xmlns="myNs">
<HeapNum> %1 </HeapNum>
</PrvGCMark>
</UserData>
</template>
<template tid="PrvGCMark_V1">
<data name="HeapNum" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<PrvGCMark_V1 xmlns="myNs">
<HeapNum> %1 </HeapNum>
<ClrInstanceID> %2 </ClrInstanceID>
</PrvGCMark_V1>
</UserData>
</template>
<template tid="GCPerHeapHistory">
</template>
<template tid="GCPerHeapHistory_V1">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCPerHeapHistory_V1 xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCPerHeapHistory_V1>
</UserData>
</template>
<template tid="GCGlobalHeap">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<UserData>
<GCGlobalHeap xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
</GCGlobalHeap>
</UserData>
</template>
<template tid="GCGlobalHeap_V1">
<data name="FinalYoungestDesired" inType="win:UInt64" outType="win:HexInt64" />
<data name="NumHeaps" inType="win:Int32" />
<data name="CondemnedGeneration" inType="win:UInt32" />
<data name="Gen0ReductionCount" inType="win:UInt32" />
<data name="Reason" inType="win:UInt32" />
<data name="GlobalMechanisms" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCGlobalHeap_V1 xmlns="myNs">
<FinalYoungestDesired> %1 </FinalYoungestDesired>
<NumHeaps> %2 </NumHeaps>
<CondemnedGeneration> %3 </CondemnedGeneration>
<Gen0ReductionCount> %4 </Gen0ReductionCount>
<Reason> %5 </Reason>
<GlobalMechanisms> %6 </GlobalMechanisms>
<ClrInstanceID> %7 </ClrInstanceID>
</GCGlobalHeap_V1>
</UserData>
</template>
<template tid="GCJoin">
<data name="Heap" inType="win:UInt32" />
<data name="JoinTime" inType="win:UInt32" />
<data name="JoinType" inType="win:UInt32" />
<UserData>
<GCJoin xmlns="myNs">
<Heap> %1 </Heap>
<JoinTime> %2 </JoinTime>
<JoinType> %3 </JoinType>
</GCJoin>
</UserData>
</template>
<template tid="GCJoin_V1">
<data name="Heap" inType="win:UInt32" />
<data name="JoinTime" inType="win:UInt32" />
<data name="JoinType" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCJoin_V1 xmlns="myNs">
<Heap> %1 </Heap>
<JoinTime> %2 </JoinTime>
<JoinType> %3 </JoinType>
<ClrInstanceID> %4 </ClrInstanceID>
</GCJoin_V1>
</UserData>
</template>
<template tid="GCOptimized">
<data name="DesiredAllocation" inType="win:UInt64" outType="win:HexInt64" />
<data name="NewAllocation" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationNumber" inType="win:UInt32" />
<UserData>
<GCOptimized xmlns="myNs">
<DesiredAllocation> %1 </DesiredAllocation>
<NewAllocation> %2 </NewAllocation>
<GenerationNumber> %3 </GenerationNumber>
</GCOptimized>
</UserData>
</template>
<template tid="GCOptimized_V1">
<data name="DesiredAllocation" inType="win:UInt64" outType="win:HexInt64" />
<data name="NewAllocation" inType="win:UInt64" outType="win:HexInt64" />
<data name="GenerationNumber" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCOptimized_V1 xmlns="myNs">
<DesiredAllocation> %1 </DesiredAllocation>
<NewAllocation> %2 </NewAllocation>
<GenerationNumber> %3 </GenerationNumber>
<ClrInstanceID> %4 </ClrInstanceID>
</GCOptimized_V1>
</UserData>
</template>
<template tid="GCSettings">
<data name="SegmentSize" inType="win:UInt64" />
<data name="LargeObjectSegmentSize" inType="win:UInt64" />
<data name="ServerGC" inType="win:Boolean" />
<UserData>
<GCSettings xmlns="myNs">
<SegmentSize> %1 </SegmentSize>
<LargeObjectSegmentSize> %2 </LargeObjectSegmentSize>
<ServerGC> %3 </ServerGC>
</GCSettings>
</UserData>
</template>
<template tid="GCSettings_V1">
<data name="SegmentSize" inType="win:UInt64" />
<data name="LargeObjectSegmentSize" inType="win:UInt64" />
<data name="ServerGC" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCSettings_V1 xmlns="myNs">
<SegmentSize> %1 </SegmentSize>
<LargeObjectSegmentSize> %2 </LargeObjectSegmentSize>
<ServerGC> %3 </ServerGC>
<ClrInstanceID> %4 </ClrInstanceID>
</GCSettings_V1>
</UserData>
</template>
<template tid="BGCDrainMark">
<data name="Objects" inType="win:UInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGCDrainMark xmlns="myNs">
<Objects> %1 </Objects>
<ClrInstanceID> %2 </ClrInstanceID>
</BGCDrainMark>
</UserData>
</template>
<template tid="BGCRevisit">
<data name="Pages" inType="win:UInt64" />
<data name="Objects" inType="win:UInt64" />
<data name="IsLarge" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGCRevisit xmlns="myNs">
<Pages> %1 </Pages>
<Objects> %2 </Objects>
<IsLarge> %3 </IsLarge>
<ClrInstanceID> %4 </ClrInstanceID>
</BGCRevisit>
</UserData>
</template>
<template tid="BGCOverflow">
<data name="Min" inType="win:UInt64" />
<data name="Max" inType="win:UInt64" />
<data name="Objects" inType="win:UInt64" />
<data name="IsLarge" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGCOverflow xmlns="myNs">
<Min> %1 </Min>
<Max> %2 </Max>
<Objects> %3 </Objects>
<IsLarge> %4 </IsLarge>
<ClrInstanceID> %5 </ClrInstanceID>
</BGCOverflow>
</UserData>
</template>
<template tid="BGCOverflow_V1">
<data name="Min" inType="win:UInt64" />
<data name="Max" inType="win:UInt64" />
<data name="Objects" inType="win:UInt64" />
<data name="IsLarge" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="GenNumber" inType="win:UInt32" />
<UserData>
<BGCOverflow_V1 xmlns="myNs">
<Min> %1 </Min>
<Max> %2 </Max>
<Objects> %3 </Objects>
<IsLarge> %4 </IsLarge>
<ClrInstanceID> %5 </ClrInstanceID>
<GenNumber> %6 </GenNumber>
</BGCOverflow_V1>
</UserData>
</template>
<template tid="BGCAllocWait">
<data name="Reason" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGCAllocWait xmlns="myNs">
<Reason> %1 </Reason>
<ClrInstanceID> %2 </ClrInstanceID>
</BGCAllocWait>
</UserData>
</template>
<template tid="GCFullNotify">
<data name="GenNumber" inType="win:UInt32" />
<data name="IsAlloc" inType="win:UInt32" />
<UserData>
<GCFullNotify xmlns="myNs">
<GenNumber> %1 </GenNumber>
<IsAlloc> %2 </IsAlloc>
</GCFullNotify>
</UserData>
</template>
<template tid="GCFullNotify_V1">
<data name="GenNumber" inType="win:UInt32" />
<data name="IsAlloc" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCFullNotify_V1 xmlns="myNs">
<GenNumber> %1 </GenNumber>
<IsAlloc> %2 </IsAlloc>
<ClrInstanceID> %3 </ClrInstanceID>
</GCFullNotify_V1>
</UserData>
</template>
<template tid="BGC1stSweepEnd">
<data name="GenNumber" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<BGC1stSweepEnd xmlns="myNs">
<GenNumber> %1 </GenNumber>
<ClrInstanceID> %2 </ClrInstanceID>
</BGC1stSweepEnd>
</UserData>
</template>
<template tid="GCNoUserData">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<GCNoUserData xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</GCNoUserData>
</UserData>
</template>
<template tid="Startup">
<UserData>
<Startup xmlns="myNs">
</Startup>
</UserData>
</template>
<template tid="Startup_V1">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<Startup_V1 xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</Startup_V1>
</UserData>
</template>
<template tid="FusionMessage">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Prepend" inType="win:Boolean" />
<data name="Message" inType="win:UnicodeString"/>
<UserData>
<FusionMessage xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Prepend> %2 </Prepend>
<Message> %3 </Message>
</FusionMessage>
</UserData>
</template>
<template tid="FusionErrorCode">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="Category" inType="win:UInt32" />
<data name="ErrorCode" inType="win:UInt32" />
<UserData>
<FusionErrorCode xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<Category> %2 </Category>
<ErrorCode> %3 </ErrorCode>
</FusionErrorCode>
</UserData>
</template>
<template tid="Binding">
<data name="AppDomainID" inType="win:UInt32" />
<data name="LoadContextID" inType="win:UInt32" />
<data name="FromLoaderCache" inType="win:UInt32" />
<data name="DynamicLoad" inType="win:UInt32" />
<data name="AssemblyCodebase" inType="win:UnicodeString" />
<data name="AssemblyName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<Binding xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<LoadContextID> %2 </LoadContextID>
<FromLoaderCache> %3 </FromLoaderCache>
<DynamicLoad> %4 </DynamicLoad>
<AssemblyCodebase> %5 </AssemblyCodebase>
<AssemblyName> %6 </AssemblyName>
<ClrInstanceID> %7 </ClrInstanceID>
</Binding>
</UserData>
</template>
<template tid="NgenBindEvent">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="BindingID" inType="win:UInt64" />
<data name="ReasonCode" inType="win:UInt32" />
<data name="AssemblyName" inType="win:UnicodeString" />
<UserData>
<NgenBindEvent xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<BindingID> %2 </BindingID>
<ReasonCode> %3 </ReasonCode>
<AssemblyName> %4 </AssemblyName>
</NgenBindEvent>
</UserData>
</template>
<template tid="ModuleTransparencyCalculation">
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ModuleTransparencyCalculation xmlns="myNs">
<Module> %1 </Module>
<AppDomainID> %2 </AppDomainID>
<ClrInstanceID> %3 </ClrInstanceID>
</ModuleTransparencyCalculation>
</UserData>
</template>
<template tid="TypeTransparencyCalculation">
<data name="Type" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TypeTransparencyCalculation xmlns="myNs">
<Type> %1 </Type>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<ClrInstanceID> %4 </ClrInstanceID>
</TypeTransparencyCalculation>
</UserData>
</template>
<template tid="MethodTransparencyCalculation">
<data name="Method" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodTransparencyCalculation xmlns="myNs">
<Method> %1 </Method>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<ClrInstanceID> %4 </ClrInstanceID>
</MethodTransparencyCalculation>
</UserData>
</template>
<template tid="FieldTransparencyCalculation">
<data name="Field" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<FieldTransparencyCalculation xmlns="myNs">
<Field> %1 </Field>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<ClrInstanceID> %4 </ClrInstanceID>
</FieldTransparencyCalculation>
</UserData>
</template>
<template tid="TokenTransparencyCalculation">
<data name="Token" inType="win:UInt32" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TokenTransparencyCalculation xmlns="myNs">
<Token> %1 </Token>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<ClrInstanceID> %4 </ClrInstanceID>
</TokenTransparencyCalculation>
</UserData>
</template>
<template tid="ModuleTransparencyCalculationResult">
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsAllCritical" inType="win:Boolean" />
<data name="IsAllTransparent" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="IsOpportunisticallyCritical" inType="win:Boolean" />
<data name="SecurityRuleSet" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<ModuleTransparencyCalculationResult xmlns="myNs">
<Module> %1 </Module>
<AppDomainID> %2 </AppDomainID>
<IsAllCritical> %3 </IsAllCritical>
<IsAllTransparent> %4 </IsAllTransparent>
<IsTreatAsSafe> %5 </IsTreatAsSafe>
<IsOpportunisticallyCritical> %6 </IsOpportunisticallyCritical>
<SecurityRuleSet> %7 </SecurityRuleSet>
<ClrInstanceID> %8 </ClrInstanceID>
</ModuleTransparencyCalculationResult>
</UserData>
</template>
<template tid="TypeTransparencyCalculationResult">
<data name="Type" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsAllCritical" inType="win:Boolean" />
<data name="IsAllTransparent" inType="win:Boolean" />
<data name="IsCritical" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TypeTransparencyCalculationResult xmlns="myNs">
<Type> %1 </Type>
<Module> %2 </Module>
<AppDomainID> %3</AppDomainID>
<IsAllCritical> %4 </IsAllCritical>
<IsAllTransparent> %5 </IsAllTransparent>
<IsCritical> %6 </IsCritical>
<IsTreatAsSafe> %7 </IsTreatAsSafe>
<ClrInstanceID> %8 </ClrInstanceID>
</TypeTransparencyCalculationResult>
</UserData>
</template>
<template tid="MethodTransparencyCalculationResult">
<data name="Method" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsCritical" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<MethodTransparencyCalculationResult xmlns="myNs">
<Method> %1 </Method>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<IsCritical> %4 </IsCritical>
<IsTreatAsSafe> %5 </IsTreatAsSafe>
<ClrInstanceID> %6 </ClrInstanceID>
</MethodTransparencyCalculationResult>
</UserData>
</template>
<template tid="FieldTransparencyCalculationResult">
<data name="Field" inType="win:UnicodeString" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsCritical" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<FieldTransparencyCalculationResult xmlns="myNs">
<Field> %1 </Field>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<IsCritical> %4 </IsCritical>
<IsTreatAsSafe> %5 </IsTreatAsSafe>
<ClrInstanceID> %6 </ClrInstanceID>
</FieldTransparencyCalculationResult>
</UserData>
</template>
<template tid="TokenTransparencyCalculationResult">
<data name="Token" inType="win:UInt32" />
<data name="Module" inType="win:UnicodeString" />
<data name="AppDomainID" inType="win:UInt32" />
<data name="IsCritical" inType="win:Boolean" />
<data name="IsTreatAsSafe" inType="win:Boolean" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<TokenTransparencyCalculationResult xmlns="myNs">
<Token> %1 </Token>
<Module> %2 </Module>
<AppDomainID> %3 </AppDomainID>
<IsCritical> %4 </IsCritical>
<IsTreatAsSafe> %5 </IsTreatAsSafe>
<ClrInstanceID> %6 </ClrInstanceID>
</TokenTransparencyCalculationResult>
</UserData>
</template>
<template tid="FailFast">
<data name="FailFastUserMessage" inType="win:UnicodeString" />
<data name="FailedEIP" inType="win:Pointer" />
<data name="OSExitCode" inType="win:UInt32" />
<data name="ClrExitCode" inType="win:UInt32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<FailFast xmlns="myNs">
<FailFastUserMessage> %1 </FailFastUserMessage>
<FailedEIP> %2 </FailedEIP>
<OSExitCode> %3 </OSExitCode>
<ClrExitCode> %4 </ClrExitCode>
<ClrInstanceID> %5 </ClrInstanceID>
</FailFast>
</UserData>
</template>
<template tid="PrvFinalizeObject">
<data name="TypeID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="TypeName" inType="win:UnicodeString" />
</template>
<template tid="CCWRefCountChange">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="COMInterfacePointer" inType="win:Pointer" />
<data name="NewRefCount" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:UnicodeString" />
<data name="NameSpace" inType="win:UnicodeString" />
<data name="Operation" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="CCWRefCountChangeAnsi">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="COMInterfacePointer" inType="win:Pointer" />
<data name="NewRefCount" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:AnsiString" />
<data name="NameSpace" inType="win:AnsiString" />
<data name="Operation" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="PinPlugAtGCTime">
<data name="PlugStart" inType="win:Pointer" />
<data name="PlugEnd" inType="win:Pointer" />
<data name="GapBeforeSize" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="PrvDestroyGCHandle">
<data name="HandleID" inType="win:Pointer" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="PrvSetGCHandle">
<data name="HandleID" inType="win:Pointer" />
<data name="ObjectID" inType="win:Pointer" />
<data name="Kind" map="GCHandleKindMap" inType="win:UInt32" />
<data name="Generation" inType="win:UInt32" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
</template>
<template tid="LoaderHeapPrivate">
<data name="LoaderHeapPtr" inType="win:Pointer" />
<data name="MemoryAddress" inType="win:Pointer" />
<data name="RequestSize" inType="win:UInt32" />
<!-- we had a weird problem where the EtwCallout callback (which does stack traces)
was not being called for only this event. By adding this field which makes
the sigature of this event the same as SetGCHandle, we avoid the problem.
ideally this gets ripped out at some point -->
<data name="Unused1" inType="win:UInt32" />
<data name="Unused2" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<LoaderHeapPrivate xmlns="myNs">
<LoaderHeapPtr> %1 </LoaderHeapPtr>
<MemoryAddress> %2 </MemoryAddress>
<RequestSize> %3 </RequestSize>
<ClrInstanceID> %4 </ClrInstanceID>
</LoaderHeapPrivate>
</UserData>
</template>
<template tid="ModuleRangePrivate">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64"/>
<data name="RangeBegin" count="1" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeSize" count="1" inType="win:UInt32" outType="win:HexInt32"/>
<data name="RangeType" map="ModuleRangeTypeMap" inType="win:UInt8"/>
<data name="IBCType" map="ModuleRangeIBCTypeMap" inType="win:UInt8"/>
<data name="SectionType" map="ModuleRangeSectionTypeMap" inType="win:UInt16" />
<UserData>
<ModuleRange xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<RangeBegin> %3 </RangeBegin>
<RangeSize> %4 </RangeSize>
<RangeType> %5 </RangeType>
<IBCType> %6 </IBCType>
<SectionType> %7 </SectionType>
</ModuleRange>
</UserData>
</template>
<template tid="MulticoreJitPrivate">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="String1" inType="win:UnicodeString" />
<data name="String2" inType="win:UnicodeString" />
<data name="Int1" inType="win:Int32" />
<data name="Int2" inType="win:Int32" />
<data name="Int3" inType="win:Int32" />
<UserData>
<MulticoreJit xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<String1> %2 </String1>
<String2> %3 </String2>
<Int1> %4 </Int1>
<Int2> %5 </Int2>
<Int3> %6 </Int3>
</MulticoreJit>
</UserData>
</template>
<template tid="MulticoreJitMethodCodeReturnedPrivate">
<data name="ClrInstanceID" inType="win:UInt16" />
<data name="ModuleID" inType="win:UInt64" />
<data name="MethodID" inType="win:UInt64" />
<UserData>
<MulticoreJitMethodCodeReturned xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
<ModuleID> %2 </ModuleID>
<MethodID> %3 </MethodID>
</MulticoreJitMethodCodeReturned>
</UserData>
</template>
<template tid="DynamicTypeUsePrivate">
<data name="TypeName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeUse xmlns="myNs">
<TypeName> %1 </TypeName>
<ClrInstanceID> %2 </ClrInstanceID>
</DynamicTypeUse>
</UserData>
</template>
<template tid="DynamicTypeUseTwoParametersPrivate">
<data name="TypeName" inType="win:UnicodeString" />
<data name="SecondTypeName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeUseTwoParameters xmlns="myNs">
<TypeName> %1 </TypeName>
<SecondTypeName> %2 </SecondTypeName>
<ClrInstanceID> %3 </ClrInstanceID>
</DynamicTypeUseTwoParameters>
</UserData>
</template>
<template tid="DynamicTypeUsePrivateVariance">
<data name="TypeName" inType="win:UnicodeString" />
<data name="InterfaceTypeName" inType="win:UnicodeString" />
<data name="VariantInterfaceTypeName" inType="win:UnicodeString" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeVariance xmlns="myNs">
<TypeName> %1 </TypeName>
<InterfaceTypeName> %2 </InterfaceTypeName>
<VariantInterfaceTypeName> %3 </VariantInterfaceTypeName>
<ClrInstanceID> %4 </ClrInstanceID>
</DynamicTypeVariance>
</UserData>
</template>
<template tid="DynamicTypeUseStringAndIntPrivate">
<data name="TypeName" inType="win:UnicodeString" />
<data name="Int1" inType="win:Int32" />
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeUseStringAndInt xmlns="myNs">
<TypeName> %1 </TypeName>
<Int1> %2 </Int1>
<ClrInstanceID> %3 </ClrInstanceID>
</DynamicTypeUseStringAndInt>
</UserData>
</template>
<template tid="DynamicTypeUseNoParametersPrivate">
<data name="ClrInstanceID" inType="win:UInt16" />
<UserData>
<DynamicTypeUseStringAndInt xmlns="myNs">
<ClrInstanceID> %1 </ClrInstanceID>
</DynamicTypeUseStringAndInt>
</UserData>
</template>
</templates>
<!--Events-->
<events>
<!--Private GC events, value reserved from 0 to 79-->
<event value="1" version="0" level="win:Informational" template="GCDecision"
keywords ="GCPrivateKeyword" opcode="GCDecision"
task="GarbageCollectionPrivate"
symbol="GCDecision" message="$(string.PrivatePublisher.GCDecisionEventMessage)"/>
<event value="1" version="1" level="win:Informational" template="GCDecision_V1"
keywords ="GCPrivateKeyword" opcode="GCDecision"
task="GarbageCollectionPrivate"
symbol="GCDecision_V1" message="$(string.PrivatePublisher.GCDecision_V1EventMessage)"/>
<event value="2" version="0" level="win:Informational" template="GCSettings"
keywords ="GCPrivateKeyword" opcode="GCSettings"
task="GarbageCollectionPrivate"
symbol="GCSettings" message="$(string.PrivatePublisher.GCSettingsEventMessage)"/>
<event value="2" version="1" level="win:Informational" template="GCSettings_V1"
keywords ="GCPrivateKeyword" opcode="GCSettings"
task="GarbageCollectionPrivate"
symbol="GCSettings_V1" message="$(string.PrivatePublisher.GCSettings_V1EventMessage)"/>
<event value="3" version="0" level="win:Verbose" template="GCOptimized"
keywords ="GCPrivateKeyword" opcode="GCOptimized"
task="GarbageCollectionPrivate"
symbol="GCOptimized" message="$(string.PrivatePublisher.GCOptimizedEventMessage)"/>
<event value="3" version="1" level="win:Verbose" template="GCOptimized_V1"
keywords ="GCPrivateKeyword" opcode="GCOptimized"
task="GarbageCollectionPrivate"
symbol="GCOptimized_V1" message="$(string.PrivatePublisher.GCOptimized_V1EventMessage)"/>
<event value="4" version="2" level="win:Informational" template="GCPerHeapHistory"
keywords ="GCPrivateKeyword" opcode="GCPerHeapHistory"
task="GarbageCollectionPrivate"
symbol="GCPerHeapHistory" message="$(string.PrivatePublisher.GCPerHeapHistoryEventMessage)"/>
<event value="4" version="1" level="win:Informational" template="GCPerHeapHistory_V1"
keywords ="GCPrivateKeyword" opcode="GCPerHeapHistory"
task="GarbageCollectionPrivate"
symbol="GCPerHeapHistory_V1" message="$(string.PrivatePublisher.GCPerHeapHistory_V1EventMessage)"/>
<event value="5" version="0" level="win:Informational" template="GCGlobalHeap"
keywords ="GCPrivateKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollectionPrivate"
symbol="GCGlobalHeapHistory" message="$(string.PrivatePublisher.GCGlobalHeapEventMessage)"/>
<event value="5" version="1" level="win:Informational" template="GCGlobalHeap_V1"
keywords ="GCPrivateKeyword" opcode="GCGlobalHeapHistory"
task="GarbageCollectionPrivate"
symbol="GCGlobalHeapHistory_V1" message="$(string.PrivatePublisher.GCGlobalHeap_V1EventMessage)"/>
<event value="6" version="0" level="win:Verbose" template="GCJoin"
keywords ="GCPrivateKeyword" opcode="GCJoin"
task="GarbageCollectionPrivate"
symbol="GCJoin" message="$(string.PrivatePublisher.GCJoinEventMessage)"/>
<event value="6" version="1" level="win:Verbose" template="GCJoin_V1"
keywords ="GCPrivateKeyword" opcode="GCJoin"
task="GarbageCollectionPrivate"
symbol="GCJoin_V1" message="$(string.PrivatePublisher.GCJoin_V1EventMessage)"/>
<event value="7" version="0" level="win:Informational" template="PrvGCMark"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkStackRoots"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkStackRoots" message="$(string.PrivatePublisher.GCMarkStackRootsEventMessage)"/>
<event value="7" version="1" level="win:Informational" template="PrvGCMark_V1"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkStackRoots"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkStackRoots_V1" message="$(string.PrivatePublisher.GCMarkStackRoots_V1EventMessage)"/>
<event value="8" version="0" level="win:Informational" template="PrvGCMark"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkFinalizeQueueRoots"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkFinalizeQueueRoots" message="$(string.PrivatePublisher.GCMarkFinalizeQueueRootsEventMessage)"/>
<event value="8" version="1" level="win:Informational" template="PrvGCMark_V1"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkFinalizeQueueRoots"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkFinalizeQueueRoots_V1" message="$(string.PrivatePublisher.GCMarkFinalizeQueueRoots_V1EventMessage)"/>
<event value="9" version="0" level="win:Informational" template="PrvGCMark"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkHandles"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkHandles" message="$(string.PrivatePublisher.GCMarkHandlesEventMessage)"/>
<event value="9" version="1" level="win:Informational" template="PrvGCMark_V1"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkHandles"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkHandles_V1" message="$(string.PrivatePublisher.GCMarkHandles_V1EventMessage)"/>
<event value="10" version="0" level="win:Informational" template="PrvGCMark"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkCards"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkCards" message="$(string.PrivatePublisher.GCMarkCardsEventMessage)"/>
<event value="10" version="1" level="win:Informational" template="PrvGCMark_V1"
keywords ="GCPrivateKeyword" opcode="PrvGCMarkCards"
task="GarbageCollectionPrivate"
symbol="PrvGCMarkCards_V1" message="$(string.PrivatePublisher.GCMarkCards_V1EventMessage)"/>
<event value="11" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGCBegin"
task="GarbageCollectionPrivate"
symbol="BGCBegin" message="$(string.PrivatePublisher.BGCBeginEventMessage)"/>
<event value="12" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC1stNonConEnd"
task="GarbageCollectionPrivate"
symbol="BGC1stNonConEnd" message="$(string.PrivatePublisher.BGC1stNonConEndEventMessage)"/>
<event value="13" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC1stConEnd"
task="GarbageCollectionPrivate"
symbol="BGC1stConEnd" message="$(string.PrivatePublisher.BGC1stConEndEventMessage)"/>
<event value="14" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC2ndNonConBegin"
task="GarbageCollectionPrivate"
symbol="BGC2ndNonConBegin" message="$(string.PrivatePublisher.BGC2ndNonConBeginEventMessage)"/>
<event value="15" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC2ndNonConEnd"
task="GarbageCollectionPrivate"
symbol="BGC2ndNonConEnd" message="$(string.PrivatePublisher.BGC2ndNonConEndEventMessage)"/>
<event value="16" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC2ndConBegin"
task="GarbageCollectionPrivate"
symbol="BGC2ndConBegin" message="$(string.PrivatePublisher.BGC2ndConBeginEventMessage)"/>
<event value="17" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGC2ndConEnd"
task="GarbageCollectionPrivate"
symbol="BGC2ndConEnd" message="$(string.PrivatePublisher.BGC2ndConEndEventMessage)"/>
<event value="18" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGCPlanEnd"
task="GarbageCollectionPrivate"
symbol="BGCPlanEnd" message="$(string.PrivatePublisher.BGCPlanEndEventMessage)"/>
<event value="19" version="0" level="win:Informational" template="GCNoUserData"
keywords ="GCPrivateKeyword" opcode="BGCSweepEnd"
task="GarbageCollectionPrivate"
symbol="BGCSweepEnd" message="$(string.PrivatePublisher.BGCSweepEndEventMessage)"/>
<event value="20" version="0" level="win:Informational" template="BGCDrainMark"
keywords ="GCPrivateKeyword" opcode="BGCDrainMark"
task="GarbageCollectionPrivate"
symbol="BGCDrainMark" message="$(string.PrivatePublisher.BGCDrainMarkEventMessage)"/>
<event value="21" version="0" level="win:Informational" template="BGCRevisit"
keywords ="GCPrivateKeyword" opcode="BGCRevisit"
task="GarbageCollectionPrivate"
symbol="BGCRevisit" message="$(string.PrivatePublisher.BGCRevisitEventMessage)"/>
<event value="22" version="0" level="win:Informational" template="BGCOverflow"
keywords ="GCPrivateKeyword" opcode="BGCOverflow"
task="GarbageCollectionPrivate"
symbol="BGCOverflow" message="$(string.PrivatePublisher.BGCOverflowEventMessage)"/>
<event value="22" version="1" level="win:Informational" template="BGCOverflow_V1"
keywords ="GCPrivateKeyword" opcode="BGCOverflow"
task="GarbageCollectionPrivate"
symbol="BGCOverflow_V1" message="$(string.PrivatePublisher.BGCOverflowEventMessage)"/>
<event value="23" version="0" level="win:Informational" template="BGCAllocWait"
keywords ="GCPrivateKeyword" opcode="BGCAllocWaitBegin"
task="GarbageCollectionPrivate"
symbol="BGCAllocWaitBegin" message="$(string.PrivatePublisher.BGCAllocWaitEventMessage)"/>
<event value="24" version="0" level="win:Informational" template="BGCAllocWait"
keywords ="GCPrivateKeyword" opcode="BGCAllocWaitEnd"
task="GarbageCollectionPrivate"
symbol="BGCAllocWaitEnd" message="$(string.PrivatePublisher.BGCAllocWaitEventMessage)"/>
<event value="25" version="0" level="win:Informational" template="GCFullNotify"
keywords ="GCPrivateKeyword" opcode="GCFullNotify"
task="GarbageCollectionPrivate"
symbol="GCFullNotify" message="$(string.PrivatePublisher.GCFullNotifyEventMessage)"/>
<event value="25" version="1" level="win:Informational" template="GCFullNotify_V1"
keywords ="GCPrivateKeyword" opcode="GCFullNotify"
task="GarbageCollectionPrivate"
symbol="GCFullNotify_V1" message="$(string.PrivatePublisher.GCFullNotify_V1EventMessage)"/>
<event value="26" version="0" level="win:Informational" template="BGC1stSweepEnd"
keywords ="GCPrivateKeyword" opcode="BGC1stSweepEnd"
task="GarbageCollectionPrivate"
symbol="BGC1stSweepEnd" message="$(string.PrivatePublisher.BGC1stSweepEndEventMessage)"/>
<!--Private events from other components in CLR, starting value 80-->
<event value="80" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEStartupStart"
task="Startup"
symbol="EEStartupStart" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="80" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEStartupStart"
task="Startup"
symbol="EEStartupStart_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="81" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEStartupEnd"
task="Startup"
symbol="EEStartupEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="81" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEStartupEnd"
task="Startup"
symbol="EEStartupEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="82" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEConfigSetup"
task="Startup"
symbol="EEConfigSetup" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="82" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEConfigSetup"
task="Startup"
symbol="EEConfigSetup_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="83" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEConfigSetupEnd"
task="Startup"
symbol="EEConfigSetupEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="83" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEConfigSetupEnd"
task="Startup"
symbol="EEConfigSetupEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="84" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LoadSystemBases"
task="Startup"
symbol="LdSysBases" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="84" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LoadSystemBases"
task="Startup"
symbol="LdSysBases_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="85" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LoadSystemBasesEnd"
task="Startup"
symbol="LdSysBasesEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="85" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LoadSystemBasesEnd"
task="Startup"
symbol="LdSysBasesEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="86" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ExecExe"
task="Startup"
symbol="ExecExe" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="86" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ExecExe"
task="Startup"
symbol="ExecExe_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="87" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ExecExeEnd"
task="Startup"
symbol="ExecExeEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="87" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ExecExeEnd"
task="Startup"
symbol="ExecExeEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="88" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="Main"
task="Startup"
symbol="Main" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="88" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="Main"
task="Startup"
symbol="Main_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="89" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="MainEnd"
task="Startup"
symbol="MainEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="89" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="MainEnd"
task="Startup"
symbol="MainEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="90" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ApplyPolicyStart"
task="Startup"
symbol="ApplyPolicyStart" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="90" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ApplyPolicyStart"
task="Startup"
symbol="ApplyPolicyStart_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="91" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ApplyPolicyEnd"
task="Startup"
symbol="ApplyPolicyEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="91" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ApplyPolicyEnd"
task="Startup"
symbol="ApplyPolicyEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="92" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LdLibShFolder"
task="Startup"
symbol="LdLibShFolder" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="92" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LdLibShFolder"
task="Startup"
symbol="LdLibShFolder_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="93" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LdLibShFolderEnd"
task="Startup"
symbol="LdLibShFolderEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="93" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LdLibShFolderEnd"
task="Startup"
symbol="LdLibShFolderEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="94" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="PrestubWorker"
task="Startup"
symbol="PrestubWorker" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="94" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="PrestubWorker"
task="Startup"
symbol="PrestubWorker_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="95" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="PrestubWorkerEnd"
task="Startup"
symbol="PrestubWorkerEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="95" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="PrestubWorkerEnd"
task="Startup"
symbol="PrestubWorkerEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="96" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="GetInstallationStart"
task="Startup"
symbol="GetInstallationStart" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="96" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="GetInstallationStart"
task="Startup"
symbol="GetInstallationStart_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="97" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="GetInstallationEnd"
task="Startup"
symbol="GetInstallationEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="97" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="GetInstallationEnd"
task="Startup"
symbol="GetInstallationEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="98" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="OpenHModule"
task="Startup"
symbol="OpenHModule" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="98" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="OpenHModule"
task="Startup"
symbol="OpenHModule_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="99" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="OpenHModuleEnd"
task="Startup"
symbol="OpenHModuleEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="99" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="OpenHModuleEnd"
task="Startup"
symbol="OpenHModuleEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="100" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ExplicitBindStart"
task="Startup"
symbol="ExplicitBindStart" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="100" version="1" level="win:Informational" template="Startup_V1"
task="Startup"
keywords ="StartupKeyword" opcode="ExplicitBindStart"
symbol="ExplicitBindStart_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="101" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ExplicitBindEnd"
task="Startup"
symbol="ExplicitBindEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="101" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ExplicitBindEnd"
task="Startup"
symbol="ExplicitBindEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="102" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ParseXml"
task="Startup"
symbol="ParseXml" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="102" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ParseXml"
task="Startup"
symbol="ParseXml_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="103" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="ParseXmlEnd"
task="Startup"
symbol="ParseXmlEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="103" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="ParseXmlEnd"
task="Startup"
symbol="ParseXmlEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="104" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="InitDefaultDomain"
task="Startup"
symbol="InitDefaultDomain" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="104" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="InitDefaultDomain"
task="Startup"
symbol="InitDefaultDomain_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="105" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="InitDefaultDomainEnd"
task="Startup"
symbol="InitDefaultDomainEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="105" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="InitDefaultDomainEnd"
task="Startup"
symbol="InitDefaultDomainEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="106" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="InitSecurity"
task="Startup"
symbol="InitSecurity" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="106" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="InitSecurity"
task="Startup"
symbol="InitSecurity_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="107" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="InitSecurityEnd"
task="Startup"
symbol="InitSecurityEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="107" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="InitSecurityEnd"
task="Startup"
symbol="InitSecurityEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="108" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="AllowBindingRedirs"
task="Startup"
symbol="AllowBindingRedirs" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="108" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="AllowBindingRedirs"
task="Startup"
symbol="AllowBindingRedirs_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="109" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="AllowBindingRedirsEnd"
task="Startup"
symbol="AllowBindingRedirsEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="109" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="AllowBindingRedirsEnd"
task="Startup"
symbol="AllowBindingRedirsEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="110" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEConfigSync"
task="Startup"
symbol="EEConfigSync" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="110" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEConfigSync"
task="Startup"
symbol="EEConfigSync_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="111" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="EEConfigSyncEnd"
task="Startup"
symbol="EEConfigSyncEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="111" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="EEConfigSyncEnd"
task="Startup"
symbol="EEConfigSyncEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="112" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionBinding"
task="Startup"
symbol="FusionBinding" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="112" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionBinding"
task="Startup"
symbol="FusionBinding_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="113" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionBindingEnd"
task="Startup"
symbol="FusionBindingEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="113" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionBindingEnd"
task="Startup"
symbol="FusionBindingEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="114" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LoaderCatchCall"
task="Startup"
symbol="LoaderCatchCall" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="114" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LoaderCatchCall"
task="Startup"
symbol="LoaderCatchCall_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="115" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="LoaderCatchCallEnd"
task="Startup"
symbol="LoaderCatchCallEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="115" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="LoaderCatchCallEnd"
task="Startup"
symbol="LoaderCatchCallEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="116" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionInit"
task="Startup"
symbol="FusionInit" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="116" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionInit"
task="Startup"
symbol="FusionInit_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="117" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionInitEnd"
task="Startup"
symbol="FusionInitEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="117" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionInitEnd"
task="Startup"
symbol="FusionInitEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="118" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionAppCtx"
task="Startup"
symbol="FusionAppCtx" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="118" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionAppCtx"
task="Startup"
symbol="FusionAppCtx_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="119" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="FusionAppCtxEnd"
task="Startup"
symbol="FusionAppCtxEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="119" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="FusionAppCtxEnd"
task="Startup"
symbol="FusionAppCtxEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="120" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="Fusion2EE"
task="Startup"
symbol="Fusion2EE" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="120" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="Fusion2EE"
task="Startup"
symbol="Fusion2EE_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="121" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="Fusion2EEEnd"
task="Startup"
symbol="Fusion2EEEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="121" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="Fusion2EEEnd"
task="Startup"
symbol="Fusion2EEEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="122" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="SecurityCatchCall"
task="Startup"
symbol="SecurityCatchCall" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="122" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="SecurityCatchCall"
task="Startup"
symbol="SecurityCatchCall_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="123" version="0" level="win:Informational" template="Startup"
keywords ="StartupKeyword" opcode="SecurityCatchCallEnd"
task="Startup"
symbol="SecurityCatchCallEnd" message="$(string.PrivatePublisher.StartupEventMessage)"/>
<event value="123" version="1" level="win:Informational" template="Startup_V1"
keywords ="StartupKeyword" opcode="SecurityCatchCallEnd"
task="Startup"
symbol="SecurityCatchCallEnd_V1" message="$(string.PrivatePublisher.Startup_V1EventMessage)"/>
<event value="151" version="0" level="win:LogAlways" template="ClrStackWalk"
keywords ="StackKeyword" opcode="CLRStackWalk"
task="CLRStackPrivate"
symbol="CLRStackWalkPrivate" message="$(string.PrivatePublisher.StackEventMessage)"/>
<event value="158" version="0" level="win:Informational" template="ModuleRangePrivate"
keywords ="PerfTrackPrivateKeyword" opcode="ModuleRangeLoadPrivate"
task="CLRPerfTrackPrivate"
symbol="ModuleRangeLoadPrivate" message="$(string.PrivatePublisher.ModuleRangeLoadEventMessage)"/>
<event value="159" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingPolicyPhaseStart"
task="Binding"
symbol="BindingPolicyPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="160" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingPolicyPhaseEnd"
task="Binding"
symbol="BindingPolicyPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="161" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingNgenPhaseStart"
task="Binding"
symbol="BindingNgenPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="162" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingNgenPhaseEnd"
task="Binding"
symbol="BindingNgenPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="163" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingLookupAndProbingPhaseStart"
task="Binding"
symbol="BindingLookupAndProbingPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="164" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingLookupAndProbingPhaseEnd"
task="Binding"
symbol="BindingLookupAndProbingPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="165" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderPhaseStart"
task="Binding"
symbol="LoaderPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="166" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderPhaseEnd"
task="Binding"
symbol="LoaderPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="167" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingPhaseStart"
task="Binding"
symbol="BindingPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="168" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingPhaseEnd"
task="Binding"
symbol="BindingPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="169" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingDownloadPhaseStart"
task="Binding"
symbol="BindingDownloadPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="170" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="BindingDownloadPhaseEnd"
task="Binding"
symbol="BindingDownloadPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="171" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderAssemblyInitPhaseStart"
task="Binding"
symbol="LoaderAssemblyInitPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="172" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderAssemblyInitPhaseEnd"
task="Binding"
symbol="LoaderAssemblyInitPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="173" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderMappingPhaseStart"
task="Binding"
symbol="LoaderMappingPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="174" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderMappingPhaseEnd"
task="Binding"
symbol="LoaderMappingPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="175" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderDeliverEventsPhaseStart"
task="Binding"
symbol="LoaderDeliverEventsPhaseStart" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="176" version="0" level="win:Informational" template="Binding"
keywords ="BindingKeyword" opcode="LoaderDeliverEventsPhaseEnd"
task="Binding"
symbol="LoaderDeliverEventsPhaseEnd" message="$(string.PrivatePublisher.BindingEventMessage)"/>
<event value="177" version="0" level="win:Informational" template="EvidenceGenerated"
keywords="SecurityPrivateKeyword" opcode="EvidenceGenerated"
task="EvidenceGeneratedTask"
symbol="EvidenceGenerated" message="$(string.PrivatePublisher.EvidenceGeneratedEventMessage)"/>
<event value="178" version="0" level="win:Informational" template="ModuleTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="ModuleTransparencyComputationStart"
task="TransparencyComputation"
symbol="ModuleTransparencyComputationStart" message="$(string.PrivatePublisher.ModuleTransparencyComputationStartEventMessage)" />
<event value="179" version="0" level="win:Informational" template="ModuleTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="ModuleTransparencyComputationEnd"
task="TransparencyComputation"
symbol="ModuleTransparencyComputationEnd" message="$(string.PrivatePublisher.ModuleTransparencyComputationEndEventMessage)" />
<event value="180" version="0" level="win:Informational" template="TypeTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="TypeTransparencyComputationStart"
task="TransparencyComputation"
symbol="TypeTransparencyComputationStart" message="$(string.PrivatePublisher.TypeTransparencyComputationStartEventMessage)" />
<event value="181" version="0" level="win:Informational" template="TypeTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="TypeTransparencyComputationEnd"
task="TransparencyComputation"
symbol="TypeTransparencyComputationEnd" message="$(string.PrivatePublisher.TypeTransparencyComputationEndEventMessage)" />
<event value="182" version="0" level="win:Informational" template="MethodTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="MethodTransparencyComputationStart"
task="TransparencyComputation"
symbol="MethodTransparencyComputationStart" message="$(string.PrivatePublisher.MethodTransparencyComputationStartEventMessage)" />
<event value="183" version="0" level="win:Informational" template="MethodTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="MethodTransparencyComputationEnd"
task="TransparencyComputation"
symbol="MethodTransparencyComputationEnd" message="$(string.PrivatePublisher.MethodTransparencyComputationEndEventMessage)" />
<event value="184" version="0" level="win:Informational" template="FieldTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="FieldTransparencyComputationStart"
task="TransparencyComputation"
symbol="FieldTransparencyComputationStart" message="$(string.PrivatePublisher.FieldTransparencyComputationStartEventMessage)" />
<event value="185" version="0" level="win:Informational" template="FieldTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="FieldTransparencyComputationEnd"
task="TransparencyComputation"
symbol="FieldTransparencyComputationEnd" message="$(string.PrivatePublisher.FieldTransparencyComputationEndEventMessage)" />
<event value="186" version="0" level="win:Informational" template="TokenTransparencyCalculation"
keywords="SecurityPrivateKeyword" opcode="TokenTransparencyComputationStart"
task="TransparencyComputation"
symbol="TokenTransparencyComputationStart" message="$(string.PrivatePublisher.TokenTransparencyComputationStartEventMessage)" />
<event value="187" version="0" level="win:Informational" template="TokenTransparencyCalculationResult"
keywords="SecurityPrivateKeyword" opcode="TokenTransparencyComputationEnd"
task="TransparencyComputation"
symbol="TokenTransparencyComputationEnd" message="$(string.PrivatePublisher.TokenTransparencyComputationEndEventMessage)" />
<event value="188" version="0" level="win:Informational" template="NgenBindEvent"
keywords="PrivateFusionKeyword" opcode="NgenBind"
task="CLRNgenBinder"
symbol="NgenBindEvent" message="$(string.PrivatePublisher.NgenBinderMessage)"/>
<!-- CLR FailFast events -->
<event value="191" version="0" level="win:Critical" template="FailFast"
opcode="FailFast"
task="CLRFailFast"
symbol="FailFast" message="$(string.PrivatePublisher.FailFastEventMessage)"/>
<event value="192" version="0" level="win:Verbose" template="PrvFinalizeObject"
keywords ="GCPrivateKeyword"
opcode="PrvFinalizeObject"
task="GarbageCollectionPrivate"
symbol="PrvFinalizeObject" message="$(string.PrivatePublisher.FinalizeObjectEventMessage)"/>
<event value="193" version="0" level="win:Verbose" template="CCWRefCountChangeAnsi"
keywords="InteropPrivateKeyword"
opcode="CCWRefCountChange"
task="GarbageCollectionPrivate"
symbol="CCWRefCountChangeAnsi" message="$(string.PrivatePublisher.CCWRefCountChangeEventMessage)"/>
<event value="194" version="0" level="win:Verbose" template="PrvSetGCHandle"
keywords="GCHandlePrivateKeyword"
opcode="SetGCHandle"
task="GarbageCollectionPrivate"
symbol="PrvSetGCHandle" message="$(string.PrivatePublisher.SetGCHandleEventMessage)"/>
<event value="195" version="0" level="win:Verbose" template="PrvDestroyGCHandle"
keywords="GCHandlePrivateKeyword"
opcode="DestroyGCHandle"
task="GarbageCollectionPrivate"
symbol="PrvDestroyGCHandle" message="$(string.PrivatePublisher.DestroyGCHandleEventMessage)"/>
<event value="196" version="0" level="win:Informational" template="FusionMessage"
keywords="BindingKeyword" opcode="FusionMessage"
task="Binding"
symbol="FusionMessageEvent" message="$(string.PrivatePublisher.FusionMessageEventMessage)"/>
<event value="197" version="0" level="win:Informational" template="FusionErrorCode"
keywords="BindingKeyword" opcode="FusionErrorCode"
task="Binding"
symbol="FusionErrorCodeEvent" message="$(string.PrivatePublisher.FusionErrorCodeEventMessage)"/>
<event value="199" version="0" level="win:Verbose" template="PinPlugAtGCTime"
keywords="GCPrivateKeyword"
opcode="PinPlugAtGCTime"
task="GarbageCollectionPrivate"
symbol="PinPlugAtGCTime" message="$(string.PrivatePublisher.PinPlugAtGCTimeEventMessage)"/>
<event value="200" version="0" level="win:Verbose" template="CCWRefCountChange"
keywords="InteropPrivateKeyword"
opcode="CCWRefCountChange"
task="GarbageCollectionPrivate"
symbol="CCWRefCountChange" message="$(string.PrivatePublisher.CCWRefCountChangeEventMessage)"/>
<event value="310" version="0" level="win:Verbose" template="LoaderHeapPrivate"
keywords="LoaderHeapPrivateKeyword" opcode="AllocRequest"
task="LoaderHeapAllocation" symbol="AllocRequest" message="$(string.PrivatePublisher.AllocRequestEventMessage)" />
<!-- CLR Private Multicore JIT events -->
<event value="201" version="0" level="win:Informational" template="MulticoreJitPrivate"
keywords="MulticoreJitPrivateKeyword" opcode="Common"
task="CLRMulticoreJit" symbol="MulticoreJit" message="$(string.PrivatePublisher.MulticoreJitCommonEventMessage)" />
<event value="202" version="0" level="win:Informational" template="MulticoreJitMethodCodeReturnedPrivate"
keywords="MulticoreJitPrivateKeyword" opcode="MethodCodeReturned"
task="CLRMulticoreJit" symbol="MulticoreJitMethodCodeReturned" message="$(string.PrivatePublisher.MulticoreJitMethodCodeReturnedMessage)" />
<!-- CLR Private Dynamic Type Usage events NOTE: These are not used anymore. They are kept around for backcompat with traces that might have already contained these -->
<event value="400" version="0" level="win:Informational" template="DynamicTypeUsePrivate"
keywords="DynamicTypeUsageKeyword"
symbol="IInspectableRuntimeClassName"
task="DynamicTypeUsage"
opcode="IInspectableRuntimeClassName"
message="$(string.PrivatePublisher.IInspectableRuntimeClassNameMessage)" />
<event value="401" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="WinRTUnbox"
task="DynamicTypeUsage"
opcode="WinRTUnbox"
message="$(string.PrivatePublisher.WinRTUnboxMessage)" />
<event value="402" version="0" level="win:Informational" template="DynamicTypeUsePrivate"
keywords="DynamicTypeUsageKeyword"
symbol="CreateRCW"
task="DynamicTypeUsage"
opcode="CreateRCW"
message="$(string.PrivatePublisher.CreateRcwMessage)" />
<event value="403" version="0" level="win:Informational" template="DynamicTypeUsePrivateVariance"
keywords="DynamicTypeUsageKeyword"
symbol="RCWVariance"
task="DynamicTypeUsage"
opcode="RCWVariance"
message="$(string.PrivatePublisher.RcwVarianceMessage)" />
<event value="404" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="RCWIEnumerableCasting"
task="DynamicTypeUsage"
opcode="RCWIEnumerableCasting"
message="$(string.PrivatePublisher.RCWIEnumerableCastingMessage)" />
<event value="405" version="0" level="win:Informational" template="DynamicTypeUsePrivate"
keywords="DynamicTypeUsageKeyword"
symbol="CreateCCW"
task="DynamicTypeUsage"
opcode="CreateCCW"
message="$(string.PrivatePublisher.CreateCCWMessage)" />
<event value="406" version="0" level="win:Informational" template="DynamicTypeUsePrivateVariance"
keywords="DynamicTypeUsageKeyword"
symbol="CCWVariance"
task="DynamicTypeUsage"
opcode="CCWVariance"
message="$(string.PrivatePublisher.CCWVarianceMessage)" />
<event value="407" version="0" level="win:Informational" template="DynamicTypeUseStringAndIntPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="ObjectVariantMarshallingToNative"
task="DynamicTypeUsage"
opcode="ObjectVariantMarshallingToNative"
message="$(string.PrivatePublisher.ObjectVariantMarshallingMessage)" />
<event value="408" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="GetTypeFromGUID"
task="DynamicTypeUsage"
opcode="GetTypeFromGUID"
message="$(string.PrivatePublisher.GetTypeFromGUIDMessage)" />
<event value="409" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="GetTypeFromProgID"
task="DynamicTypeUsage"
opcode="GetTypeFromProgID"
message="$(string.PrivatePublisher.GetTypeFromProgIDMessage)" />
<event value="410" version="0" level="win:Informational" template="DynamicTypeUseTwoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="ConvertToCallbackEtw"
task="DynamicTypeUsage"
opcode="ConvertToCallbackEtw"
message="$(string.PrivatePublisher.ConvertToCallbackMessage)" />
<event value="411" version="0" level="win:Informational" template="DynamicTypeUseNoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="BeginCreateManagedReference"
task="DynamicTypeUsage"
opcode="BeginCreateManagedReference"
message="$(string.PrivatePublisher.BeginCreateManagedReferenceMessage)" />
<event value="412" version="0" level="win:Informational" template="DynamicTypeUseNoParametersPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="EndCreateManagedReference"
task="DynamicTypeUsage"
opcode="EndCreateManagedReference"
message="$(string.PrivatePublisher.EndCreateManagedReferenceMessage)" />
<event value="413" version="0" level="win:Informational" template="DynamicTypeUseStringAndIntPrivate"
keywords="DynamicTypeUsageKeyword"
symbol="ObjectVariantMarshallingToManaged"
task="DynamicTypeUsage"
opcode="ObjectVariantMarshallingToManaged"
message="$(string.PrivatePublisher.ObjectVariantMarshallingMessage)" />
</events>
</provider>
<!-- Mono Profiler Publisher-->
<provider name="Microsoft-DotNETRuntimeMonoProfiler"
guid="{7F442D82-0F1D-5155-4B8C-1529EB2E31C2}"
symbol="MICROSOFT_DOTNETRUNTIME_MONO_PROFILER_PROVIDER"
resourceFileName="%INSTALL_PATH%\clretwrc.dll"
messageFileName="%INSTALL_PATH%\clretwrc.dll">
<!--Keywords-->
<keywords>
<keyword name="GCKeyword" mask="0x1"
message="$(string.MonoProfilerPublisher.GCKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_KEYWORD" />
<keyword name="GCHandleKeyword" mask="0x2"
message="$(string.MonoProfilerPublisher.GCHandleKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_HANDLE_KEYWORD" />
<keyword name="LoaderKeyword" mask="0x8"
message="$(string.MonoProfilerPublisher.LoaderKeywordMessage)" symbol="CLR_MONO_PROFILER_LOADER_KEYWORD" />
<keyword name="JitKeyword" mask="0x10"
message="$(string.MonoProfilerPublisher.JitKeywordMessage)" symbol="CLR_MONO_PROFILER_JIT_KEYWORD" />
<keyword name="ContentionKeyword" mask="0x4000"
message="$(string.MonoProfilerPublisher.ContentionKeywordMessage)" symbol="CLR_MONO_PROFILER_CONTENTION_KEYWORD"/>
<keyword name="ExceptionKeyword" mask="0x8000"
message="$(string.MonoProfilerPublisher.ExceptionKeywordMessage)" symbol="CLR_MONO_PROFILER_EXCEPTION_KEYWORD" />
<keyword name="ThreadingKeyword" mask="0x10000"
message="$(string.MonoProfilerPublisher.ThreadingKeywordMessage)" symbol="CLR_MONO_PROFILER_THREADING_KEYWORD"/>
<keyword name="GCHeapDumpKeyword" mask="0x100000"
message="$(string.MonoProfilerPublisher.GCHeapDumpKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_HEAPDUMP_KEYWORD" />
<keyword name="GCAllocationKeyword" mask="0x200000"
message="$(string.MonoProfilerPublisher.GCAllocationKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_ALLOCATION_KEYWORD" />
<keyword name="GCMovesKeyword" mask="0x400000"
message="$(string.MonoProfilerPublisher.GCMovesKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_MOVES_KEYWORD" />
<keyword name="GCHeapCollectKeyword" mask="0x800000"
message="$(string.MonoProfilerPublisher.GCHeapCollectKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_HEAPCOLLECT_KEYWORD" />
<keyword name="GCFinalizationKeyword" mask="0x1000000"
message="$(string.MonoProfilerPublisher.GCFinalizationKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZATION_KEYWORD" />
<keyword name="GCResizeKeyword" mask="0x2000000"
message="$(string.MonoProfilerPublisher.GCResizeKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_RESIZE_KEYWORD" />
<keyword name="GCRootKeyword" mask="0x4000000"
message="$(string.MonoProfilerPublisher.GCRootKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_ROOT_KEYWORD" />
<keyword name="GCHeapDumpVTableClassReferenceKeyword" mask="0x8000000"
message="$(string.MonoProfilerPublisher.GCHeapDumpVTableClassReferenceKeywordMessage)" symbol="CLR_MONO_PROFILER_GC_HEAPDUMP_VTABLE_CLASS_REFERENCE_KEYWORD" />
<keyword name="MethodTracingKeyword" mask="0x20000000"
message="$(string.MonoProfilerPublisher.MethodTracingKeywordMessage)" symbol="CLR_MONO_PROFILER_METHOD_TRACING_KEYWORD" />
<keyword name="TypeLoadingKeyword" mask="0x8000000000"
message="$(string.MonoProfilerPublisher.TypeLoadingKeywordMessage)" symbol="CLR_MONO_PROFILER_TYPE_LOADING_KEYWORD" />
<keyword name="MonitorKeyword" mask="0x10000000000"
message="$(string.MonoProfilerPublisher.MonitorKeywordMessage)" symbol="CLR_MONO_PROFILER_MONITOR_KEYWORD" />
</keywords>
<!--Tasks-->
<tasks>
<task name="MonoProfiler" symbol="CLR_MONO_PROFILER_TASK"
value="1" eventGUID="{7EC39CC6-C9E3-4328-9B32-CA6C5EC0EF31}"
message="$(string.MonoProfilerPublisher.MonoProfilerTaskMessage)">
<opcodes>
<opcode name="ContextLoaded" message="$(string.MonoProfilerPublisher.ContextLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_CONTEXT_LOADED_OPCODE" value="18" />
<opcode name="ContextUnloaded" message="$(string.MonoProfilerPublisher.ContextUnloadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_CONTEXT_UNLOADED_OPCODE" value="19" />
<opcode name="AppDomainLoading" message="$(string.MonoProfilerPublisher.AppDomainLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_LOADING_OPCODE" value="20" />
<opcode name="AppDomainLoaded" message="$(string.MonoProfilerPublisher.AppDomainLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_LOADED_OPCODE" value="21" />
<opcode name="AppDomainUnloading" message="$(string.MonoProfilerPublisher.AppDomainUnloadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_UNLOADING_OPCODE" value="22" />
<opcode name="AppDomainUnloaded" message="$(string.MonoProfilerPublisher.AppDomainUnloadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_UNLOADED_OPCODE" value="23" />
<opcode name="AppDomainName" message="$(string.MonoProfilerPublisher.AppDomainNameOpcodeMessage)" symbol="CLR_MONO_PROFILER_APP_DOMAIN_NAME_OPCODE" value="24" />
<opcode name="JitBegin" message="$(string.MonoProfilerPublisher.JitBeginOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_BEGIN_OPCODE" value="25" />
<opcode name="JitFailed" message="$(string.MonoProfilerPublisher.JitFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_FAILED_OPCODE" value="26" />
<opcode name="JitDone" message="$(string.MonoProfilerPublisher.JitDoneOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_DONE_OPCODE" value="27" />
<opcode name="JitChunkCreated" message="$(string.MonoProfilerPublisher.JitChunkCreatedOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_CHUNK_CREATED_OPCODE" value="28" />
<opcode name="JitChunkDestroyed" message="$(string.MonoProfilerPublisher.JitChunkDestroyedOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_CHUNK_DESTROYED_OPCODE" value="29" />
<opcode name="JitCodeBuffer" message="$(string.MonoProfilerPublisher.JitCodeBufferOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_CODE_BUFFER_OPCODE" value="30" />
<opcode name="ClassLoading" message="$(string.MonoProfilerPublisher.ClassLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_CLASS_LOADING_OPCODE" value="31" />
<opcode name="ClassFailed" message="$(string.MonoProfilerPublisher.ClassFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_CLASS_FAILED_OPCODE" value="32" />
<opcode name="ClassLoaded" message="$(string.MonoProfilerPublisher.ClassLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_CLASS_LOADED_OPCODE" value="33" />
<opcode name="VTableLoading" message="$(string.MonoProfilerPublisher.VTableLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_VTABLE_LOADING_OPCODE" value="34" />
<opcode name="VTableFailed" message="$(string.MonoProfilerPublisher.VTableFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_VTABLE_FAILED_OPCODE" value="35" />
<opcode name="VTableLoaded" message="$(string.MonoProfilerPublisher.VTableLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_VTABLE_LOADED_OPCODE" value="36" />
<opcode name="ModuleLoading" message="$(string.MonoProfilerPublisher.ModuleLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_LOADING_OPCODE" value="37" />
<opcode name="ModuleFailed" message="$(string.MonoProfilerPublisher.ModuleFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_FAILED_OPCODE" value="38" />
<opcode name="ModuleLoaded" message="$(string.MonoProfilerPublisher.ModuleLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_LOADED_OPCODE" value="39" />
<opcode name="ModuleUnloading" message="$(string.MonoProfilerPublisher.ModuleUnloadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_UNLOADING_OPCODE" value="40" />
<opcode name="ModuleUnloaded" message="$(string.MonoProfilerPublisher.ModuleUnloadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MODULE_UNLOADED_OPCODE" value="41" />
<opcode name="AssemblyLoading" message="$(string.MonoProfilerPublisher.AssemblyLoadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_ASSEMBLY_LOADING_OPCODE" value="42" />
<opcode name="AssemblyLoaded" message="$(string.MonoProfilerPublisher.AssemblyLoadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_ASSEMBLY_LOADED_OPCODE" value="43" />
<opcode name="AssemblyUnloading" message="$(string.MonoProfilerPublisher.AssemblyUnloadingOpcodeMessage)" symbol="CLR_MONO_PROFILER_ASSEMBLY_UNLOADING_OPCODE" value="44" />
<opcode name="AssemblyUnloaded" message="$(string.MonoProfilerPublisher.AssemblyUnloadedOpcodeMessage)" symbol="CLR_MONO_PROFILER_ASSEMBLY_UNLOADED_OPCODE" value="45" />
<opcode name="MethodEnter" message="$(string.MonoProfilerPublisher.MethodEnterOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_ENTER_OPCODE" value="46" />
<opcode name="MethodLeave" message="$(string.MonoProfilerPublisher.MethodLeaveOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_LEAVE_OPCODE" value="47" />
<opcode name="MethodTailCall" message="$(string.MonoProfilerPublisher.MethodTailCallOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_TAIL_CALL_OPCODE" value="48" />
<opcode name="MethodExceptionLeave" message="$(string.MonoProfilerPublisher.MethodExceptionLeaveOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_EXCEPTION_LEAVE_OPCODE" value="49" />
<opcode name="MethodFree" message="$(string.MonoProfilerPublisher.MethodFreeOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_FREE_OPCODE" value="50" />
<opcode name="MethodBeginInvoke" message="$(string.MonoProfilerPublisher.MethodBeginInvokeOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_BEGIN_INVOKE_OPCODE" value="51" />
<opcode name="MethodEndInvoke" message="$(string.MonoProfilerPublisher.MethodEndInvokeOpcodeMessage)" symbol="CLR_MONO_PROFILER_METHOD_END_INVOKE_OPCODE" value="52" />
<opcode name="ExceptionThrow" message="$(string.MonoProfilerPublisher.ExceptionThrowOpcodeMessage)" symbol="CLR_MONO_PROFILER_EXCEPTION_THROW_OPCODE" value="53" />
<opcode name="ExceptionClause" message="$(string.MonoProfilerPublisher.ExceptionClauseOpcodeMessage)" symbol="CLR_MONO_PROFILER_EXCEPTION_CLAUSE_OPCODE" value="54" />
<opcode name="GCEvent" message="$(string.MonoProfilerPublisher.GCEventOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_EVENT_OPCODE" value="55" />
<opcode name="GCAllocation" message="$(string.MonoProfilerPublisher.GCAllocationOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_ALLOCATION_OPCODE" value="56" />
<opcode name="GCMoves" message="$(string.MonoProfilerPublisher.GCMovesOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_MOVES_OPCODE" value="57" />
<opcode name="GCResize" message="$(string.MonoProfilerPublisher.GCResizeOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_RESIZE_OPCODE" value="58" />
<opcode name="GCHandleCreated" message="$(string.MonoProfilerPublisher.GCHandleCreatedOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HANDLE_CREATED_OPCODE" value="59" />
<opcode name="GCHandleDeleted" message="$(string.MonoProfilerPublisher.GCHandleDeletedOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HANDLE_DELETED_OPCODE" value="60" />
<opcode name="GCFinalizing" message="$(string.MonoProfilerPublisher.GCFinalizingOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZING_OPCODE" value="61" />
<opcode name="GCFinalized" message="$(string.MonoProfilerPublisher.GCFinalizedOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZED_OPCODE" value="62" />
<opcode name="GCFinalizingObject" message="$(string.MonoProfilerPublisher.GCFinalizingObjectOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZING_OBJECT_OPCODE" value="63" />
<opcode name="GCFinalizedObject" message="$(string.MonoProfilerPublisher.GCFinalizedObjectOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_FINALIZED_OBJECT_OPCODE" value="64" />
<opcode name="GCRootRegister" message="$(string.MonoProfilerPublisher.GCRootRegisterOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_ROOT_REGISTER_OPCODE" value="65" />
<opcode name="GCRootUnregister" message="$(string.MonoProfilerPublisher.GCRootUnregisterOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_ROOT_UNREGISTER_OPCODE" value="66" />
<opcode name="GCRoots" message="$(string.MonoProfilerPublisher.GCRootsOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_ROOTS_OPCODE" value="67" />
<opcode name="GCHeapDumpStart" message="$(string.MonoProfilerPublisher.GCHeapDumpStartOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_START_OPCODE" value="68" />
<opcode name="GCHeapDumpStop" message="$(string.MonoProfilerPublisher.GCHeapDumpStopOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_STOP_OPCODE" value="69" />
<opcode name="GCHeapDumpObjectReference" message="$(string.MonoProfilerPublisher.GCHeapDumpObjectReferenceOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_OBJECT_REFERENCE_OPCODE" value="70" />
<opcode name="MonitorContention" message="$(string.MonoProfilerPublisher.MonitorContentionOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_CONTENTION_OPCODE" value="71" />
<opcode name="MonitorFailed" message="$(string.MonoProfilerPublisher.MonitorFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_FAILED_OPCODE" value="72" />
<opcode name="MonitorAquired" message="$(string.MonoProfilerPublisher.MonitorAquiredOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_AQUIRED_OPCODE" value="73" />
<opcode name="ThreadStarted" message="$(string.MonoProfilerPublisher.ThreadStartedOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_STARTED_OPCODE" value="74" />
<opcode name="ThreadStopping" message="$(string.MonoProfilerPublisher.ThreadStoppingOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_STOPPING_OPCODE" value="75" />
<opcode name="ThreadStopped" message="$(string.MonoProfilerPublisher.ThreadStoppedOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_STOPPED_OPCODE" value="76" />
<opcode name="ThreadExited" message="$(string.MonoProfilerPublisher.ThreadExitedOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_EXITED_OPCODE" value="77" />
<opcode name="ThreadName" message="$(string.MonoProfilerPublisher.ThreadNameOpcodeMessage)" symbol="CLR_MONO_PROFILER_THREAD_NAME_OPCODE" value="78" />
<opcode name="JitDoneVerbose" message="$(string.MonoProfilerPublisher.JitDoneVerboseOpcodeMessage)" symbol="CLR_MONO_PROFILER_JIT_DONE_VERBOSE_OPCODE" value="79" />
<opcode name="GCHeapDumpVTableClassReference" message="$(string.MonoProfilerPublisher.GCHeapDumpVTableClassReferenceOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_VTABLE_CLASS_REFERENCE_OPCODE" value="80" />
</opcodes>
</task>
</tasks>
<maps>
<valueMap name="JitCodeBufferTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.MethodMessage)"/>
<map value="0x1" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.MethodTrampolineMessage)"/>
<map value="0x2" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.UnboxTrampolineMessage)"/>
<map value="0x3" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.IMTTrampolineMessage)"/>
<map value="0x4" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.GenericsTrampolineMessage)"/>
<map value="0x5" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.SpecificTrampolineMessage)"/>
<map value="0x6" message="$(string.MonoProfilerPublisher.CodeBufferTypeMap.HelperMessage)"/>
</valueMap>
<valueMap name="ExceptionClauseTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.ExceptionClauseTypeMap.NoneMessage)"/>
<map value="0x1" message="$(string.MonoProfilerPublisher.ExceptionClauseTypeMap.FilterMessage)"/>
<map value="0x2" message="$(string.MonoProfilerPublisher.ExceptionClauseTypeMap.FinallyMessage)"/>
<map value="0x3" message="$(string.MonoProfilerPublisher.ExceptionClauseTypeMap.FaultMessage)"/>
</valueMap>
<valueMap name="GCEventTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.GCEventTypeMap.StartMessage)"/>
<map value="0x5" message="$(string.MonoProfilerPublisher.GCEventTypeMap.EndMessage)"/>
<map value="0x6" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PreStopWorldMessage)"/>
<map value="0x7" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PostStopWorldMessage)"/>
<map value="0x8" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PreStartWorldMessage)"/>
<map value="0x9" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PostStartWorldMessage)"/>
<map value="0xA" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PreStopWorldLockedMessage)"/>
<map value="0xB" message="$(string.MonoProfilerPublisher.GCEventTypeMap.PostStartWorldUnlockedMessage)"/>
</valueMap>
<valueMap name="GCHandleTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.GCHandleTypeMap.WeakMessage)"/>
<map value="0x1" message="$(string.MonoProfilerPublisher.GCHandleTypeMap.WeakTrackResurrectionMessage)"/>
<map value="0x2" message="$(string.MonoProfilerPublisher.GCHandleTypeMap.NormalMessage)"/>
<map value="0x3" message="$(string.MonoProfilerPublisher.GCHandleTypeMap.PinnedMessage)"/>
</valueMap>
<valueMap name="GCRootTypeMap">
<map value="0x0" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ExternalMessage)"/>
<map value="0x1" message="$(string.MonoProfilerPublisher.GCRootTypeMap.StackMessage)"/>
<map value="0x2" message="$(string.MonoProfilerPublisher.GCRootTypeMap.FinalizerQueueMessage)"/>
<map value="0x3" message="$(string.MonoProfilerPublisher.GCRootTypeMap.StaticMessage)"/>
<map value="0x4" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ThreadStaticMessage)"/>
<map value="0x5" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ContextStaticMessage)"/>
<map value="0x6" message="$(string.MonoProfilerPublisher.GCRootTypeMap.GCHandleMessage)"/>
<map value="0x7" message="$(string.MonoProfilerPublisher.GCRootTypeMap.JitMessage)"/>
<map value="0x8" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ThreadingMessage)"/>
<map value="0x9" message="$(string.MonoProfilerPublisher.GCRootTypeMap.DomainMessage)"/>
<map value="0xA" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ReflectionMessage)"/>
<map value="0xB" message="$(string.MonoProfilerPublisher.GCRootTypeMap.MarshalMessage)"/>
<map value="0xC" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ThreadPoolMessage)"/>
<map value="0xD" message="$(string.MonoProfilerPublisher.GCRootTypeMap.DebuggerMessage)"/>
<map value="0xE" message="$(string.MonoProfilerPublisher.GCRootTypeMap.HandleMessage)"/>
<map value="0xF" message="$(string.MonoProfilerPublisher.GCRootTypeMap.EphemeronMessage)"/>
<map value="0x10" message="$(string.MonoProfilerPublisher.GCRootTypeMap.ToggleRefMessage)"/>
</valueMap>
</maps>
<templates>
<template tid="ContextLoadedUnloaded">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ContextID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<ContextLoadedUnloaded xmlns="myNs">
<ObjectID> %1 </ObjectID>
<AppDomainID> %2 </AppDomainID>
<ContextID> %3 </ContextID>
</ContextLoadedUnloaded>
</UserData>
</template>
<template tid="AppDomainLoadUnload">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<AppDomainLoadUnload xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
</AppDomainLoadUnload>
</UserData>
</template>
<template tid="AppDomainName">
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainName" inType="win:UnicodeString" />
<UserData>
<AppDomainName xmlns="myNs">
<AppDomainID> %1 </AppDomainID>
<AppDomainName> %2 </AppDomainName>
</AppDomainName>
</UserData>
</template>
<template tid="JitBeginFailedDone">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<UserData>
<JitBeginFailedDone xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodToken> %3 </MethodToken>
</JitBeginFailedDone>
</UserData>
</template>
<template tid="JitChunkCreated">
<data name="ChunkID" inType="win:Pointer" outType="win:HexInt64" />
<data name="ChunkSize" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<JitChunkCreated xmlns="myNs">
<ChunkID> %1 </ChunkID>
<ChunkSize> %2 </ChunkSize>
</JitChunkCreated>
</UserData>
</template>
<template tid="JitChunkDestroyed">
<data name="ChunkID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<JitChunkDestroyed xmlns="myNs">
<ChunkID> %1 </ChunkID>
</JitChunkDestroyed>
</UserData>
</template>
<template tid="JitCodeBuffer">
<data name="BufferID" inType="win:Pointer" outType="win:HexInt64" />
<data name="BufferSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="BufferType" inType="win:UInt8" map="JitCodeBufferTypeMap" />
<UserData>
<JitCodeBuffer xmlns="myNs">
<BufferID> %1 </BufferID>
<BufferSize> %2 </BufferSize>
<BufferType> %3 </BufferType>
</JitCodeBuffer>
</UserData>
</template>
<template tid="ClassLoadingFailed">
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<ClassLoadingFailed xmlns="myNs">
<ClassID> %1 </ClassID>
<ModuleID> %2 </ModuleID>
</ClassLoadingFailed>
</UserData>
</template>
<template tid="ClassLoaded">
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:UnicodeString" />
<UserData>
<ClassLoaded xmlns="myNs">
<ClassID> %1 </ClassID>
<ModuleID> %2 </ModuleID>
<ClassName> %3 </ClassName>
</ClassLoaded>
</UserData>
</template>
<template tid="VTableLoadingFailedLoaded">
<data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AppDomainID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<VTableLoadingFailedLoaded xmlns="myNs">
<VTableID> %1 </VTableID>
<ClassID> %2 </ClassID>
<AppDomainID> %3 </AppDomainID>
</VTableLoadingFailedLoaded>
</UserData>
</template>
<template tid="ModuleLoadingUnloadingFailed">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<ModuleLoadingUnloadingFailed xmlns="myNs">
<ModuleID> %1 </ModuleID>
</ModuleLoadingUnloadingFailed>
</UserData>
</template>
<template tid="ModuleLoadedUnloaded">
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleName" inType="win:UnicodeString" />
<data name="ModuleSignature" inType="win:UnicodeString" />
<UserData>
<ModuleLoadedUnloaded xmlns="myNs">
<ModuleID> %1 </ModuleID>
<ModuleName> %2 </ModuleName>
<ModuleSignature> %3 </ModuleSignature>
</ModuleLoadedUnloaded>
</UserData>
</template>
<template tid="AssemblyLoadingUnloading">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<AssemblyLoadingUnloading xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<ModuleID> %2 </ModuleID>
</AssemblyLoadingUnloading>
</UserData>
</template>
<template tid="AssemblyLoadedUnloaded">
<data name="AssemblyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="AssemblyName" inType="win:UnicodeString" />
<UserData>
<AssemblyLoadedUnloaded xmlns="myNs">
<AssemblyID> %1 </AssemblyID>
<ModuleID> %2 </ModuleID>
<AssemblyName> %3 </AssemblyName>
</AssemblyLoadedUnloaded>
</UserData>
</template>
<template tid="MethodTracing">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<MethodTracing xmlns="myNs">
<MethodID> %1 </MethodID>
</MethodTracing>
</UserData>
</template>
<template tid="ExceptionThrow">
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<ExceptionThrow xmlns="myNs">
<TypeID> %1 </TypeID>
<ObjectID> %2 </ObjectID>
</ExceptionThrow>
</UserData>
</template>
<template tid="ExceptionClause">
<data name="ClauseType" inType="win:UInt8" map="ExceptionClauseTypeMap" />
<data name="ClauseIdx" inType="win:UInt32" />
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="TypeID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<ExceptionClause xmlns="myNs">
<ClauseType> %1 </ClauseType>
<ClauseIdx> %2 </ClauseIdx>
<MethodID> %3 </MethodID>
<TypeID> %4 </TypeID>
<ObjectID> %5 </ObjectID>
</ExceptionClause>
</UserData>
</template>
<template tid="GCEvent">
<data name="GCEventType" inType="win:UInt8" map="GCEventTypeMap" />
<data name="GCGeneration" inType="win:UInt32" />
<UserData>
<GCEvent xmlns="myNs">
<GCEventType> %1 </GCEventType>
<GCGeneration> %2 </GCGeneration>
</GCEvent>
</UserData>
</template>
<template tid="GCAllocation">
<data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="ObjectSize" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCAllocation xmlns="myNs">
<VTableID> %1 </VTableID>
<ObjectID> %2 </ObjectID>
<ObjectSize> %3 </ObjectSize>
</GCAllocation>
</UserData>
</template>
<template tid="GCMoves">
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="AddressID" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCMoves xmlns="myNs">
<Count> %1 </Count>
</GCMoves>
</UserData>
</template>
<template tid="GCResize">
<data name="NewSize" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<GCResize xmlns="myNs">
<NewSize> %1 </NewSize>
</GCResize>
</UserData>
</template>
<template tid="GCHandleCreated">
<data name="HandleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="HandleType" inType="win:UInt8" map="GCHandleTypeMap" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<GCHandleCreated xmlns="myNs">
<HandleID> %1 </HandleID>
<HandleType> %2 </HandleType>
<ObjectID> %3 </ObjectID>
</GCHandleCreated>
</UserData>
</template>
<template tid="GCHandleDeleted">
<data name="HandleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="HandleType" inType="win:UInt8" map="GCHandleTypeMap" />
<UserData>
<GCHandleDeleted xmlns="myNs">
<HandleID> %1 </HandleID>
<HandleType> %2 </HandleType>
</GCHandleDeleted>
</UserData>
</template>
<template tid="GCFinalizingFinalizedObject">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<GCFinalizingFinalizedObject xmlns="myNs">
<ObjectID> %1 </ObjectID>
</GCFinalizingFinalizedObject>
</UserData>
</template>
<template tid="GCRootRegister">
<data name="RootID" inType="win:Pointer" outType="win:HexInt64" />
<data name="RootSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="RootType" inType="win:UInt8" map="GCRootTypeMap" />
<data name="RootKeyID" inType="win:UInt64" outType="win:HexInt64" />
<data name="RootKeyName" inType="win:UnicodeString" />
<UserData>
<GCRootRegister xmlns="myNs">
<RootID> %1 </RootID>
<RootSize> %2 </RootSize>
<RootType> %3 </RootType>
<RootKeyID> %4 </RootKeyID>
<RootKeyName> %5 </RootKeyName>
</GCRootRegister>
</UserData>
</template>
<template tid="GCRootUnregister">
<data name="RootID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<GCRootUnregister xmlns="myNs">
<RootID> %1 </RootID>
</GCRootUnregister>
</UserData>
</template>
<template tid="GCRoots">
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="AddressID" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCRoots xmlns="myNs">
<Count> %1 </Count>
</GCRoots>
</UserData>
</template>
<template tid="GCHeapDumpStart">
<data name="HeapCollectParam" inType="win:UnicodeString" />
<UserData>
<GCHeapDumpStart xmlns="myNs">
<HeapCollectParam> %1 </HeapCollectParam>
</GCHeapDumpStart>
</UserData>
</template>
<template tid="GCHeapDumpObjectReference">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectSize" inType="win:UInt64" outType="win:HexInt64" />
<data name="ObjectGeneration" inType="win:UInt8" />
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="ReferenceOffset" inType="win:UInt32" />
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
</struct>
<UserData>
<GCHeapDumpObjectReference xmlns="myNs">
<ObjectID> %1 </ObjectID>
<VTableID> %2 </VTableID>
<ObjectSize> %3 </ObjectSize>
<ObjectGeneration> %4 </ObjectGeneration>
<Count> %5 </Count>
</GCHeapDumpObjectReference>
</UserData>
</template>
<template tid="MonitorContentionFailedAcquired">
<data name="ObjectID" inType="win:Pointer" outType="win:HexInt64" />
<UserData>
<MonitorContentionFailedAcquired xmlns="myNs">
<ObjectID> %1 </ObjectID>
</MonitorContentionFailedAcquired>
</UserData>
</template>
<template tid="ThreadStartedStoppingStoppedExited">
<data name="ThreadID" inType="win:UInt64" outType="win:HexInt64" />
<UserData>
<ThreadStartedStoppingStoppedExited xmlns="myNs">
<ThreadID> %1 </ThreadID>
</ThreadStartedStoppingStoppedExited>
</UserData>
</template>
<template tid="ThreadName">
<data name="ThreadID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ThreadName" inType="win:UnicodeString" />
<UserData>
<ThreadName xmlns="myNs">
<ThreadID> %1 </ThreadID>
<ThreadName> %2 </ThreadName>
</ThreadName>
</UserData>
</template>
<template tid="JitDoneVerbose">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodNamespace" inType="win:UnicodeString" />
<data name="MethodName" inType="win:UnicodeString" />
<data name="MethodSignature" inType="win:UnicodeString" />
<UserData>
<JitDoneVerbose xmlns="myNs">
<MethodID> %1 </MethodID>
<MethodNamespace> %2 </MethodNamespace>
<MethodName> %3 </MethodName>
<MethodSignature> %4 </MethodSignature>
</JitDoneVerbose>
</UserData>
</template>
<template tid="JitDone_V1">
<data name="MethodID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="MethodToken" inType="win:UInt32" outType="win:HexInt32" />
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="Type" inType="win:UInt8" />
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
</struct>
<UserData>
<JitDone_V1 xmlns="myNs">
<MethodID> %1 </MethodID>
<ModuleID> %2 </ModuleID>
<MethodToken> %3 </MethodToken>
<Count> %4 </Count>
</JitDone_V1>
</UserData>
</template>
<template tid="ClassLoaded_V1">
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:UnicodeString" />
<data name="Count" inType="win:UInt32" outType="win:HexInt32" />
<struct name="Values" count="Count">
<data name="Type" inType="win:UInt8" />
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
</struct>
<UserData>
<ClassLoaded_V1 xmlns="myNs">
<ClassID> %1 </ClassID>
<ModuleID> %2 </ModuleID>
<ClassName> %3 </ClassName>
<Count> %4 </Count>
</ClassLoaded_V1>
</UserData>
</template>
<template tid="GCHeapDumpVTableClassReference">
<data name="VTableID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ModuleID" inType="win:UInt64" outType="win:HexInt64" />
<data name="ClassName" inType="win:UnicodeString" />
<UserData>
<GCHeapDumpVTableClassReference xmlns="myNs">
<VTableID> %1 </VTableID>
<ClassID> %2 </ClassID>
<ModuleID> %3 </ModuleID>
<ClassName> %4 </ClassName>
</GCHeapDumpVTableClassReference>
</UserData>
</template>
</templates>
<events>
<event value="1" version="0" level="win:Informational" template="ContextLoadedUnloaded"
keywords ="LoaderKeyword" opcode="ContextLoaded"
task="MonoProfiler"
symbol="MonoProfilerContextLoaded" message="$(string.MonoProfilerPublisher.ContextLoadedUnloadedEventMessage)" />
<event value="2" version="0" level="win:Informational" template="ContextLoadedUnloaded"
keywords ="LoaderKeyword" opcode="ContextUnloaded"
task="MonoProfiler"
symbol="MonoProfilerContextUnloaded" message="$(string.MonoProfilerPublisher.ContextLoadedUnloadedEventMessage)" />
<event value="3" version="0" level="win:Verbose" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainLoading"
task="MonoProfiler"
symbol="MonoProfilerAppDomainLoading" message="$(string.MonoProfilerPublisher.AppDomainLoadUnloadEventMessage)" />
<event value="4" version="0" level="win:Informational" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainLoaded"
task="MonoProfiler"
symbol="MonoProfilerAppDomainLoaded" message="$(string.MonoProfilerPublisher.AppDomainLoadUnloadEventMessage)" />
<event value="5" version="0" level="win:Verbose" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainUnloading"
task="MonoProfiler"
symbol="MonoProfilerAppDomainUnloading" message="$(string.MonoProfilerPublisher.AppDomainLoadUnloadEventMessage)" />
<event value="6" version="0" level="win:Informational" template="AppDomainLoadUnload"
keywords ="LoaderKeyword" opcode="AppDomainUnloaded"
task="MonoProfiler"
symbol="MonoProfilerAppDomainUnloaded" message="$(string.MonoProfilerPublisher.AppDomainLoadUnloadEventMessage)" />
<event value="7" version="0" level="win:Verbose" template="AppDomainName"
keywords ="LoaderKeyword" opcode="AppDomainName"
task="MonoProfiler"
symbol="MonoProfilerAppDomainName" message="$(string.MonoProfilerPublisher.AppDomainNameEventMessage)" />
<event value="8" version="0" level="win:Informational" template="JitBeginFailedDone"
keywords ="JitKeyword" opcode="JitBegin"
task="MonoProfiler"
symbol="MonoProfilerJitBegin" message="$(string.MonoProfilerPublisher.JitBeginFailedDoneEventMessage)" />
<event value="9" version="0" level="win:Informational" template="JitBeginFailedDone"
keywords ="JitKeyword" opcode="JitFailed"
task="MonoProfiler"
symbol="MonoProfilerJitFailed" message="$(string.MonoProfilerPublisher.JitBeginFailedDoneEventMessage)" />
<event value="10" version="0" level="win:Informational" template="JitBeginFailedDone"
keywords ="JitKeyword" opcode="JitDone"
task="MonoProfiler"
symbol="MonoProfilerJitDone" message="$(string.MonoProfilerPublisher.JitBeginFailedDoneEventMessage)" />
<event value="10" version="1" level="win:Informational" template="JitDone_V1"
keywords ="JitKeyword" opcode="JitDone"
task="MonoProfiler"
symbol="MonoProfilerJitDone_V1" message="$(string.MonoProfilerPublisher.JitDone_V1EventMessage)" />
<event value="11" version="0" level="win:Informational" template="JitChunkCreated"
keywords ="JitKeyword" opcode="JitChunkCreated"
task="MonoProfiler"
symbol="MonoProfilerJitChunkCreated" message="$(string.MonoProfilerPublisher.JitChunkCreatedEventMessage)" />
<event value="12" version="0" level="win:Informational" template="JitChunkDestroyed"
keywords ="JitKeyword" opcode="JitChunkDestroyed"
task="MonoProfiler"
symbol="MonoProfilerJitChunkDestroyed" message="$(string.MonoProfilerPublisher.JitChunkDestroyedEventMessage)" />
<event value="13" version="0" level="win:Informational" template="JitCodeBuffer"
keywords ="JitKeyword" opcode="JitCodeBuffer"
task="MonoProfiler"
symbol="MonoProfilerJitCodeBuffer" message="$(string.MonoProfilerPublisher.JitCodeBufferEventMessage)" />
<event value="14" version="0" level="win:Verbose" template="ClassLoadingFailed"
keywords ="TypeLoadingKeyword" opcode="ClassLoading"
task="MonoProfiler"
symbol="MonoProfilerClassLoading" message="$(string.MonoProfilerPublisher.ClassLoadingFailedEventMessage)" />
<event value="15" version="0" level="win:Informational" template="ClassLoadingFailed"
keywords ="TypeLoadingKeyword" opcode="ClassFailed"
task="MonoProfiler"
symbol="MonoProfilerClassFailed" message="$(string.MonoProfilerPublisher.ClassLoadingFailedEventMessage)" />
<event value="16" version="0" level="win:Informational" template="ClassLoaded"
keywords ="TypeLoadingKeyword" opcode="ClassLoaded"
task="MonoProfiler"
symbol="MonoProfilerClassLoaded" message="$(string.MonoProfilerPublisher.ClassLoadedEventMessage)" />
<event value="16" version="1" level="win:Informational" template="ClassLoaded_V1"
keywords ="TypeLoadingKeyword" opcode="ClassLoaded"
task="MonoProfiler"
symbol="MonoProfilerClassLoaded_V1" message="$(string.MonoProfilerPublisher.ClassLoaded_V1EventMessage)" />
<event value="17" version="0" level="win:Verbose" template="VTableLoadingFailedLoaded"
keywords ="TypeLoadingKeyword" opcode="VTableLoading"
task="MonoProfiler"
symbol="MonoProfilerVTableLoading" message="$(string.MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage)" />
<event value="18" version="0" level="win:Informational" template="VTableLoadingFailedLoaded"
keywords ="TypeLoadingKeyword" opcode="VTableFailed"
task="MonoProfiler"
symbol="MonoProfilerVTableFailed" message="$(string.MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage)" />
<event value="19" version="0" level="win:Informational" template="VTableLoadingFailedLoaded"
keywords ="TypeLoadingKeyword" opcode="VTableLoaded"
task="MonoProfiler"
symbol="MonoProfilerVTableLoaded" message="$(string.MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage)" />
<event value="20" version="0" level="win:Verbose" template="ModuleLoadingUnloadingFailed"
keywords ="LoaderKeyword" opcode="ModuleLoading"
task="MonoProfiler"
symbol="MonoProfilerModuleLoading" message="$(string.MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage)" />
<event value="21" version="0" level="win:Informational" template="ModuleLoadingUnloadingFailed"
keywords ="LoaderKeyword" opcode="ModuleFailed"
task="MonoProfiler"
symbol="MonoProfilerModuleFailed" message="$(string.MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage)" />
<event value="22" version="0" level="win:Informational" template="ModuleLoadedUnloaded"
keywords ="LoaderKeyword" opcode="ModuleLoaded"
task="MonoProfiler"
symbol="MonoProfilerModuleLoaded" message="$(string.MonoProfilerPublisher.ModuleLoadedUnloadedEventMessage)" />
<event value="23" version="0" level="win:Verbose" template="ModuleLoadingUnloadingFailed"
keywords ="LoaderKeyword" opcode="ModuleUnloading"
task="MonoProfiler"
symbol="MonoProfilerModuleUnloading" message="$(string.MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage)" />
<event value="24" version="0" level="win:Informational" template="ModuleLoadedUnloaded"
keywords ="LoaderKeyword" opcode="ModuleUnloaded"
task="MonoProfiler"
symbol="MonoProfilerModuleUnloaded" message="$(string.MonoProfilerPublisher.ModuleLoadedUnloadedEventMessage)" />
<event value="25" version="0" level="win:Verbose" template="AssemblyLoadingUnloading"
keywords ="LoaderKeyword" opcode="AssemblyLoading"
task="MonoProfiler"
symbol="MonoProfilerAssemblyLoading" message="$(string.MonoProfilerPublisher.AssemblyLoadingUnloadingEventMessage)" />
<event value="26" version="0" level="win:Informational" template="AssemblyLoadedUnloaded"
keywords ="LoaderKeyword" opcode="AssemblyLoaded"
task="MonoProfiler"
symbol="MonoProfilerAssemblyLoaded" message="$(string.MonoProfilerPublisher.AssemblyLoadedUnloadedEventMessage)" />
<event value="27" version="0" level="win:Verbose" template="AssemblyLoadingUnloading"
keywords ="LoaderKeyword" opcode="AssemblyUnloading"
task="MonoProfiler"
symbol="MonoProfilerAssemblyUnloading" message="$(string.MonoProfilerPublisher.AssemblyLoadingUnloadingEventMessage)" />
<event value="28" version="0" level="win:Informational" template="AssemblyLoadedUnloaded"
keywords ="LoaderKeyword" opcode="AssemblyUnloaded"
task="MonoProfiler"
symbol="MonoProfilerAssemblyUnloaded" message="$(string.MonoProfilerPublisher.AssemblyLoadedUnloadedEventMessage)" />
<event value="29" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodEnter"
task="MonoProfiler"
symbol="MonoProfilerMethodEnter" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="30" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodLeave"
task="MonoProfiler"
symbol="MonoProfilerMethodLeave" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="31" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodTailCall"
task="MonoProfiler"
symbol="MonoProfilerMethodTailCall" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="32" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodExceptionLeave"
task="MonoProfiler"
symbol="MonoProfilerMethodExceptionLeave" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="33" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodFree"
task="MonoProfiler"
symbol="MonoProfilerMethodFree" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="34" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodBeginInvoke"
task="MonoProfiler"
symbol="MonoProfilerMethodBeginInvoke" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="35" version="0" level="win:Informational" template="MethodTracing"
keywords ="MethodTracingKeyword" opcode="MethodEndInvoke"
task="MonoProfiler"
symbol="MonoProfilerMethodEndInvoke" message="$(string.MonoProfilerPublisher.MethodTracingEventMessage)" />
<event value="36" version="0" level="win:Informational" template="ExceptionThrow"
keywords ="ExceptionKeyword" opcode="ExceptionThrow"
task="MonoProfiler"
symbol="MonoProfilerExceptionThrow" message="$(string.MonoProfilerPublisher.ExceptionThrowEventMessage)" />
<event value="37" version="0" level="win:Informational" template="ExceptionClause"
keywords ="ExceptionKeyword" opcode="ExceptionClause"
task="MonoProfiler"
symbol="MonoProfilerExceptionClause" message="$(string.MonoProfilerPublisher.ExceptionClauseEventMessage)" />
<event value="38" version="0" level="win:Informational" template="GCEvent"
keywords ="GCKeyword" opcode="GCEvent"
task="MonoProfiler"
symbol="MonoProfilerGCEvent" message="$(string.MonoProfilerPublisher.GCEventEventMessage)" />
<event value="39" version="0" level="win:Informational" template="GCAllocation"
keywords ="GCAllocationKeyword" opcode="GCAllocation"
task="MonoProfiler"
symbol="MonoProfilerGCAllocation" message="$(string.MonoProfilerPublisher.GCAllocationEventMessage)" />
<event value="40" version="0" level="win:Informational" template="GCMoves"
keywords ="GCMovesKeyword" opcode="GCMoves"
task="MonoProfiler"
symbol="MonoProfilerGCMoves" message="$(string.MonoProfilerPublisher.GCMovesEventMessage)" />
<event value="41" version="0" level="win:Informational" template="GCResize"
keywords ="GCResizeKeyword" opcode="GCResize"
task="MonoProfiler"
symbol="MonoProfilerGCResize" message="$(string.MonoProfilerPublisher.GCResizeEventMessage)" />
<event value="42" version="0" level="win:Informational" template="GCHandleCreated"
keywords ="GCHandleKeyword" opcode="GCHandleCreated"
task="MonoProfiler"
symbol="MonoProfilerGCHandleCreated" message="$(string.MonoProfilerPublisher.GCHandleCreatedEventMessage)" />
<event value="43" version="0" level="win:Informational" template="GCHandleDeleted"
keywords ="GCHandleKeyword" opcode="GCHandleDeleted"
task="MonoProfiler"
symbol="MonoProfilerGCHandleDeleted" message="$(string.MonoProfilerPublisher.GCHandleDeletedEventMessage)" />
<event value="44" version="0" level="win:Informational"
keywords ="GCFinalizationKeyword" opcode="GCFinalizing"
task="MonoProfiler"
symbol="MonoProfilerGCFinalizing" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedEventMessage)" />
<event value="45" version="0" level="win:Informational"
keywords ="GCFinalizationKeyword" opcode="GCFinalized"
task="MonoProfiler"
symbol="MonoProfilerGCFinalized" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedEventMessage)" />
<event value="46" version="0" level="win:Informational" template="GCFinalizingFinalizedObject"
keywords ="GCFinalizationKeyword" opcode="GCFinalizingObject"
task="MonoProfiler"
symbol="MonoProfilerGCFinalizingObject" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedObjectEventMessage)" />
<event value="47" version="0" level="win:Informational" template="GCFinalizingFinalizedObject"
keywords ="GCFinalizationKeyword" opcode="GCFinalizedObject"
task="MonoProfiler"
symbol="MonoProfilerGCFinalizedObject" message="$(string.MonoProfilerPublisher.GCFinalizingFinalizedObjectEventMessage)" />
<event value="48" version="0" level="win:Informational" template="GCRootRegister"
keywords ="GCRootKeyword" opcode="GCRootRegister"
task="MonoProfiler"
symbol="MonoProfilerGCRootRegister" message="$(string.MonoProfilerPublisher.GCRootRegisterEventMessage)" />
<event value="49" version="0" level="win:Informational" template="GCRootUnregister"
keywords ="GCRootKeyword" opcode="GCRootUnregister"
task="MonoProfiler"
symbol="MonoProfilerGCRootUnregister" message="$(string.MonoProfilerPublisher.GCRootUnregisterEventMessage)" />
<event value="50" version="0" level="win:Informational" template="GCRoots"
keywords ="GCRootKeyword" opcode="GCRoots"
task="MonoProfiler"
symbol="MonoProfilerGCRoots" message="$(string.MonoProfilerPublisher.GCRootsEventMessage)" />
<event value="51" version="0" level="win:Informational"
keywords ="GCHeapDumpKeyword" opcode="GCHeapDumpStart" template="GCHeapDumpStart"
task="MonoProfiler"
symbol="MonoProfilerGCHeapDumpStart" message="$(string.MonoProfilerPublisher.GCHeapDumpStartEventMessage)" />
<event value="52" version="0" level="win:Informational"
keywords ="GCHeapDumpKeyword" opcode="GCHeapDumpStop"
task="MonoProfiler"
symbol="MonoProfilerGCHeapDumpStop" message="$(string.MonoProfilerPublisher.GCHeapDumpStopEventMessage)" />
<event value="53" version="0" level="win:Informational" template="GCHeapDumpObjectReference"
keywords ="GCHeapDumpKeyword" opcode="GCHeapDumpObjectReference"
task="MonoProfiler"
symbol="MonoProfilerGCHeapDumpObjectReference" message="$(string.MonoProfilerPublisher.GCHeapDumpObjectReferenceEventMessage)" />
<event value="54" version="0" level="win:Informational" template="MonitorContentionFailedAcquired"
keywords ="MonitorKeyword ContentionKeyword" opcode="MonitorContention"
task="MonoProfiler"
symbol="MonoProfilerMonitorContention" message="$(string.MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage)" />
<event value="55" version="0" level="win:Informational" template="MonitorContentionFailedAcquired"
keywords ="MonitorKeyword" opcode="MonitorFailed"
task="MonoProfiler"
symbol="MonoProfilerMonitorFailed" message="$(string.MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage)" />
<event value="56" version="0" level="win:Informational" template="MonitorContentionFailedAcquired"
keywords ="MonitorKeyword" opcode="MonitorAquired"
task="MonoProfiler"
symbol="MonoProfilerMonitorAcquired" message="$(string.MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage)" />
<event value="57" version="0" level="win:Informational" template="ThreadStartedStoppingStoppedExited"
keywords ="ThreadingKeyword" opcode="ThreadStarted"
task="MonoProfiler"
symbol="MonoProfilerThreadStarted" message="$(string.MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage)" />
<event value="58" version="0" level="win:Verbose" template="ThreadStartedStoppingStoppedExited"
keywords ="ThreadingKeyword" opcode="ThreadStopping"
task="MonoProfiler"
symbol="MonoProfilerThreadStopping" message="$(string.MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage)" />
<event value="59" version="0" level="win:Informational" template="ThreadStartedStoppingStoppedExited"
keywords ="ThreadingKeyword" opcode="ThreadStopped"
task="MonoProfiler"
symbol="MonoProfilerThreadStopped" message="$(string.MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage)" />
<event value="60" version="0" level="win:Informational" template="ThreadStartedStoppingStoppedExited"
keywords ="ThreadingKeyword" opcode="ThreadExited"
task="MonoProfiler"
symbol="MonoProfilerThreadExited" message="$(string.MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage)" />
<event value="61" version="0" level="win:Verbose" template="ThreadName"
keywords ="ThreadingKeyword" opcode="ThreadName"
task="MonoProfiler"
symbol="MonoProfilerThreadName" message="$(string.MonoProfilerPublisher.ThreadNameEventMessage)" />
<event value="62" version="0" level="win:Verbose" template="JitDoneVerbose"
keywords ="JitKeyword" opcode="JitDoneVerbose"
task="MonoProfiler"
symbol="MonoProfilerJitDoneVerbose" message="$(string.MonoProfilerPublisher.JitDoneVerboseEventMessage)" />
<event value="63" version="0" level="win:Informational" template="GCHeapDumpVTableClassReference"
keywords ="GCHeapDumpVTableClassReferenceKeyword" opcode="GCHeapDumpVTableClassReference"
task="MonoProfiler"
symbol="MonoProfilerGCHeapDumpVTableClassReference" message="$(string.MonoProfilerPublisher.GCHeapDumpVTableClassReferenceEventMessage)" />
</events>
</provider>
</events>
</instrumentation>
<localization>
<resources culture="en-US">
<stringTable>
<!--Message Strings-->
<!-- Event Messages -->
<string id="RuntimePublisher.GCStartEventMessage" value="Count=%1;%nReason=%2" />
<string id="RuntimePublisher.GCStart_V1EventMessage" value="Count=%1;%nDepth=%2;%nReason=%3;%nType=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.GCStart_V2EventMessage" value="Count=%1;%nDepth=%2;%nReason=%3;%nType=%4;%nClrInstanceID=%5;%nClientSequenceNumber=%6" />
<string id="RuntimePublisher.GCEndEventMessage" value="Count=%1;%nDepth=%2" />
<string id="RuntimePublisher.GCEnd_V1EventMessage" value="Count=%1;%nDepth=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.GCHeapStatsEventMessage" value="GenerationSize0=%1;%nTotalPromotedSize0=%2;%nGenerationSize1=%3;%nTotalPromotedSize1=%4;%nGenerationSize2=%5;%nTotalPromotedSize2=%6;%nGenerationSize3=%7;%nTotalPromotedSize3=%8;%nFinalizationPromotedSize=%9;%nFinalizationPromotedCount=%10;%nPinnedObjectCount=%11;%nSinkBlockCount=%12;%nGCHandleCount=%13" />
<string id="RuntimePublisher.GCHeapStats_V1EventMessage" value="GenerationSize0=%1;%nTotalPromotedSize0=%2;%nGenerationSize1=%3;%nTotalPromotedSize1=%4;%nGenerationSize2=%5;%nTotalPromotedSize2=%6;%nGenerationSize3=%7;%nTotalPromotedSize3=%8;%nFinalizationPromotedSize=%9;%nFinalizationPromotedCount=%10;%nPinnedObjectCount=%11;%nSinkBlockCount=%12;%nGCHandleCount=%13;%nClrInstanceID=%14" />
<string id="RuntimePublisher.GCHeapStats_V2EventMessage" value="GenerationSize0=%1;%nTotalPromotedSize0=%2;%nGenerationSize1=%3;%nTotalPromotedSize1=%4;%nGenerationSize2=%5;%nTotalPromotedSize2=%6;%nGenerationSize3=%7;%nTotalPromotedSize3=%8;%nFinalizationPromotedSize=%9;%nFinalizationPromotedCount=%10;%nPinnedObjectCount=%11;%nSinkBlockCount=%12;%nGCHandleCount=%13;%nClrInstanceID=%14;%nGenerationSize4=%15;%nTotalPromotedSize4=%16" />
<string id="RuntimePublisher.GCCreateSegmentEventMessage" value="Address=%1;%nSize=%2;%nType=%3" />
<string id="RuntimePublisher.GCCreateSegment_V1EventMessage" value="Address=%1;%nSize=%2;%nType=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.GCFreeSegmentEventMessage" value="Address=%1" />
<string id="RuntimePublisher.GCFreeSegment_V1EventMessage" value="Address=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.GCRestartEEBeginEventMessage" value="NONE" />
<string id="RuntimePublisher.GCRestartEEBegin_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCRestartEEEndEventMessage" value="NONE" />
<string id="RuntimePublisher.GCRestartEEEnd_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCSuspendEEEventMessage" value="Reason=%1" />
<string id="RuntimePublisher.GCSuspendEE_V1EventMessage" value="Reason=%1;%nCount=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.GCSuspendEEEndEventMessage" value="NONE" />
<string id="RuntimePublisher.GCSuspendEEEnd_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCAllocationTickEventMessage" value="Amount=%1;%nKind=%2" />
<string id="RuntimePublisher.GCAllocationTick_V1EventMessage" value="Amount=%1;%nKind=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.GCAllocationTick_V2EventMessage" value="Amount=%1;%nKind=%2;%nClrInstanceID=%3;Amount64=%4;%nTypeID=%5;%nTypeName=%6;%nHeapIndex=%7" />
<string id="RuntimePublisher.GCAllocationTick_V3EventMessage" value="Amount=%1;%nKind=%2;%nClrInstanceID=%3;Amount64=%4;%nTypeID=%5;%nTypeName=%6;%nHeapIndex=%7;%nAddress=%8" />
<string id="RuntimePublisher.GCAllocationTick_V4EventMessage" value="Amount=%1;%nKind=%2;%nClrInstanceID=%3;Amount64=%4;%nTypeID=%5;%nTypeName=%6;%nHeapIndex=%7;%nAddress=%8;%nObjectSize=%9" />
<string id="RuntimePublisher.GCCreateConcurrentThreadEventMessage" value="NONE" />
<string id="RuntimePublisher.GCCreateConcurrentThread_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCTerminateConcurrentThreadEventMessage" value="NONE" />
<string id="RuntimePublisher.GCTerminateConcurrentThread_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.GCFinalizersEndEventMessage" value="Count=%1" />
<string id="RuntimePublisher.GCFinalizersEnd_V1EventMessage" value="Count=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.GCFinalizersBeginEventMessage" value="NONE" />
<string id="RuntimePublisher.GCFinalizersBegin_V1EventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.BulkTypeEventMessage" value="Count=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.GCBulkRootEdgeEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkRootCCWEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkRCWEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkRootStaticVarEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCDynamicEventMessage" value="ClrInstanceID=%1;Data=%2;Size=%3" />
<string id="RuntimePublisher.GCBulkRootConditionalWeakTableElementEdgeEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkNodeEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkEdgeEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCSampledObjectAllocationHighEventMessage" value="High:ClrInstanceID=%1;%nAddress=%2;%nTypeID=%3;%nObjectCountForTypeSample=%4;%nTotalSizeForTypeSample=%5" />
<string id="RuntimePublisher.GCSampledObjectAllocationLowEventMessage" value="Low:ClrInstanceID=%1;%nAddress=%2;%nTypeID=%3;%nObjectCountForTypeSample=%4;%nTotalSizeForTypeSample=%5" />
<string id="RuntimePublisher.GCBulkSurvivingObjectRangesEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCBulkMovedObjectRangesEventMessage" value="ClrInstanceID=%1;%nIndex=%2;%nCount=%3" />
<string id="RuntimePublisher.GCGenerationRangeEventMessage" value="ClrInstanceID=%1;%nGeneration=%2;%nRangeStart=%3;%nRangeUsedLength=%4;%nRangeReservedLength=%5" />
<string id="RuntimePublisher.GCMarkStackRootsEventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.GCMarkFinalizeQueueRootsEventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.GCMarkHandlesEventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.GCMarkOlderGenerationRootsEventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.GCMarkWithTypeEventMessage" value="HeapNum=%1;%nClrInstanceID=%2;%nType=%3;%nBytes=%4"/>
<string id="RuntimePublisher.GCJoin_V2EventMessage" value="Heap=%1;%nJoinTime=%2;%nJoinType=%3;%nClrInstanceID=%4;%nJoinID=%5"/>
<string id="RuntimePublisher.GCPerHeapHistory_V3EventMessage" value="ClrInstanceID=%1;%nFreeListAllocated=%2;%nFreeListRejected=%3;%nEndOfSegAllocated=%4;%nCondemnedAllocated=%5;%nPinnedAllocated=%6;%nPinnedAllocatedAdvance=%7;%nRunningFreeListEfficiency=%8;%nCondemnReasons0=%9;%nCondemnReasons1=%10;%nCompactMechanisms=%11;%nExpandMechanisms=%12;%nHeapIndex=%13;%nExtraGen0Commit=%14;%nCount=%15"/>
<string id="RuntimePublisher.GCGlobalHeap_V2EventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCountD=%4;%nReason=%5;%nGlobalMechanisms=%6;%nClrInstanceID=%7;%nPauseMode=%8;%nMemoryPressure=%9"/>
<string id="RuntimePublisher.GCGlobalHeap_V3EventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCountD=%4;%nReason=%5;%nGlobalMechanisms=%6;%nClrInstanceID=%7;%nPauseMode=%8;%nMemoryPressure=%9;%nCondemnReasons0=%10;%nCondemnReasons1=%11"/>
<string id="RuntimePublisher.GCGlobalHeap_V4EventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCountD=%4;%nReason=%5;%nGlobalMechanisms=%6;%nClrInstanceID=%7;%nPauseMode=%8;%nMemoryPressure=%9;%nCondemnReasons0=%10;%nCondemnReasons1=%11;%nCount=%12"/>
<string id="RuntimePublisher.GCLOHCompactEventMessage" value="ClrInstanceID=%1;%nCount=%2" />
<string id="RuntimePublisher.GCFitBucketInfoEventMessage" value="ClrInstanceID=%1;%nBucketKind=%2;%nTotalSize=%3;%nCount=%4" />
<string id="RuntimePublisher.FinalizeObjectEventMessage" value="TypeID=%1;%nObjectID=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.GCTriggeredEventMessage" value="Reason=%1" />
<string id="RuntimePublisher.PinObjectAtGCTimeEventMessage" value="HandleID=%1;%nObjectID=%2;%nObjectSize=%3;%nTypeName=%4;%n;%nClrInstanceID=%5" />
<string id="RuntimePublisher.IncreaseMemoryPressureEventMessage" value="BytesAllocated=%1;%n;%nClrInstanceID=%2" />
<string id="RuntimePublisher.DecreaseMemoryPressureEventMessage" value="BytesFreed=%1;%n;%nClrInstanceID=%2" />
<string id="RuntimePublisher.WorkerThreadCreateEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreads=%2" />
<string id="RuntimePublisher.WorkerThreadTerminateEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreads=%2" />
<string id="RuntimePublisher.WorkerThreadRetirementRetireThreadEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreads=%2" />
<string id="RuntimePublisher.WorkerThreadRetirementUnretireThreadEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreads=%2" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadEventMessage" value="WorkerThreadCount=%1;%nRetiredWorkerThreadCount=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.YieldProcessorMeasurementEventMessage" value="ClrInstanceID=%1;%nNsPerYield=%2;%nEstablishedNsPerYield=%3" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadAdjustmentSampleEventMessage" value="Throughput=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadAdjustmentAdjustmentEventMessage" value="AverageThroughput=%1;%nNewWorkerThreadCount=%2;%nReason=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadAdjustmentStatsEventMessage" value="Duration=%1;%nThroughput=%2;%nThreadWave=%3;%nThroughputWave=%4;%nThroughputErrorEstimate=%5;%nAverageThroughputErrorEstimate=%6;%nThroughputRatio=%7;%nConfidence=%8;%nNewControlSetting=%9;%nNewThreadWaveMagnitude=%10;%nClrInstanceID=%11" />
<string id="RuntimePublisher.IOThreadCreateEventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2" />
<string id="RuntimePublisher.IOThreadCreate_V1EventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.IOThreadTerminateEventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2" />
<string id="RuntimePublisher.IOThreadTerminate_V1EventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.IOThreadRetirementRetireThreadEventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2" />
<string id="RuntimePublisher.IOThreadRetirementRetireThread_V1EventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.IOThreadRetirementUnretireThreadEventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2" />
<string id="RuntimePublisher.IOThreadRetirementUnretireThread_V1EventMessage" value="IOThreadCount=%1;%nRetiredIOThreads=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadPoolSuspendSuspendThreadEventMessage" value="ClrThreadID=%1;%nCPUUtilization=%2" />
<string id="RuntimePublisher.ThreadPoolSuspendResumeThreadEventMessage" value="ClrThreadID=%1;%nCPUUtilization=%2" />
<string id="RuntimePublisher.ThreadPoolWorkingThreadCountEventMessage" value="Count=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.ThreadPoolEnqueueEventMessage" value="WorkID=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.ThreadPoolDequeueEventMessage" value="WorkID=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.ThreadPoolIOEnqueueEventMessage" value="WorkID=%1;%nMultiDequeues=%4%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadPoolIOEnqueue_V1EventMessage" value="WorkID=%1;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadPoolIODequeueEventMessage" value="WorkID=%1;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadPoolIOPackEventMessage" value="WorkID=%1;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadCreatingEventMessage" value="ID=%1;%nClrInstanceID=%s" />
<string id="RuntimePublisher.ThreadRunningEventMessage" value="ID=%1;%nClrInstanceID=%s" />
<string id="RuntimePublisher.MethodDetailsEventMessage" value="MethodID=%1;%TypeID=%2;MethodToken=%3;TypeParameterCount=%4;LoaderModuleID=%5" />
<string id="RuntimePublisher.TypeLoadStartEventMessage" value="TypeLoadStartID=%1;ClrInstanceID=%2" />
<string id="RuntimePublisher.TypeLoadStopEventMessage" value="TypeLoadStartID=%1;ClrInstanceID=%2;LoadLevel=%3;TypeID=%4;TypeName=%5" />
<string id="RuntimePublisher.ExceptionExceptionThrownEventMessage" value="NONE" />
<string id="RuntimePublisher.ExceptionExceptionThrown_V1EventMessage" value="ExceptionType=%1;%nExceptionMessage=%2;%nExceptionEIP=%3;%nExceptionHRESULT=%4;%nExceptionFlags=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.ExceptionExceptionHandlingEventMessage" value="EntryEIP=%1;%nMethodID=%2;%nMethodName=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.ExceptionExceptionHandlingNoneEventMessage" value="NONE" />
<string id="RuntimePublisher.ContentionStartEventMessage" value="NONE" />
<string id="RuntimePublisher.ContentionStart_V1EventMessage" value="ContentionFlags=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.ContentionStopEventMessage" value="ContentionFlags=%1;%nClrInstanceID=%2"/>
<string id="RuntimePublisher.ContentionStop_V1EventMessage" value="ContentionFlags=%1;%nClrInstanceID=%2;DurationNs=%3"/>
<string id="RuntimePublisher.DCStartCompleteEventMessage" value="NONE" />
<string id="RuntimePublisher.DCEndCompleteEventMessage" value="NONE" />
<string id="RuntimePublisher.MethodDCStartEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RuntimePublisher.MethodDCEndEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RuntimePublisher.MethodDCStartVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RuntimePublisher.MethodDCEndVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RuntimePublisher.MethodLoadEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RuntimePublisher.MethodLoad_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.MethodLoad_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7;%nReJITID=%8" />
<string id="RuntimePublisher.R2RGetEntryPointEventMessage" value="MethodID=%1;%nMethodName=%2;%nEntryPoint=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.R2RGetEntryPointStartEventMessage" value="MethodID=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.MethodLoadVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RuntimePublisher.MethodLoadVerbose_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10" />
<string id="RuntimePublisher.MethodLoadVerbose_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10;%nReJITID=%11" />
<string id="RuntimePublisher.MethodUnloadEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RuntimePublisher.MethodUnload_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.MethodUnload_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7;%nReJITID=%8" />
<string id="RuntimePublisher.MethodUnloadVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RuntimePublisher.MethodUnloadVerbose_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10" />
<string id="RuntimePublisher.MethodUnloadVerbose_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10;%nReJITID=%11" />
<string id="RuntimePublisher.MethodJittingStartedEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodToken=%3;%nMethodILSize=%4;%nMethodNamespace=%5;%nMethodName=%6;%nMethodSignature=%7" />
<string id="RuntimePublisher.MethodJittingStarted_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodToken=%3;%nMethodILSize=%4;%nMethodNamespace=%5;%nMethodName=%6;%nMethodSignature=%7;%nClrInstanceID=%8" />
<string id="RuntimePublisher.MethodILToNativeMapEventMessage" value="MethodID=%1;%nReJITID=%2;%nMethodExtent=%3;%nCountOfMapEntries=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.DomainModuleLoadEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;%nModuleILPath=%5;ModuleNativePath=%6" />
<string id="RuntimePublisher.DomainModuleLoad_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;%nModuleILPath=%5;ModuleNativePath=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.DomainModuleUnloadEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;%nModuleILPath=%5;ModuleNativePath=%6" />
<string id="RuntimePublisher.DomainModuleUnload_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;%nModuleILPath=%5;ModuleNativePath=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.ModuleDCStartEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;%nModuleNativePath=%5" />
<string id="RuntimePublisher.ModuleDCEndEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;%nModuleNativePath=%5" />
<string id="RuntimePublisher.ModuleLoadEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;%nModuleNativePath=%5" />
<string id="RuntimePublisher.ModuleLoad_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.ModuleLoad_V2EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6;%nManagedPdbSignature=%7;%nManagedPdbAge=%8;%nManagedPdbBuildPath=%9;%nNativePdbSignature=%10;%nNativePdbAge=%11;%nNativePdbBuildPath=%12" />
<string id="RuntimePublisher.ModuleUnloadEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;%nModuleNativePath=%5" />
<string id="RuntimePublisher.ModuleUnload_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.ModuleUnload_V2EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6;%nManagedPdbSignature=%7;%nManagedPdbAge=%8;%nManagedPdbBuildPath=%9;%nNativePdbSignature=%10;%nNativePdbAge=%11;%nNativePdbBuildPath=%12" />
<string id="RuntimePublisher.AssemblyLoadEventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;%nFullyQualifiedAssemblyName=%4" />
<string id="RuntimePublisher.AssemblyLoad_V1EventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;%nFullyQualifiedAssemblyName=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.AssemblyUnloadEventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;%nFullyQualifiedAssemblyName=%4" />
<string id="RuntimePublisher.AssemblyUnload_V1EventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;%nFullyQualifiedAssemblyName=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.AppDomainLoadEventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3" />
<string id="RuntimePublisher.AppDomainLoad_V1EventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3;%nAppDomainIndex=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.AppDomainUnloadEventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3" />
<string id="RuntimePublisher.AppDomainUnload_V1EventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3;%nAppDomainIndex=%4;%nClrInstanceID=%5" />
<string id="RuntimePublisher.AssemblyLoadStartEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nAssemblyPath=%3;%nRequestingAssembly=%4;%nAssemblyLoadContext=%5;%nRequestingAssemblyLoadContext=%6" />
<string id="RuntimePublisher.AssemblyLoadStopEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nAssemblyPath=%3;%nRequestingAssembly=%4;%nAssemblyLoadContext=%5;%nRequestingAssemblyLoadContext=%6;%nSuccess=%7;%nResultAssemblyName=%8;%nResultAssemblyPath=%9;%nCached=%10" />
<string id="RuntimePublisher.AssemblyLoadContextResolvingHandlerInvokedEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nHandlerName=%3;%nAssemblyLoadContext=%4;%nResultAssemblyName=%5;%nResultAssemblyPath=%6" />
<string id="RuntimePublisher.AppDomainAssemblyResolveHandlerInvokedEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nHandlerName=%3;%nResultAssemblyName=%4;%nResultAssemblyPath=%5" />
<string id="RuntimePublisher.AssemblyLoadFromResolveHandlerInvokedEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nIsTrackedLoad=%3;%nRequestingAssemblyPath=%4;%nComputedRequestedAssemblyPath=%5" />
<string id="RuntimePublisher.KnownPathProbedEventMessage" value="ClrInstanceID=%1;%nFilePath=%2;%nSource=%3;%nResult=%4" />
<string id="RuntimePublisher.JitInstrumentationDataEventMessage" value="%MethodId=%4" />
<string id="RuntimePublisher.ProfilerEventMessage" value="%Message=%2" />
<string id="RuntimePublisher.ResolutionAttemptedEventMessage" value="ClrInstanceID=%1;%nAssemblyName=%2;%nStage=%3;%nAssemblyLoadContext=%4;%nResult=%5;%nResultAssemblyName=%6;%nResultAssemblyPath=%7;%nErrorMessage=%8" />
<string id="RuntimePublisher.StackEventMessage" value="ClrInstanceID=%1;%nReserved1=%2;%nReserved2=%3;%nFrameCount=%4;%nStack=%5" />
<string id="RuntimePublisher.AppDomainMemAllocatedEventMessage" value="AppDomainID=%1;%nAllocated=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.AppDomainMemSurvivedEventMessage" value="AppDomainID=%1;%nSurvived=%2;%nProcessSurvived=%3;%nClrInstanceID=%4" />
<string id="RuntimePublisher.ThreadCreatedEventMessage" value="ManagedThreadID=%1;%nAppDomainID=%2;%nFlags=%3;%nManagedThreadIndex=%4;%nOSThreadID=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.ThreadTerminatedEventMessage" value="ManagedThreadID=%1;%nAppDomainID=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ThreadDomainEnterEventMessage" value="ManagedThreadID=%1;%nAppDomainID=%2;%nClrInstanceID=%3" />
<string id="RuntimePublisher.ILStubGeneratedEventMessage" value="ClrInstanceID=%1;%nModuleID=%2;%nStubMethodID=%3;%nStubFlags=%4;%nManagedInteropMethodToken=%5;%nManagedInteropMethodNamespace=%6;%nManagedInteropMethodName=%7;%nManagedInteropMethodSignature=%8;%nNativeMethodSignature=%9;%nStubMethodSignature=%10;%nStubMethodILCode=%11" />
<string id="RuntimePublisher.ILStubCacheHitEventMessage" value="ClrInstanceID=%1;%nModuleID=%2;%nStubMethodID=%3;%nManagedInteropMethodToken=%4;%nManagedInteropMethodNamespace=%5;%nManagedInteropMethodName=%6;%nManagedInteropMethodSignature=%7" />
<string id="RuntimePublisher.StrongNameVerificationStartEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nFullyQualifiedAssemblyName=%3"/>
<string id="RuntimePublisher.StrongNameVerificationStart_V1EventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nFullyQualifiedAssemblyName=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.StrongNameVerificationEndEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nFullyQualifiedAssemblyName=%3"/>
<string id="RuntimePublisher.StrongNameVerificationEnd_V1EventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nFullyQualifiedAssemblyName=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.AuthenticodeVerificationStartEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3"/>
<string id="RuntimePublisher.AuthenticodeVerificationStart_V1EventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.AuthenticodeVerificationEndEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3"/>
<string id="RuntimePublisher.AuthenticodeVerificationEnd_V1EventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.EEStartupStartEventMessage" value="VerificationFlags=%1;%nErrorCode=%2;%nModulePath=%3;%nClrInstanceID=%4"/>
<string id="RuntimePublisher.RuntimeInformationEventMessage" value="ClrInstanceID=%1;%nSKU=%2;%nBclMajorVersion=%3;%nBclMinorVersion=%4;%nBclBuildNumber=%5;%nBclQfeNumber=%6;%nVMMajorVersion=%7;%nVMMinorVersion=%8;%nVMBuildNumber=%9;%nVMQfeNumber=%10;%nStartupFlags=%11;%nStartupMode=%12;%nCommandLine=%13;%nComObjectGUID=%14;%nRuntimeDllPath=%15"/>
<string id="RuntimePublisher.MethodJitInliningFailedEventMessage" value="MethodBeingCompiledNamespace=%1;%nMethodBeingCompiledName=%2;%nMethodBeingCompiledNameSignature=%3;%nInlinerNamespace=%4;%nInlinerName=%5;%nInlinerNameSignature=%6;%nInlineeNamespace=%7;%nInlineeName=%8;%nInlineeNameSignature=%9;%nFailAlways=%10;%nFailReason=%11;%nClrInstanceID=%12" />
<string id="RuntimePublisher.MethodJitInliningSucceededEventMessage" value="MethodBeingCompiledNamespace=%1;%nMethodBeingCompiledName=%2;%nMethodBeingCompiledNameSignature=%3;%nInlinerNamespace=%4;%nInlinerName=%5;%nInlinerNameSignature=%6;%nInlineeNamespace=%7;%nInlineeName=%8;%nInlineeNameSignature=%9;%nClrInstanceID=%10" />
<string id="RuntimePublisher.MethodJitTailCallFailedEventMessage" value="MethodBeingCompiledNamespace=%1;%nMethodBeingCompiledName=%2;%nMethodBeingCompiledNameSignature=%3;%nCallerNamespace=%4;%nCallerName=%5;%nCallerNameSignature=%6;%nCalleeNamespace=%7;%nCalleeName=%8;%nCalleeNameSignature=%9;%nTailPrefix=%10;%nFailReason=%11;%nClrInstanceID=%12" />
<string id="RuntimePublisher.MethodJitTailCallSucceededEventMessage" value="MethodBeingCompiledNamespace=%1;%nMethodBeingCompiledName=%2;%nMethodBeingCompiledNameSignature=%3;%nCallerNamespace=%4;%nCallerName=%5;%nCallerNameSignature=%6;%nCalleeNamespace=%7;%nCalleeName=%8;%nCalleeNameSignature=%9;%nTailPrefix=%10;%nTailCallType=%11;%nClrInstanceID=%12" />
<string id="RuntimePublisher.MethodJitMemoryAllocatedForCodeEventMessage" value="MethodID=%1;%nModuleID=%2;%nJitHotCodeRequestSize=%3;%nJitRODataRequestSize=%4;%nAllocatedSizeForJitCode=%5;%nJitAllocFlag=%6;%nClrInstanceID=%7" />
<string id="RuntimePublisher.SetGCHandleEventMessage" value="HandleID=%1;%nObjectID=%2;%nKind=%3;%nGeneration=%4;%nAppDomainID=%5;%nClrInstanceID=%6" />
<string id="RuntimePublisher.DestroyGCHandleEventMessage" value="HandleID=%1;%nClrInstanceID=%2" />
<string id="RuntimePublisher.CodeSymbolsEventMessage" value="%nClrInstanceId=%1;%nModuleId=%2;%nTotalChunks=%3;%nChunkNumber=%4;%nChunkLength=%5;%nChunk=%6" />
<string id="RuntimePublisher.TieredCompilationSettingsEventMessage" value="ClrInstanceID=%1;%nFlags=%2" />
<string id="RuntimePublisher.TieredCompilationPauseEventMessage" value="ClrInstanceID=%1" />
<string id="RuntimePublisher.TieredCompilationResumeEventMessage" value="ClrInstanceID=%1;%nNewMethodCount=%2" />
<string id="RuntimePublisher.TieredCompilationBackgroundJitStartEventMessage" value="ClrInstanceID=%1;%nPendingMethodCount=%2" />
<string id="RuntimePublisher.TieredCompilationBackgroundJitStopEventMessage" value="ClrInstanceID=%1;%nPendingMethodCount=%2;%nJittedMethodCount=%3" />
<string id="RuntimePublisher.ExecutionCheckpointEventMessage" value="ClrInstanceID=%1;Checkpoint=%2;Timestamp=%3"/>
<string id="RundownPublisher.MethodDCStartEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RundownPublisher.MethodDCStart_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" />
<string id="RundownPublisher.MethodDCStart_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7;%nReJITID=%8" />
<string id="RuntimePublisher.ModuleRangeLoadEventMessage" value="ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5" />
<string id="RundownPublisher.MethodDCEndEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6" />
<string id="RundownPublisher.MethodDCEnd_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7" />
<string id="RundownPublisher.MethodDCEnd_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nClrInstanceID=%7;%nReJITID=%8" />
<string id="RundownPublisher.MethodDCStartVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RundownPublisher.MethodDCStartVerbose_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10" />
<string id="RundownPublisher.MethodDCStartVerbose_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10;%nReJITID=%11" />
<string id="RundownPublisher.MethodDCEndVerboseEventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9" />
<string id="RundownPublisher.MethodDCEndVerbose_V1EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10" />
<string id="RundownPublisher.MethodDCEndVerbose_V2EventMessage" value="MethodID=%1;%nModuleID=%2;%nMethodStartAddress=%3;%nMethodSize=%4;%nMethodToken=%5;%nMethodFlags=%6;%nMethodNamespace=%7;%nMethodName=%8;%nMethodSignature=%9;%nClrInstanceID=%10;%nReJITID=%11" />
<string id="RundownPublisher.MethodDCStartILToNativeMapEventMessage" value="MethodID=%1;%nReJITID=%2;%nMethodExtent=%3;%nCountOfMapEntries=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.MethodDCEndILToNativeMapEventMessage" value="MethodID=%1;%nReJITID=%2;%nMethodExtent=%3;%nCountOfMapEntries=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.DomainModuleDCStartEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;ModuleILPath=%5;ModuleNativePath=%6" />
<string id="RundownPublisher.DomainModuleDCStart_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;ModuleILPath=%5;ModuleNativePath=%6;%nClrInstanceID=%7" />
<string id="RundownPublisher.DomainModuleDCEndEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;ModuleILPath=%5;ModuleNativePath=%6" />
<string id="RundownPublisher.DomainModuleDCEnd_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nAppDomainID=%3;%nModuleFlags=%4;ModuleILPath=%5;ModuleNativePath=%6;%nClrInstanceID=%7" />
<string id="RundownPublisher.ModuleDCStartEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;ModuleNativePath=%5" />
<string id="RundownPublisher.ModuleDCStart_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;ModuleNativePath=%5;%nClrInstanceID=%6" />
<string id="RundownPublisher.ModuleDCStart_V2EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6;%nManagedPdbSignature=%7;%nManagedPdbAge=%8;%nManagedPdbBuildPath=%9;%nNativePdbSignature=%10;%nNativePdbAge=%11;%nNativePdbBuildPath=%12" />
<string id="RundownPublisher.ModuleDCEndEventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;ModuleNativePath=%5" />
<string id="RundownPublisher.ModuleDCEnd_V1EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;ModuleILPath=%4;ModuleNativePath=%5;%nClrInstanceID=%6" />
<string id="RundownPublisher.ModuleDCEnd_V2EventMessage" value="ModuleID=%1;%nAssemblyID=%2;%nModuleFlags=%3;%nModuleILPath=%4;%nModuleNativePath=%5;%nClrInstanceID=%6;%nManagedPdbSignature=%7;%nManagedPdbAge=%8;%nManagedPdbBuildPath=%9;%nNativePdbSignature=%10;%nNativePdbAge=%11;%nNativePdbBuildPath=%12" />
<string id="RundownPublisher.AssemblyDCStartEventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;FullyQualifiedAssemblyName=%4" />
<string id="RundownPublisher.AssemblyDCStart_V1EventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;FullyQualifiedAssemblyName=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.AssemblyDCEndEventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;FullyQualifiedAssemblyName=%4" />
<string id="RundownPublisher.AssemblyDCEnd_V1EventMessage" value="AssemblyID=%1;%nAppDomainID=%2;%nAssemblyFlags=%3;FullyQualifiedAssemblyName=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.AppDomainDCStartEventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3" />
<string id="RundownPublisher.AppDomainDCStart_V1EventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3;%nAppDomainIndex=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.AppDomainDCEndEventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3" />
<string id="RundownPublisher.AppDomainDCEnd_V1EventMessage" value="AppDomainID=%1;%nAppDomainFlags=%2;%nAppDomainName=%3;%nAppDomainIndex=%4;%nClrInstanceID=%5" />
<string id="RundownPublisher.DCStartCompleteEventMessage" value="ClrInstanceID=%1" />
<string id="RundownPublisher.DCEndCompleteEventMessage" value="ClrInstanceID=%1" />
<string id="RundownPublisher.DCStartInitEventMessage" value="ClrInstanceID=%1" />
<string id="RundownPublisher.DCEndInitEventMessage" value="ClrInstanceID=%1" />
<string id="RundownPublisher.ThreadCreatedEventMessage" value="ManagedThreadID=%1;%nAppDomainID=%2;%nFlags=%3;%nManagedThreadIndex=%4;%nOSThreadID=%5;%nClrInstanceID=%6" />
<string id="RundownPublisher.RuntimeInformationEventMessage" value="ClrInstanceID=%1;%nSKU=%2;%nBclMajorVersion=%3;%nBclMinorVersion=%4;%nBclBuildNumber=%5;%nBclQfeNumber=%6;%nVMMajorVersion=%7;%nVMMinorVersion=%8;%nVMBuildNumber=%9;%nVMQfeNumber=%10;%nStartupFlags=%11;%nStartupMode=%12;%nCommandLine=%13;%nComObjectGUID=%14;%nRuntimeDllPath=%15"/>
<string id="RundownPublisher.StackEventMessage" value="ClrInstanceID=%1;%nReserved1=%2;%nReserved2=%3;%nFrameCount=%4;%nStack=%5" />
<string id="RundownPublisher.GCSettingsRundownEventMessage" value="HardLimit=%1;%nLOHThreshold=%2;%nPhysicalMemoryConfig=%3;%nGen0MinBudgetConfig=%4;%nGen0MaxBudgetConfig=%5;%nHighMemPercentConfig=%6;%nBitSettings=%7;%nClrInstanceID=%8" />
<string id="RundownPublisher.ModuleRangeDCStartEventMessage" value="ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5" />
<string id="RundownPublisher.ModuleRangeDCEndEventMessage" value= "ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5" />
<string id="RundownPublisher.TieredCompilationSettingsDCStartEventMessage" value="ClrInstanceID=%1;%nFlags=%2" />
<string id="RundownPublisher.ExecutionCheckpointDCEndEventMessage" value="ClrInstanceID=%1;Checkpoint=%2;Timestamp=%3"/>
<string id="StressPublisher.StressLogEventMessage" value="Facility=%1;%nLevel=%2;%nMessage=%3" />
<string id="StressPublisher.StressLog_V1EventMessage" value="Facility=%1;%nLevel=%2;%nMessage=%3;%nClrInstanceID=%4" />
<string id="StressPublisher.StackEventMessage" value="ClrInstanceID=%1;%nReserved1=%2;%nReserved2=%3;%nFrameCount=%4;%nStack=%5" />
<string id="PrivatePublisher.FailFastEventMessage" value="FailFastUserMessage=%1;%nFailedEIP=%2;%nOSExitCode=%3;%nClrExitCode=%4;%nClrInstanceID=%5" />
<string id="PrivatePublisher.FinalizeObjectEventMessage" value="TypeName=%1;%nTypeID=%2;%nObjectID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.SetGCHandleEventMessage" value="HandleID=%1;%nObjectID=%2;%n;%nClrInstanceID=%3" />
<string id="PrivatePublisher.DestroyGCHandleEventMessage" value="HandleID=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.PinPlugAtGCTimeEventMessage" value="PlugStart=%1;%nPlugEnd=%2;%n;%nClrInstanceID=%3" />
<string id="PrivatePublisher.CCWRefCountChangeEventMessage" value="HandleID=%1;%nObjectID=%2;%nCOMInterfacePointer=%3;%nNewRefCount=%4;%nTypeName=%5;%nOperation=%6;%nClrInstanceID=%7" />
<string id="PrivatePublisher.GCDecisionEventMessage" value="DoCompact=%1" />
<string id="PrivatePublisher.GCDecision_V1EventMessage" value="DoCompact=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.GCSettingsEventMessage" value="SegmentSize=%1;%nLargeObjectSegmentSize=%2;%nServerGC=%3"/>
<string id="PrivatePublisher.GCSettings_V1EventMessage" value="SegmentSize=%1;%nLargeObjectSegmentSize=%2;%nServerGC=%3;%nClrInstanceID=%4"/>
<string id="PrivatePublisher.GCOptimizedEventMessage" value="DesiredAllocation=%1;%nNewAllocation=%2;%nGenerationNumber=%3"/>
<string id="PrivatePublisher.GCOptimized_V1EventMessage" value="DesiredAllocation=%1;%nNewAllocation=%2;%nGenerationNumber=%3;%nClrInstanceID=%4"/>
<string id="PrivatePublisher.GCPerHeapHistoryEventMessage" value="NONE"/>
<string id="PrivatePublisher.GCPerHeapHistory_V1EventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.GCGlobalHeapEventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCount=%4;%nReason=%5;%nGlobalMechanisms=%6"/>
<string id="PrivatePublisher.GCGlobalHeap_V1EventMessage" value="FinalYoungestDesired=%1;%nNumHeaps=%2;%nCondemnedGeneration=%3;%nGen0ReductionCount=%4;%nReason=%5;%nGlobalMechanisms=%6;%nClrInstanceID=%7"/>
<string id="PrivatePublisher.GCJoinEventMessage" value="Heap=%1;%nJoinTime=%2;%nJoinType=%3"/>
<string id="PrivatePublisher.GCJoin_V1EventMessage" value="Heap=%1;%nJoinTime=%2;%nJoinType=%3;%nClrInstanceID=%4"/>
<string id="PrivatePublisher.GCMarkStackRootsEventMessage" value="HeapNum=%1"/>
<string id="PrivatePublisher.GCMarkStackRoots_V1EventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.GCMarkFinalizeQueueRootsEventMessage" value="HeapNum=%1"/>
<string id="PrivatePublisher.GCMarkFinalizeQueueRoots_V1EventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.GCMarkHandlesEventMessage" value="HeapNum=%1"/>
<string id="PrivatePublisher.GCMarkHandles_V1EventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.GCMarkCardsEventMessage" value="HeapNum=%1"/>
<string id="PrivatePublisher.GCMarkCards_V1EventMessage" value="HeapNum=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.BGCBeginEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC1stNonConEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC1stConEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC2ndNonConBeginEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC2ndNonConEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC2ndConBeginEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGC1stSweepEndEventMessage" value="GenNumber=%1;ClrInstanceID=%2"/>
<string id="PrivatePublisher.BGC2ndConEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGCPlanEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGCSweepEndEventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.BGCDrainMarkEventMessage" value="Objects=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.BGCRevisitEventMessage" value="Pages=%1;%nObjects=%2;%nIsLarge=%3;%nClrInstanceID=%4"/>
<string id="PrivatePublisher.BGCOverflowEventMessage" value="Min=%1;%nMax=%2;%Objects=%3;%nIsLarge=%4;%nClrInstanceID=%5"/>
<string id="PrivatePublisher.BGCOverflow_V1EventMessage" value="Min=%1;%nMax=%2;%Objects=%3;%nIsLarge=%4;%nClrInstanceID=%5;%GenNumber=%6"/>
<string id="PrivatePublisher.BGCAllocWaitEventMessage" value="Reason=%1;%nClrInstanceID=%2"/>
<string id="PrivatePublisher.GCFullNotifyEventMessage" value="GenNumber=%1;%nIsAlloc=%2"/>
<string id="PrivatePublisher.GCFullNotify_V1EventMessage" value="GenNumber=%1;%nIsAlloc=%2;%nClrInstanceID=%3"/>
<string id="PrivatePublisher.StartupEventMessage" value="NONE"/>
<string id="PrivatePublisher.Startup_V1EventMessage" value="ClrInstanceID=%1"/>
<string id="PrivatePublisher.StackEventMessage" value="ClrInstanceID=%1;%nReserved1=%2;%nReserved2=%3;%nFrameCount=%4;%nStack=%5" />
<string id="PrivatePublisher.BindingEventMessage" value="%AppDomainID=%1;%nLoadContextID=%2;%nFromLoaderCache=%3;%nDynamicLoad=%4;%nAssemblyCodebase=%5;%nAssemblyName=%6;%nClrInstanceID=%6"/>
<string id="PrivatePublisher.EvidenceGeneratedEventMessage" value="EvidenceType=%1;%nAppDomainID=%2;%nILImage=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.NgenBinderMessage" value="ClrInstanceID=%1;%nBindingID=%2;%nReason=%3;%nAssembly=%4" />
<string id="PrivatePublisher.FusionMessageEventMessage" value="ClrInstanceID=%1;%nMessage=%2;" />
<string id="PrivatePublisher.FusionErrorCodeEventMessage" value="ClrInstanceID=%1;%nCategory=%2%nErrorCode=%3" />
<string id="PrivatePublisher.ModuleTransparencyComputationStartEventMessage" value="Module=%1;%nAppDomainID=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.ModuleTransparencyComputationEndEventMessage" value="Module=%1;%nAppDomainID=%2;%nIsAllCritical=%3;%nIsAllTransparent=%4;%nIsTreatAsSafe=%5;%nIsOpportunisticallyCritical=%6;%nSecurityRuleSet=%7;%nClrInstanceID=%8" />
<string id="PrivatePublisher.TypeTransparencyComputationStartEventMessage" value="Type=%1;%nModule=%2;%nAppDomainID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.TypeTransparencyComputationEndEventMessage" value="Type=%1;%nModule=%2;%nAppDomainID=%3;%nIsAllCritical=%4;%nIsAllTransparent=%5;%nIsCritical=%6;%nIsTreatAsSafe=%7;%nClrInstanceID=%8" />
<string id="PrivatePublisher.MethodTransparencyComputationStartEventMessage" value="Method=%1;%nModule=%2;%nAppDomainID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.MethodTransparencyComputationEndEventMessage" value="Method=%1;%nModule=%2;%nAppDomainID=%3;%nIsCritical=%4;%nIsTreatAsSafe=%5;%nClrInstanceID=%6" />
<string id="PrivatePublisher.FieldTransparencyComputationStartEventMessage" value="Field=%1;%nModule=%2;%nAppDomainID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.FieldTransparencyComputationEndEventMessage" value="Field=%1;%nModule=%2;%nAppDomainID=%3;%nIsCritical=%4;%nIsTreatAsSafe=%5;%nClrInstanceID=%6" />
<string id="PrivatePublisher.TokenTransparencyComputationStartEventMessage" value="Token=%1;%nModule=%2;%nAppDomainID=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.TokenTransparencyComputationEndEventMessage" value="Token=%1;%nModule=%2;%nAppDomainID=%3;%nIsCritical=%4;%nIsTreatAsSafe=%5;%nClrInstanceID=%6" />
<string id="PrivatePublisher.AllocRequestEventMessage" value="LoaderHeapPtr=%1;%nMemoryAddress=%2;%nRequestSize=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.ModuleRangeLoadEventMessage" value="ClrInstanceID=%1;%ModuleID=%2;%nRangeBegin=%3;%nRangeSize=%4;%nRangeType=%5;%nIBCType=%6;%nSectionType=%7" />
<string id="PrivatePublisher.MulticoreJitCommonEventMessage" value="ClrInstanceID=%1;%String1=%2;%nString2=%3;%nInt1=%4;%nInt2=%5;%nInt3=%6" />
<string id="PrivatePublisher.MulticoreJitMethodCodeReturnedMessage" value="ClrInstanceID=%1;%nModuleID=%2;%nMethodID=%3" />
<string id="PrivatePublisher.IInspectableRuntimeClassNameMessage" value="TypeName=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.WinRTUnboxMessage" value="TypeName=%1;%nObject=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.CreateRcwMessage" value="TypeName=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.RcwVarianceMessage" value="RcwTypeName=%1;%nInterface=%2;%nVariantInterface=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.RCWIEnumerableCastingMessage" value="TypeName=%1;%nSecondType=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.CreateCCWMessage" value="TypeName=%1;%nClrInstanceID=%2" />
<string id="PrivatePublisher.CCWVarianceMessage" value="RcwTypeName=%1;%nInterface=%2;%nVariantInterface=%3;%nClrInstanceID=%4" />
<string id="PrivatePublisher.ObjectVariantMarshallingMessage" value="TypeName=%1;%nInt1=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.GetTypeFromGUIDMessage" value="TypeName=%1;%nSecondType=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.GetTypeFromProgIDMessage" value="TypeName=%1;%nSecondType=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.ConvertToCallbackMessage" value="TypeName=%1;%nSecondType=%2;%nClrInstanceID=%3" />
<string id="PrivatePublisher.BeginCreateManagedReferenceMessage" value="ClrInstanceID=%1" />
<string id="PrivatePublisher.EndCreateManagedReferenceMessage" value="ClrInstanceID=%1" />
<!-- Task Messages -->
<string id="RuntimePublisher.GarbageCollectionTaskMessage" value="GC" />
<string id="RuntimePublisher.WorkerThreadCreationTaskMessage" value="WorkerThreadCreationV2" />
<string id="RuntimePublisher.WorkerThreadRetirementTaskMessage" value="WorkerThreadRetirementV2" />
<string id="RuntimePublisher.IOThreadCreationTaskMessage" value="IOThreadCreation" />
<string id="RuntimePublisher.IOThreadRetirementTaskMessage" value="IOThreadRetirement" />
<string id="RuntimePublisher.ThreadpoolSuspensionTaskMessage" value="ThreadpoolSuspensionV2" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadTaskMessage" value="ThreadPoolWorkerThread" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadRetirementTaskMessage" value="ThreadPoolWorkerThreadRetirement" />
<string id="RuntimePublisher.ThreadPoolWorkerThreadAdjustmentTaskMessage" value="ThreadPoolWorkerThreadAdjustment" />
<string id="RuntimePublisher.ExceptionTaskMessage" value="Exception" />
<string id="RuntimePublisher.ExceptionCatchTaskMessage" value="ExceptionCatch" />
<string id="RuntimePublisher.ExceptionFinallyTaskMessage" value="ExceptionFinally" />
<string id="RuntimePublisher.ExceptionFilterTaskMessage" value="ExceptionFilter" />
<string id="RuntimePublisher.ContentionTaskMessage" value="Contention" />
<string id="RuntimePublisher.MethodTaskMessage" value="Method" />
<string id="RuntimePublisher.LoaderTaskMessage" value="Loader" />
<string id="RuntimePublisher.StackTaskMessage" value="ClrStack" />
<string id="RuntimePublisher.StrongNameVerificationTaskMessage" value="StrongNameVerification" />
<string id="RuntimePublisher.AuthenticodeVerificationTaskMessage" value="AuthenticodeVerification" />
<string id="RuntimePublisher.AppDomainResourceManagementTaskMessage" value="AppDomainResourceManagement" />
<string id="RuntimePublisher.ILStubTaskMessage" value="ILStub" />
<string id="RuntimePublisher.EEStartupTaskMessage" value="Runtime" />
<string id="RuntimePublisher.PerfTrackTaskMessage" value="ClrPerfTrack" />
<string id="RuntimePublisher.TypeTaskMessage" value="Type" />
<string id="RuntimePublisher.ThreadPoolWorkingThreadCountTaskMessage" value="ThreadPoolWorkingThreadCount" />
<string id="RuntimePublisher.ThreadPoolTaskMessage" value="ThreadPool" />
<string id="RuntimePublisher.ThreadTaskMessage" value="Thread" />
<string id="RuntimePublisher.DebugIPCEventTaskMessage" value="DebugIPCEvent" />
<string id="RuntimePublisher.DebugExceptionProcessingTaskMessage" value="DebugExceptionProcessing" />
<string id="RuntimePublisher.CodeSymbolsTaskMessage" value="CodeSymbols" />
<string id="RuntimePublisher.TieredCompilationTaskMessage" value="TieredCompilation" />
<string id="RuntimePublisher.AssemblyLoaderTaskMessage" value="AssemblyLoader" />
<string id="RuntimePublisher.TypeLoadTaskMessage" value="TypeLoad" />
<string id="RuntimePublisher.JitInstrumentationDataTaskMessage" value="JitInstrumentationData" />
<string id="RuntimePublisher.ExecutionCheckpointTaskMessage" value="ExecutionCheckpoint" />
<string id="RuntimePublisher.ProfilerTaskMessage" value="Profiler" />
<string id="RuntimePublisher.YieldProcessorMeasurementTaskMessage" value="YieldProcessorMeasurement" />
<string id="RundownPublisher.GCTaskMessage" value="GC" />
<string id="RundownPublisher.EEStartupTaskMessage" value="Runtime" />
<string id="RundownPublisher.MethodTaskMessage" value="Method" />
<string id="RundownPublisher.LoaderTaskMessage" value="Loader" />
<string id="RundownPublisher.StackTaskMessage" value="ClrStack" />
<string id="RundownPublisher.PerfTrackTaskMessage" value="ClrPerfTrack" />
<string id="RundownPublisher.TieredCompilationTaskMessage" value="TieredCompilation" />
<string id="RundownPublisher.ExecutionCheckpointTaskMessage" value="ExecutionCheckpoint" />
<string id="PrivatePublisher.GarbageCollectionTaskMessage" value="GC" />
<string id="PrivatePublisher.StartupTaskMessage" value="Startup"/>
<string id="PrivatePublisher.StackTaskMessage" value="ClrStack" />
<string id="PrivatePublisher.BindingTaskMessage" value="Binding"/>
<string id="PrivatePublisher.EvidenceGeneratedTaskMessage" value="EvidenceGeneration"/>
<string id="PrivatePublisher.TransparencyComputationMessage" value="Transparency"/>
<string id="PrivatePublisher.NgenBinderTaskMessage" value="NgenBinder" />
<string id="PrivatePublisher.FailFastTaskMessage" value="FailFast" />
<string id="PrivatePublisher.LoaderHeapAllocationPrivateTaskMessage" value="LoaderHeap" />
<string id="PrivatePublisher.PerfTrackTaskMessage" value="ClrPerfTrack" />
<string id="PrivatePublisher.MulticoreJitTaskMessage" value="ClrMulticoreJit" />
<string id="PrivatePublisher.DynamicTypeUsageTaskMessage" value="ClrDynamicTypeUsage" />
<string id="StressPublisher.StressTaskMessage" value="StressLog" />
<string id="StressPublisher.StackTaskMessage" value="ClrStack" />
<!-- Map Messages -->
<string id="RuntimePublisher.AppDomain.DefaultMapMessage" value="Default" />
<string id="RuntimePublisher.AppDomain.ExecutableMapMessage" value="Executable" />
<string id="RuntimePublisher.AppDomain.SharedMapMessage" value="Shared" />
<string id="RuntimePublisher.Assembly.DomainNeutralMapMessage" value="DomainNeutral" />
<string id="RuntimePublisher.Assembly.DynamicMapMessage" value="Dynamic" />
<string id="RuntimePublisher.Assembly.NativeMapMessage" value="Native" />
<string id="RuntimePublisher.Assembly.CollectibleMapMessage" value="Collectible" />
<string id="RuntimePublisher.Module.DomainNeutralMapMessage" value="DomainNeutral" />
<string id="RuntimePublisher.Module.NativeMapMessage" value="Native" />
<string id="RuntimePublisher.Module.DynamicMapMessage" value="Dynamic" />
<string id="RuntimePublisher.Module.ManifestMapMessage" value="Manifest" />
<string id="RuntimePublisher.Module.IbcOptimizedMapMessage" value="IbcOptimized" />
<string id="RuntimePublisher.Module.ReadyToRunModuleMapMessage" value="ReadyToRunModule" />
<string id="RuntimePublisher.Module.PartialReadyToRunModuleMapMessage" value="PartialReadyToRunModule" />
<string id="RuntimePublisher.Method.DynamicMapMessage" value="Dynamic" />
<string id="RuntimePublisher.Method.GenericMapMessage" value="Generic" />
<string id="RuntimePublisher.Method.HasSharedGenericCodeMapMessage" value="HasSharedGenericCode" />
<string id="RuntimePublisher.Method.JittedMapMessage" value="Jitted" />
<string id="RuntimePublisher.Method.JitHelperMapMessage" value="JitHelper" />
<string id="RuntimePublisher.Method.ProfilerRejectedPrecompiledCodeMapMessage" value="ProfilerRejectedPrecompiledCode" />
<string id="RuntimePublisher.Method.ReadyToRunRejectedPrecompiledCodeMapMessage" value="ReadyToRunRejectedPrecompiledCode" />
<string id="RuntimePublisher.GCSegment.SmallObjectHeapMapMessage" value="SmallObjectHeap" />
<string id="RuntimePublisher.GCSegment.LargeObjectHeapMapMessage" value="LargeObjectHeap" />
<string id="RuntimePublisher.GCSegment.ReadOnlyHeapMapMessage" value="ReadOnlyHeap" />
<string id="RuntimePublisher.GCSegment.PinnedObjectHeapMapMessage" value="PinnedHeap" />
<string id="RuntimePublisher.GCAllocation.SmallMapMessage" value="Small" />
<string id="RuntimePublisher.GCAllocation.LargeMapMessage" value="Large" />
<string id="RuntimePublisher.GCAllocation.PinnedMapMessage" value="Pinned" />
<string id="RuntimePublisher.GCBucket.FLItemMapMessage" value="FLItem" />
<string id="RuntimePublisher.GCBucket.PlugMessage" value="Plug" />
<string id="RuntimePublisher.GCType.NonConcurrentGCMapMessage" value="NonConcurrentGC" />
<string id="RuntimePublisher.GCType.BackgroundGCMapMessage" value="BackgroundGC" />
<string id="RuntimePublisher.GCType.ForegroundGCMapMessage" value="ForegroundGC" />
<string id="RuntimePublisher.GCReason.AllocSmallMapMessage" value="AllocSmall" />
<string id="RuntimePublisher.GCReason.InducedMapMessage" value="Induced" />
<string id="RuntimePublisher.GCReason.LowMemoryMapMessage" value="LowMemory" />
<string id="RuntimePublisher.GCReason.EmptyMapMessage" value="Empty" />
<string id="RuntimePublisher.GCReason.AllocLargeMapMessage" value="AllocLarge" />
<string id="RuntimePublisher.GCReason.OutOfSpaceSmallObjectHeapMapMessage" value="OutOfSpaceSmallObjectHeap" />
<string id="RuntimePublisher.GCReason.OutOfSpaceLargeObjectHeapMapMessage" value="OutOfSpaceLargeObjectHeap" />
<string id="RuntimePublisher.GCReason.InducedNoForceMapMessage" value="InducedNoForce" />
<string id="RuntimePublisher.GCReason.StressMapMessage" value="Stress" />
<string id="RuntimePublisher.GCReason.InducedLowMemoryMapMessage" value="InducedLowMemory" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendOtherMapMessage" value="SuspendOther" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForGCMapMessage" value="SuspendForGC" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForAppDomainShutdownMapMessage" value="SuspendForAppDomainShutdown" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForCodePitchingMapMessage" value="SuspendForCodePitching" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForShutdownMapMessage" value="SuspendForShutdown" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForDebuggerMapMessage" value="SuspendForDebugger" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForGCPrepMapMessage" value="SuspendForGCPrep" />
<string id="RuntimePublisher.GCSuspendEEReason.SuspendForDebuggerSweepMapMessage" value="SuspendForDebuggerSweep" />
<string id="RuntimePublisher.StartupMode.ManagedExeMapMessage" value="ManagedExe" />
<string id="RuntimePublisher.StartupMode.HostedCLRMapMessage" value="HostedClr" />
<string id="RuntimePublisher.StartupMode.IjwDllMapMessage" value="IjwDll" />
<string id="RuntimePublisher.StartupMode.ComActivatedMapMessage" value="ComActivated" />
<string id="RuntimePublisher.StartupMode.OtherMapMessage" value="Other" />
<string id="RuntimePublisher.RuntimeSku.DesktopCLRMapMessage" value="DesktopClr" />
<string id="RuntimePublisher.RuntimeSku.CoreCLRMapMessage" value="CoreClr" />
<string id="RuntimePublisher.ExceptionThrown.HasInnerExceptionMapMessage" value="HasInnerException" />
<string id="RuntimePublisher.ExceptionThrown.NestedMapMessage" value="Nested" />
<string id="RuntimePublisher.ExceptionThrown.ReThrownMapMessage" value="ReThrown" />
<string id="RuntimePublisher.ExceptionThrown.CorruptedStateMapMessage" value="CorruptedState" />
<string id="RuntimePublisher.ExceptionThrown.CLSCompliantMapMessage" value="CLSCompliant" />
<string id="RuntimePublisher.ILStubGenerated.ReverseInteropMapMessage" value="ReverseInterop" />
<string id="RuntimePublisher.ILStubGenerated.COMInteropMapMessage" value="ComInterop" />
<string id="RuntimePublisher.ILStubGenerated.NGenedStubMapMessage" value="NGenedStub" />
<string id="RuntimePublisher.ILStubGenerated.DelegateMapMessage" value="Delegate" />
<string id="RuntimePublisher.ILStubGenerated.VarArgMapMessage" value="VarArg" />
<string id="RuntimePublisher.ILStubGenerated.UnmanagedCalleeMapMessage" value="UnmanagedCallee" />
<string id="RuntimePublisher.ILStubGenerated.StructStubMapMessage" value="StructMarshal" />
<string id="RuntimePublisher.Contention.ManagedMapMessage" value="Managed" />
<string id="RuntimePublisher.Contention.NativeMapMessage" value="Native" />
<string id="RuntimePublisher.TailCallType.OptimizedMapMessage" value="OptimizedTailCall" />
<string id="RuntimePublisher.TailCallType.RecursiveMapMessage" value="RecursiveLoop" />
<string id="RuntimePublisher.TailCallType.HelperMapMessage" value="HelperAssistedTailCall" />
<string id="RuntimePublisher.ThreadAdjustmentReason.WarmupMapMessage" value="Warmup" />
<string id="RuntimePublisher.ThreadAdjustmentReason.InitializingMapMessage" value="Initializing" />
<string id="RuntimePublisher.ThreadAdjustmentReason.RandomMoveMapMessage" value="RandomMove" />
<string id="RuntimePublisher.ThreadAdjustmentReason.ClimbingMoveMapMessage" value="ClimbingMove" />
<string id="RuntimePublisher.ThreadAdjustmentReason.ChangePointMapMessage" value="ChangePoint" />
<string id="RuntimePublisher.ThreadAdjustmentReason.StabilizingMapMessage" value="Stabilizing" />
<string id="RuntimePublisher.ThreadAdjustmentReason.StarvationMapMessage" value="Starvation" />
<string id="RuntimePublisher.ThreadAdjustmentReason.ThreadTimedOutMapMessage" value="ThreadTimedOut" />
<string id="RuntimePublisher.GCRootKind.Stack" value="Stack" />
<string id="RuntimePublisher.GCRootKind.Finalizer" value="Finalizer" />
<string id="RuntimePublisher.GCRootKind.Handle" value="Handle" />
<string id="RuntimePublisher.GCRootKind.Older" value="Older" />
<string id="RuntimePublisher.GCRootKind.SizedRef" value="SizedRef" />
<string id="RuntimePublisher.GCRootKind.Overflow" value="Overflow" />
<string id="RuntimePublisher.GCRootKind.DependentHandle" value="DependentHandle" />
<string id="RuntimePublisher.GCRootKind.NewFQ" value="NewFQ" />
<string id="RuntimePublisher.GCRootKind.Steal" value="Steal" />
<string id="RuntimePublisher.GCRootKind.BGC" value="BGC" />
<string id="RuntimePublisher.Startup.CONCURRENT_GCMapMessage" value="CONCURRENT_GC" />
<string id="RuntimePublisher.Startup.LOADER_OPTIMIZATION_SINGLE_DOMAINMapMessage" value="LOADER_OPTIMIZATION_SINGLE_DOMAIN" />
<string id="RuntimePublisher.Startup.LOADER_OPTIMIZATION_MULTI_DOMAINMapMessage" value="LOADER_OPTIMIZATION_MULTI_DOMAIN" />
<string id="RuntimePublisher.Startup.LOADER_SAFEMODEMapMessage" value="LOADER_SAFEMODE" />
<string id="RuntimePublisher.Startup.LOADER_SETPREFERENCEMapMessage" value="LOADER_SETPREFERENCE" />
<string id="RuntimePublisher.Startup.SERVER_GCMapMessage" value="SERVER_GC" />
<string id="RuntimePublisher.Startup.HOARD_GC_VMMapMessage" value="HOARD_GC_VM" />
<string id="RuntimePublisher.Startup.SINGLE_VERSION_HOSTING_INTERFACEMapMessage" value="SINGLE_VERSION_HOSTING_INTERFACE" />
<string id="RuntimePublisher.Startup.LEGACY_IMPERSONATIONMapMessage" value="LEGACY_IMPERSONATION" />
<string id="RuntimePublisher.Startup.DISABLE_COMMITTHREADSTACKMapMessage" value="DISABLE_COMMITTHREADSTACK" />
<string id="RuntimePublisher.Startup.ALWAYSFLOW_IMPERSONATIONMapMessage" value="ALWAYSFLOW_IMPERSONATION" />
<string id="RuntimePublisher.Startup.TRIM_GC_COMMITMapMessage" value="TRIM_GC_COMMIT" />
<string id="RuntimePublisher.Startup.ETWMapMessage" value="ETW" />
<string id="RuntimePublisher.Startup.SERVER_BUILDMapMessage" value="SERVER_BUILD" />
<string id="RuntimePublisher.Startup.ARMMapMessage" value="ARM" />
<string id="RuntimePublisher.ModuleRangeTypeMap.ColdRangeMessage" value="ColdRange"/>
<string id="RuntimePublisher.TypeFlags.Delegate" value="Delegate"/>
<string id="RuntimePublisher.TypeFlags.Finalizable" value="Finalizable"/>
<string id="RuntimePublisher.TypeFlags.ExternallyImplementedCOMObject" value="ExternallyImplementedCOMObject"/>
<string id="RuntimePublisher.TypeFlags.Array" value="Array"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit0" value="ArrayRankBit0"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit1" value="ArrayRankBit1"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit2" value="ArrayRankBit2"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit3" value="ArrayRankBit3"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit4" value="ArrayRankBit4"/>
<string id="RuntimePublisher.TypeFlags.ArrayRankBit5" value="ArrayRankBit5"/>
<string id="RuntimePublisher.GCRootFlags.Pinning" value="Pinning"/>
<string id="RuntimePublisher.GCRootFlags.WeakRef" value="WeakRef"/>
<string id="RuntimePublisher.GCRootFlags.Interior" value="Interior"/>
<string id="RuntimePublisher.GCRootFlags.RefCounted" value="RefCounted"/>
<string id="RuntimePublisher.GCRootStaticVarFlags.ThreadLocal" value="ThreadLocal"/>
<string id="RuntimePublisher.GCRootCCWFlags.Strong" value="Strong"/>
<string id="RuntimePublisher.GCRootCCWFlags.Pegged" value="Pegged"/>
<string id="RundownPublisher.AppDomain.DefaultMapMessage" value="Default" />
<string id="RuntimePublisher.ThreadFlags.GCSpecial" value="GCSpecial"/>
<string id="RuntimePublisher.ThreadFlags.Finalizer" value="Finalizer"/>
<string id="RuntimePublisher.ThreadFlags.ThreadPoolWorker" value="ThreadPoolWorker"/>
<string id="RuntimePublisher.GCHandleKind.WeakShortMessage" value="WeakShort" />
<string id="RuntimePublisher.GCHandleKind.WeakLongMessage" value="WeakLong" />
<string id="RuntimePublisher.GCHandleKind.StrongMessage" value="Strong" />
<string id="RuntimePublisher.GCHandleKind.PinnedMessage" value="Pinned" />
<string id="RuntimePublisher.GCHandleKind.VariableMessage" value="Variable" />
<string id="RuntimePublisher.GCHandleKind.RefCountedMessage" value="RefCounted" />
<string id="RuntimePublisher.GCHandleKind.DependentMessage" value="Dependent" />
<string id="RuntimePublisher.GCHandleKind.AsyncPinnedMessage" value="AsyncPinned" />
<string id="RuntimePublisher.GCHandleKind.SizedRefMessage" value="SizedRef" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.NoneMapMessage" value="None" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.QuickJitMapMessage" value="QuickJit" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage" value="QuickJitForLoops" />
<string id="RuntimePublisher.KnownPathSource.ApplicationAssembliesMessage" value="ApplicationAssemblies" />
<string id="RuntimePublisher.KnownPathSource.UnusedMessage" value="Unused" />
<string id="RuntimePublisher.KnownPathSource.AppPathsMessage" value="AppPaths" />
<string id="RuntimePublisher.KnownPathSource.PlatformResourceRootsMessage" value="PlatformResourceRoots" />
<string id="RuntimePublisher.KnownPathSource.SatelliteSubdirectoryMessage" value="SatelliteSubdirectory" />
<string id="RuntimePublisher.ResolutionAttempted.FindInLoadContext" value="FindInLoadContext" />
<string id="RuntimePublisher.ResolutionAttempted.AssemblyLoadContextLoad" value="AssemblyLoadContextLoad"/>
<string id="RuntimePublisher.ResolutionAttempted.ApplicationAssemblies" value="ApplicationAssemblies" />
<string id="RuntimePublisher.ResolutionAttempted.DefaultAssemblyLoadContextFallback" value="DefaultAssemblyLoadContextFallback" />
<string id="RuntimePublisher.ResolutionAttempted.ResolveSatelliteAssembly" value="ResolveSatelliteAssembly" />
<string id="RuntimePublisher.ResolutionAttempted.AssemblyLoadContextResolvingEvent" value="AssemblyLoadContextResolvingEvent" />
<string id="RuntimePublisher.ResolutionAttempted.AppDomainAssemblyResolveEvent" value="AppDomainAssemblyResolveEvent" />
<string id="RuntimePublisher.ResolutionAttempted.Success" value="Success" />
<string id="RuntimePublisher.ResolutionAttempted.AssemblyNotFound" value="AssemblyNotFound" />
<string id="RuntimePublisher.ResolutionAttempted.MismatchedAssemblyName" value="MismatchedAssemblyName" />
<string id="RuntimePublisher.ResolutionAttempted.IncompatibleVersion" value="IncompatibleVersion" />
<string id="RuntimePublisher.ResolutionAttempted.Failure" value="Failure" />
<string id="RuntimePublisher.ResolutionAttempted.Exception" value="Exception" />
<string id="RundownPublisher.AppDomain.ExecutableMapMessage" value="Executable" />
<string id="RundownPublisher.AppDomain.SharedMapMessage" value="Shared" />
<string id="RundownPublisher.Assembly.DomainNeutralMapMessage" value="DomainNeutral" />
<string id="RundownPublisher.Assembly.DynamicMapMessage" value="Dynamic" />
<string id="RundownPublisher.Assembly.NativeMapMessage" value="Native" />
<string id="RundownPublisher.Assembly.CollectibleMapMessage" value="Collectible" />
<string id="RundownPublisher.Module.DomainNeutralMapMessage" value="DomainNeutral" />
<string id="RundownPublisher.Module.NativeMapMessage" value="Native" />
<string id="RundownPublisher.Module.DynamicMapMessage" value="Dynamic" />
<string id="RundownPublisher.Module.ManifestMapMessage" value="Manifest" />
<string id="RundownPublisher.Module.IbcOptimizedMapMessage" value="IbcOptimized" />
<string id="RundownPublisher.Module.ReadyToRunModuleMapMessage" value="ReadyToRunModule" />
<string id="RundownPublisher.Module.PartialReadyToRunModuleMapMessage" value="PartialReadyToRunModule" />
<string id="RundownPublisher.Method.DynamicMapMessage" value="Dynamic" />
<string id="RundownPublisher.Method.GenericMapMessage" value="Generic" />
<string id="RundownPublisher.Method.HasSharedGenericCodeMapMessage" value="HasSharedGenericCode" />
<string id="RundownPublisher.Method.JittedMapMessage" value="Jitted" />
<string id="RundownPublisher.Method.JitHelperMapMessage" value="JitHelper" />
<string id="RundownPublisher.Method.ProfilerRejectedPrecompiledCodeMapMessage" value="ProfilerRejectedPrecompiledCode" />
<string id="RundownPublisher.Method.ReadyToRunRejectedPrecompiledCodeMapMessage" value="ReadyToRunRejectedPrecompiledCode" />
<string id="RundownPublisher.StartupMode.ManagedExeMapMessage" value="ManagedExe" />
<string id="RundownPublisher.StartupMode.HostedCLRMapMessage" value="HostedClr" />
<string id="RundownPublisher.StartupMode.IjwDllMapMessage" value="IjwDll" />
<string id="RundownPublisher.StartupMode.ComActivatedMapMessage" value="ComActivated" />
<string id="RundownPublisher.StartupMode.OtherMapMessage" value="Other" />
<string id="RundownPublisher.RuntimeSku.DesktopCLRMapMessage" value="DesktopClr" />
<string id="RundownPublisher.RuntimeSku.CoreCLRMapMessage" value="CoreClr" />
<string id="RundownPublisher.Startup.CONCURRENT_GCMapMessage" value="CONCURRENT_GC" />
<string id="RundownPublisher.Startup.LOADER_OPTIMIZATION_SINGLE_DOMAINMapMessage" value="LOADER_OPTIMIZATION_SINGLE_DOMAIN" />
<string id="RundownPublisher.Startup.LOADER_OPTIMIZATION_MULTI_DOMAINMapMessage" value="LOADER_OPTIMIZATION_MULTI_DOMAIN" />
<string id="RundownPublisher.Startup.LOADER_SAFEMODEMapMessage" value="LOADER_SAFEMODE" />
<string id="RundownPublisher.Startup.LOADER_SETPREFERENCEMapMessage" value="LOADER_SETPREFERENCE" />
<string id="RundownPublisher.Startup.SERVER_GCMapMessage" value="SERVER_GC" />
<string id="RundownPublisher.Startup.HOARD_GC_VMMapMessage" value="HOARD_GC_VM" />
<string id="RundownPublisher.Startup.SINGLE_VERSION_HOSTING_INTERFACEMapMessage" value="SINGLE_VERSION_HOSTING_INTERFACE" />
<string id="RundownPublisher.Startup.LEGACY_IMPERSONATIONMapMessage" value="LEGACY_IMPERSONATION" />
<string id="RundownPublisher.Startup.DISABLE_COMMITTHREADSTACKMapMessage" value="DISABLE_COMMITTHREADSTACK" />
<string id="RundownPublisher.Startup.ALWAYSFLOW_IMPERSONATIONMapMessage" value="ALWAYSFLOW_IMPERSONATION" />
<string id="RundownPublisher.Startup.TRIM_GC_COMMITMapMessage" value="TRIM_GC_COMMIT" />
<string id="RundownPublisher.Startup.ETWMapMessage" value="ETW" />
<string id="RundownPublisher.Startup.SERVER_BUILDMapMessage" value="SERVER_BUILD" />
<string id="RundownPublisher.Startup.ARMMapMessage" value="ARM" />
<string id="RundownPublisher.ModuleRangeTypeMap.ColdRangeMessage" value="ColdRange"/>
<string id="RundownPublisher.ThreadFlags.GCSpecial" value="GCSpecial"/>
<string id="RundownPublisher.ThreadFlags.Finalizer" value="Finalizer"/>
<string id="RundownPublisher.ThreadFlags.ThreadPoolWorker" value="ThreadPoolWorker"/>
<string id="RundownPublisher.TieredCompilationSettingsFlags.NoneMapMessage" value="None" />
<string id="RundownPublisher.TieredCompilationSettingsFlags.QuickJitMapMessage" value="QuickJit" />
<string id="RundownPublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage" value="QuickJitForLoops" />
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ModuleSection" value="ModuleSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.EETableSection" value="EETableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.WriteDataSection" value="WriteDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.WriteableDataSection" value="WriteableDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DataSection" value="DataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.RVAStaticsSection" value="RVAStaticsSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.EEDataSection" value="EEDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoTableEagerSection" value="DelayLoadInfoTableEagerSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoTableSection" value="DelayLoadInfoTableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.EEReadonlyData" value="EEReadonlyData"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlyData" value="ReadonlyData"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ClassSection" value="ClassSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CrossDomainInfoSection" value="CrossDomainInfoSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodDescSection" value="MethodDescSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodDescWriteableSection" value="MethodDescWriteableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ExceptionSection" value="ExceptionSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.InstrumentSection" value="InstrumentSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.VirtualImportThunkSection" value="VirtualImportThunkSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ExternalMethodThunkSection" value="ExternalMethodThunkSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.HelperTableSection" value="HelperTableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeWriteableSection" value="MethodPrecodeWriteableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeWriteSection" value="MethodPrecodeWriteSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MethodPrecodeSection" value="MethodPrecodeSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.Win32ResourcesSection" value="Win32ResourcesSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.HeaderSection" value="HeaderSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.MetadataSection" value="MetadataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoSection" value="DelayLoadInfoSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ImportTableSection" value="ImportTableSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CodeSection" value="CodeSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CodeHeaderSection" value="CodeHeaderSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CodeManagerSection" value="CodeManagerSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.UnwindDataSection" value="UnwindDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.RuntimeFunctionSection" value="RuntimeFunctionSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.StubsSection" value="StubsSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.StubDispatchDataSection" value="StubDispatchDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ExternalMethodDataSection" value="ExternalMethodDataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DelayLoadInfoDelayListSection" value="DelayLoadInfoDelayListSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlySharedSection" value="ReadonlySharedSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ReadonlySection" value="ReadonlySection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ILSection" value="ILSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.GCInfoSection" value="GCInfoSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ILMetadataSection" value="ILMetadataSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ResourcesSection" value="ResourcesSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.CompressedMapsSection" value="CompressedMapsSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.DebugSection" value="DebugSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.BaseRelocsSection" value="BaseRelocsSection"/>
<string id="PrivatePublisher.ModuleRangeIBCTypeMap.IBCUnprofiledSectionMessage" value="IBCUnprofiledSection"/>
<string id="PrivatePublisher.ModuleRangeIBCTypeMap.IBCProfiledSectionMessage" value="IBCProfiledSection"/>
<string id="PrivatePublisher.ModuleRangeTypeMap.HotRangeMessage" value="HotRange"/>
<string id="PrivatePublisher.ModuleRangeTypeMap.WarmRangeMessage" value="WarmRange"/>
<string id="PrivatePublisher.ModuleRangeTypeMap.ColdRangeMessage" value="ColdRange"/>
<string id="PrivatePublisher.ModuleRangeTypeMap.HotColdRangeMessage" value="HotColdSortedRange"/>
<string id="PrivatePublisher.GCHandleKind.WeakShortMessage" value="WeakShort" />
<string id="PrivatePublisher.GCHandleKind.WeakLongMessage" value="WeakLong" />
<string id="PrivatePublisher.GCHandleKind.StrongMessage" value="Strong" />
<string id="PrivatePublisher.GCHandleKind.PinnedMessage" value="Pinned" />
<string id="PrivatePublisher.GCHandleKind.VariableMessage" value="Variable" />
<string id="PrivatePublisher.GCHandleKind.RefCountedMessage" value="RefCounted" />
<string id="PrivatePublisher.GCHandleKind.DependentMessage" value="Dependent" />
<string id="PrivatePublisher.GCHandleKind.AsyncPinnedMessage" value="AsyncPinned" />
<string id="PrivatePublisher.GCHandleKind.SizedRefMessage" value="SizedRef" />
<!-- Keyword Messages -->
<string id="RuntimePublisher.GCKeywordMessage" value="GC" />
<string id="RuntimePublisher.ThreadingKeywordMessage" value="Threading" />
<string id="RuntimePublisher.AssemblyLoaderKeywordMessage" value="AssemblyLoader" />
<string id="RuntimePublisher.LoaderKeywordMessage" value="Loader" />
<string id="RuntimePublisher.JitKeywordMessage" value="Jit" />
<string id="RuntimePublisher.JittedMethodILToNativeMapKeywordMessage" value="JittedMethodILToNativeMap" />
<string id="RuntimePublisher.NGenKeywordMessage" value="NGen" />
<string id="RuntimePublisher.StartEnumerationKeywordMessage" value="StartEnumeration" />
<string id="RuntimePublisher.EndEnumerationKeywordMessage" value="StopEnumeration" />
<string id="RuntimePublisher.SecurityKeywordMessage" value="Security" />
<string id="RuntimePublisher.AppDomainResourceManagementKeywordMessage" value="AppDomainResourceManagement" />
<string id="RuntimePublisher.InteropKeywordMessage" value="Interop" />
<string id="RuntimePublisher.ContentionKeywordMessage" value="Contention" />
<string id="RuntimePublisher.ExceptionKeywordMessage" value="Exception" />
<string id="RuntimePublisher.PerfTrackKeywordMessage" value="PerfTrack" />
<string id="RuntimePublisher.StackKeywordMessage" value="Stack" />
<string id="RuntimePublisher.JitTracingKeywordMessage" value="JitTracing" />
<string id="RuntimePublisher.OverrideAndSuppressNGenEventsKeywordMessage" value="OverrideAndSuppressNGenEvents" />
<string id="RuntimePublisher.TypeKeywordMessage" value="Type" />
<string id="RuntimePublisher.GCHeapDumpKeywordMessage" value="GCHeapDump" />
<string id="RuntimePublisher.GCSampledObjectAllocationHighKeywordMessage" value="GCSampledObjectAllocationHigh" />
<string id="RuntimePublisher.GCSampledObjectAllocationLowKeywordMessage" value="GCSampledObjectAllocationLow" />
<string id="RuntimePublisher.GCHeapSurvivalAndMovementKeywordMessage" value="GCHeapSurvivalAndMovement" />
<string id="RuntimePublisher.GCHeapCollectKeyword" value="GCHeapCollect" />
<string id="RuntimePublisher.GCHeapAndTypeNamesKeyword" value="GCHeapAndTypeNames" />
<string id="RuntimePublisher.GCHandleKeywordMessage" value="GCHandle" />
<string id="RuntimePublisher.ThreadTransferKeywordMessage" value="ThreadTransfer" />
<string id="RuntimePublisher.DebuggerKeywordMessage" value="Debugger" />
<string id="RuntimePublisher.MonitoringKeywordMessage" value="Monitoring" />
<string id="RuntimePublisher.CodeSymbolsKeywordMessage" value="CodeSymbols" />
<string id="RuntimePublisher.EventSourceKeywordMessage" value="EventSource" />
<string id="RuntimePublisher.CompilationKeywordMessage" value="Compilation" />
<string id="RuntimePublisher.CompilationDiagnosticKeywordMessage" value="CompilationDiagnostic" />
<string id="RuntimePublisher.MethodDiagnosticKeywordMessage" value="MethodDiagnostic" />
<string id="RuntimePublisher.TypeDiagnosticKeywordMessage" value="TypeDiagnostic" />
<string id="RuntimePublisher.JitInstrumentationDataKeywordMessage" value="JitInstrumentationData" />
<string id="RuntimePublisher.ProfilerKeywordMessage" value="Profiler" />
<string id="RuntimePublisher.GenAwareBeginEventMessage" value="NONE" />
<string id="RuntimePublisher.GenAwareEndEventMessage" value="NONE" />
<string id="RundownPublisher.GCKeywordMessage" value="GC" />
<string id="RundownPublisher.LoaderKeywordMessage" value="Loader" />
<string id="RundownPublisher.JitKeywordMessage" value="Jit" />
<string id="RundownPublisher.JittedMethodILToNativeMapRundownKeywordMessage" value="JittedMethodILToNativeMapRundown" />
<string id="RundownPublisher.NGenKeywordMessage" value="NGen" />
<string id="RundownPublisher.StartRundownKeywordMessage" value="Start" />
<string id="RundownPublisher.EndRundownKeywordMessage" value="End" />
<string id="RuntimePublisher.AppDomainResourceManagementRundownKeywordMessage" value="AppDomainResourceManagement" />
<string id="RundownPublisher.ThreadingKeywordMessage" value="Threading" />
<string id="RundownPublisher.OverrideAndSuppressNGenEventsRundownKeywordMessage" value="OverrideAndSuppressNGenEvents" />
<string id="RundownPublisher.PerfTrackRundownKeywordMessage" value="PerfTrack" />
<string id="RundownPublisher.StackKeywordMessage" value="Stack" />
<string id="RundownPublisher.CompilationKeywordMessage" value="Compilation" />
<string id="PrivatePublisher.GCPrivateKeywordMessage" value="GC" />
<string id="PrivatePublisher.StartupKeywordMessage" value="Startup" />
<string id="PrivatePublisher.StackKeywordMessage" value="Stack" />
<string id="PrivatePublisher.BindingKeywordMessage" value="Binding" />
<string id="PrivatePublisher.NGenForceRestoreKeywordMessage" value="NGenForceRestore" />
<string id="PrivatePublisher.SecurityPrivateKeywordMessage" value="Security" />
<string id="PrivatePublisher.PrivateFusionKeywordMessage" value="Fusion" />
<string id="PrivatePublisher.LoaderHeapPrivateKeywordMessage" value="LoaderHeap" />
<string id="PrivatePublisher.PerfTrackKeywordMessage" value="PerfTrack" />
<string id="PrivatePublisher.DynamicTypeUsageMessage" value="DynamicTypeUsage" />
<string id="PrivatePublisher.MulticoreJitPrivateKeywordMessage" value="MulticoreJit" />
<string id="PrivatePublisher.InteropPrivateKeywordMessage" value="Interop" />
<string id="PrivatePublisher.GCHandlePrivateKeywordMessage" value="GCHandle" />
<string id="StressPublisher.StackKeywordMessage" value="Stack" />
<!-- Opcode messages -->
<string id="RuntimePublisher.GCRestartEEEndOpcodeMessage" value="RestartEEStop" />
<string id="RuntimePublisher.GCHeapStatsOpcodeMessage" value="HeapStats" />
<string id="RuntimePublisher.GCCreateSegmentOpcodeMessage" value="CreateSegment" />
<string id="RuntimePublisher.GCFreeSegmentOpcodeMessage" value="FreeSegment" />
<string id="RuntimePublisher.GCRestartEEBeginOpcodeMessage" value="RestartEEStart" />
<string id="RuntimePublisher.GCSuspendEEEndOpcodeMessage" value="SuspendEEStop" />
<string id="RuntimePublisher.GCSuspendEEBeginOpcodeMessage" value="SuspendEEStart" />
<string id="RuntimePublisher.GCAllocationTickOpcodeMessage" value="AllocationTick" />
<string id="RuntimePublisher.GCCreateConcurrentThreadOpcodeMessage" value="CreateConcurrentThread" />
<string id="RuntimePublisher.GCTerminateConcurrentThreadOpcodeMessage" value="TerminateConcurrentThread" />
<string id="RuntimePublisher.GCFinalizersEndOpcodeMessage" value="FinalizersStop" />
<string id="RuntimePublisher.GCFinalizersBeginOpcodeMessage" value="FinalizersStart" />
<string id="RuntimePublisher.GCBulkRootEdgeOpcodeMessage" value="GCBulkRootEdge" />
<string id="RuntimePublisher.GCBulkRootCCWOpcodeMessage" value="GCBulkRootCCW" />
<string id="RuntimePublisher.GCBulkRCWOpcodeMessage" value="GCBulkRCW" />
<string id="RuntimePublisher.GCBulkRootStaticVarOpcodeMessage" value="GCBulkRootStaticVar" />
<string id="RuntimePublisher.GCDynamicEventOpcodeMessage" value="GCDynamicEvent" />
<string id="RuntimePublisher.GCBulkRootConditionalWeakTableElementEdgeOpcodeMessage" value="GCBulkRootConditionalWeakTableElementEdge" />
<string id="RuntimePublisher.GCBulkNodeOpcodeMessage" value="GCBulkNode" />
<string id="RuntimePublisher.GCBulkEdgeOpcodeMessage" value="GCBulkEdge" />
<string id="RuntimePublisher.GCSampledObjectAllocationOpcodeMessage" value="GCSampledObjectAllocation" />
<string id="RuntimePublisher.GCBulkSurvivingObjectRangesOpcodeMessage" value="GCBulkSurvivingObjectRanges" />
<string id="RuntimePublisher.GCBulkMovedObjectRangesOpcodeMessage" value="GCBulkMovedObjectRanges" />
<string id="RuntimePublisher.GCGenerationRangeOpcodeMessage" value="GCGenerationRange" />
<string id="RuntimePublisher.GCMarkStackRootsOpcodeMessage" value="MarkStackRoots" />
<string id="RuntimePublisher.GCMarkHandlesOpcodeMessage" value="MarkHandles" />
<string id="RuntimePublisher.GCMarkFinalizeQueueRootsOpcodeMessage" value="MarkFinalizeQueueRoots" />
<string id="RuntimePublisher.GCMarkOlderGenerationRootsOpcodeMessage" value="MarkCards" />
<string id="RuntimePublisher.GCMarkOpcodeMessage" value="Mark" />
<string id="RuntimePublisher.GCJoinOpcodeMessage" value="GCJoin" />
<string id="RuntimePublisher.GCPerHeapHistoryOpcodeMessage" value="PerHeapHistory" />
<string id="RuntimePublisher.GCLOHCompactOpcodeMessage" value="GCLOHCompact" />
<string id="RuntimePublisher.GCFitBucketInfoOpcodeMessage" value="GCFitBucketInfo" />
<string id="RuntimePublisher.GCGlobalHeapHistoryOpcodeMessage" value="GlobalHeapHistory" />
<string id="RuntimePublisher.GenAwareBeginOpcodeMessage" value="GenAwareBegin" />
<string id="RuntimePublisher.GenAwareEndOpcodeMessage" value="GenAwareEnd" />
<string id="RuntimePublisher.FinalizeObjectOpcodeMessage" value="FinalizeObject" />
<string id="RuntimePublisher.BulkTypeOpcodeMessage" value="BulkType" />
<string id="RuntimePublisher.MethodDetailsOpcodeMessage" value="MethodDetails" />
<string id="RuntimePublisher.MethodLoadOpcodeMessage" value="Load" />
<string id="RuntimePublisher.MethodUnloadOpcodeMessage" value="Unload" />
<string id="RuntimePublisher.MethodLoadVerboseOpcodeMessage" value="LoadVerbose" />
<string id="RuntimePublisher.MethodUnloadVerboseOpcodeMessage" value="UnloadVerbose" />
<string id="RuntimePublisher.DCStartCompleteOpcodeMessage" value="DCStartCompleteV2" />
<string id="RuntimePublisher.DCEndCompleteOpcodeMessage" value="DCEndCompleteV2" />
<string id="RuntimePublisher.MethodDCStartOpcodeMessage" value="DCStartV2" />
<string id="RuntimePublisher.MethodDCEndOpcodeMessage" value="DCStopV2" />
<string id="RuntimePublisher.MethodDCStartVerboseOpcodeMessage" value="DCStartVerboseV2" />
<string id="RuntimePublisher.MethodDCEndVerboseOpcodeMessage" value="DCStopVerboseV2" />
<string id="RuntimePublisher.MethodJittingStartedOpcodeMessage" value="JittingStarted" />
<string id="RuntimePublisher.JitInliningSucceededOpcodeMessage" value="InliningSucceeded" />
<string id="RuntimePublisher.JitInliningFailedOpcodeMessage" value="InliningFailed" />
<string id="RuntimePublisher.JitTailCallSucceededOpcodeMessage" value="TailCallSucceeded" />
<string id="RuntimePublisher.JitTailCallFailedOpcodeMessage" value="TailCallFailed" />
<string id="RuntimePublisher.MemoryAllocatedForJitCodeOpcodeMessage" value="MemoryAllocatedForJitCode" />
<string id="RuntimePublisher.MethodILToNativeMapOpcodeMessage" value="MethodILToNativeMap" />
<string id="RuntimePublisher.DomainModuleLoadOpcodeMessage" value="DomainModuleLoad" />
<string id="RuntimePublisher.ModuleLoadOpcodeMessage" value="ModuleLoad" />
<string id="RuntimePublisher.ModuleUnloadOpcodeMessage" value="ModuleUnload" />
<string id="RuntimePublisher.ModuleDCStartOpcodeMessage" value="ModuleDCStartV2" />
<string id="RuntimePublisher.ModuleDCEndOpcodeMessage" value="ModuleDCStopV2" />
<string id="RuntimePublisher.AssemblyLoadOpcodeMessage" value="AssemblyLoad" />
<string id="RuntimePublisher.AssemblyUnloadOpcodeMessage" value="AssemblyUnload" />
<string id="RuntimePublisher.AppDomainLoadOpcodeMessage" value="AppDomainLoad" />
<string id="RuntimePublisher.AppDomainUnloadOpcodeMessage" value="AppDomainUnload" />
<string id="RuntimePublisher.CLRStackWalkOpcodeMessage" value="Walk" />
<string id="RuntimePublisher.AppDomainMemAllocatedOpcodeMessage" value="MemAllocated" />
<string id="RuntimePublisher.AppDomainMemSurvivedOpcodeMessage" value="MemSurvived" />
<string id="RuntimePublisher.ThreadCreatedOpcodeMessage" value="ThreadCreated" />
<string id="RuntimePublisher.ThreadTerminatedOpcodeMessage" value="ThreadTerminated" />
<string id="RuntimePublisher.ThreadDomainEnterOpcodeMessage" value="DomainEnter" />
<string id="RuntimePublisher.ILStubGeneratedOpcodeMessage" value="StubGenerated" />
<string id="RuntimePublisher.ILStubCacheHitOpcodeMessage" value="StubCacheHit" />
<string id="RuntimePublisher.WaitOpcodeMessage" value="Wait" />
<string id="RuntimePublisher.SampleOpcodeMessage" value="Sample" />
<string id="RuntimePublisher.AdjustmentOpcodeMessage" value="Adjustment" />
<string id="RuntimePublisher.StatsOpcodeMessage" value="Stats" />
<string id="RuntimePublisher.ModuleRangeLoadOpcodeMessage" value="ModuleRangeLoad" />
<string id="RuntimePublisher.SetGCHandleOpcodeMessage" value="SetGCHandle" />
<string id="RuntimePublisher.DestroyGCHandleOpcodeMessage" value="DestoryGCHandle" />
<string id="RuntimePublisher.TriggeredOpcodeMessage" value="Triggered" />
<string id="RuntimePublisher.PinObjectAtGCTimeOpcodeMessage" value="PinObjectAtGCTime" />
<string id="RuntimePublisher.IncreaseMemoryPressureOpcodeMessage" value="IncreaseMemoryPressure" />
<string id="RuntimePublisher.DecreaseMemoryPressureOpcodeMessage" value="DecreaseMemoryPressure" />
<string id="RuntimePublisher.EnqueueOpcodeMessage" value="Enqueue" />
<string id="RuntimePublisher.DequeueOpcodeMessage" value="Dequeue" />
<string id="RuntimePublisher.IOEnqueueOpcodeMessage" value="IOEnqueue" />
<string id="RuntimePublisher.IODequeueOpcodeMessage" value="IODequeue" />
<string id="RuntimePublisher.IOPackOpcodeMessage" value="IOPack" />
<string id="RuntimePublisher.ThreadCreatingOpcodeMessage" value="Creating" />
<string id="RuntimePublisher.ThreadRunningOpcodeMessage" value="Running" />
<string id="RuntimePublisher.DebugIPCEventStartOpcodeMessage" value="IPCEventStart" />
<string id="RuntimePublisher.DebugIPCEventEndOpcodeMessage" value="IPCEventEnd" />
<string id="RuntimePublisher.DebugExceptionProcessingStartOpcodeMessage" value="ExceptionProcessingStart" />
<string id="RuntimePublisher.DebugExceptionProcessingEndOpcodeMessage" value="ExceptionProcessingEnd" />
<string id="RuntimePublisher.TieredCompilationSettingsOpcodeMessage" value="Settings" />
<string id="RuntimePublisher.TieredCompilationPauseOpcodeMessage" value="Pause" />
<string id="RuntimePublisher.TieredCompilationResumeOpcodeMessage" value="Resume" />
<string id="RuntimePublisher.AssemblyLoadContextResolvingHandlerInvokedOpcodeMessage" value="AssemblyLoadContextResolvingHandlerInvoked" />
<string id="RuntimePublisher.AppDomainAssemblyResolveHandlerInvokedOpcodeMessage" value="AppDomainAssemblyResolveHandlerInvoked" />
<string id="RuntimePublisher.AssemblyLoadFromResolveHandlerInvokedOpcodeMessage" value="AssemblyLoadFromResolveHandlerInvoked" />
<string id="RuntimePublisher.KnownPathProbedOpcodeMessage" value="KnownPathProbed" />
<string id="RuntimePublisher.ResolutionAttemptedOpcodeMessage" value="ResolutionAttempted" />
<string id="RuntimePublisher.InstrumentationDataOpcodeMessage" value="InstrumentationData" />
<string id="RuntimePublisher.ExecutionCheckpointOpcodeMessage" value="ExecutionCheckpoint" />
<string id="RuntimePublisher.ProfilerOpcodeMessage" value="ProfilerMessage" />
<string id="RundownPublisher.GCSettingsOpcodeMessage" value="GCSettingsRundown" />
<string id="RundownPublisher.MethodDCStartOpcodeMessage" value="DCStart" />
<string id="RundownPublisher.MethodDCEndOpcodeMessage" value="DCStop" />
<string id="RundownPublisher.MethodDCStartVerboseOpcodeMessage" value="DCStartVerbose" />
<string id="RundownPublisher.MethodDCEndVerboseOpcodeMessage" value="DCStopVerbose" />
<string id="RundownPublisher.MethodDCStartILToNativeMapOpcodeMessage" value="MethodDCStartILToNativeMap" />
<string id="RundownPublisher.MethodDCEndILToNativeMapOpcodeMessage" value="MethodDCEndILToNativeMap" />
<string id="RundownPublisher.DCStartCompleteOpcodeMessage" value="DCStartComplete" />
<string id="RundownPublisher.DCEndCompleteOpcodeMessage" value="DCStopComplete" />
<string id="RundownPublisher.DCStartInitOpcodeMessage" value="DCStartInit" />
<string id="RundownPublisher.DCEndInitOpcodeMessage" value="DCStopInit" />
<string id="RundownPublisher.ModuleDCStartOpcodeMessage" value="ModuleDCStart" />
<string id="RundownPublisher.ModuleDCEndOpcodeMessage" value="ModuleDCStop" />
<string id="RundownPublisher.AssemblyDCStartOpcodeMessage" value="AssemblyDCStart" />
<string id="RundownPublisher.AssemblyDCEndOpcodeMessage" value="AssemblyDCStop" />
<string id="RundownPublisher.AppDomainDCStartOpcodeMessage" value="AppDomainDCStart" />
<string id="RundownPublisher.AppDomainDCEndOpcodeMessage" value="AppDomainDCStop" />
<string id="RundownPublisher.DomainModuleDCStartOpcodeMessage" value="DomainModuleDCStart" />
<string id="RundownPublisher.DomainModuleDCEndOpcodeMessage" value="DomainModuleDCStop" />
<string id="RundownPublisher.ThreadDCOpcodeMessage" value="ThreadDCStop" />
<string id="RundownPublisher.CLRStackWalkOpcodeMessage" value="Walk" />
<string id="RundownPublisher.ModuleRangeDCStartOpcodeMessage" value="ModuleRangeDCStart" />
<string id="RundownPublisher.ModuleRangeDCEndOpcodeMessage" value="ModuleRangeDCEnd" />
<string id="RundownPublisher.TieredCompilationSettingsDCStartOpcodeMessage" value="SettingsDCStart" />
<string id="RundownPublisher.ExecutionCheckpointDCEndOpcodeMessage" value="ExecutionCheckpointDCEnd" />
<string id="PrivatePublisher.FailFastOpcodeMessage" value="FailFast" />
<string id="PrivatePublisher.GCDecisionOpcodeMessage" value="Decision" />
<string id="PrivatePublisher.GCSettingsOpcodeMessage" value="Settings" />
<string id="PrivatePublisher.GCOptimizedOpcodeMessage" value="Optimized" />
<string id="PrivatePublisher.GCPerHeapHistoryOpcodeMessage" value="PerHeapHistory" />
<string id="PrivatePublisher.GCGlobalHeapHistoryOpcodeMessage" value="GlobalHeapHistory" />
<string id="PrivatePublisher.GCFullNotifyOpcodeMessage" value="FullNotify" />
<string id="PrivatePublisher.GCJoinOpcodeMessage" value="Join" />
<string id="PrivatePublisher.GCMarkStackRootsOpcodeMessage" value="MarkStackRoots" />
<string id="PrivatePublisher.GCMarkHandlesOpcodeMessage" value="MarkHandles" />
<string id="PrivatePublisher.GCMarkFinalizeQueueRootsOpcodeMessage" value="MarkFinalizeQueueRoots" />
<string id="PrivatePublisher.GCMarkCardsOpcodeMessage" value="MarkCards" />
<string id="PrivatePublisher.BGCBeginOpcodeMessage" value="BGCStart" />
<string id="PrivatePublisher.BGC1stNonCondEndOpcodeMessage" value="BGC1stNonCondStop" />
<string id="PrivatePublisher.BGC2ndNonConBeginOpcodeMessage" value="BGC2ndNonConStart" />
<string id="PrivatePublisher.BGC1stConEndOpcodeMessage" value="BGC1stConStop" />
<string id="PrivatePublisher.BGC2ndNonConEndOpcodeMessage" value="BGC2ndNonConStop" />
<string id="PrivatePublisher.BGC2ndConBeginOpcodeMessage" value="BGC2ndConStart" />
<string id="PrivatePublisher.BGC1stSweepEndOpcodeMessage" value="BGC1stSweepEnd" />
<string id="PrivatePublisher.BGC2ndConEndOpcodeMessage" value="BGC2ndConStop" />
<string id="PrivatePublisher.BGCPlanEndOpcodeMessage" value="BGCPlanStop" />
<string id="PrivatePublisher.BGCSweepEndOpcodeMessage" value="BGCSweepStop" />
<string id="PrivatePublisher.BGCDrainMarkOpcodeMessage" value="BGCDrainMark" />
<string id="PrivatePublisher.BGCRevisitOpcodeMessage" value="BGCRevisit" />
<string id="PrivatePublisher.BGCOverflowOpcodeMessage" value="BGCOverflow" />
<string id="PrivatePublisher.BGCAllocWaitBeginOpcodeMessage" value="BGCAllocWaitStart" />
<string id="PrivatePublisher.BGCAllocWaitEndOpcodeMessage" value="BGCAllocWaitStop" />
<string id="PrivatePublisher.FinalizeObjectOpcodeMessage" value="FinalizeObject" />
<string id="PrivatePublisher.SetGCHandleOpcodeMessage" value="SetGCHandle" />
<string id="PrivatePublisher.DestroyGCHandleOpcodeMessage" value="DestoryGCHandle" />
<string id="PrivatePublisher.PinPlugAtGCTimeOpcodeMessage" value="PinPlugAtGCTime" />
<string id="PrivatePublisher.CCWRefCountChangeOpcodeMessage" value="CCWRefCountChange" />
<string id="PrivatePublisher.EEStartupStartOpcodeMessage" value="EEStartupStart" />
<string id="PrivatePublisher.EEStartupEndOpcodeMessage" value="EEStartupStop" />
<string id="PrivatePublisher.EEConfigSetupOpcodeMessage" value="EEConfigSetupStart" />
<string id="PrivatePublisher.EEConfigSetupEndOpcodeMessage" value="EEConfigSetupStop" />
<string id="PrivatePublisher.LoadSystemBasesOpcodeMessage" value="LoadSystemBasesStart" />
<string id="PrivatePublisher.LoadSystemBasesEndOpcodeMessage" value="LoadSystemBasesStop" />
<string id="PrivatePublisher.ExecExeOpcodeMessage" value="ExecExeStart" />
<string id="PrivatePublisher.ExecExeEndOpcodeMessage" value="ExecExeStop" />
<string id="PrivatePublisher.MainOpcodeMessage" value="MainStart" />
<string id="PrivatePublisher.MainEndOpcodeMessage" value="MainStop" />
<string id="PrivatePublisher.ApplyPolicyStartOpcodeMessage" value="ApplyPolicyStart" />
<string id="PrivatePublisher.ApplyPolicyEndOpcodeMessage" value="ApplyPolicyStop" />
<string id="PrivatePublisher.LdLibShFolderOpcodeMessage" value="LdLibShFolderStart" />
<string id="PrivatePublisher.LdLibShFolderEndOpcodeMessage" value="LdLibShFolderStop" />
<string id="PrivatePublisher.PrestubWorkerOpcodeMessage" value="PrestubWorkerStart" />
<string id="PrivatePublisher.PrestubWorkerEndOpcodeMessage" value="PrestubWorkerStop" />
<string id="PrivatePublisher.GetInstallationStartOpcodeMessage" value="GetInstallationStart" />
<string id="PrivatePublisher.GetInstallationEndOpcodeMessage" value="GetInstallationStop" />
<string id="PrivatePublisher.OpenHModuleOpcodeMessage" value="OpenHModuleStart" />
<string id="PrivatePublisher.OpenHModuleEndOpcodeMessage" value="OpenHModuleStop" />
<string id="PrivatePublisher.ExplicitBindStartOpcodeMessage" value="ExplicitBindStart" />
<string id="PrivatePublisher.ExplicitBindEndOpcodeMessage" value="ExplicitBindStop" />
<string id="PrivatePublisher.ParseXmlOpcodeMessage" value="ParseXmlStart" />
<string id="PrivatePublisher.ParseXmlEndOpcodeMessage" value="ParseXmlStop" />
<string id="PrivatePublisher.InitDefaultDomainOpcodeMessage" value="InitDefaultDomainStart" />
<string id="PrivatePublisher.InitDefaultDomainEndOpcodeMessage" value="InitDefaultDomainStop" />
<string id="PrivatePublisher.InitSecurityOpcodeMessage" value="InitSecurityStart" />
<string id="PrivatePublisher.InitSecurityEndOpcodeMessage" value="InitSecurityStop" />
<string id="PrivatePublisher.AllowBindingRedirsOpcodeMessage" value="AllowBindingRedirsStart" />
<string id="PrivatePublisher.AllowBindingRedirsEndOpcodeMessage" value="AllowBindingRedirsStop" />
<string id="PrivatePublisher.EEConfigSyncOpcodeMessage" value="EEConfigSyncStart" />
<string id="PrivatePublisher.EEConfigSyncEndOpcodeMessage" value="EEConfigSyncStop" />
<string id="PrivatePublisher.FusionBindingOpcodeMessage" value="BindingStart" />
<string id="PrivatePublisher.FusionBindingEndOpcodeMessage" value="BindingStop" />
<string id="PrivatePublisher.LoaderCatchCallOpcodeMessage" value="LoaderCatchCallStart" />
<string id="PrivatePublisher.LoaderCatchCallEndOpcodeMessage" value="LoaderCatchCallStop" />
<string id="PrivatePublisher.FusionInitOpcodeMessage" value="FusionInitStart" />
<string id="PrivatePublisher.FusionInitEndOpcodeMessage" value="FusionInitStop" />
<string id="PrivatePublisher.FusionAppCtxOpcodeMessage" value="FusionAppCtxStart" />
<string id="PrivatePublisher.FusionAppCtxEndOpcodeMessage" value="FusionAppCtxStop" />
<string id="PrivatePublisher.Fusion2EEOpcodeMessage" value="Fusion2EEStart" />
<string id="PrivatePublisher.Fusion2EEEndOpcodeMessage" value="Fusion2EEStop" />
<string id="PrivatePublisher.SecurityCatchCallOpcodeMessage" value="SecurityCatchCallStart" />
<string id="PrivatePublisher.SecurityCatchCallEndOpcodeMessage" value="SecurityCatchCallStop" />
<string id="PrivatePublisher.BindingPolicyPhaseStartOpcodeMessage" value="PolicyPhaseStart" />
<string id="PrivatePublisher.BindingPolicyPhaseEndOpcodeMessage" value="PolicyPhaseStop" />
<string id="PrivatePublisher.BindingNgenPhaseStartOpcodeMessage" value="NgenPhaseStart" />
<string id="PrivatePublisher.BindingNgenPhaseEndOpcodeMessage" value="NgenPhaseStop" />
<string id="PrivatePublisher.BindingLoopupAndProbingPhaseStartOpcodeMessage" value="LoopupAndProbingPhaseStart" />
<string id="PrivatePublisher.BindingLookupAndProbingPhaseEndOpcodeMessage" value="LookupAndProbingPhaseStop" />
<string id="PrivatePublisher.LoaderPhaseStartOpcodeMessage" value="LoaderPhaseStart" />
<string id="PrivatePublisher.LoaderPhaseEndOpcodeMessage" value="LoaderPhaseStop" />
<string id="PrivatePublisher.BindingPhaseStartOpcodeMessage" value="PhaseStart" />
<string id="PrivatePublisher.BindingPhaseEndOpcodeMessage" value="PhaseStop" />
<string id="PrivatePublisher.BindingDownloadPhaseStartOpcodeMessage" value="DownloadPhaseStart" />
<string id="PrivatePublisher.BindingDownloadPhaseEndOpcodeMessage" value="DownloadPhaseStop" />
<string id="PrivatePublisher.LoaderAssemblyInitPhaseStartOpcodeMessage" value="LoaderAssemblyInitPhaseStart" />
<string id="PrivatePublisher.LoaderAssemblyInitPhaseEndOpcodeMessage" value="LoaderAssemblyInitPhaseStop" />
<string id="PrivatePublisher.LoaderMappingPhaseStartOpcodeMessage" value="LoaderMappingPhaseStart" />
<string id="PrivatePublisher.LoaderMappingPhaseEndOpcodeMessage" value="LoaderMappingPhaseStop" />
<string id="PrivatePublisher.NgenBindOpcodeMessage" value="NgenBind" />
<string id="PrivatePublisher.LoaderDeliverEventPhaseStartOpcodeMessage" value="LoaderDeliverEventPhaseStart" />
<string id="PrivatePublisher.LoaderDeliverEventsPhaseEndOpcodeMessage" value="LoaderDeliverEventsPhaseStop" />
<string id="PrivatePublisher.FusionMessageOpcodeMessage" value="FusionMessage" />
<string id="PrivatePublisher.FusionErrorCodeOpcodeMessage" value="FusionErrorCode" />
<string id="PrivatePublisher.IInspectableRuntimeClassNameOpcodeMessage" value="IInspectableRuntimeClassName" />
<string id="PrivatePublisher.WinRTUnboxOpcodeMessage" value="WinRTUnbox" />
<string id="PrivatePublisher.CreateRCWOpcodeMessage" value="CreateRCW" />
<string id="PrivatePublisher.RCWVarianceOpcodeMessage" value="RCWVariance" />
<string id="PrivatePublisher.RCWIEnumerableCastingOpcodeMessage" value="RCWIEnumerableCasting" />
<string id="PrivatePublisher.CreateCCWOpcodeMessage" value="CreateCCW" />
<string id="PrivatePublisher.CCWVarianceOpcodeMessage" value="CCWVariance" />
<string id="PrivatePublisher.ObjectVariantMarshallingToNativeOpcodeMessage" value="ObjectVariantMarshallingToNative" />
<string id="PrivatePublisher.GetTypeFromGUIDOpcodeMessage" value="GetTypeFromGUID" />
<string id="PrivatePublisher.GetTypeFromProgIDOpcodeMessage" value="GetTypeFromProgID" />
<string id="PrivatePublisher.ConvertToCallbackEtwOpcodeMessage" value="ConvertToCallbackEtw" />
<string id="PrivatePublisher.BeginCreateManagedReferenceOpcodeMessage" value="BeginCreateManagedReference" />
<string id="PrivatePublisher.EndCreateManagedReferenceOpcodeMessage" value="EndCreateManagedReference" />
<string id="PrivatePublisher.ObjectVariantMarshallingToManagedOpcodeMessage" value="ObjectVariantMarshallingToManaged" />
<string id="PrivatePublisher.CLRStackWalkOpcodeMessage" value="Walk" />
<string id="PrivatePublisher.MulticoreJitOpcodeMessage" value="Common" />
<string id="PrivatePublisher.MulticoreJitOpcodeMethodCodeReturnedMessage" value="MethodCodeReturned" />
<string id="StressPublisher.CLRStackWalkOpcodeMessage" value="Walk" />
<string id="PrivatePublisher.EvidenceGeneratedMessage" value="EvidenceGenerated" />
<string id="PrivatePublisher.ModuleTransparencyComputationStartMessage" value="ModuleTransparencyComputationStart" />
<string id="PrivatePublisher.ModuleTransparencyComputationEndMessage" value="ModuleTransparencyComputationStop" />
<string id="PrivatePublisher.TypeTransparencyComputationStartMessage" value="TypeTransparencyComputationStart" />
<string id="PrivatePublisher.TypeTransparencyComputationEndMessage" value="TypeTransparencyComputationStop" />
<string id="PrivatePublisher.MethodTransparencyComputationStartMessage" value="MethodTransparencyComputationStart" />
<string id="PrivatePublisher.MethodTransparencyComputationEndMessage" value="MethodTransparencyComputationStop" />
<string id="PrivatePublisher.FieldTransparencyComputationStartMessage" value="FieldTransparencyComputationStart" />
<string id="PrivatePublisher.FieldTransparencyComputationEndMessage" value="FieldTransparencyComputationStop" />
<string id="PrivatePublisher.TokenTransparencyComputationStartMessage" value="TokenTransparencyComputationStart" />
<string id="PrivatePublisher.TokenTransparencyComputationEndMessage" value="TokenTransparencyComputationStop" />
<string id="PrivatePublisher.LoaderHeapPrivateAllocRequestMessage" value="LoaderHeapAllocRequest" />
<string id="PrivatePublisher.ModuleRangeLoadOpcodeMessage" value="ModuleRangeLoad" />
<string id="MonoProfilerPublisher.MonoProfilerTaskMessage" value="MonoProfiler" />
<string id="MonoProfilerPublisher.GCKeywordMessage" value="GC" />
<string id="MonoProfilerPublisher.GCHandleKeywordMessage" value="GCHandle" />
<string id="MonoProfilerPublisher.LoaderKeywordMessage" value="Loader" />
<string id="MonoProfilerPublisher.JitKeywordMessage" value="Jit" />
<string id="MonoProfilerPublisher.ContentionKeywordMessage" value="Contention" />
<string id="MonoProfilerPublisher.ExceptionKeywordMessage" value="Exception" />
<string id="MonoProfilerPublisher.ThreadingKeywordMessage" value="Threading" />
<string id="MonoProfilerPublisher.GCHeapDumpKeywordMessage" value="GCHeapDump" />
<string id="MonoProfilerPublisher.GCAllocationKeywordMessage" value="GCAllocation" />
<string id="MonoProfilerPublisher.GCMovesKeywordMessage" value="GCMoves" />
<string id="MonoProfilerPublisher.GCHeapCollectKeywordMessage" value="GCHeapCollect" />
<string id="MonoProfilerPublisher.GCResizeKeywordMessage" value="GCResize" />
<string id="MonoProfilerPublisher.GCRootKeywordMessage" value="GCRoot" />
<string id="MonoProfilerPublisher.GCHeapDumpVTableClassReferenceKeywordMessage" value="GCHeapDumpVTableClassReference" />
<string id="MonoProfilerPublisher.GCFinalizationKeywordMessage" value="GCFinalization" />
<string id="MonoProfilerPublisher.MethodTracingKeywordMessage" value="PerfTrack" />
<string id="MonoProfilerPublisher.TypeLoadingKeywordMessage" value="TypeLoading" />
<string id="MonoProfilerPublisher.MonitorKeywordMessage" value="Monitor" />
<string id="MonoProfilerPublisher.ContextLoadedOpcodeMessage" value="ContextLoaded" />
<string id="MonoProfilerPublisher.ContextUnloadedOpcodeMessage" value="ContextUnloaded" />
<string id="MonoProfilerPublisher.AppDomainLoadingOpcodeMessage" value="AppDomainLoading" />
<string id="MonoProfilerPublisher.AppDomainLoadedOpcodeMessage" value="AppDomainLoaded" />
<string id="MonoProfilerPublisher.AppDomainUnloadingOpcodeMessage" value="AppDomainUnloading" />
<string id="MonoProfilerPublisher.AppDomainUnloadedOpcodeMessage" value="AppDomainUnloaded" />
<string id="MonoProfilerPublisher.AppDomainNameOpcodeMessage" value="AppDomainName" />
<string id="MonoProfilerPublisher.JitBeginOpcodeMessage" value="JitBegin" />
<string id="MonoProfilerPublisher.JitFailedOpcodeMessage" value="JitFailed" />
<string id="MonoProfilerPublisher.JitDoneOpcodeMessage" value="JitDone" />
<string id="MonoProfilerPublisher.JitChunkCreatedOpcodeMessage" value="JitChunkCreated" />
<string id="MonoProfilerPublisher.JitChunkDestroyedOpcodeMessage" value="JitChunkDestroyed" />
<string id="MonoProfilerPublisher.JitCodeBufferOpcodeMessage" value="JitCodeBuffer" />
<string id="MonoProfilerPublisher.ClassLoadingOpcodeMessage" value="ClassLoading" />
<string id="MonoProfilerPublisher.ClassFailedOpcodeMessage" value="ClassFailed" />
<string id="MonoProfilerPublisher.ClassLoadedOpcodeMessage" value="ClassLoaded" />
<string id="MonoProfilerPublisher.VTableLoadingOpcodeMessage" value="VTableLoading" />
<string id="MonoProfilerPublisher.VTableFailedOpcodeMessage" value="VTableFailed" />
<string id="MonoProfilerPublisher.VTableLoadedOpcodeMessage" value="VTableLoaded" />
<string id="MonoProfilerPublisher.ModuleLoadingOpcodeMessage" value="ModuleLoading" />
<string id="MonoProfilerPublisher.ModuleFailedOpcodeMessage" value="ModuleFailed" />
<string id="MonoProfilerPublisher.ModuleLoadedOpcodeMessage" value="ModuleLoaded" />
<string id="MonoProfilerPublisher.ModuleUnloadingOpcodeMessage" value="ModuleUnloading" />
<string id="MonoProfilerPublisher.ModuleUnloadedOpcodeMessage" value="ModuleUnloaded" />
<string id="MonoProfilerPublisher.AssemblyLoadingOpcodeMessage" value="AssemblyLoading" />
<string id="MonoProfilerPublisher.AssemblyLoadedOpcodeMessage" value="AssemblyLoaded" />
<string id="MonoProfilerPublisher.AssemblyUnloadingOpcodeMessage" value="AssemblyUnloading" />
<string id="MonoProfilerPublisher.AssemblyUnloadedOpcodeMessage" value="AssemblyUnloaded" />
<string id="MonoProfilerPublisher.MethodEnterOpcodeMessage" value="MethodEnter" />
<string id="MonoProfilerPublisher.MethodLeaveOpcodeMessage" value="MethodLeave" />
<string id="MonoProfilerPublisher.MethodTailCallOpcodeMessage" value="MethodTailCall" />
<string id="MonoProfilerPublisher.MethodExceptionLeaveOpcodeMessage" value="MethodExceptionLeave" />
<string id="MonoProfilerPublisher.MethodFreeOpcodeMessage" value="MethodFree" />
<string id="MonoProfilerPublisher.MethodBeginInvokeOpcodeMessage" value="MethodBeginInvoke" />
<string id="MonoProfilerPublisher.MethodEndInvokeOpcodeMessage" value="MethodEndInvoke" />
<string id="MonoProfilerPublisher.ExceptionThrowOpcodeMessage" value="ExceptionThrow" />
<string id="MonoProfilerPublisher.ExceptionClauseOpcodeMessage" value="ExceptionClause" />
<string id="MonoProfilerPublisher.GCEventOpcodeMessage" value="GCEvent" />
<string id="MonoProfilerPublisher.GCAllocationOpcodeMessage" value="GCAllocation" />
<string id="MonoProfilerPublisher.GCMovesOpcodeMessage" value="GCMoves" />
<string id="MonoProfilerPublisher.GCResizeOpcodeMessage" value="GCResize" />
<string id="MonoProfilerPublisher.GCHandleCreatedOpcodeMessage" value="GCHandleCreated" />
<string id="MonoProfilerPublisher.GCHandleDeletedOpcodeMessage" value="GCHandleDeleted" />
<string id="MonoProfilerPublisher.GCFinalizingOpcodeMessage" value="GCFinalizing" />
<string id="MonoProfilerPublisher.GCFinalizedOpcodeMessage" value="GCFinalized" />
<string id="MonoProfilerPublisher.GCFinalizingObjectOpcodeMessage" value="GCFinalizingObject" />
<string id="MonoProfilerPublisher.GCFinalizedObjectOpcodeMessage" value="GCFinalizedObject" />
<string id="MonoProfilerPublisher.GCRootRegisterOpcodeMessage" value="GCRootRegister" />
<string id="MonoProfilerPublisher.GCRootUnregisterOpcodeMessage" value="GCRootUnregister" />
<string id="MonoProfilerPublisher.GCRootsOpcodeMessage" value="GCRoots" />
<string id="MonoProfilerPublisher.GCHeapDumpStartOpcodeMessage" value="GCHeapDumpStart" />
<string id="MonoProfilerPublisher.GCHeapDumpStopOpcodeMessage" value="GCHeapDumpStop" />
<string id="MonoProfilerPublisher.GCHeapDumpObjectReferenceOpcodeMessage" value="GCHeapDumpObjectReference" />
<string id="MonoProfilerPublisher.MonitorContentionOpcodeMessage" value="MonitorContention" />
<string id="MonoProfilerPublisher.MonitorFailedOpcodeMessage" value="MonitorFailed" />
<string id="MonoProfilerPublisher.MonitorAquiredOpcodeMessage" value="MonitorAquired" />
<string id="MonoProfilerPublisher.ThreadStartedOpcodeMessage" value="ThreadStarted" />
<string id="MonoProfilerPublisher.ThreadStoppingOpcodeMessage" value="ThreadStopping" />
<string id="MonoProfilerPublisher.ThreadStoppedOpcodeMessage" value="ThreadStopped" />
<string id="MonoProfilerPublisher.ThreadExitedOpcodeMessage" value="ThreadExited" />
<string id="MonoProfilerPublisher.ThreadNameOpcodeMessage" value="ThreadName" />
<string id="MonoProfilerPublisher.JitDoneVerboseOpcodeMessage" value="JitDoneVerbose" />
<string id="MonoProfilerPublisher.GCHeapDumpVTableClassReferenceOpcodeMessage" value="GCHeapDumpVTableClassReference" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.MethodMessage" value="Method" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.MethodTrampolineMessage" value="MethodTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.UnboxTrampolineMessage" value="UnboxTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.IMTTrampolineMessage" value="IMTTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.GenericsTrampolineMessage" value="GenericsTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.SpecificTrampolineMessage" value="SpecificTrampoline" />
<string id="MonoProfilerPublisher.CodeBufferTypeMap.HelperMessage" value="Helper" />
<string id="MonoProfilerPublisher.ExceptionClauseTypeMap.NoneMessage" value="None" />
<string id="MonoProfilerPublisher.ExceptionClauseTypeMap.FilterMessage" value="Filter" />
<string id="MonoProfilerPublisher.ExceptionClauseTypeMap.FinallyMessage" value="Finally" />
<string id="MonoProfilerPublisher.ExceptionClauseTypeMap.FaultMessage" value="Fault" />
<string id="MonoProfilerPublisher.GCEventTypeMap.StartMessage" value="Start" />
<string id="MonoProfilerPublisher.GCEventTypeMap.EndMessage" value="End" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PreStopWorldMessage" value="PreStopWorld" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PostStopWorldMessage" value="PostStopWorld" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PreStartWorldMessage" value="PreStartWorld" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PostStartWorldMessage" value="PostStartWorld" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PreStopWorldLockedMessage" value="PreStopWorldLocked" />
<string id="MonoProfilerPublisher.GCEventTypeMap.PostStartWorldUnlockedMessage" value="PostStartWorldUnlocked" />
<string id="MonoProfilerPublisher.GCHandleTypeMap.WeakMessage" value="Weak" />
<string id="MonoProfilerPublisher.GCHandleTypeMap.WeakTrackResurrectionMessage" value="WeakTrackResurrection" />
<string id="MonoProfilerPublisher.GCHandleTypeMap.NormalMessage" value="Normal" />
<string id="MonoProfilerPublisher.GCHandleTypeMap.PinnedMessage" value="Pinned" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ExternalMessage" value="External" />
<string id="MonoProfilerPublisher.GCRootTypeMap.StackMessage" value="Stack" />
<string id="MonoProfilerPublisher.GCRootTypeMap.FinalizerQueueMessage" value="FinalizerQueue" />
<string id="MonoProfilerPublisher.GCRootTypeMap.StaticMessage" value="Static" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ThreadStaticMessage" value="ThreadStatic" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ContextStaticMessage" value="ContextStatic" />
<string id="MonoProfilerPublisher.GCRootTypeMap.GCHandleMessage" value="GCHandle" />
<string id="MonoProfilerPublisher.GCRootTypeMap.JitMessage" value="Jit" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ThreadingMessage" value="Threading" />
<string id="MonoProfilerPublisher.GCRootTypeMap.DomainMessage" value="Domain" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ReflectionMessage" value="Reflection" />
<string id="MonoProfilerPublisher.GCRootTypeMap.MarshalMessage" value="Marshal" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ThreadPoolMessage" value="ThreadPool" />
<string id="MonoProfilerPublisher.GCRootTypeMap.DebuggerMessage" value="Debugger" />
<string id="MonoProfilerPublisher.GCRootTypeMap.HandleMessage" value="Handle" />
<string id="MonoProfilerPublisher.GCRootTypeMap.EphemeronMessage" value="Ephemeron" />
<string id="MonoProfilerPublisher.GCRootTypeMap.ToggleRefMessage" value="ToggleRef" />
<string id="MonoProfilerPublisher.ContextLoadedUnloadedEventMessage" value="ObjectID=%1;%nAppDomainId=%2;%nContextID=%3" />
<string id="MonoProfilerPublisher.AppDomainLoadUnloadEventMessage" value="AppDomainId=%1" />
<string id="MonoProfilerPublisher.AppDomainNameEventMessage" value="AppDomainId=%1;%nAppDomainName=%2" />
<string id="MonoProfilerPublisher.JitBeginFailedDoneEventMessage" value="MethodId=%1;%nModuleID=%2;%nMethodToken=%3" />
<string id="MonoProfilerPublisher.JitDone_V1EventMessage" value="MethodId=%1;%nModuleID=%2;%nMethodToken=%3;%nCount=%4" />
<string id="MonoProfilerPublisher.JitChunkCreatedEventMessage" value="ChunkID=%1;%nChunkSize=%2" />
<string id="MonoProfilerPublisher.JitChunkDestroyedEventMessage" value="ChunkID=%1" />
<string id="MonoProfilerPublisher.JitCodeBufferEventMessage" value="BufferID=%1;%nBufferSize=%2;%nBufferType=%3" />
<string id="MonoProfilerPublisher.ClassLoadingFailedEventMessage" value="ClassID=%1;%nModuleID=%2" />
<string id="MonoProfilerPublisher.ClassLoadedEventMessage" value="ClassID=%1;%nModuleID=%2;%nClassName=%3" />
<string id="MonoProfilerPublisher.ClassLoaded_V1EventMessage" value="ClassID=%1;%nModuleID=%2;%nClassName=%3;%nCount=%4" />
<string id="MonoProfilerPublisher.VTableLoadingFailedLoadedEventMessage" value="VTableID=%1;%nClassID=%2;%nAppDomainID=%3" />
<string id="MonoProfilerPublisher.ModuleLoadingUnloadingFailedEventMessage" value="ModuleID=%1" />
<string id="MonoProfilerPublisher.ModuleLoadedUnloadedEventMessage" value="ModuleID=%1;%nModuleName=%2;%nModuleSignature=%3" />
<string id="MonoProfilerPublisher.AssemblyLoadingUnloadingEventMessage" value="AssemblyID=%1;%nModuleID=%2" />
<string id="MonoProfilerPublisher.AssemblyLoadedUnloadedEventMessage" value="%nAssemblyID=%1;%nModuleID=%2;%nAssemblyName=%3" />
<string id="MonoProfilerPublisher.MethodTracingEventMessage" value="MethodID=%1" />
<string id="MonoProfilerPublisher.ExceptionThrowEventMessage" value="TypeID=%1;%nObjectID=%2" />
<string id="MonoProfilerPublisher.ExceptionClauseEventMessage" value="ClauseType=%1;%nClauseID=%2;%nMethodID=%3;%nTypeID=%4;%nObjectID=%5" />
<string id="MonoProfilerPublisher.GCEventEventMessage" value="GCEventType=%1;%nGCGeneration=%2" />
<string id="MonoProfilerPublisher.GCAllocationEventMessage" value="VTableID=%1;%nObjectID=%2;%nObjectSize=%3" />
<string id="MonoProfilerPublisher.GCMovesEventMessage" value="Count=%1" />
<string id="MonoProfilerPublisher.GCResizeEventMessage" value="NewSize=%1" />
<string id="MonoProfilerPublisher.GCHandleCreatedEventMessage" value="HandleID=%1;%nHandleType=%2;%nObjectID=%3" />
<string id="MonoProfilerPublisher.GCHandleDeletedEventMessage" value="HandleID=%1;%nHandleType=%2" />
<string id="MonoProfilerPublisher.GCFinalizingFinalizedEventMessage" value="NONE" />
<string id="MonoProfilerPublisher.GCFinalizingFinalizedObjectEventMessage" value="ObjectID=%1" />
<string id="MonoProfilerPublisher.GCRootRegisterEventMessage" value="RootID=%1;%nRootSize=%2;%nRootType=%3;%nRootKeyID=%4;%nRootKeyName=%5" />
<string id="MonoProfilerPublisher.GCRootUnregisterEventMessage" value="RootID=%1" />
<string id="MonoProfilerPublisher.GCRootsEventMessage" value="Count=%1" />
<string id="MonoProfilerPublisher.GCHeapDumpStartEventMessage" value="HeapCollectParam=%1" />
<string id="MonoProfilerPublisher.GCHeapDumpStopEventMessage" value="NONE" />
<string id="MonoProfilerPublisher.GCHeapDumpObjectReferenceEventMessage" value="ObjectID=%1;%nVTableID=%2;%nObjectSize=%3;%nObjectGeneration=%4;%nCount=%5" />
<string id="MonoProfilerPublisher.MonitorContentionFailedAcquiredEventMessage" value="ObjectID=%1" />
<string id="MonoProfilerPublisher.ThreadStartedStoppingStoppedExitedEventMessage" value="ThreadID=%1" />
<string id="MonoProfilerPublisher.ThreadNameEventMessage" value="ThreadID=%1;%nThreadName=%2" />
<string id="MonoProfilerPublisher.JitDoneVerboseEventMessage" value="MethodId=%1;%nMethodNamespace=%2;%nMethodName=%3;%nMethodSignature=%4" />
<string id="MonoProfilerPublisher.GCHeapDumpVTableClassReferenceEventMessage" value="VTableID=%1;%nClassID=%2;%nModuleID=%3;%nClassName=%4" />
</stringTable>
</resources>
</localization>
</instrumentationManifest>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/coreclr/pal/tests/palsuite/threading/OpenEventW/test4/test4.cpp
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*=============================================================================
**
** Source: test4.c
**
** Purpose: Positive test for OpenEventW.
**
** Dependencies: PAL_Initialize
** PAL_Terminate
** CreateEvent
** CloseHandle
** WaitForSingleObject
**
** Purpose:
**
** Test to ensure proper operation of the OpenEventW()
** API by trying to open an event with a name that is
** already taken by a non-event object.
**
**
**===========================================================================*/
#include <palsuite.h>
PALTEST(threading_OpenEventW_test4_paltest_openeventw_test4, "threading/OpenEventW/test4/paltest_openeventw_test4")
{
/* local variables */
BOOL bRet = PASS;
DWORD dwLastError = 0;
HANDLE hMutex = NULL;
HANDLE hTestEvent = NULL;
LPSECURITY_ATTRIBUTES lpSecurityAttributes = NULL;
BOOL bInitialState = TRUE;
WCHAR wcName[] = {'I','m','A','M','u','t','e','x','\0'};
LPWSTR lpName = wcName;
/* PAL initialization */
if( (PAL_Initialize(argc, argv)) != 0 )
{
return( FAIL );
}
/* create a mutex object */
hMutex = CreateMutexW( lpSecurityAttributes,
bInitialState,
lpName );
if( hMutex == NULL )
{
/* ERROR */
Fail( "ERROR:%lu:CreateMutexW() call failed\n", GetLastError() );
}
/* open a new handle to our event */
hTestEvent = OpenEventW(EVENT_ALL_ACCESS, /* we want all rights */
FALSE, /* no inherit */
lpName );
if( hTestEvent != NULL )
{
/* ERROR */
Trace( "ERROR:OpenEventW() call succeeded against a named "
"mutex, should have returned NULL\n" );
if( ! CloseHandle( hTestEvent ) )
{
Trace( "ERROR:%lu:CloseHandle() call failed \n", GetLastError() );
}
bRet = FAIL;
}
else
{
dwLastError = GetLastError();
if( dwLastError != ERROR_INVALID_HANDLE )
{
/* ERROR */
Trace( "ERROR:OpenEventW() call failed against a named "
"mutex, but returned an unexpected result: %lu\n",
dwLastError );
bRet = FAIL;
}
}
/* close the mutex handle */
if( ! CloseHandle( hMutex ) )
{
Trace( "ERROR:%lu:CloseHandle() call failed \n", GetLastError() );
bRet = FAIL;
}
/* fail here if we weren't successful */
if( bRet == FAIL )
{
Fail( "" );
}
/* PAL termination */
PAL_Terminate();
/* return success or failure */
return PASS;
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*=============================================================================
**
** Source: test4.c
**
** Purpose: Positive test for OpenEventW.
**
** Dependencies: PAL_Initialize
** PAL_Terminate
** CreateEvent
** CloseHandle
** WaitForSingleObject
**
** Purpose:
**
** Test to ensure proper operation of the OpenEventW()
** API by trying to open an event with a name that is
** already taken by a non-event object.
**
**
**===========================================================================*/
#include <palsuite.h>
PALTEST(threading_OpenEventW_test4_paltest_openeventw_test4, "threading/OpenEventW/test4/paltest_openeventw_test4")
{
/* local variables */
BOOL bRet = PASS;
DWORD dwLastError = 0;
HANDLE hMutex = NULL;
HANDLE hTestEvent = NULL;
LPSECURITY_ATTRIBUTES lpSecurityAttributes = NULL;
BOOL bInitialState = TRUE;
WCHAR wcName[] = {'I','m','A','M','u','t','e','x','\0'};
LPWSTR lpName = wcName;
/* PAL initialization */
if( (PAL_Initialize(argc, argv)) != 0 )
{
return( FAIL );
}
/* create a mutex object */
hMutex = CreateMutexW( lpSecurityAttributes,
bInitialState,
lpName );
if( hMutex == NULL )
{
/* ERROR */
Fail( "ERROR:%lu:CreateMutexW() call failed\n", GetLastError() );
}
/* open a new handle to our event */
hTestEvent = OpenEventW(EVENT_ALL_ACCESS, /* we want all rights */
FALSE, /* no inherit */
lpName );
if( hTestEvent != NULL )
{
/* ERROR */
Trace( "ERROR:OpenEventW() call succeeded against a named "
"mutex, should have returned NULL\n" );
if( ! CloseHandle( hTestEvent ) )
{
Trace( "ERROR:%lu:CloseHandle() call failed \n", GetLastError() );
}
bRet = FAIL;
}
else
{
dwLastError = GetLastError();
if( dwLastError != ERROR_INVALID_HANDLE )
{
/* ERROR */
Trace( "ERROR:OpenEventW() call failed against a named "
"mutex, but returned an unexpected result: %lu\n",
dwLastError );
bRet = FAIL;
}
}
/* close the mutex handle */
if( ! CloseHandle( hMutex ) )
{
Trace( "ERROR:%lu:CloseHandle() call failed \n", GetLastError() );
bRet = FAIL;
}
/* fail here if we weren't successful */
if( bRet == FAIL )
{
Fail( "" );
}
/* PAL termination */
PAL_Terminate();
/* return success or failure */
return PASS;
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/coreclr/pal/src/misc/utils.cpp
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*++
Module Name:
misc/utils.c
Abstract:
Miscellaneous helper functions for the PAL, which don't fit anywhere else
--*/
#include "pal/dbgmsg.h"
SET_DEFAULT_DEBUG_CHANNEL(MISC); // some headers have code with asserts, so do this first
#include "pal/palinternal.h"
#if HAVE_VM_ALLOCATE
#include <mach/message.h>
#endif //HAVE_VM_ALLOCATE
#include <sys/mman.h>
#include "pal/utils.h"
#include "pal/file.h"
#include <errno.h>
#include <string.h>
// In safemath.h, Template SafeInt uses macro _ASSERTE, which need to use variable
// defdbgchan defined by SET_DEFAULT_DEBUG_CHANNEL. Therefore, the include statement
// should be placed after the SET_DEFAULT_DEBUG_CHANNEL(MISC)
#include <safemath.h>
/*++
Function:
UTIL_inverse_wcspbrk
Opposite of wcspbrk : searches a string for the first character NOT in the
given set
Parameters :
LPWSTR lpwstr : string to search
LPCWSTR charset : list of characters to search for
Return value :
pointer to first character of lpwstr that isn't in the set
NULL if all characters are in the set
--*/
LPWSTR UTIL_inverse_wcspbrk(LPWSTR lpwstr, LPCWSTR charset)
{
while(*lpwstr)
{
if(NULL == PAL_wcschr(charset,*lpwstr))
{
return lpwstr;
}
lpwstr++;
}
return NULL;
}
/*++
Function :
UTIL_IsReadOnlyBitsSet
Takes a struct stat *
Returns true if the file is read only,
--*/
BOOL UTIL_IsReadOnlyBitsSet( struct stat * stat_data )
{
BOOL bRetVal = FALSE;
/* Check for read permissions. */
if ( stat_data->st_uid == geteuid() )
{
/* The process owner is the file owner as well. */
if ( ( stat_data->st_mode & S_IRUSR ) && !( stat_data->st_mode & S_IWUSR ) )
{
bRetVal = TRUE;
}
}
else if ( stat_data->st_gid == getegid() )
{
/* The process's owner is in the same group as the file's owner. */
if ( ( stat_data->st_mode & S_IRGRP ) && !( stat_data->st_mode & S_IWGRP ) )
{
bRetVal = TRUE;
}
}
else
{
/* Check the other bits to see who can access the file. */
if ( ( stat_data->st_mode & S_IROTH ) && !( stat_data->st_mode & S_IWOTH ) )
{
bRetVal = TRUE;
}
}
return bRetVal;
}
/*++
Function :
UTIL_IsExecuteBitsSet
Takes a struct stat *
Returns true if the file is executable,
--*/
BOOL UTIL_IsExecuteBitsSet( struct stat * stat_data )
{
BOOL bRetVal = FALSE;
if ( (stat_data->st_mode & S_IFMT) == S_IFDIR )
{
return FALSE;
}
/* Check for read permissions. */
if ( 0 == geteuid() )
{
/* The process owner is root */
bRetVal = TRUE;
}
else if ( stat_data->st_uid == geteuid() )
{
/* The process owner is the file owner as well. */
if ( ( stat_data->st_mode & S_IXUSR ) )
{
bRetVal = TRUE;
}
}
else if ( stat_data->st_gid == getegid() )
{
/* The process's owner is in the same group as the file's owner. */
if ( ( stat_data->st_mode & S_IXGRP ) )
{
bRetVal = TRUE;
}
}
else
{
/* Check the other bits to see who can access the file. */
if ( ( stat_data->st_mode & S_IXOTH ) )
{
bRetVal = TRUE;
}
}
return bRetVal;
}
/*++
Function :
UTIL_WCToMB_Alloc
Converts a wide string to a multibyte string, allocating the required buffer
Parameters :
LPCWSTR lpWideCharStr : string to convert
int cchWideChar : number of wide characters to convert
(-1 to convert a complete null-termnated string)
Return Value :
newly allocated buffer containing the converted string. Conversion is
performed using CP_ACP. Buffer is allocated with malloc(), release it
with free().
In case if failure, LastError will be set.
--*/
LPSTR UTIL_WCToMB_Alloc(LPCWSTR lpWideCharStr, int cchWideChar)
{
int length;
LPSTR lpMultiByteStr;
/* get required buffer length */
length = WideCharToMultiByte(CP_ACP, 0, lpWideCharStr, cchWideChar,
NULL, 0, NULL, NULL);
if(0 == length)
{
ERROR("WCToMB error; GetLastError returns %#x", GetLastError());
return NULL;
}
/* allocate required buffer */
lpMultiByteStr = (LPSTR)PAL_malloc(length);
if(NULL == lpMultiByteStr)
{
ERROR("malloc() failed! errno is %d (%s)\n", errno,strerror(errno));
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return NULL;
}
/* convert into allocated buffer */
length = WideCharToMultiByte(CP_ACP, 0, lpWideCharStr, cchWideChar,
lpMultiByteStr, length, NULL, NULL);
if(0 == length)
{
ASSERT("WCToMB error; GetLastError returns %#x\n", GetLastError());
PAL_free(lpMultiByteStr);
return NULL;
}
return lpMultiByteStr;
}
/*++
Function :
UTIL_MBToWC_Alloc
Converts a multibyte string to a wide string, allocating the required buffer
Parameters :
LPCSTR lpMultiByteStr : string to convert
int cbMultiByte : number of bytes to convert
(-1 to convert a complete null-termnated string)
Return Value :
newly allocated buffer containing the converted string. Conversion is
performed using CP_ACP. Buffer is allocated with malloc(), release it
with free().
In case if failure, LastError will be set.
--*/
LPWSTR UTIL_MBToWC_Alloc(LPCSTR lpMultiByteStr, int cbMultiByte)
{
int length;
LPWSTR lpWideCharStr;
/* get required buffer length */
length = MultiByteToWideChar(CP_ACP, 0, lpMultiByteStr, cbMultiByte,
NULL, 0);
if(0 == length)
{
ERROR("MBToWC error; GetLastError returns %#x", GetLastError());
return NULL;
}
/* allocate required buffer */
size_t fullsize;
if (!ClrSafeInt<size_t>::multiply(length,sizeof(WCHAR),fullsize))
{
ERROR("integer overflow! length = %d , sizeof(WCHAR) = (%d)\n", length,sizeof(WCHAR) );
SetLastError(ERROR_ARITHMETIC_OVERFLOW);
return NULL;
}
lpWideCharStr = (LPWSTR)PAL_malloc(fullsize);
if(NULL == lpWideCharStr)
{
ERROR("malloc() failed! errno is %d (%s)\n", errno,strerror(errno));
SetLastError(FILEGetLastErrorFromErrno());
return NULL;
}
/* convert into allocated buffer */
length = MultiByteToWideChar(CP_ACP, 0, lpMultiByteStr, cbMultiByte,
lpWideCharStr, length);
if(0 >= length)
{
ASSERT("MCToMB error; GetLastError returns %#x\n", GetLastError());
PAL_free(lpWideCharStr);
return NULL;
}
return lpWideCharStr;
}
#if HAVE_VM_ALLOCATE
/*++
Function:
UTIL_MachErrorToPalError
Maps a Mach kern_return_t to a Win32 error code.
--*/
DWORD UTIL_MachErrorToPalError(kern_return_t MachReturn)
{
switch (MachReturn)
{
case KERN_SUCCESS:
return ERROR_SUCCESS;
case KERN_NO_ACCESS:
case KERN_INVALID_CAPABILITY:
return ERROR_ACCESS_DENIED;
case KERN_TERMINATED:
return ERROR_INVALID_HANDLE;
case KERN_INVALID_ADDRESS:
return ERROR_INVALID_ADDRESS;
case KERN_NO_SPACE:
return ERROR_NOT_ENOUGH_MEMORY;
case KERN_INVALID_ARGUMENT:
return ERROR_INVALID_PARAMETER;
default:
ASSERT("Unknown kern_return_t value %d - reporting ERROR_INTERNAL_ERROR\n", MachReturn);
return ERROR_INTERNAL_ERROR;
}
}
/*++
Function:
UTIL_SetLastErrorFromMach
Sets Win32 LastError according to the argument Mach kern_return_t value,
provided it indicates an error. If the argument indicates success, does
not modify LastError.
--*/
void UTIL_SetLastErrorFromMach(kern_return_t MachReturn)
{
DWORD palError = UTIL_MachErrorToPalError(MachReturn);
if (palError != ERROR_SUCCESS)
{
SetLastError(palError);
}
}
#endif //HAVE_VM_ALLOCATE
#ifdef __APPLE__
/*++
Function:
IsRunningOnMojaveHardenedRuntime() - Test if the current process is running on Mojave hardened runtime
--*/
BOOL IsRunningOnMojaveHardenedRuntime()
{
#if defined(TARGET_ARM64)
return true;
#else // defined(TARGET_ARM64)
static volatile int isRunningOnMojaveHardenedRuntime = -1;
if (isRunningOnMojaveHardenedRuntime == -1)
{
BOOL mhrDetected = FALSE;
int pageSize = sysconf(_SC_PAGE_SIZE);
// Try to map a page with read-write-execute protection. It should fail on Mojave hardened runtime.
void* testPage = mmap(NULL, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
if (testPage == MAP_FAILED && (errno == EACCES))
{
// The mapping has failed with EACCES, check if making the same mapping with MAP_JIT flag works
testPage = mmap(NULL, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE | MAP_JIT, -1, 0);
if (testPage != MAP_FAILED)
{
mhrDetected = TRUE;
}
}
if (testPage != MAP_FAILED)
{
munmap(testPage, pageSize);
}
isRunningOnMojaveHardenedRuntime = (int)mhrDetected;
}
return (BOOL)isRunningOnMojaveHardenedRuntime;
#endif // defined(TARGET_ARM64)
}
#endif // __APPLE__
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*++
Module Name:
misc/utils.c
Abstract:
Miscellaneous helper functions for the PAL, which don't fit anywhere else
--*/
#include "pal/dbgmsg.h"
SET_DEFAULT_DEBUG_CHANNEL(MISC); // some headers have code with asserts, so do this first
#include "pal/palinternal.h"
#if HAVE_VM_ALLOCATE
#include <mach/message.h>
#endif //HAVE_VM_ALLOCATE
#include <sys/mman.h>
#include "pal/utils.h"
#include "pal/file.h"
#include <errno.h>
#include <string.h>
// In safemath.h, Template SafeInt uses macro _ASSERTE, which need to use variable
// defdbgchan defined by SET_DEFAULT_DEBUG_CHANNEL. Therefore, the include statement
// should be placed after the SET_DEFAULT_DEBUG_CHANNEL(MISC)
#include <safemath.h>
/*++
Function:
UTIL_inverse_wcspbrk
Opposite of wcspbrk : searches a string for the first character NOT in the
given set
Parameters :
LPWSTR lpwstr : string to search
LPCWSTR charset : list of characters to search for
Return value :
pointer to first character of lpwstr that isn't in the set
NULL if all characters are in the set
--*/
LPWSTR UTIL_inverse_wcspbrk(LPWSTR lpwstr, LPCWSTR charset)
{
while(*lpwstr)
{
if(NULL == PAL_wcschr(charset,*lpwstr))
{
return lpwstr;
}
lpwstr++;
}
return NULL;
}
/*++
Function :
UTIL_IsReadOnlyBitsSet
Takes a struct stat *
Returns true if the file is read only,
--*/
BOOL UTIL_IsReadOnlyBitsSet( struct stat * stat_data )
{
BOOL bRetVal = FALSE;
/* Check for read permissions. */
if ( stat_data->st_uid == geteuid() )
{
/* The process owner is the file owner as well. */
if ( ( stat_data->st_mode & S_IRUSR ) && !( stat_data->st_mode & S_IWUSR ) )
{
bRetVal = TRUE;
}
}
else if ( stat_data->st_gid == getegid() )
{
/* The process's owner is in the same group as the file's owner. */
if ( ( stat_data->st_mode & S_IRGRP ) && !( stat_data->st_mode & S_IWGRP ) )
{
bRetVal = TRUE;
}
}
else
{
/* Check the other bits to see who can access the file. */
if ( ( stat_data->st_mode & S_IROTH ) && !( stat_data->st_mode & S_IWOTH ) )
{
bRetVal = TRUE;
}
}
return bRetVal;
}
/*++
Function :
UTIL_IsExecuteBitsSet
Takes a struct stat *
Returns true if the file is executable,
--*/
BOOL UTIL_IsExecuteBitsSet( struct stat * stat_data )
{
BOOL bRetVal = FALSE;
if ( (stat_data->st_mode & S_IFMT) == S_IFDIR )
{
return FALSE;
}
/* Check for read permissions. */
if ( 0 == geteuid() )
{
/* The process owner is root */
bRetVal = TRUE;
}
else if ( stat_data->st_uid == geteuid() )
{
/* The process owner is the file owner as well. */
if ( ( stat_data->st_mode & S_IXUSR ) )
{
bRetVal = TRUE;
}
}
else if ( stat_data->st_gid == getegid() )
{
/* The process's owner is in the same group as the file's owner. */
if ( ( stat_data->st_mode & S_IXGRP ) )
{
bRetVal = TRUE;
}
}
else
{
/* Check the other bits to see who can access the file. */
if ( ( stat_data->st_mode & S_IXOTH ) )
{
bRetVal = TRUE;
}
}
return bRetVal;
}
/*++
Function :
UTIL_WCToMB_Alloc
Converts a wide string to a multibyte string, allocating the required buffer
Parameters :
LPCWSTR lpWideCharStr : string to convert
int cchWideChar : number of wide characters to convert
(-1 to convert a complete null-termnated string)
Return Value :
newly allocated buffer containing the converted string. Conversion is
performed using CP_ACP. Buffer is allocated with malloc(), release it
with free().
In case if failure, LastError will be set.
--*/
LPSTR UTIL_WCToMB_Alloc(LPCWSTR lpWideCharStr, int cchWideChar)
{
int length;
LPSTR lpMultiByteStr;
/* get required buffer length */
length = WideCharToMultiByte(CP_ACP, 0, lpWideCharStr, cchWideChar,
NULL, 0, NULL, NULL);
if(0 == length)
{
ERROR("WCToMB error; GetLastError returns %#x", GetLastError());
return NULL;
}
/* allocate required buffer */
lpMultiByteStr = (LPSTR)PAL_malloc(length);
if(NULL == lpMultiByteStr)
{
ERROR("malloc() failed! errno is %d (%s)\n", errno,strerror(errno));
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return NULL;
}
/* convert into allocated buffer */
length = WideCharToMultiByte(CP_ACP, 0, lpWideCharStr, cchWideChar,
lpMultiByteStr, length, NULL, NULL);
if(0 == length)
{
ASSERT("WCToMB error; GetLastError returns %#x\n", GetLastError());
PAL_free(lpMultiByteStr);
return NULL;
}
return lpMultiByteStr;
}
/*++
Function :
UTIL_MBToWC_Alloc
Converts a multibyte string to a wide string, allocating the required buffer
Parameters :
LPCSTR lpMultiByteStr : string to convert
int cbMultiByte : number of bytes to convert
(-1 to convert a complete null-termnated string)
Return Value :
newly allocated buffer containing the converted string. Conversion is
performed using CP_ACP. Buffer is allocated with malloc(), release it
with free().
In case if failure, LastError will be set.
--*/
LPWSTR UTIL_MBToWC_Alloc(LPCSTR lpMultiByteStr, int cbMultiByte)
{
int length;
LPWSTR lpWideCharStr;
/* get required buffer length */
length = MultiByteToWideChar(CP_ACP, 0, lpMultiByteStr, cbMultiByte,
NULL, 0);
if(0 == length)
{
ERROR("MBToWC error; GetLastError returns %#x", GetLastError());
return NULL;
}
/* allocate required buffer */
size_t fullsize;
if (!ClrSafeInt<size_t>::multiply(length,sizeof(WCHAR),fullsize))
{
ERROR("integer overflow! length = %d , sizeof(WCHAR) = (%d)\n", length,sizeof(WCHAR) );
SetLastError(ERROR_ARITHMETIC_OVERFLOW);
return NULL;
}
lpWideCharStr = (LPWSTR)PAL_malloc(fullsize);
if(NULL == lpWideCharStr)
{
ERROR("malloc() failed! errno is %d (%s)\n", errno,strerror(errno));
SetLastError(FILEGetLastErrorFromErrno());
return NULL;
}
/* convert into allocated buffer */
length = MultiByteToWideChar(CP_ACP, 0, lpMultiByteStr, cbMultiByte,
lpWideCharStr, length);
if(0 >= length)
{
ASSERT("MCToMB error; GetLastError returns %#x\n", GetLastError());
PAL_free(lpWideCharStr);
return NULL;
}
return lpWideCharStr;
}
#if HAVE_VM_ALLOCATE
/*++
Function:
UTIL_MachErrorToPalError
Maps a Mach kern_return_t to a Win32 error code.
--*/
DWORD UTIL_MachErrorToPalError(kern_return_t MachReturn)
{
switch (MachReturn)
{
case KERN_SUCCESS:
return ERROR_SUCCESS;
case KERN_NO_ACCESS:
case KERN_INVALID_CAPABILITY:
return ERROR_ACCESS_DENIED;
case KERN_TERMINATED:
return ERROR_INVALID_HANDLE;
case KERN_INVALID_ADDRESS:
return ERROR_INVALID_ADDRESS;
case KERN_NO_SPACE:
return ERROR_NOT_ENOUGH_MEMORY;
case KERN_INVALID_ARGUMENT:
return ERROR_INVALID_PARAMETER;
default:
ASSERT("Unknown kern_return_t value %d - reporting ERROR_INTERNAL_ERROR\n", MachReturn);
return ERROR_INTERNAL_ERROR;
}
}
/*++
Function:
UTIL_SetLastErrorFromMach
Sets Win32 LastError according to the argument Mach kern_return_t value,
provided it indicates an error. If the argument indicates success, does
not modify LastError.
--*/
void UTIL_SetLastErrorFromMach(kern_return_t MachReturn)
{
DWORD palError = UTIL_MachErrorToPalError(MachReturn);
if (palError != ERROR_SUCCESS)
{
SetLastError(palError);
}
}
#endif //HAVE_VM_ALLOCATE
#ifdef __APPLE__
/*++
Function:
IsRunningOnMojaveHardenedRuntime() - Test if the current process is running on Mojave hardened runtime
--*/
BOOL IsRunningOnMojaveHardenedRuntime()
{
#if defined(TARGET_ARM64)
return true;
#else // defined(TARGET_ARM64)
static volatile int isRunningOnMojaveHardenedRuntime = -1;
if (isRunningOnMojaveHardenedRuntime == -1)
{
BOOL mhrDetected = FALSE;
int pageSize = sysconf(_SC_PAGE_SIZE);
// Try to map a page with read-write-execute protection. It should fail on Mojave hardened runtime.
void* testPage = mmap(NULL, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
if (testPage == MAP_FAILED && (errno == EACCES))
{
// The mapping has failed with EACCES, check if making the same mapping with MAP_JIT flag works
testPage = mmap(NULL, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE | MAP_JIT, -1, 0);
if (testPage != MAP_FAILED)
{
mhrDetected = TRUE;
}
}
if (testPage != MAP_FAILED)
{
munmap(testPage, pageSize);
}
isRunningOnMojaveHardenedRuntime = (int)mhrDetected;
}
return (BOOL)isRunningOnMojaveHardenedRuntime;
#endif // defined(TARGET_ARM64)
}
#endif // __APPLE__
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/Loader/classloader/MethodImpl/CovariantReturns/UnitTest/Modules/GenToNonGen1.ilproj
|
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Library</OutputType>
<CLRTestKind>BuildOnly</CLRTestKind>
</PropertyGroup>
<ItemGroup>
<Compile Include="GenToNonGen1.il" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Library</OutputType>
<CLRTestKind>BuildOnly</CLRTestKind>
</PropertyGroup>
<ItemGroup>
<Compile Include="GenToNonGen1.il" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/BaseCertificateTest.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using Xunit;
using Xunit.Abstractions;
namespace System.Net.Http.WinHttpHandlerFunctional.Tests
{
public abstract class BaseCertificateTest
{
private readonly ITestOutputHelper _output;
protected readonly ValidationCallbackHistory _validationCallbackHistory;
public BaseCertificateTest(ITestOutputHelper output)
{
_output = output;
_validationCallbackHistory = new ValidationCallbackHistory();
}
public class ValidationCallbackHistory
{
public bool ThrowException;
public bool ReturnFailure;
public bool WasCalled;
public SslPolicyErrors SslPolicyErrors;
public string CertificateSubject;
public X509CertificateCollection CertificateChain;
public X509ChainStatus[] ChainStatus;
public ValidationCallbackHistory()
{
ThrowException = false;
ReturnFailure = false;
WasCalled = false;
SslPolicyErrors = SslPolicyErrors.None;
CertificateSubject = null;
CertificateChain = new X509CertificateCollection();
ChainStatus = null;
}
}
protected bool CustomServerCertificateValidationCallback(
HttpRequestMessage sender,
X509Certificate2 certificate,
X509Chain chain,
SslPolicyErrors sslPolicyErrors)
{
_validationCallbackHistory.WasCalled = true;
_validationCallbackHistory.CertificateSubject = certificate.Subject;
foreach (var element in chain.ChainElements)
{
_validationCallbackHistory.CertificateChain.Add(element.Certificate);
}
_validationCallbackHistory.ChainStatus = chain.ChainStatus;
_validationCallbackHistory.SslPolicyErrors = sslPolicyErrors;
if (_validationCallbackHistory.ThrowException)
{
throw new CustomException();
}
if (_validationCallbackHistory.ReturnFailure)
{
return false;
}
return true;
}
protected void ConfirmValidCertificate(string expectedHostName)
{
Assert.Equal(SslPolicyErrors.None, _validationCallbackHistory.SslPolicyErrors);
Assert.True(_validationCallbackHistory.CertificateChain.Count > 0);
_output.WriteLine("Certificate.Subject: {0}", _validationCallbackHistory.CertificateSubject);
_output.WriteLine("Expected HostName: {0}", expectedHostName);
}
public class CustomException : Exception
{
public CustomException()
{
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using Xunit;
using Xunit.Abstractions;
namespace System.Net.Http.WinHttpHandlerFunctional.Tests
{
public abstract class BaseCertificateTest
{
private readonly ITestOutputHelper _output;
protected readonly ValidationCallbackHistory _validationCallbackHistory;
public BaseCertificateTest(ITestOutputHelper output)
{
_output = output;
_validationCallbackHistory = new ValidationCallbackHistory();
}
public class ValidationCallbackHistory
{
public bool ThrowException;
public bool ReturnFailure;
public bool WasCalled;
public SslPolicyErrors SslPolicyErrors;
public string CertificateSubject;
public X509CertificateCollection CertificateChain;
public X509ChainStatus[] ChainStatus;
public ValidationCallbackHistory()
{
ThrowException = false;
ReturnFailure = false;
WasCalled = false;
SslPolicyErrors = SslPolicyErrors.None;
CertificateSubject = null;
CertificateChain = new X509CertificateCollection();
ChainStatus = null;
}
}
protected bool CustomServerCertificateValidationCallback(
HttpRequestMessage sender,
X509Certificate2 certificate,
X509Chain chain,
SslPolicyErrors sslPolicyErrors)
{
_validationCallbackHistory.WasCalled = true;
_validationCallbackHistory.CertificateSubject = certificate.Subject;
foreach (var element in chain.ChainElements)
{
_validationCallbackHistory.CertificateChain.Add(element.Certificate);
}
_validationCallbackHistory.ChainStatus = chain.ChainStatus;
_validationCallbackHistory.SslPolicyErrors = sslPolicyErrors;
if (_validationCallbackHistory.ThrowException)
{
throw new CustomException();
}
if (_validationCallbackHistory.ReturnFailure)
{
return false;
}
return true;
}
protected void ConfirmValidCertificate(string expectedHostName)
{
Assert.Equal(SslPolicyErrors.None, _validationCallbackHistory.SslPolicyErrors);
Assert.True(_validationCallbackHistory.CertificateChain.Count > 0);
_output.WriteLine("Certificate.Subject: {0}", _validationCallbackHistory.CertificateSubject);
_output.WriteLine("Expected HostName: {0}", expectedHostName);
}
public class CustomException : Exception
{
public CustomException()
{
}
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/HardwareIntrinsics/X86/Sse3/MoveHighAndDuplicate.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics.X86;
using System.Runtime.Intrinsics;
namespace IntelHardwareIntrinsicTest
{
class Program
{
const int Pass = 100;
const int Fail = 0;
static unsafe int Main(string[] args)
{
int testResult = Pass;
if (Sse3.IsSupported)
{
using (TestTable<float> floatTable = new TestTable<float>(new float[4] { 1, -5, 100, 0 }, new float[4]))
{
var vf1 = Sse.LoadVector128((float*)(floatTable.inArrayPtr));
var vf2 = Sse3.MoveHighAndDuplicate(vf1);
Unsafe.Write(floatTable.outArrayPtr, vf2);
if (BitConverter.SingleToInt32Bits(floatTable.inArray[1]) != BitConverter.SingleToInt32Bits(floatTable.outArray[0]) ||
BitConverter.SingleToInt32Bits(floatTable.inArray[1]) != BitConverter.SingleToInt32Bits(floatTable.outArray[1]) ||
BitConverter.SingleToInt32Bits(floatTable.inArray[3]) != BitConverter.SingleToInt32Bits(floatTable.outArray[2]) ||
BitConverter.SingleToInt32Bits(floatTable.inArray[3]) != BitConverter.SingleToInt32Bits(floatTable.outArray[3]))
{
Console.WriteLine("Sse3 MoveHighAndDuplicate failed on float:");
foreach (var item in floatTable.outArray)
{
Console.Write(item + ", ");
}
Console.WriteLine();
testResult = Fail;
}
}
}
return testResult;
}
public unsafe struct TestTable<T> : IDisposable where T : struct
{
public T[] inArray;
public T[] outArray;
public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer();
public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer();
GCHandle inHandle;
GCHandle outHandle;
public TestTable(T[] a, T[] b)
{
this.inArray = a;
this.outArray = b;
inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned);
outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned);
}
public bool CheckResult(Func<T, T, bool> check)
{
for (int i = 0; i < inArray.Length; i++)
{
if (!check(inArray[i], outArray[i]))
{
return false;
}
}
return true;
}
public void Dispose()
{
inHandle.Free();
outHandle.Free();
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics.X86;
using System.Runtime.Intrinsics;
namespace IntelHardwareIntrinsicTest
{
class Program
{
const int Pass = 100;
const int Fail = 0;
static unsafe int Main(string[] args)
{
int testResult = Pass;
if (Sse3.IsSupported)
{
using (TestTable<float> floatTable = new TestTable<float>(new float[4] { 1, -5, 100, 0 }, new float[4]))
{
var vf1 = Sse.LoadVector128((float*)(floatTable.inArrayPtr));
var vf2 = Sse3.MoveHighAndDuplicate(vf1);
Unsafe.Write(floatTable.outArrayPtr, vf2);
if (BitConverter.SingleToInt32Bits(floatTable.inArray[1]) != BitConverter.SingleToInt32Bits(floatTable.outArray[0]) ||
BitConverter.SingleToInt32Bits(floatTable.inArray[1]) != BitConverter.SingleToInt32Bits(floatTable.outArray[1]) ||
BitConverter.SingleToInt32Bits(floatTable.inArray[3]) != BitConverter.SingleToInt32Bits(floatTable.outArray[2]) ||
BitConverter.SingleToInt32Bits(floatTable.inArray[3]) != BitConverter.SingleToInt32Bits(floatTable.outArray[3]))
{
Console.WriteLine("Sse3 MoveHighAndDuplicate failed on float:");
foreach (var item in floatTable.outArray)
{
Console.Write(item + ", ");
}
Console.WriteLine();
testResult = Fail;
}
}
}
return testResult;
}
public unsafe struct TestTable<T> : IDisposable where T : struct
{
public T[] inArray;
public T[] outArray;
public void* inArrayPtr => inHandle.AddrOfPinnedObject().ToPointer();
public void* outArrayPtr => outHandle.AddrOfPinnedObject().ToPointer();
GCHandle inHandle;
GCHandle outHandle;
public TestTable(T[] a, T[] b)
{
this.inArray = a;
this.outArray = b;
inHandle = GCHandle.Alloc(inArray, GCHandleType.Pinned);
outHandle = GCHandle.Alloc(outArray, GCHandleType.Pinned);
}
public bool CheckResult(Func<T, T, bool> check)
{
for (int i = 0; i < inArray.Length; i++)
{
if (!check(inArray[i], outArray[i]))
{
return false;
}
}
return true;
}
public void Dispose()
{
inHandle.Free();
outHandle.Free();
}
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/Methodical/explicit/coverage/seq_gc_long_1_r.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<CLRTestPriority>1</CLRTestPriority>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<DebugType>None</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="seq_gc_long_1.cs" />
<Compile Include="body_safe_long.cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<CLRTestPriority>1</CLRTestPriority>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<DebugType>None</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="seq_gc_long_1.cs" />
<Compile Include="body_safe_long.cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/OpenSslCertificateAssetDownloader.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
using System.Threading;
using Microsoft.Win32.SafeHandles;
namespace System.Security.Cryptography.X509Certificates
{
internal static class OpenSslCertificateAssetDownloader
{
private static readonly Func<string, CancellationToken, byte[]?>? s_downloadBytes = CreateDownloadBytesFunc();
internal static X509Certificate2? DownloadCertificate(string uri, TimeSpan downloadTimeout)
{
byte[]? data = DownloadAsset(uri, downloadTimeout);
if (data == null || data.Length == 0)
{
return null;
}
try
{
X509Certificate2 certificate = new X509Certificate2(data);
certificate.ThrowIfInvalid();
return certificate;
}
catch (CryptographicException)
{
return null;
}
}
internal static SafeX509CrlHandle? DownloadCrl(string uri, TimeSpan downloadTimeout)
{
byte[]? data = DownloadAsset(uri, downloadTimeout);
if (data == null)
{
return null;
}
// DER-encoded CRL seems to be the most common off of some random spot-checking, so try DER first.
SafeX509CrlHandle handle = Interop.Crypto.DecodeX509Crl(data, data.Length);
if (!handle.IsInvalid)
{
return handle;
}
using (SafeBioHandle bio = Interop.Crypto.CreateMemoryBio())
{
Interop.Crypto.CheckValidOpenSslHandle(bio);
Interop.Crypto.BioWrite(bio, data, data.Length);
handle = Interop.Crypto.PemReadBioX509Crl(bio);
// DecodeX509Crl failed, so we need to clear its error.
// If PemReadBioX509Crl failed, clear that too.
Interop.Crypto.ErrClearError();
if (!handle.IsInvalid)
{
return handle;
}
}
return null;
}
internal static SafeOcspResponseHandle? DownloadOcspGet(string uri, TimeSpan downloadTimeout)
{
byte[]? data = DownloadAsset(uri, downloadTimeout);
if (data == null)
{
return null;
}
// https://tools.ietf.org/html/rfc6960#appendix-A.2 says that the response is the DER-encoded
// response, so no rebuffering to interpret PEM is required.
SafeOcspResponseHandle resp = Interop.Crypto.DecodeOcspResponse(data);
if (resp.IsInvalid)
{
// We're not going to report this error to a user, so clear it
// (to avoid tainting future exceptions)
Interop.Crypto.ErrClearError();
}
return resp;
}
private static byte[]? DownloadAsset(string uri, TimeSpan downloadTimeout)
{
if (s_downloadBytes != null && downloadTimeout > TimeSpan.Zero)
{
long totalMillis = (long)downloadTimeout.TotalMilliseconds;
CancellationTokenSource? cts = totalMillis > int.MaxValue ? null : new CancellationTokenSource((int)totalMillis);
try
{
return s_downloadBytes(uri, cts?.Token ?? default);
}
catch { }
finally
{
cts?.Dispose();
}
}
return null;
}
private static Func<string, CancellationToken, byte[]?>? CreateDownloadBytesFunc()
{
try
{
// Use reflection to access System.Net.Http:
// Since System.Net.Http.dll explicitly depends on System.Security.Cryptography.X509Certificates.dll,
// the latter can't in turn have an explicit dependency on the former.
// Get the relevant types needed.
Type? socketsHttpHandlerType = Type.GetType("System.Net.Http.SocketsHttpHandler, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpMessageHandlerType = Type.GetType("System.Net.Http.HttpMessageHandler, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpClientType = Type.GetType("System.Net.Http.HttpClient, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpRequestMessageType = Type.GetType("System.Net.Http.HttpRequestMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpResponseMessageType = Type.GetType("System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpResponseHeadersType = Type.GetType("System.Net.Http.Headers.HttpResponseHeaders, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpContentType = Type.GetType("System.Net.Http.HttpContent, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
if (socketsHttpHandlerType == null || httpMessageHandlerType == null || httpClientType == null || httpRequestMessageType == null ||
httpResponseMessageType == null || httpResponseHeadersType == null || httpContentType == null)
{
Debug.Fail("Unable to load required type.");
return null;
}
// Get the methods on those types.
ConstructorInfo? socketsHttpHandlerCtor = socketsHttpHandlerType.GetConstructor(Type.EmptyTypes);
PropertyInfo? pooledConnectionIdleTimeoutProp = socketsHttpHandlerType.GetProperty("PooledConnectionIdleTimeout");
PropertyInfo? allowAutoRedirectProp = socketsHttpHandlerType.GetProperty("AllowAutoRedirect");
ConstructorInfo? httpClientCtor = httpClientType.GetConstructor(new Type[] { httpMessageHandlerType });
PropertyInfo? requestUriProp = httpRequestMessageType.GetProperty("RequestUri");
ConstructorInfo? httpRequestMessageCtor = httpRequestMessageType.GetConstructor(Type.EmptyTypes);
MethodInfo? sendMethod = httpClientType.GetMethod("Send", new Type[] { httpRequestMessageType, typeof(CancellationToken) });
PropertyInfo? responseContentProp = httpResponseMessageType.GetProperty("Content");
PropertyInfo? responseStatusCodeProp = httpResponseMessageType.GetProperty("StatusCode");
PropertyInfo? responseHeadersProp = httpResponseMessageType.GetProperty("Headers");
PropertyInfo? responseHeadersLocationProp = httpResponseHeadersType.GetProperty("Location");
MethodInfo? readAsStreamMethod = httpContentType.GetMethod("ReadAsStream", Type.EmptyTypes);
if (socketsHttpHandlerCtor == null || pooledConnectionIdleTimeoutProp == null || allowAutoRedirectProp == null || httpClientCtor == null ||
requestUriProp == null || httpRequestMessageCtor == null || sendMethod == null || responseContentProp == null || responseStatusCodeProp == null ||
responseHeadersProp == null || responseHeadersLocationProp == null || readAsStreamMethod == null)
{
Debug.Fail("Unable to load required member.");
return null;
}
// Only keep idle connections around briefly, as a compromise between resource leakage and port exhaustion.
const int PooledConnectionIdleTimeoutSeconds = 15;
const int MaxRedirections = 10;
// Equivalent of:
// var socketsHttpHandler = new SocketsHttpHandler() {
// PooledConnectionIdleTimeout = TimeSpan.FromSeconds(PooledConnectionIdleTimeoutSeconds),
// AllowAutoRedirect = false
// };
// var httpClient = new HttpClient(socketsHttpHandler);
// Note: using a ConstructorInfo instead of Activator.CreateInstance, so the ILLinker can see the usage through the lambda method.
object? socketsHttpHandler = socketsHttpHandlerCtor.Invoke(null);
pooledConnectionIdleTimeoutProp.SetValue(socketsHttpHandler, TimeSpan.FromSeconds(PooledConnectionIdleTimeoutSeconds));
allowAutoRedirectProp.SetValue(socketsHttpHandler, false);
object? httpClient = httpClientCtor.Invoke(new object?[] { socketsHttpHandler });
return (string uriString, CancellationToken cancellationToken) =>
{
Uri uri = new Uri(uriString);
if (!IsAllowedScheme(uri.Scheme))
{
return null;
}
// Equivalent of:
// HttpRequestMessage requestMessage = new HttpRequestMessage() { RequestUri = new Uri(uri) };
// HttpResponseMessage responseMessage = httpClient.Send(requestMessage, cancellationToken);
// Note: using a ConstructorInfo instead of Activator.CreateInstance, so the ILLinker can see the usage through the lambda method.
object requestMessage = httpRequestMessageCtor.Invoke(null);
requestUriProp.SetValue(requestMessage, uri);
object responseMessage = sendMethod.Invoke(httpClient, new object[] { requestMessage, cancellationToken })!;
int redirections = 0;
Uri? redirectUri;
bool hasRedirect;
while (true)
{
int statusCode = (int)responseStatusCodeProp.GetValue(responseMessage)!;
object responseHeaders = responseHeadersProp.GetValue(responseMessage)!;
Uri? location = (Uri?)responseHeadersLocationProp.GetValue(responseHeaders);
redirectUri = GetUriForRedirect((Uri)requestUriProp.GetValue(requestMessage)!, statusCode, location, out hasRedirect);
if (redirectUri == null)
{
break;
}
((IDisposable)responseMessage).Dispose();
redirections++;
if (redirections > MaxRedirections)
{
return null;
}
// Equivalent of:
// requestMessage = new HttpRequestMessage() { RequestUri = redirectUri };
// requestMessage.RequestUri = redirectUri;
// responseMessage = httpClient.Send(requestMessage, cancellationToken);
requestMessage = httpRequestMessageCtor.Invoke(null);
requestUriProp.SetValue(requestMessage, redirectUri);
responseMessage = sendMethod.Invoke(httpClient, new object[] { requestMessage, cancellationToken })!;
}
if (hasRedirect && redirectUri == null)
{
return null;
}
// Equivalent of:
// using Stream responseStream = resp.Content.ReadAsStream();
object content = responseContentProp.GetValue(responseMessage)!;
using Stream responseStream = (Stream)readAsStreamMethod.Invoke(content, null)!;
var result = new MemoryStream();
responseStream.CopyTo(result);
((IDisposable)responseMessage).Dispose();
return result.ToArray();
};
}
catch
{
// We shouldn't have any exceptions, but if we do, ignore them all.
return null;
}
}
private static Uri? GetUriForRedirect(Uri requestUri, int statusCode, Uri? location, out bool hasRedirect)
{
if (!IsRedirectStatusCode(statusCode))
{
hasRedirect = false;
return null;
}
hasRedirect = true;
if (location == null)
{
return null;
}
// Ensure the redirect location is an absolute URI.
if (!location.IsAbsoluteUri)
{
location = new Uri(requestUri, location);
}
// Per https://tools.ietf.org/html/rfc7231#section-7.1.2, a redirect location without a
// fragment should inherit the fragment from the original URI.
string requestFragment = requestUri.Fragment;
if (!string.IsNullOrEmpty(requestFragment))
{
string redirectFragment = location.Fragment;
if (string.IsNullOrEmpty(redirectFragment))
{
location = new UriBuilder(location) { Fragment = requestFragment }.Uri;
}
}
if (!IsAllowedScheme(location.Scheme))
{
return null;
}
return location;
}
private static bool IsRedirectStatusCode(int statusCode)
{
// MultipleChoices (300), Moved (301), Found (302), SeeOther (303), TemporaryRedirect (307), PermanentRedirect (308)
return (statusCode >= 300 && statusCode <= 303) || statusCode == 307 || statusCode == 308;
}
private static bool IsAllowedScheme(string scheme)
{
return string.Equals(scheme, "http", StringComparison.OrdinalIgnoreCase);
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
using System.Threading;
using Microsoft.Win32.SafeHandles;
namespace System.Security.Cryptography.X509Certificates
{
internal static class OpenSslCertificateAssetDownloader
{
private static readonly Func<string, CancellationToken, byte[]?>? s_downloadBytes = CreateDownloadBytesFunc();
internal static X509Certificate2? DownloadCertificate(string uri, TimeSpan downloadTimeout)
{
byte[]? data = DownloadAsset(uri, downloadTimeout);
if (data == null || data.Length == 0)
{
return null;
}
try
{
X509Certificate2 certificate = new X509Certificate2(data);
certificate.ThrowIfInvalid();
return certificate;
}
catch (CryptographicException)
{
return null;
}
}
internal static SafeX509CrlHandle? DownloadCrl(string uri, TimeSpan downloadTimeout)
{
byte[]? data = DownloadAsset(uri, downloadTimeout);
if (data == null)
{
return null;
}
// DER-encoded CRL seems to be the most common off of some random spot-checking, so try DER first.
SafeX509CrlHandle handle = Interop.Crypto.DecodeX509Crl(data, data.Length);
if (!handle.IsInvalid)
{
return handle;
}
using (SafeBioHandle bio = Interop.Crypto.CreateMemoryBio())
{
Interop.Crypto.CheckValidOpenSslHandle(bio);
Interop.Crypto.BioWrite(bio, data, data.Length);
handle = Interop.Crypto.PemReadBioX509Crl(bio);
// DecodeX509Crl failed, so we need to clear its error.
// If PemReadBioX509Crl failed, clear that too.
Interop.Crypto.ErrClearError();
if (!handle.IsInvalid)
{
return handle;
}
}
return null;
}
internal static SafeOcspResponseHandle? DownloadOcspGet(string uri, TimeSpan downloadTimeout)
{
byte[]? data = DownloadAsset(uri, downloadTimeout);
if (data == null)
{
return null;
}
// https://tools.ietf.org/html/rfc6960#appendix-A.2 says that the response is the DER-encoded
// response, so no rebuffering to interpret PEM is required.
SafeOcspResponseHandle resp = Interop.Crypto.DecodeOcspResponse(data);
if (resp.IsInvalid)
{
// We're not going to report this error to a user, so clear it
// (to avoid tainting future exceptions)
Interop.Crypto.ErrClearError();
}
return resp;
}
private static byte[]? DownloadAsset(string uri, TimeSpan downloadTimeout)
{
if (s_downloadBytes != null && downloadTimeout > TimeSpan.Zero)
{
long totalMillis = (long)downloadTimeout.TotalMilliseconds;
CancellationTokenSource? cts = totalMillis > int.MaxValue ? null : new CancellationTokenSource((int)totalMillis);
try
{
return s_downloadBytes(uri, cts?.Token ?? default);
}
catch { }
finally
{
cts?.Dispose();
}
}
return null;
}
private static Func<string, CancellationToken, byte[]?>? CreateDownloadBytesFunc()
{
try
{
// Use reflection to access System.Net.Http:
// Since System.Net.Http.dll explicitly depends on System.Security.Cryptography.X509Certificates.dll,
// the latter can't in turn have an explicit dependency on the former.
// Get the relevant types needed.
Type? socketsHttpHandlerType = Type.GetType("System.Net.Http.SocketsHttpHandler, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpMessageHandlerType = Type.GetType("System.Net.Http.HttpMessageHandler, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpClientType = Type.GetType("System.Net.Http.HttpClient, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpRequestMessageType = Type.GetType("System.Net.Http.HttpRequestMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpResponseMessageType = Type.GetType("System.Net.Http.HttpResponseMessage, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpResponseHeadersType = Type.GetType("System.Net.Http.Headers.HttpResponseHeaders, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
Type? httpContentType = Type.GetType("System.Net.Http.HttpContent, System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false);
if (socketsHttpHandlerType == null || httpMessageHandlerType == null || httpClientType == null || httpRequestMessageType == null ||
httpResponseMessageType == null || httpResponseHeadersType == null || httpContentType == null)
{
Debug.Fail("Unable to load required type.");
return null;
}
// Get the methods on those types.
ConstructorInfo? socketsHttpHandlerCtor = socketsHttpHandlerType.GetConstructor(Type.EmptyTypes);
PropertyInfo? pooledConnectionIdleTimeoutProp = socketsHttpHandlerType.GetProperty("PooledConnectionIdleTimeout");
PropertyInfo? allowAutoRedirectProp = socketsHttpHandlerType.GetProperty("AllowAutoRedirect");
ConstructorInfo? httpClientCtor = httpClientType.GetConstructor(new Type[] { httpMessageHandlerType });
PropertyInfo? requestUriProp = httpRequestMessageType.GetProperty("RequestUri");
ConstructorInfo? httpRequestMessageCtor = httpRequestMessageType.GetConstructor(Type.EmptyTypes);
MethodInfo? sendMethod = httpClientType.GetMethod("Send", new Type[] { httpRequestMessageType, typeof(CancellationToken) });
PropertyInfo? responseContentProp = httpResponseMessageType.GetProperty("Content");
PropertyInfo? responseStatusCodeProp = httpResponseMessageType.GetProperty("StatusCode");
PropertyInfo? responseHeadersProp = httpResponseMessageType.GetProperty("Headers");
PropertyInfo? responseHeadersLocationProp = httpResponseHeadersType.GetProperty("Location");
MethodInfo? readAsStreamMethod = httpContentType.GetMethod("ReadAsStream", Type.EmptyTypes);
if (socketsHttpHandlerCtor == null || pooledConnectionIdleTimeoutProp == null || allowAutoRedirectProp == null || httpClientCtor == null ||
requestUriProp == null || httpRequestMessageCtor == null || sendMethod == null || responseContentProp == null || responseStatusCodeProp == null ||
responseHeadersProp == null || responseHeadersLocationProp == null || readAsStreamMethod == null)
{
Debug.Fail("Unable to load required member.");
return null;
}
// Only keep idle connections around briefly, as a compromise between resource leakage and port exhaustion.
const int PooledConnectionIdleTimeoutSeconds = 15;
const int MaxRedirections = 10;
// Equivalent of:
// var socketsHttpHandler = new SocketsHttpHandler() {
// PooledConnectionIdleTimeout = TimeSpan.FromSeconds(PooledConnectionIdleTimeoutSeconds),
// AllowAutoRedirect = false
// };
// var httpClient = new HttpClient(socketsHttpHandler);
// Note: using a ConstructorInfo instead of Activator.CreateInstance, so the ILLinker can see the usage through the lambda method.
object? socketsHttpHandler = socketsHttpHandlerCtor.Invoke(null);
pooledConnectionIdleTimeoutProp.SetValue(socketsHttpHandler, TimeSpan.FromSeconds(PooledConnectionIdleTimeoutSeconds));
allowAutoRedirectProp.SetValue(socketsHttpHandler, false);
object? httpClient = httpClientCtor.Invoke(new object?[] { socketsHttpHandler });
return (string uriString, CancellationToken cancellationToken) =>
{
Uri uri = new Uri(uriString);
if (!IsAllowedScheme(uri.Scheme))
{
return null;
}
// Equivalent of:
// HttpRequestMessage requestMessage = new HttpRequestMessage() { RequestUri = new Uri(uri) };
// HttpResponseMessage responseMessage = httpClient.Send(requestMessage, cancellationToken);
// Note: using a ConstructorInfo instead of Activator.CreateInstance, so the ILLinker can see the usage through the lambda method.
object requestMessage = httpRequestMessageCtor.Invoke(null);
requestUriProp.SetValue(requestMessage, uri);
object responseMessage = sendMethod.Invoke(httpClient, new object[] { requestMessage, cancellationToken })!;
int redirections = 0;
Uri? redirectUri;
bool hasRedirect;
while (true)
{
int statusCode = (int)responseStatusCodeProp.GetValue(responseMessage)!;
object responseHeaders = responseHeadersProp.GetValue(responseMessage)!;
Uri? location = (Uri?)responseHeadersLocationProp.GetValue(responseHeaders);
redirectUri = GetUriForRedirect((Uri)requestUriProp.GetValue(requestMessage)!, statusCode, location, out hasRedirect);
if (redirectUri == null)
{
break;
}
((IDisposable)responseMessage).Dispose();
redirections++;
if (redirections > MaxRedirections)
{
return null;
}
// Equivalent of:
// requestMessage = new HttpRequestMessage() { RequestUri = redirectUri };
// requestMessage.RequestUri = redirectUri;
// responseMessage = httpClient.Send(requestMessage, cancellationToken);
requestMessage = httpRequestMessageCtor.Invoke(null);
requestUriProp.SetValue(requestMessage, redirectUri);
responseMessage = sendMethod.Invoke(httpClient, new object[] { requestMessage, cancellationToken })!;
}
if (hasRedirect && redirectUri == null)
{
return null;
}
// Equivalent of:
// using Stream responseStream = resp.Content.ReadAsStream();
object content = responseContentProp.GetValue(responseMessage)!;
using Stream responseStream = (Stream)readAsStreamMethod.Invoke(content, null)!;
var result = new MemoryStream();
responseStream.CopyTo(result);
((IDisposable)responseMessage).Dispose();
return result.ToArray();
};
}
catch
{
// We shouldn't have any exceptions, but if we do, ignore them all.
return null;
}
}
private static Uri? GetUriForRedirect(Uri requestUri, int statusCode, Uri? location, out bool hasRedirect)
{
if (!IsRedirectStatusCode(statusCode))
{
hasRedirect = false;
return null;
}
hasRedirect = true;
if (location == null)
{
return null;
}
// Ensure the redirect location is an absolute URI.
if (!location.IsAbsoluteUri)
{
location = new Uri(requestUri, location);
}
// Per https://tools.ietf.org/html/rfc7231#section-7.1.2, a redirect location without a
// fragment should inherit the fragment from the original URI.
string requestFragment = requestUri.Fragment;
if (!string.IsNullOrEmpty(requestFragment))
{
string redirectFragment = location.Fragment;
if (string.IsNullOrEmpty(redirectFragment))
{
location = new UriBuilder(location) { Fragment = requestFragment }.Uri;
}
}
if (!IsAllowedScheme(location.Scheme))
{
return null;
}
return location;
}
private static bool IsRedirectStatusCode(int statusCode)
{
// MultipleChoices (300), Moved (301), Found (302), SeeOther (303), TemporaryRedirect (307), PermanentRedirect (308)
return (statusCode >= 300 && statusCode <= 303) || statusCode == 307 || statusCode == 308;
}
private static bool IsAllowedScheme(string scheme)
{
return string.Equals(scheme, "http", StringComparison.OrdinalIgnoreCase);
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Private.Xml/tests/XmlReader/ReadContentAs/ReadAsDateTimeOffsetTests.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Xunit;
namespace System.Xml.Tests
{
public class DateTimeOffsetTests
{
[Fact]
public static void ReadContentAsDateTimeOffset1()
{
var reader = Utils.CreateFragmentReader("<Root> <![CDATA[0]]>001Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset10()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[9]]>999Z</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset11()
{
var reader = Utils.CreateFragmentReader("<Root> 2000-0<![CDATA[2]]>-29T23:59:59.999<?a?>9999 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2000, 2, 29, 23, 59, 59, DateTimeKind.Local).AddTicks(9999999)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset12()
{
var reader = Utils.CreateFragmentReader("<Root> 2<?a?>00<!-- Comment inbetween-->0-02-29T23:59:5<?a?>9-13:<![CDATA[60]]> </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2000, 2, 29, 23, 59, 59, new TimeSpan(-14, 0, 0)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset13()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[9]]>999Z</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset14()
{
var reader = Utils.CreateFragmentReader("<Root> 20<?a?>02-1<![CDATA[2]]>-3<!-- Comment inbetween-->0 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2002, 12, 30, 0, 0, 0, DateTimeKind.Local)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset15()
{
var reader = Utils.CreateFragmentReader("<Root> <![CDATA[2]]>00<?a?>2-1<!-- Comment inbetween-->2-30Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2002, 12, 30, 0, 0, 0, 0, DateTimeKind.Utc)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset16()
{
var reader = Utils.CreateFragmentReader("<Root> <!-- Comment inbetween-->0002-01-01T00:00:00+00:00 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2, 1, 1, 0, 0, 0, DateTimeKind.Utc)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset17()
{
var reader = Utils.CreateFragmentReader("<Root>99<!-- Comment inbetween-->99-1<?a?>2-31T1<![CDATA[2]]>:59:59</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 12, 31, 12, 59, 59, DateTimeKind.Local)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset18()
{
var reader = Utils.CreateFragmentReader("<Root> 999<!-- Comment inbetween-->9 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 1, 1, 0, 0, 0, DateTimeKind.Local)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset19()
{
var reader = Utils.CreateFragmentReader("<Root>001-01-01T00:00:00+00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset2()
{
var reader = Utils.CreateFragmentReader("<Root> 2000-0<![CDATA[2]]>-29T23:59:59.999<?a?>9999 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2000, 2, 29, 23, 59, 59, DateTimeKind.Local).AddTicks(9999999)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset20()
{
var reader = Utils.CreateFragmentReader("<Root>99<?a?>99-12-31T12:59:59+14:00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset21()
{
var reader = Utils.CreateFragmentReader("<Root>0<?a?></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset22()
{
var reader = Utils.CreateFragmentReader("<Root> 9<?a?>999 Z</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset23()
{
var reader = Utils.CreateFragmentReader("<Root> ABC<?a?>D </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset24()
{
var reader = Utils.CreateFragmentReader("<Root>yyy<?a?>y-MM-ddTHH:mm</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset25()
{
var reader = Utils.CreateFragmentReader("<Root>21<?a?>00-02-29T23:59:59.9999999+13:60 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset26()
{
var reader = Utils.CreateFragmentReader("<Root>3 000-0<?a?>2-29T23:59:59.999999999999-13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset27()
{
var reader = Utils.CreateFragmentReader("<Root> 200<?a?>2-12-33</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset28()
{
var reader = Utils.CreateFragmentReader("<Root>20<?a?>0<![CDATA[2<?a?>]]>-13-30 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset29()
{
var reader = Utils.CreateFragmentReader("<Root> 001-01-01<?a?>T00:00:00+00:00 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset3()
{
var reader = Utils.CreateFragmentReader("<Root> 2<?a?>00<!-- Comment inbetween-->0-02-29T23:59:5<?a?>9-13:<![CDATA[60]]> </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2000, 2, 29, 23, 59, 59, new TimeSpan(-14, 0, 0)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset30()
{
var reader = Utils.CreateFragmentReader("<Root>9999-1<![CDATA[2]]>-31T12:59:59+14:00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset31()
{
var reader = Utils.CreateFragmentReader("<Root><?a?>0<!-- Comment inbetween--></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset32()
{
var reader = Utils.CreateFragmentReader("<Root> 9<?a?>9<!-- Comment inbetween-->99 Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset33()
{
var reader = Utils.CreateFragmentReader("<Root>A<?a?>B<!-- Comment inbetween-->CD</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset34()
{
var reader = Utils.CreateFragmentReader("<Root>yyyy-MM-ddTHH:mm</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset35()
{
var reader = Utils.CreateFragmentReader("<Root> 21<?a?>00<!-- Comment inbetween-->-02-29T23:59:59.9999999+13:60 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset36()
{
var reader = Utils.CreateFragmentReader("<Root>3000-<?a?>02-29T<!-- Comment inbetween-->23:59:59.999999999999-13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset37()
{
var reader = Utils.CreateFragmentReader("<Root>2002-12-33</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset38()
{
var reader = Utils.CreateFragmentReader("<Root >2002-13-30 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset39()
{
var reader = Utils.CreateFragmentReader("<Root> 200<!-- Comment inbetween-->2-<![CDATA[12]]>-3<?a?>0Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2002, 12, 30, 0, 0, 0, TimeSpan.FromHours(0)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset4()
{
var reader = Utils.CreateFragmentReader("<Root> 20<?a?>02-1<![CDATA[2]]>-3<!-- Comment inbetween-->0 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2002, 12, 30, 0, 0, 0, DateTimeKind.Local)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset40()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[00]]>01-01-01<?a?>T00:00:0<!-- Comment inbetween-->0+00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(1, 1, 1, 0, 0, 0, TimeSpan.FromHours(0)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset41()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[9]]>99<?a?>9-12-31T12:<!-- Comment inbetween-->5<![CDATA[9]]>:5<![CDATA[9]]>+14:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(9999, 12, 31, 12, 59, 59, TimeSpan.FromHours(+14)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset42()
{
var reader = Utils.CreateFragmentReader("<Root> 9<![CDATA[9]]>99-1<?a?>2-31T1<!-- Comment inbetween-->2:59:59-10:60 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(9999, 12, 31, 12, 59, 59, TimeSpan.FromHours(-11)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset43()
{
var reader = Utils.CreateFragmentReader("<Root> 20<!-- Comment inbetween-->05 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2005, 1, 1, 0, 0, 0, TimeZoneInfo.Local.GetUtcOffset(new DateTime(2005, 1, 1))).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset44()
{
var reader = Utils.CreateFragmentReader("<Root> 9<![CDATA[9]]>9<!-- Comment inbetween-->9<?a?> </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(9999, 1, 1, 0, 0, 0, TimeZoneInfo.Local.GetUtcOffset(new DateTime(9999, 1, 1))).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset45()
{
var reader = Utils.CreateFragmentReader("<Root> 0<?a?>0<!-- Comment inbetween-->01Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(1, 1, 1, 0, 0, 0, TimeSpan.FromHours(0)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset46()
{
var reader = Utils.CreateFragmentReader("<Root>99<!-- Comment inbetween-->9<![CDATA[9]]>Z<?a?></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(9999, 1, 1, 0, 0, 0, TimeSpan.FromHours(0)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset47()
{
var reader = Utils.CreateFragmentReader("<Root>2<!-- Comment inbetween-->000-02-29T23:5<?a?>9:5<![CDATA[9]]>.999999<![CDATA[9]]>+13:60 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2000, 2, 29, 23, 59, 59, TimeSpan.FromHours(14)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset48()
{
var reader = Utils.CreateFragmentReader("<Root> 20<?a?>00-02-29T23:59:59.999999999999-<!-- Comment inbetween-->13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2000, 3, 1, 0, 0, 0, TimeSpan.FromHours(-14)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset49()
{
var reader = Utils.CreateFragmentReader("<Root> 0001-01-01T00<?a?>:00:00<!-- Comment inbetween-->-1<!-- Comment inbetween-->3:<![CDATA[60]]> </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(1, 1, 1, 0, 0, 0, TimeSpan.FromHours(-14)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset5()
{
var reader = Utils.CreateFragmentReader("<Root> <![CDATA[2]]>00<?a?>2-1<!-- Comment inbetween-->2-30Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2002, 12, 30, 0, 0, 0, 0, DateTimeKind.Utc)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset50()
{
var reader = Utils.CreateFragmentReader("<Root>2<?a?>00<!-- Comment inbetween-->2-12-3<![CDATA[0]]></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2002, 12, 30, 0, 0, 0, TimeZoneInfo.Local.GetUtcOffset(new DateTime(2002, 12, 30))).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset51()
{
var reader = Utils.CreateFragmentReader("<Root> 20<?9?>02-1<![CDATA[2]]>-3<!-- Comment inbetween-->0 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset52()
{
var reader = Utils.CreateFragmentReader("<Root>9999-12-31T12:5<?a?>9:59+14:00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset53()
{
var reader = Utils.CreateFragmentReader("<Root>0<?a?></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset54()
{
var reader = Utils.CreateFragmentReader("<Root>99<?a?>9Z</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset55()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[z<!-- Comment inbetween-->]]></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset56()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[Z<!-- Comment inbetween-->]]></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset57()
{
var reader = Utils.CreateFragmentReader("<Root>21<!-- Comment inbetween-->00-02-29T23:59:59.9999999+13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset58()
{
var reader = Utils.CreateFragmentReader("<Root>3000-02-29T23:59:<!-- Comment inbetween-->9.999999999999-13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset59()
{
var reader = Utils.CreateFragmentReader("<Root>001-01-01T0<?a?>0:00:00<!-- Comment inbetween-->+00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset6()
{
var reader = Utils.CreateFragmentReader("<Root> <!-- Comment inbetween-->0002-01-01T00:00:00+00:00 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2, 1, 1, 0, 0, 0, DateTimeKind.Utc)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset60()
{
var reader = Utils.CreateFragmentReader("<Root>0001-<![CDATA[0<!-- Comment inbetween-->1]]>-01T0<?a?>0:00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset7()
{
var reader = Utils.CreateFragmentReader("<Root>99<!-- Comment inbetween-->99-1<?a?>2-31T1<![CDATA[2]]>:59:59</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 12, 31, 12, 59, 59, DateTimeKind.Local)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset8()
{
var reader = Utils.CreateFragmentReader("<Root> 999<!-- Comment inbetween-->9 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 1, 1, 0, 0, 0, DateTimeKind.Local)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset9()
{
var reader = Utils.CreateFragmentReader("<Root> <![CDATA[0]]>001Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)), reader.ReadContentAsDateTimeOffset());
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Xunit;
namespace System.Xml.Tests
{
public class DateTimeOffsetTests
{
[Fact]
public static void ReadContentAsDateTimeOffset1()
{
var reader = Utils.CreateFragmentReader("<Root> <![CDATA[0]]>001Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset10()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[9]]>999Z</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset11()
{
var reader = Utils.CreateFragmentReader("<Root> 2000-0<![CDATA[2]]>-29T23:59:59.999<?a?>9999 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2000, 2, 29, 23, 59, 59, DateTimeKind.Local).AddTicks(9999999)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset12()
{
var reader = Utils.CreateFragmentReader("<Root> 2<?a?>00<!-- Comment inbetween-->0-02-29T23:59:5<?a?>9-13:<![CDATA[60]]> </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2000, 2, 29, 23, 59, 59, new TimeSpan(-14, 0, 0)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset13()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[9]]>999Z</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset14()
{
var reader = Utils.CreateFragmentReader("<Root> 20<?a?>02-1<![CDATA[2]]>-3<!-- Comment inbetween-->0 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2002, 12, 30, 0, 0, 0, DateTimeKind.Local)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset15()
{
var reader = Utils.CreateFragmentReader("<Root> <![CDATA[2]]>00<?a?>2-1<!-- Comment inbetween-->2-30Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2002, 12, 30, 0, 0, 0, 0, DateTimeKind.Utc)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset16()
{
var reader = Utils.CreateFragmentReader("<Root> <!-- Comment inbetween-->0002-01-01T00:00:00+00:00 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2, 1, 1, 0, 0, 0, DateTimeKind.Utc)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset17()
{
var reader = Utils.CreateFragmentReader("<Root>99<!-- Comment inbetween-->99-1<?a?>2-31T1<![CDATA[2]]>:59:59</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 12, 31, 12, 59, 59, DateTimeKind.Local)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset18()
{
var reader = Utils.CreateFragmentReader("<Root> 999<!-- Comment inbetween-->9 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 1, 1, 0, 0, 0, DateTimeKind.Local)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset19()
{
var reader = Utils.CreateFragmentReader("<Root>001-01-01T00:00:00+00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset2()
{
var reader = Utils.CreateFragmentReader("<Root> 2000-0<![CDATA[2]]>-29T23:59:59.999<?a?>9999 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2000, 2, 29, 23, 59, 59, DateTimeKind.Local).AddTicks(9999999)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset20()
{
var reader = Utils.CreateFragmentReader("<Root>99<?a?>99-12-31T12:59:59+14:00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset21()
{
var reader = Utils.CreateFragmentReader("<Root>0<?a?></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset22()
{
var reader = Utils.CreateFragmentReader("<Root> 9<?a?>999 Z</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset23()
{
var reader = Utils.CreateFragmentReader("<Root> ABC<?a?>D </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset24()
{
var reader = Utils.CreateFragmentReader("<Root>yyy<?a?>y-MM-ddTHH:mm</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset25()
{
var reader = Utils.CreateFragmentReader("<Root>21<?a?>00-02-29T23:59:59.9999999+13:60 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset26()
{
var reader = Utils.CreateFragmentReader("<Root>3 000-0<?a?>2-29T23:59:59.999999999999-13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset27()
{
var reader = Utils.CreateFragmentReader("<Root> 200<?a?>2-12-33</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset28()
{
var reader = Utils.CreateFragmentReader("<Root>20<?a?>0<![CDATA[2<?a?>]]>-13-30 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset29()
{
var reader = Utils.CreateFragmentReader("<Root> 001-01-01<?a?>T00:00:00+00:00 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset3()
{
var reader = Utils.CreateFragmentReader("<Root> 2<?a?>00<!-- Comment inbetween-->0-02-29T23:59:5<?a?>9-13:<![CDATA[60]]> </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2000, 2, 29, 23, 59, 59, new TimeSpan(-14, 0, 0)), (DateTimeOffset)reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset30()
{
var reader = Utils.CreateFragmentReader("<Root>9999-1<![CDATA[2]]>-31T12:59:59+14:00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset31()
{
var reader = Utils.CreateFragmentReader("<Root><?a?>0<!-- Comment inbetween--></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset32()
{
var reader = Utils.CreateFragmentReader("<Root> 9<?a?>9<!-- Comment inbetween-->99 Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset33()
{
var reader = Utils.CreateFragmentReader("<Root>A<?a?>B<!-- Comment inbetween-->CD</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset34()
{
var reader = Utils.CreateFragmentReader("<Root>yyyy-MM-ddTHH:mm</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset35()
{
var reader = Utils.CreateFragmentReader("<Root> 21<?a?>00<!-- Comment inbetween-->-02-29T23:59:59.9999999+13:60 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset36()
{
var reader = Utils.CreateFragmentReader("<Root>3000-<?a?>02-29T<!-- Comment inbetween-->23:59:59.999999999999-13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset37()
{
var reader = Utils.CreateFragmentReader("<Root>2002-12-33</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset38()
{
var reader = Utils.CreateFragmentReader("<Root >2002-13-30 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset39()
{
var reader = Utils.CreateFragmentReader("<Root> 200<!-- Comment inbetween-->2-<![CDATA[12]]>-3<?a?>0Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2002, 12, 30, 0, 0, 0, TimeSpan.FromHours(0)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset4()
{
var reader = Utils.CreateFragmentReader("<Root> 20<?a?>02-1<![CDATA[2]]>-3<!-- Comment inbetween-->0 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2002, 12, 30, 0, 0, 0, DateTimeKind.Local)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset40()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[00]]>01-01-01<?a?>T00:00:0<!-- Comment inbetween-->0+00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(1, 1, 1, 0, 0, 0, TimeSpan.FromHours(0)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset41()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[9]]>99<?a?>9-12-31T12:<!-- Comment inbetween-->5<![CDATA[9]]>:5<![CDATA[9]]>+14:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(9999, 12, 31, 12, 59, 59, TimeSpan.FromHours(+14)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset42()
{
var reader = Utils.CreateFragmentReader("<Root> 9<![CDATA[9]]>99-1<?a?>2-31T1<!-- Comment inbetween-->2:59:59-10:60 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(9999, 12, 31, 12, 59, 59, TimeSpan.FromHours(-11)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset43()
{
var reader = Utils.CreateFragmentReader("<Root> 20<!-- Comment inbetween-->05 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2005, 1, 1, 0, 0, 0, TimeZoneInfo.Local.GetUtcOffset(new DateTime(2005, 1, 1))).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset44()
{
var reader = Utils.CreateFragmentReader("<Root> 9<![CDATA[9]]>9<!-- Comment inbetween-->9<?a?> </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(9999, 1, 1, 0, 0, 0, TimeZoneInfo.Local.GetUtcOffset(new DateTime(9999, 1, 1))).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset45()
{
var reader = Utils.CreateFragmentReader("<Root> 0<?a?>0<!-- Comment inbetween-->01Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(1, 1, 1, 0, 0, 0, TimeSpan.FromHours(0)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset46()
{
var reader = Utils.CreateFragmentReader("<Root>99<!-- Comment inbetween-->9<![CDATA[9]]>Z<?a?></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(9999, 1, 1, 0, 0, 0, TimeSpan.FromHours(0)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset47()
{
var reader = Utils.CreateFragmentReader("<Root>2<!-- Comment inbetween-->000-02-29T23:5<?a?>9:5<![CDATA[9]]>.999999<![CDATA[9]]>+13:60 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2000, 2, 29, 23, 59, 59, TimeSpan.FromHours(14)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset48()
{
var reader = Utils.CreateFragmentReader("<Root> 20<?a?>00-02-29T23:59:59.999999999999-<!-- Comment inbetween-->13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2000, 3, 1, 0, 0, 0, TimeSpan.FromHours(-14)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset49()
{
var reader = Utils.CreateFragmentReader("<Root> 0001-01-01T00<?a?>:00:00<!-- Comment inbetween-->-1<!-- Comment inbetween-->3:<![CDATA[60]]> </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(1, 1, 1, 0, 0, 0, TimeSpan.FromHours(-14)).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset5()
{
var reader = Utils.CreateFragmentReader("<Root> <![CDATA[2]]>00<?a?>2-1<!-- Comment inbetween-->2-30Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2002, 12, 30, 0, 0, 0, 0, DateTimeKind.Utc)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset50()
{
var reader = Utils.CreateFragmentReader("<Root>2<?a?>00<!-- Comment inbetween-->2-12-3<![CDATA[0]]></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(2002, 12, 30, 0, 0, 0, TimeZoneInfo.Local.GetUtcOffset(new DateTime(2002, 12, 30))).ToString(), reader.ReadContentAs(typeof(DateTimeOffset), null).ToString());
}
[Fact]
public static void ReadContentAsDateTimeOffset51()
{
var reader = Utils.CreateFragmentReader("<Root> 20<?9?>02-1<![CDATA[2]]>-3<!-- Comment inbetween-->0 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset52()
{
var reader = Utils.CreateFragmentReader("<Root>9999-12-31T12:5<?a?>9:59+14:00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset53()
{
var reader = Utils.CreateFragmentReader("<Root>0<?a?></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset54()
{
var reader = Utils.CreateFragmentReader("<Root>99<?a?>9Z</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset55()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[z<!-- Comment inbetween-->]]></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset56()
{
var reader = Utils.CreateFragmentReader("<Root><![CDATA[Z<!-- Comment inbetween-->]]></Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset57()
{
var reader = Utils.CreateFragmentReader("<Root>21<!-- Comment inbetween-->00-02-29T23:59:59.9999999+13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset58()
{
var reader = Utils.CreateFragmentReader("<Root>3000-02-29T23:59:<!-- Comment inbetween-->9.999999999999-13:60</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset59()
{
var reader = Utils.CreateFragmentReader("<Root>001-01-01T0<?a?>0:00:00<!-- Comment inbetween-->+00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset6()
{
var reader = Utils.CreateFragmentReader("<Root> <!-- Comment inbetween-->0002-01-01T00:00:00+00:00 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(2, 1, 1, 0, 0, 0, DateTimeKind.Utc)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset60()
{
var reader = Utils.CreateFragmentReader("<Root>0001-<![CDATA[0<!-- Comment inbetween-->1]]>-01T0<?a?>0:00:00</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Throws<XmlException>(() => reader.ReadContentAs(typeof(DateTimeOffset), null));
}
[Fact]
public static void ReadContentAsDateTimeOffset7()
{
var reader = Utils.CreateFragmentReader("<Root>99<!-- Comment inbetween-->99-1<?a?>2-31T1<![CDATA[2]]>:59:59</Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 12, 31, 12, 59, 59, DateTimeKind.Local)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset8()
{
var reader = Utils.CreateFragmentReader("<Root> 999<!-- Comment inbetween-->9 </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(9999, 1, 1, 0, 0, 0, DateTimeKind.Local)), reader.ReadContentAsDateTimeOffset());
}
[Fact]
public static void ReadContentAsDateTimeOffset9()
{
var reader = Utils.CreateFragmentReader("<Root> <![CDATA[0]]>001Z </Root>");
reader.PositionOnElement("Root");
reader.Read();
Assert.Equal(new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)), reader.ReadContentAsDateTimeOffset());
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<ILLinkTrimAssembly>false</ILLinkTrimAssembly>
<NoWarn>$(NoWarn);CS3001</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="EventSourceGenerator.cs" />
<Compile Include="EventSourceGenerator.Emitter.cs" />
<Compile Include="EventSourceGenerator.Parser.cs" />
<Compile Include="$(CommonPath)\Roslyn\GetBestTypeByMetadataName.cs" Link="Common\Roslyn\GetBestTypeByMetadataName.cs" />
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<ILLinkTrimAssembly>false</ILLinkTrimAssembly>
<NoWarn>$(NoWarn);CS3001</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="EventSourceGenerator.cs" />
<Compile Include="EventSourceGenerator.Emitter.cs" />
<Compile Include="EventSourceGenerator.Parser.cs" />
<Compile Include="$(CommonPath)\Roslyn\GetBestTypeByMetadataName.cs" Link="Common\Roslyn\GetBestTypeByMetadataName.cs" />
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Fakes/ClassWithAbstractClassConstraint.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes
{
public class ClassWithAbstractClassConstraint<T> : IFakeOpenGenericService<T>
where T : AbstractClass
{
public ClassWithAbstractClassConstraint(T value) => Value = value;
public T Value { get; }
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes
{
public class ClassWithAbstractClassConstraint<T> : IFakeOpenGenericService<T>
where T : AbstractClass
{
public ClassWithAbstractClassConstraint(T value) => Value = value;
public T Value { get; }
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/jit64/regress/vsw/286991/test.il
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern mscorlib {}
.assembly test {}
.method public static int32 Main()
{
.entrypoint
ldc.i4 0x40
call int32 isupper(int32)
ldc.i4 100
add
ret
}
.method public static pinvokeimpl("msvcrt.dll" cdecl)
int32 isupper(int32) cil managed preservesig
{
.custom instance void [mscorlib]System.Security.SuppressUnmanagedCodeSecurityAttribute::.ctor() = ( 01 00 00 00 )
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern mscorlib {}
.assembly test {}
.method public static int32 Main()
{
.entrypoint
ldc.i4 0x40
call int32 isupper(int32)
ldc.i4 100
add
ret
}
.method public static pinvokeimpl("msvcrt.dll" cdecl)
int32 isupper(int32) cil managed preservesig
{
.custom instance void [mscorlib]System.Security.SuppressUnmanagedCodeSecurityAttribute::.ctor() = ( 01 00 00 00 )
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.EventLog.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'" />
<Compile Include="System.Diagnostics.EventLog.netframework.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.TraceSource\ref\System.Diagnostics.TraceSource.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFramework)' != '$(NetCoreAppCurrent)'">
<Reference Include="System.ComponentModel.Primitives" />
<Reference Include="System.ComponentModel.TypeConverter" />
<Reference Include="System.Diagnostics.TraceSource" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Security.Principal.Windows" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" PrivateAssets="all" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.EventLog.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'" />
<Compile Include="System.Diagnostics.EventLog.netframework.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.TraceSource\ref\System.Diagnostics.TraceSource.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFramework)' != '$(NetCoreAppCurrent)'">
<Reference Include="System.ComponentModel.Primitives" />
<Reference Include="System.ComponentModel.TypeConverter" />
<Reference Include="System.Diagnostics.TraceSource" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Security.Principal.Windows" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" PrivateAssets="all" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/coreclr/utilcode/stacktrace.cpp
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
#include "stdafx.h"
#include "stacktrace.h"
#include <imagehlp.h>
#include "corhlpr.h"
#include "utilcode.h"
#include "pedecoder.h" // for IMAGE_FILE_MACHINE_NATIVE
#include <minipal/utils.h>
//This is a workaround. We need to work with the debugger team to figure
//out how the module handle of the CLR can be found in a SxS safe way.
HMODULE GetCLRModuleHack()
{
static HMODULE s_hModCLR = 0;
if (!s_hModCLR)
{
s_hModCLR = GetModuleHandleA(MAIN_CLR_DLL_NAME_A);
}
return s_hModCLR;
}
HINSTANCE LoadImageHlp()
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled.
return LoadLibraryExA("imagehlp.dll", NULL, 0);
}
HINSTANCE LoadDbgHelp()
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled.
return LoadLibraryExA("dbghelp.dll", NULL, 0);
}
/****************************************************************************
* SymCallback *
*---------------------*
* Description:
* Callback for imghelp.
****************************************************************************/
BOOL __stdcall SymCallback
(
HANDLE hProcess,
ULONG ActionCode,
PVOID CallbackData,
PVOID UserContext
)
{
WRAPPER_NO_CONTRACT;
switch (ActionCode)
{
case CBA_DEBUG_INFO:
OutputDebugStringA("IMGHLP: ");
OutputDebugStringA((LPCSTR) CallbackData);
OutputDebugStringA("\n");
break;
case CBA_DEFERRED_SYMBOL_LOAD_START:
OutputDebugStringA("IMGHLP: Deferred symbol load start ");
OutputDebugStringA(((IMAGEHLP_DEFERRED_SYMBOL_LOAD*)CallbackData)->FileName);
OutputDebugStringA("\n");
break;
case CBA_DEFERRED_SYMBOL_LOAD_COMPLETE:
OutputDebugStringA("IMGHLP: Deferred symbol load complete ");
OutputDebugStringA(((IMAGEHLP_DEFERRED_SYMBOL_LOAD*)CallbackData)->FileName);
OutputDebugStringA("\n");
break;
case CBA_DEFERRED_SYMBOL_LOAD_FAILURE:
OutputDebugStringA("IMGHLP: Deferred symbol load failure ");
OutputDebugStringA(((IMAGEHLP_DEFERRED_SYMBOL_LOAD*)CallbackData)->FileName);
OutputDebugStringA("\n");
break;
case CBA_DEFERRED_SYMBOL_LOAD_PARTIAL:
OutputDebugStringA("IMGHLP: Deferred symbol load partial ");
OutputDebugStringA(((IMAGEHLP_DEFERRED_SYMBOL_LOAD*)CallbackData)->FileName);
OutputDebugStringA("\n");
break;
}
return FALSE;
}
// @TODO_IA64: all of this stack trace stuff is pretty much broken on 64-bit
// right now because this code doesn't use the new SymXxxx64 functions.
#define LOCAL_ASSERT(x)
//
//--- Macros ------------------------------------------------------------------
//
//
// Types and Constants --------------------------------------------------------
//
struct SYM_INFO
{
DWORD_PTR dwOffset;
char achModule[cchMaxAssertModuleLen];
char achSymbol[cchMaxAssertSymbolLen];
};
//--- Function Pointers to APIs in IMAGEHLP.DLL. Loaded dynamically. ---------
typedef LPAPI_VERSION (__stdcall *pfnImgHlp_ImagehlpApiVersionEx)(
LPAPI_VERSION AppVersion
);
typedef BOOL (__stdcall *pfnImgHlp_StackWalk)(
DWORD MachineType,
HANDLE hProcess,
HANDLE hThread,
LPSTACKFRAME StackFrame,
LPVOID ContextRecord,
PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
PTRANSLATE_ADDRESS_ROUTINE TranslateAddress
);
#ifdef HOST_64BIT
typedef DWORD64 (__stdcall *pfnImgHlp_SymGetModuleBase64)(
IN HANDLE hProcess,
IN DWORD64 dwAddr
);
typedef IMAGEHLP_SYMBOL64 PLAT_IMAGEHLP_SYMBOL;
typedef IMAGEHLP_MODULE64 PLAT_IMAGEHLP_MODULE;
#else
typedef IMAGEHLP_SYMBOL PLAT_IMAGEHLP_SYMBOL;
typedef IMAGEHLP_MODULE PLAT_IMAGEHLP_MODULE;
#endif
#undef IMAGEHLP_SYMBOL
#undef IMAGEHLP_MODULE
typedef BOOL (__stdcall *pfnImgHlp_SymGetModuleInfo)(
IN HANDLE hProcess,
IN DWORD_PTR dwAddr,
OUT PLAT_IMAGEHLP_MODULE* ModuleInfo
);
typedef LPVOID (__stdcall *pfnImgHlp_SymFunctionTableAccess)(
HANDLE hProcess,
DWORD_PTR AddrBase
);
typedef BOOL (__stdcall *pfnImgHlp_SymGetSymFromAddr)(
IN HANDLE hProcess,
IN DWORD_PTR dwAddr,
OUT DWORD_PTR* pdwDisplacement,
OUT PLAT_IMAGEHLP_SYMBOL* Symbol
);
typedef BOOL (__stdcall *pfnImgHlp_SymInitialize)(
IN HANDLE hProcess,
IN LPSTR UserSearchPath,
IN BOOL fInvadeProcess
);
typedef BOOL (__stdcall *pfnImgHlp_SymUnDName)(
IN PLAT_IMAGEHLP_SYMBOL* sym, // Symbol to undecorate
OUT LPSTR UnDecName, // Buffer to store undecorated name in
IN DWORD UnDecNameLength // Size of the buffer
);
typedef BOOL (__stdcall *pfnImgHlp_SymLoadModule)(
IN HANDLE hProcess,
IN HANDLE hFile,
IN PSTR ImageName,
IN PSTR ModuleName,
IN DWORD_PTR BaseOfDll,
IN DWORD SizeOfDll
);
typedef BOOL (_stdcall *pfnImgHlp_SymRegisterCallback)(
IN HANDLE hProcess,
IN PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
IN PVOID UserContext
);
typedef DWORD (_stdcall *pfnImgHlp_SymSetOptions)(
IN DWORD SymOptions
);
typedef DWORD (_stdcall *pfnImgHlp_SymGetOptions)(
);
struct IMGHLPFN_LOAD
{
LPCSTR pszFnName;
LPVOID * ppvfn;
};
#if defined(HOST_64BIT)
typedef void (*pfn_GetRuntimeStackWalkInfo)(
IN ULONG64 ControlPc,
OUT UINT_PTR* pModuleBase,
OUT UINT_PTR* pFuncEntry
);
#endif // HOST_64BIT
//
// Globals --------------------------------------------------------------------
//
static BOOL g_fLoadedImageHlp = FALSE; // set to true on success
static BOOL g_fLoadedImageHlpFailed = FALSE; // set to true on failure
static HINSTANCE g_hinstImageHlp = NULL;
static HINSTANCE g_hinstDbgHelp = NULL;
static HANDLE g_hProcess = NULL;
pfnImgHlp_ImagehlpApiVersionEx _ImagehlpApiVersionEx;
pfnImgHlp_StackWalk _StackWalk;
pfnImgHlp_SymGetModuleInfo _SymGetModuleInfo;
pfnImgHlp_SymFunctionTableAccess _SymFunctionTableAccess;
pfnImgHlp_SymGetSymFromAddr _SymGetSymFromAddr;
pfnImgHlp_SymInitialize _SymInitialize;
pfnImgHlp_SymUnDName _SymUnDName;
pfnImgHlp_SymLoadModule _SymLoadModule;
pfnImgHlp_SymRegisterCallback _SymRegisterCallback;
pfnImgHlp_SymSetOptions _SymSetOptions;
pfnImgHlp_SymGetOptions _SymGetOptions;
#if defined(HOST_64BIT)
pfn_GetRuntimeStackWalkInfo _GetRuntimeStackWalkInfo;
#endif // HOST_64BIT
IMGHLPFN_LOAD ailFuncList[] =
{
{ "ImagehlpApiVersionEx", (LPVOID*)&_ImagehlpApiVersionEx },
{ "StackWalk", (LPVOID*)&_StackWalk },
{ "SymGetModuleInfo", (LPVOID*)&_SymGetModuleInfo },
{ "SymFunctionTableAccess", (LPVOID*)&_SymFunctionTableAccess },
{ "SymGetSymFromAddr", (LPVOID*)&_SymGetSymFromAddr },
{ "SymInitialize", (LPVOID*)&_SymInitialize },
{ "SymUnDName", (LPVOID*)&_SymUnDName },
{ "SymLoadModule", (LPVOID*)&_SymLoadModule },
{ "SymRegisterCallback", (LPVOID*)&_SymRegisterCallback },
{ "SymSetOptions", (LPVOID*)&_SymSetOptions },
{ "SymGetOptions", (LPVOID*)&_SymGetOptions },
};
/****************************************************************************
* FillSymbolSearchPath *
*----------------------*
* Description:
* Manually pick out all the symbol path information we need for a real
* stack trace to work. This includes the default NT symbol paths and
* places on a VBL build machine where they should live.
****************************************************************************/
#define MAX_SYM_PATH (1024*8)
#define DEFAULT_SYM_PATH W("symsrv*symsrv.dll*\\\\symbols\\symbols;")
#define STR_ENGINE_NAME MAIN_CLR_DLL_NAME_W
LPSTR FillSymbolSearchPathThrows(CQuickBytes &qb)
{
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled.
#ifndef DACCESS_COMPILE
// not allowed to do allocation if current thread suspends EE.
if (IsSuspendEEThread ())
return NULL;
#endif
InlineSString<MAX_SYM_PATH> rcBuff ; // Working buffer
int chTotal = 0; // How full is working buffer.
int ch;
// If the NT symbol server path vars are there, then use those.
chTotal = WszGetEnvironmentVariable(W("_NT_SYMBOL_PATH"), rcBuff);
if (chTotal + 1 < MAX_SYM_PATH)
rcBuff.Append(W(';'));
// Copy the defacto NT symbol path as well.
size_t sympathLength = chTotal + ARRAY_SIZE(DEFAULT_SYM_PATH) + 1;
// integer overflow occurred
if (sympathLength < (size_t)chTotal || sympathLength < ARRAY_SIZE(DEFAULT_SYM_PATH))
{
return NULL;
}
if (sympathLength < MAX_SYM_PATH)
{
rcBuff.Append(DEFAULT_SYM_PATH);
chTotal = rcBuff.GetCount();
}
// Next, if there is a URTTARGET, add that since that is where ndpsetup places
// your symobls on an install.
PathString rcBuffTemp;
ch = WszGetEnvironmentVariable(W("URTTARGET"), rcBuffTemp);
rcBuff.Append(rcBuffTemp);
if (ch != 0 && (chTotal + ch + 1 < MAX_SYM_PATH))
{
size_t chNewTotal = chTotal + ch;
if (chNewTotal < (size_t)chTotal || chNewTotal < (size_t)ch)
{ // integer overflow occurred
return NULL;
}
chTotal += ch;
rcBuff.Append(W(';'));
}
#ifndef SELF_NO_HOST
// Fetch the path location of the engine dll and add that path as well, just
// in case URTARGET didn't cut it either.
// For no-host builds of utilcode, we don't necessarily have an engine DLL in the
// process, so skip this part.
ch = WszGetModuleFileName(GetCLRModuleHack(), rcBuffTemp);
size_t pathLocationLength = chTotal + ch + 1;
// integer overflow occurred
if (pathLocationLength < (size_t)chTotal || pathLocationLength < (size_t)ch)
{
return NULL;
}
if (ch != 0 && (pathLocationLength < MAX_SYM_PATH))
{
chTotal = chTotal + ch - ARRAY_SIZE(STR_ENGINE_NAME);
rcBuff.Append(W(';'));
}
#endif
// Now we have a working buffer with a bunch of interesting stuff. Time
// to convert it back to ansi for the imagehlp api's. Allocate the buffer
// 2x bigger to handle worst case for MBCS.
ch = ::WszWideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, rcBuff, -1, 0, 0, 0, 0);
LPSTR szRtn = (LPSTR) qb.AllocNoThrow(ch + 1);
if (!szRtn)
return NULL;
WszWideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, rcBuff, -1, szRtn, ch+1, 0, 0);
return (szRtn);
}
LPSTR FillSymbolSearchPath(CQuickBytes &qb)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled.
LPSTR retval;
HRESULT hr = S_OK;
EX_TRY
{
retval = FillSymbolSearchPathThrows(qb);
}
EX_CATCH_HRESULT(hr);
if (hr != S_OK)
{
SetLastError(hr);
retval = NULL;
}
return retval;
}
/****************************************************************************
* MagicInit *
*-----------*
* Description:
* Initializes the symbol loading code. Currently called (if necessary)
* at the beginning of each method that might need ImageHelp to be
* loaded.
****************************************************************************/
void MagicInit()
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
if (g_fLoadedImageHlp || g_fLoadedImageHlpFailed)
{
return;
}
g_hProcess = GetCurrentProcess();
if (g_hinstDbgHelp == NULL)
{
g_hinstDbgHelp = LoadDbgHelp();
}
if (NULL == g_hinstDbgHelp)
{
// Imagehlp.dll has dependency on dbghelp.dll through delay load.
// If dbghelp.dll is not available, Imagehlp.dll initializes API's like ImageApiVersionEx to
// some dummy function. Then we AV when we use data from _ImagehlpApiVersionEx
g_fLoadedImageHlpFailed = TRUE;
return;
}
//
// Try to load imagehlp.dll
//
if (g_hinstImageHlp == NULL) {
g_hinstImageHlp = LoadImageHlp();
}
LOCAL_ASSERT(g_hinstImageHlp);
if (NULL == g_hinstImageHlp)
{
g_fLoadedImageHlpFailed = TRUE;
return;
}
//
// Try to get the API entrypoints in imagehlp.dll
//
for (int i = 0; i < ARRAY_SIZE(ailFuncList); i++)
{
*(ailFuncList[i].ppvfn) = GetProcAddress(
g_hinstImageHlp,
ailFuncList[i].pszFnName);
LOCAL_ASSERT(*(ailFuncList[i].ppvfn));
if (!*(ailFuncList[i].ppvfn))
{
g_fLoadedImageHlpFailed = TRUE;
return;
}
}
API_VERSION AppVersion = { 4, 0, API_VERSION_NUMBER, 0 };
LPAPI_VERSION papiver = _ImagehlpApiVersionEx(&AppVersion);
//
// We assume any version 4 or greater is OK.
//
LOCAL_ASSERT(papiver->Revision >= 4);
if (papiver->Revision < 4)
{
g_fLoadedImageHlpFailed = TRUE;
return;
}
g_fLoadedImageHlp = TRUE;
//
// Initialize imagehlp.dll. A NULL search path is supposed to resolve
// symbols but never works. So pull in everything and put some additional
// hints that might help out a dev box.
//
_SymSetOptions(_SymGetOptions() | SYMOPT_DEFERRED_LOADS|SYMOPT_DEBUG);
#ifndef HOST_64BIT
_SymRegisterCallback(g_hProcess, SymCallback, 0);
#endif
CQuickBytes qbSearchPath;
LPSTR szSearchPath = FillSymbolSearchPath(qbSearchPath);
_SymInitialize(g_hProcess, szSearchPath, TRUE);
return;
}
/****************************************************************************
* FillSymbolInfo *
*----------------*
* Description:
* Fills in a SYM_INFO structure
****************************************************************************/
void FillSymbolInfo
(
SYM_INFO *psi,
DWORD_PTR dwAddr
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
if (!g_fLoadedImageHlp)
{
return;
}
LOCAL_ASSERT(psi);
memset(psi, 0, sizeof(SYM_INFO));
PLAT_IMAGEHLP_MODULE mi;
mi.SizeOfStruct = sizeof(mi);
if (!_SymGetModuleInfo(g_hProcess, dwAddr, &mi))
{
strcpy_s(psi->achModule, ARRAY_SIZE(psi->achModule), "<no module>");
}
else
{
strcpy_s(psi->achModule, ARRAY_SIZE(psi->achModule), mi.ModuleName);
_strupr_s(psi->achModule, ARRAY_SIZE(psi->achModule));
}
CHAR rgchUndec[256];
const CHAR * pszSymbol = NULL;
// Name field of IMAGEHLP_SYMBOL is dynamically sized.
// Pad with space for 255 characters.
union
{
CHAR rgchSymbol[sizeof(PLAT_IMAGEHLP_SYMBOL) + 255];
PLAT_IMAGEHLP_SYMBOL sym;
};
__try
{
sym.SizeOfStruct = sizeof(PLAT_IMAGEHLP_SYMBOL);
sym.Address = dwAddr;
sym.MaxNameLength = 255;
if (_SymGetSymFromAddr(g_hProcess, dwAddr, &psi->dwOffset, &sym))
{
pszSymbol = sym.Name;
if (_SymUnDName(&sym, rgchUndec, STRING_LENGTH(rgchUndec)))
{
pszSymbol = rgchUndec;
}
}
else
{
pszSymbol = "<no symbol>";
}
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
pszSymbol = "<EX: no symbol>";
psi->dwOffset = dwAddr - mi.BaseOfImage;
}
strcpy_s(psi->achSymbol, ARRAY_SIZE(psi->achSymbol), pszSymbol);
}
/****************************************************************************
* FunctionTableAccess *
*---------------------*
* Description:
* Helper for imagehlp's StackWalk API.
****************************************************************************/
LPVOID __stdcall FunctionTableAccess
(
HANDLE hProcess,
DWORD_PTR dwPCAddr
)
{
WRAPPER_NO_CONTRACT;
HANDLE hFuncEntry = _SymFunctionTableAccess( hProcess, dwPCAddr );
#if defined(HOST_64BIT)
if (hFuncEntry == NULL)
{
if (_GetRuntimeStackWalkInfo == NULL)
{
_GetRuntimeStackWalkInfo = (pfn_GetRuntimeStackWalkInfo)
GetProcAddress(GetCLRModuleHack(), "GetRuntimeStackWalkInfo");
if (_GetRuntimeStackWalkInfo == NULL)
return NULL;
}
_GetRuntimeStackWalkInfo((ULONG64)dwPCAddr, NULL, (UINT_PTR*)(&hFuncEntry));
}
#endif // HOST_64BIT
return hFuncEntry;
}
/****************************************************************************
* GetModuleBase *
*---------------*
* Description:
* Helper for imagehlp's StackWalk API. Retrieves the base address of
* the module containing the giving virtual address.
*
* NOTE: If the module information for the given module hasnot yet been
* loaded, then it is loaded on this call.
*
* Return:
* Base virtual address where the module containing ReturnAddress is
* loaded, or 0 if the address cannot be determined.
****************************************************************************/
DWORD_PTR __stdcall GetModuleBase
(
HANDLE hProcess,
DWORD_PTR dwAddr
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
PLAT_IMAGEHLP_MODULE ModuleInfo;
ModuleInfo.SizeOfStruct = sizeof(ModuleInfo);
if (_SymGetModuleInfo(hProcess, dwAddr, &ModuleInfo))
{
return ModuleInfo.BaseOfImage;
}
else
{
MEMORY_BASIC_INFORMATION mbi;
if (VirtualQueryEx(hProcess, (LPVOID)dwAddr, &mbi, sizeof(mbi)))
{
if (mbi.Type & MEM_IMAGE)
{
char achFile[MAX_LONGPATH] = {0};
DWORD cch;
cch = GetModuleFileNameA(
(HINSTANCE)mbi.AllocationBase,
achFile,
MAX_LONGPATH);
// Ignore the return code since we can't do anything with it.
_SymLoadModule(
hProcess,
NULL,
((cch) ? achFile : NULL),
NULL,
(DWORD_PTR)mbi.AllocationBase,
0);
return (DWORD_PTR)mbi.AllocationBase;
}
}
}
#if defined(HOST_64BIT)
if (_GetRuntimeStackWalkInfo == NULL)
{
_GetRuntimeStackWalkInfo = (pfn_GetRuntimeStackWalkInfo)
GetProcAddress(GetCLRModuleHack(), "GetRuntimeStackWalkInfo");
if (_GetRuntimeStackWalkInfo == NULL)
return NULL;
}
DWORD_PTR moduleBase;
_GetRuntimeStackWalkInfo((ULONG64)dwAddr, (UINT_PTR*)&moduleBase, NULL);
if (moduleBase != NULL)
return moduleBase;
#endif // HOST_64BIT
return 0;
}
#if !defined(DACCESS_COMPILE)
/****************************************************************************
* GetStackBacktrace *
*-------------------*
* Description:
* Gets a stacktrace of the current stack, including symbols.
*
* Return:
* The number of elements actually retrieved.
****************************************************************************/
UINT GetStackBacktrace
(
UINT ifrStart, // How many stack elements to skip before starting.
UINT cfrTotal, // How many elements to trace after starting.
DWORD_PTR* pdwEip, // Array to be filled with stack addresses.
SYM_INFO* psiSymbols, // This array is filled with symbol information.
// It should be big enough to hold cfrTotal elts.
// If NULL, no symbol information is stored.
CONTEXT * pContext // Context to use (or NULL to use current)
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
UINT nElements = 0;
DWORD_PTR* pdw = pdwEip;
SYM_INFO* psi = psiSymbols;
MagicInit();
memset(pdwEip, 0, cfrTotal*sizeof(DWORD_PTR));
if (psiSymbols)
{
memset(psiSymbols, 0, cfrTotal * sizeof(SYM_INFO));
}
if (!g_fLoadedImageHlp)
{
return 0;
}
CONTEXT context;
if (pContext == NULL)
{
ClrCaptureContext(&context);
}
else
{
memcpy(&context, pContext, sizeof(CONTEXT));
}
#ifdef HOST_64BIT
STACKFRAME64 stkfrm;
memset(&stkfrm, 0, sizeof(STACKFRAME64));
#else
STACKFRAME stkfrm;
memset(&stkfrm, 0, sizeof(STACKFRAME));
#endif
stkfrm.AddrPC.Mode = AddrModeFlat;
stkfrm.AddrStack.Mode = AddrModeFlat;
stkfrm.AddrFrame.Mode = AddrModeFlat;
#if defined(_M_IX86)
stkfrm.AddrPC.Offset = context.Eip;
stkfrm.AddrStack.Offset = context.Esp;
stkfrm.AddrFrame.Offset = context.Ebp; // Frame Pointer
#endif
#ifndef HOST_X86
// If we don't have a user-supplied context, then don't skip any frames.
// So ignore this function (GetStackBackTrace)
// ClrCaptureContext on x86 gives us the ESP/EBP/EIP of its caller's caller
// so we don't need to do this.
if (pContext == NULL)
{
ifrStart += 1;
}
#endif // !HOST_X86
for (UINT i = 0; i < ifrStart + cfrTotal; i++)
{
if (!_StackWalk(IMAGE_FILE_MACHINE_NATIVE,
g_hProcess,
GetCurrentThread(),
&stkfrm,
&context,
NULL,
(PFUNCTION_TABLE_ACCESS_ROUTINE)FunctionTableAccess,
(PGET_MODULE_BASE_ROUTINE)GetModuleBase,
NULL))
{
break;
}
if (i >= ifrStart)
{
*pdw++ = stkfrm.AddrPC.Offset;
nElements++;
if (psi)
{
FillSymbolInfo(psi++, stkfrm.AddrPC.Offset);
}
}
}
LOCAL_ASSERT(nElements == (UINT)(pdw - pdwEip));
return nElements;
}
#endif // !defined(DACCESS_COMPILE)
/****************************************************************************
* GetStringFromSymbolInfo *
*-------------------------*
* Description:
* Actually prints the info into the string for the symbol.
****************************************************************************/
#ifdef HOST_64BIT
#define FMT_ADDR_BARE "%08x`%08x"
#define FMT_ADDR_OFFSET "%llX"
#else
#define FMT_ADDR_BARE "%08x"
#define FMT_ADDR_OFFSET "%lX"
#endif
void GetStringFromSymbolInfo
(
DWORD_PTR dwAddr,
SYM_INFO *psi, // @parm Pointer to SYMBOL_INFO. Can be NULL.
__out_ecount (cchMaxAssertStackLevelStringLen) CHAR *pszString // @parm Place to put string.
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
LOCAL_ASSERT(pszString);
// <module>! <symbol> + 0x<offset> 0x<addr>\n
if (psi)
{
sprintf_s(pszString,
cchMaxAssertStackLevelStringLen,
"%s! %s + 0x" FMT_ADDR_OFFSET " (0x" FMT_ADDR_BARE ")",
(psi->achModule[0]) ? psi->achModule : "<no module>",
(psi->achSymbol[0]) ? psi->achSymbol : "<no symbol>",
psi->dwOffset,
DBG_ADDR(dwAddr));
}
else
{
sprintf_s(pszString, cchMaxAssertStackLevelStringLen, "<symbols not available> (0x%p)", (void *)dwAddr);
}
LOCAL_ASSERT(strlen(pszString) < cchMaxAssertStackLevelStringLen);
}
#if !defined(DACCESS_COMPILE)
/****************************************************************************
* GetStringFromStackLevels *
*--------------------------*
* Description:
* Retrieves a string from the stack frame. If more than one frame, they
* are separated by newlines
****************************************************************************/
void GetStringFromStackLevels
(
UINT ifrStart, // @parm How many stack elements to skip before starting.
UINT cfrTotal, // @parm How many elements to trace after starting.
// Can't be more than cfrMaxAssertStackLevels.
__out_ecount(cchMaxAssertStackLevelStringLen * cfrTotal) CHAR *pszString, // @parm Place to put string.
// Max size will be cchMaxAssertStackLevelStringLen * cfrTotal.
CONTEXT * pContext // @parm Context to start the stack trace at; null for current context.
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
LOCAL_ASSERT(pszString);
LOCAL_ASSERT(cfrTotal < cfrMaxAssertStackLevels);
*pszString = '\0';
if (cfrTotal == 0)
{
return;
}
DWORD_PTR rgdwStackAddrs[cfrMaxAssertStackLevels];
SYM_INFO rgsi[cfrMaxAssertStackLevels];
// Ignore this function (GetStringFromStackLevels) if we don't have a user-supplied context.
if (pContext == NULL)
{
ifrStart += 1;
}
UINT uiRetrieved =
GetStackBacktrace(ifrStart, cfrTotal, rgdwStackAddrs, rgsi, pContext);
// First level
CHAR aszLevel[cchMaxAssertStackLevelStringLen];
GetStringFromSymbolInfo(rgdwStackAddrs[0], &rgsi[0], aszLevel);
size_t bufSize = cchMaxAssertStackLevelStringLen * cfrTotal;
strcpy_s(pszString, bufSize, aszLevel);
// Additional levels
for (UINT i = 1; i < uiRetrieved; ++i)
{
strcat_s(pszString, bufSize, "\n");
GetStringFromSymbolInfo(rgdwStackAddrs[i],
&rgsi[i], aszLevel);
strcat_s(pszString, bufSize, aszLevel);
}
LOCAL_ASSERT(strlen(pszString) <= cchMaxAssertStackLevelStringLen * cfrTotal);
}
#endif // !defined(DACCESS_COMPILE)
/****************************************************************************
* GetStringFromAddr *
*-------------------*
* Description:
* Returns a string from an address.
****************************************************************************/
void GetStringFromAddr
(
DWORD_PTR dwAddr,
_Out_writes_(cchMaxAssertStackLevelStringLen) LPSTR szString // Place to put string.
// Buffer must hold at least cchMaxAssertStackLevelStringLen.
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
LOCAL_ASSERT(szString);
SYM_INFO si;
FillSymbolInfo(&si, dwAddr);
sprintf_s(szString,
cchMaxAssertStackLevelStringLen,
"%s! %s + 0x%p (0x%p)",
(si.achModule[0]) ? si.achModule : "<no module>",
(si.achSymbol[0]) ? si.achSymbol : "<no symbol>",
(void*)si.dwOffset,
(void*)dwAddr);
}
/****************************************************************************
* MagicDeinit *
*-------------*
* Description:
* Cleans up for the symbol loading code. Should be called before exit
* to free the dynamically loaded imagehlp.dll.
****************************************************************************/
void MagicDeinit(void)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
if (g_hinstImageHlp)
{
FreeLibrary(g_hinstImageHlp);
g_hinstImageHlp = NULL;
g_fLoadedImageHlp = FALSE;
}
}
#if defined(HOST_X86)
/****************************************************************************
* ClrCaptureContext *
*-------------------*
* Description:
* Exactly the contents of RtlCaptureContext for Win7 - Win2K doesn't
* support this, so we need it for CoreCLR 4, if we require Win2K support
****************************************************************************/
extern "C" __declspec(naked) void __stdcall
ClrCaptureContext(_Out_ PCONTEXT ctx)
{
__asm {
push ebx;
mov ebx,dword ptr [esp+8]
mov dword ptr [ebx+0B0h],eax
mov dword ptr [ebx+0ACh],ecx
mov dword ptr [ebx+0A8h],edx
mov eax,dword ptr [esp]
mov dword ptr [ebx+0A4h],eax
mov dword ptr [ebx+0A0h],esi
mov dword ptr [ebx+09Ch],edi
mov word ptr [ebx+0BCh],cs
mov word ptr [ebx+098h],ds
mov word ptr [ebx+094h],es
mov word ptr [ebx+090h],fs
mov word ptr [ebx+08Ch],gs
mov word ptr [ebx+0C8h],ss
pushfd
pop dword ptr [ebx+0C0h]
mov eax,dword ptr [ebp+4]
mov dword ptr [ebx+0B8h],eax
mov eax,dword ptr [ebp]
mov dword ptr [ebx+0B4h],eax
lea eax,[ebp+8]
mov dword ptr [ebx+0C4h],eax
mov dword ptr [ebx],10007h
pop ebx
ret 4
}
}
#endif // HOST_X86
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
#include "stdafx.h"
#include "stacktrace.h"
#include <imagehlp.h>
#include "corhlpr.h"
#include "utilcode.h"
#include "pedecoder.h" // for IMAGE_FILE_MACHINE_NATIVE
#include <minipal/utils.h>
//This is a workaround. We need to work with the debugger team to figure
//out how the module handle of the CLR can be found in a SxS safe way.
HMODULE GetCLRModuleHack()
{
static HMODULE s_hModCLR = 0;
if (!s_hModCLR)
{
s_hModCLR = GetModuleHandleA(MAIN_CLR_DLL_NAME_A);
}
return s_hModCLR;
}
HINSTANCE LoadImageHlp()
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled.
return LoadLibraryExA("imagehlp.dll", NULL, 0);
}
HINSTANCE LoadDbgHelp()
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled.
return LoadLibraryExA("dbghelp.dll", NULL, 0);
}
/****************************************************************************
* SymCallback *
*---------------------*
* Description:
* Callback for imghelp.
****************************************************************************/
BOOL __stdcall SymCallback
(
HANDLE hProcess,
ULONG ActionCode,
PVOID CallbackData,
PVOID UserContext
)
{
WRAPPER_NO_CONTRACT;
switch (ActionCode)
{
case CBA_DEBUG_INFO:
OutputDebugStringA("IMGHLP: ");
OutputDebugStringA((LPCSTR) CallbackData);
OutputDebugStringA("\n");
break;
case CBA_DEFERRED_SYMBOL_LOAD_START:
OutputDebugStringA("IMGHLP: Deferred symbol load start ");
OutputDebugStringA(((IMAGEHLP_DEFERRED_SYMBOL_LOAD*)CallbackData)->FileName);
OutputDebugStringA("\n");
break;
case CBA_DEFERRED_SYMBOL_LOAD_COMPLETE:
OutputDebugStringA("IMGHLP: Deferred symbol load complete ");
OutputDebugStringA(((IMAGEHLP_DEFERRED_SYMBOL_LOAD*)CallbackData)->FileName);
OutputDebugStringA("\n");
break;
case CBA_DEFERRED_SYMBOL_LOAD_FAILURE:
OutputDebugStringA("IMGHLP: Deferred symbol load failure ");
OutputDebugStringA(((IMAGEHLP_DEFERRED_SYMBOL_LOAD*)CallbackData)->FileName);
OutputDebugStringA("\n");
break;
case CBA_DEFERRED_SYMBOL_LOAD_PARTIAL:
OutputDebugStringA("IMGHLP: Deferred symbol load partial ");
OutputDebugStringA(((IMAGEHLP_DEFERRED_SYMBOL_LOAD*)CallbackData)->FileName);
OutputDebugStringA("\n");
break;
}
return FALSE;
}
// @TODO_IA64: all of this stack trace stuff is pretty much broken on 64-bit
// right now because this code doesn't use the new SymXxxx64 functions.
#define LOCAL_ASSERT(x)
//
//--- Macros ------------------------------------------------------------------
//
//
// Types and Constants --------------------------------------------------------
//
struct SYM_INFO
{
DWORD_PTR dwOffset;
char achModule[cchMaxAssertModuleLen];
char achSymbol[cchMaxAssertSymbolLen];
};
//--- Function Pointers to APIs in IMAGEHLP.DLL. Loaded dynamically. ---------
typedef LPAPI_VERSION (__stdcall *pfnImgHlp_ImagehlpApiVersionEx)(
LPAPI_VERSION AppVersion
);
typedef BOOL (__stdcall *pfnImgHlp_StackWalk)(
DWORD MachineType,
HANDLE hProcess,
HANDLE hThread,
LPSTACKFRAME StackFrame,
LPVOID ContextRecord,
PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
PTRANSLATE_ADDRESS_ROUTINE TranslateAddress
);
#ifdef HOST_64BIT
typedef DWORD64 (__stdcall *pfnImgHlp_SymGetModuleBase64)(
IN HANDLE hProcess,
IN DWORD64 dwAddr
);
typedef IMAGEHLP_SYMBOL64 PLAT_IMAGEHLP_SYMBOL;
typedef IMAGEHLP_MODULE64 PLAT_IMAGEHLP_MODULE;
#else
typedef IMAGEHLP_SYMBOL PLAT_IMAGEHLP_SYMBOL;
typedef IMAGEHLP_MODULE PLAT_IMAGEHLP_MODULE;
#endif
#undef IMAGEHLP_SYMBOL
#undef IMAGEHLP_MODULE
typedef BOOL (__stdcall *pfnImgHlp_SymGetModuleInfo)(
IN HANDLE hProcess,
IN DWORD_PTR dwAddr,
OUT PLAT_IMAGEHLP_MODULE* ModuleInfo
);
typedef LPVOID (__stdcall *pfnImgHlp_SymFunctionTableAccess)(
HANDLE hProcess,
DWORD_PTR AddrBase
);
typedef BOOL (__stdcall *pfnImgHlp_SymGetSymFromAddr)(
IN HANDLE hProcess,
IN DWORD_PTR dwAddr,
OUT DWORD_PTR* pdwDisplacement,
OUT PLAT_IMAGEHLP_SYMBOL* Symbol
);
typedef BOOL (__stdcall *pfnImgHlp_SymInitialize)(
IN HANDLE hProcess,
IN LPSTR UserSearchPath,
IN BOOL fInvadeProcess
);
typedef BOOL (__stdcall *pfnImgHlp_SymUnDName)(
IN PLAT_IMAGEHLP_SYMBOL* sym, // Symbol to undecorate
OUT LPSTR UnDecName, // Buffer to store undecorated name in
IN DWORD UnDecNameLength // Size of the buffer
);
typedef BOOL (__stdcall *pfnImgHlp_SymLoadModule)(
IN HANDLE hProcess,
IN HANDLE hFile,
IN PSTR ImageName,
IN PSTR ModuleName,
IN DWORD_PTR BaseOfDll,
IN DWORD SizeOfDll
);
typedef BOOL (_stdcall *pfnImgHlp_SymRegisterCallback)(
IN HANDLE hProcess,
IN PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
IN PVOID UserContext
);
typedef DWORD (_stdcall *pfnImgHlp_SymSetOptions)(
IN DWORD SymOptions
);
typedef DWORD (_stdcall *pfnImgHlp_SymGetOptions)(
);
struct IMGHLPFN_LOAD
{
LPCSTR pszFnName;
LPVOID * ppvfn;
};
#if defined(HOST_64BIT)
typedef void (*pfn_GetRuntimeStackWalkInfo)(
IN ULONG64 ControlPc,
OUT UINT_PTR* pModuleBase,
OUT UINT_PTR* pFuncEntry
);
#endif // HOST_64BIT
//
// Globals --------------------------------------------------------------------
//
static BOOL g_fLoadedImageHlp = FALSE; // set to true on success
static BOOL g_fLoadedImageHlpFailed = FALSE; // set to true on failure
static HINSTANCE g_hinstImageHlp = NULL;
static HINSTANCE g_hinstDbgHelp = NULL;
static HANDLE g_hProcess = NULL;
pfnImgHlp_ImagehlpApiVersionEx _ImagehlpApiVersionEx;
pfnImgHlp_StackWalk _StackWalk;
pfnImgHlp_SymGetModuleInfo _SymGetModuleInfo;
pfnImgHlp_SymFunctionTableAccess _SymFunctionTableAccess;
pfnImgHlp_SymGetSymFromAddr _SymGetSymFromAddr;
pfnImgHlp_SymInitialize _SymInitialize;
pfnImgHlp_SymUnDName _SymUnDName;
pfnImgHlp_SymLoadModule _SymLoadModule;
pfnImgHlp_SymRegisterCallback _SymRegisterCallback;
pfnImgHlp_SymSetOptions _SymSetOptions;
pfnImgHlp_SymGetOptions _SymGetOptions;
#if defined(HOST_64BIT)
pfn_GetRuntimeStackWalkInfo _GetRuntimeStackWalkInfo;
#endif // HOST_64BIT
IMGHLPFN_LOAD ailFuncList[] =
{
{ "ImagehlpApiVersionEx", (LPVOID*)&_ImagehlpApiVersionEx },
{ "StackWalk", (LPVOID*)&_StackWalk },
{ "SymGetModuleInfo", (LPVOID*)&_SymGetModuleInfo },
{ "SymFunctionTableAccess", (LPVOID*)&_SymFunctionTableAccess },
{ "SymGetSymFromAddr", (LPVOID*)&_SymGetSymFromAddr },
{ "SymInitialize", (LPVOID*)&_SymInitialize },
{ "SymUnDName", (LPVOID*)&_SymUnDName },
{ "SymLoadModule", (LPVOID*)&_SymLoadModule },
{ "SymRegisterCallback", (LPVOID*)&_SymRegisterCallback },
{ "SymSetOptions", (LPVOID*)&_SymSetOptions },
{ "SymGetOptions", (LPVOID*)&_SymGetOptions },
};
/****************************************************************************
* FillSymbolSearchPath *
*----------------------*
* Description:
* Manually pick out all the symbol path information we need for a real
* stack trace to work. This includes the default NT symbol paths and
* places on a VBL build machine where they should live.
****************************************************************************/
#define MAX_SYM_PATH (1024*8)
#define DEFAULT_SYM_PATH W("symsrv*symsrv.dll*\\\\symbols\\symbols;")
#define STR_ENGINE_NAME MAIN_CLR_DLL_NAME_W
LPSTR FillSymbolSearchPathThrows(CQuickBytes &qb)
{
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled.
#ifndef DACCESS_COMPILE
// not allowed to do allocation if current thread suspends EE.
if (IsSuspendEEThread ())
return NULL;
#endif
InlineSString<MAX_SYM_PATH> rcBuff ; // Working buffer
int chTotal = 0; // How full is working buffer.
int ch;
// If the NT symbol server path vars are there, then use those.
chTotal = WszGetEnvironmentVariable(W("_NT_SYMBOL_PATH"), rcBuff);
if (chTotal + 1 < MAX_SYM_PATH)
rcBuff.Append(W(';'));
// Copy the defacto NT symbol path as well.
size_t sympathLength = chTotal + ARRAY_SIZE(DEFAULT_SYM_PATH) + 1;
// integer overflow occurred
if (sympathLength < (size_t)chTotal || sympathLength < ARRAY_SIZE(DEFAULT_SYM_PATH))
{
return NULL;
}
if (sympathLength < MAX_SYM_PATH)
{
rcBuff.Append(DEFAULT_SYM_PATH);
chTotal = rcBuff.GetCount();
}
// Next, if there is a URTTARGET, add that since that is where ndpsetup places
// your symobls on an install.
PathString rcBuffTemp;
ch = WszGetEnvironmentVariable(W("URTTARGET"), rcBuffTemp);
rcBuff.Append(rcBuffTemp);
if (ch != 0 && (chTotal + ch + 1 < MAX_SYM_PATH))
{
size_t chNewTotal = chTotal + ch;
if (chNewTotal < (size_t)chTotal || chNewTotal < (size_t)ch)
{ // integer overflow occurred
return NULL;
}
chTotal += ch;
rcBuff.Append(W(';'));
}
#ifndef SELF_NO_HOST
// Fetch the path location of the engine dll and add that path as well, just
// in case URTARGET didn't cut it either.
// For no-host builds of utilcode, we don't necessarily have an engine DLL in the
// process, so skip this part.
ch = WszGetModuleFileName(GetCLRModuleHack(), rcBuffTemp);
size_t pathLocationLength = chTotal + ch + 1;
// integer overflow occurred
if (pathLocationLength < (size_t)chTotal || pathLocationLength < (size_t)ch)
{
return NULL;
}
if (ch != 0 && (pathLocationLength < MAX_SYM_PATH))
{
chTotal = chTotal + ch - ARRAY_SIZE(STR_ENGINE_NAME);
rcBuff.Append(W(';'));
}
#endif
// Now we have a working buffer with a bunch of interesting stuff. Time
// to convert it back to ansi for the imagehlp api's. Allocate the buffer
// 2x bigger to handle worst case for MBCS.
ch = ::WszWideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, rcBuff, -1, 0, 0, 0, 0);
LPSTR szRtn = (LPSTR) qb.AllocNoThrow(ch + 1);
if (!szRtn)
return NULL;
WszWideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, rcBuff, -1, szRtn, ch+1, 0, 0);
return (szRtn);
}
LPSTR FillSymbolSearchPath(CQuickBytes &qb)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled.
LPSTR retval;
HRESULT hr = S_OK;
EX_TRY
{
retval = FillSymbolSearchPathThrows(qb);
}
EX_CATCH_HRESULT(hr);
if (hr != S_OK)
{
SetLastError(hr);
retval = NULL;
}
return retval;
}
/****************************************************************************
* MagicInit *
*-----------*
* Description:
* Initializes the symbol loading code. Currently called (if necessary)
* at the beginning of each method that might need ImageHelp to be
* loaded.
****************************************************************************/
void MagicInit()
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
if (g_fLoadedImageHlp || g_fLoadedImageHlpFailed)
{
return;
}
g_hProcess = GetCurrentProcess();
if (g_hinstDbgHelp == NULL)
{
g_hinstDbgHelp = LoadDbgHelp();
}
if (NULL == g_hinstDbgHelp)
{
// Imagehlp.dll has dependency on dbghelp.dll through delay load.
// If dbghelp.dll is not available, Imagehlp.dll initializes API's like ImageApiVersionEx to
// some dummy function. Then we AV when we use data from _ImagehlpApiVersionEx
g_fLoadedImageHlpFailed = TRUE;
return;
}
//
// Try to load imagehlp.dll
//
if (g_hinstImageHlp == NULL) {
g_hinstImageHlp = LoadImageHlp();
}
LOCAL_ASSERT(g_hinstImageHlp);
if (NULL == g_hinstImageHlp)
{
g_fLoadedImageHlpFailed = TRUE;
return;
}
//
// Try to get the API entrypoints in imagehlp.dll
//
for (int i = 0; i < ARRAY_SIZE(ailFuncList); i++)
{
*(ailFuncList[i].ppvfn) = GetProcAddress(
g_hinstImageHlp,
ailFuncList[i].pszFnName);
LOCAL_ASSERT(*(ailFuncList[i].ppvfn));
if (!*(ailFuncList[i].ppvfn))
{
g_fLoadedImageHlpFailed = TRUE;
return;
}
}
API_VERSION AppVersion = { 4, 0, API_VERSION_NUMBER, 0 };
LPAPI_VERSION papiver = _ImagehlpApiVersionEx(&AppVersion);
//
// We assume any version 4 or greater is OK.
//
LOCAL_ASSERT(papiver->Revision >= 4);
if (papiver->Revision < 4)
{
g_fLoadedImageHlpFailed = TRUE;
return;
}
g_fLoadedImageHlp = TRUE;
//
// Initialize imagehlp.dll. A NULL search path is supposed to resolve
// symbols but never works. So pull in everything and put some additional
// hints that might help out a dev box.
//
_SymSetOptions(_SymGetOptions() | SYMOPT_DEFERRED_LOADS|SYMOPT_DEBUG);
#ifndef HOST_64BIT
_SymRegisterCallback(g_hProcess, SymCallback, 0);
#endif
CQuickBytes qbSearchPath;
LPSTR szSearchPath = FillSymbolSearchPath(qbSearchPath);
_SymInitialize(g_hProcess, szSearchPath, TRUE);
return;
}
/****************************************************************************
* FillSymbolInfo *
*----------------*
* Description:
* Fills in a SYM_INFO structure
****************************************************************************/
void FillSymbolInfo
(
SYM_INFO *psi,
DWORD_PTR dwAddr
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
if (!g_fLoadedImageHlp)
{
return;
}
LOCAL_ASSERT(psi);
memset(psi, 0, sizeof(SYM_INFO));
PLAT_IMAGEHLP_MODULE mi;
mi.SizeOfStruct = sizeof(mi);
if (!_SymGetModuleInfo(g_hProcess, dwAddr, &mi))
{
strcpy_s(psi->achModule, ARRAY_SIZE(psi->achModule), "<no module>");
}
else
{
strcpy_s(psi->achModule, ARRAY_SIZE(psi->achModule), mi.ModuleName);
_strupr_s(psi->achModule, ARRAY_SIZE(psi->achModule));
}
CHAR rgchUndec[256];
const CHAR * pszSymbol = NULL;
// Name field of IMAGEHLP_SYMBOL is dynamically sized.
// Pad with space for 255 characters.
union
{
CHAR rgchSymbol[sizeof(PLAT_IMAGEHLP_SYMBOL) + 255];
PLAT_IMAGEHLP_SYMBOL sym;
};
__try
{
sym.SizeOfStruct = sizeof(PLAT_IMAGEHLP_SYMBOL);
sym.Address = dwAddr;
sym.MaxNameLength = 255;
if (_SymGetSymFromAddr(g_hProcess, dwAddr, &psi->dwOffset, &sym))
{
pszSymbol = sym.Name;
if (_SymUnDName(&sym, rgchUndec, STRING_LENGTH(rgchUndec)))
{
pszSymbol = rgchUndec;
}
}
else
{
pszSymbol = "<no symbol>";
}
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
pszSymbol = "<EX: no symbol>";
psi->dwOffset = dwAddr - mi.BaseOfImage;
}
strcpy_s(psi->achSymbol, ARRAY_SIZE(psi->achSymbol), pszSymbol);
}
/****************************************************************************
* FunctionTableAccess *
*---------------------*
* Description:
* Helper for imagehlp's StackWalk API.
****************************************************************************/
LPVOID __stdcall FunctionTableAccess
(
HANDLE hProcess,
DWORD_PTR dwPCAddr
)
{
WRAPPER_NO_CONTRACT;
HANDLE hFuncEntry = _SymFunctionTableAccess( hProcess, dwPCAddr );
#if defined(HOST_64BIT)
if (hFuncEntry == NULL)
{
if (_GetRuntimeStackWalkInfo == NULL)
{
_GetRuntimeStackWalkInfo = (pfn_GetRuntimeStackWalkInfo)
GetProcAddress(GetCLRModuleHack(), "GetRuntimeStackWalkInfo");
if (_GetRuntimeStackWalkInfo == NULL)
return NULL;
}
_GetRuntimeStackWalkInfo((ULONG64)dwPCAddr, NULL, (UINT_PTR*)(&hFuncEntry));
}
#endif // HOST_64BIT
return hFuncEntry;
}
/****************************************************************************
* GetModuleBase *
*---------------*
* Description:
* Helper for imagehlp's StackWalk API. Retrieves the base address of
* the module containing the giving virtual address.
*
* NOTE: If the module information for the given module hasnot yet been
* loaded, then it is loaded on this call.
*
* Return:
* Base virtual address where the module containing ReturnAddress is
* loaded, or 0 if the address cannot be determined.
****************************************************************************/
DWORD_PTR __stdcall GetModuleBase
(
HANDLE hProcess,
DWORD_PTR dwAddr
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
PLAT_IMAGEHLP_MODULE ModuleInfo;
ModuleInfo.SizeOfStruct = sizeof(ModuleInfo);
if (_SymGetModuleInfo(hProcess, dwAddr, &ModuleInfo))
{
return ModuleInfo.BaseOfImage;
}
else
{
MEMORY_BASIC_INFORMATION mbi;
if (VirtualQueryEx(hProcess, (LPVOID)dwAddr, &mbi, sizeof(mbi)))
{
if (mbi.Type & MEM_IMAGE)
{
char achFile[MAX_LONGPATH] = {0};
DWORD cch;
cch = GetModuleFileNameA(
(HINSTANCE)mbi.AllocationBase,
achFile,
MAX_LONGPATH);
// Ignore the return code since we can't do anything with it.
_SymLoadModule(
hProcess,
NULL,
((cch) ? achFile : NULL),
NULL,
(DWORD_PTR)mbi.AllocationBase,
0);
return (DWORD_PTR)mbi.AllocationBase;
}
}
}
#if defined(HOST_64BIT)
if (_GetRuntimeStackWalkInfo == NULL)
{
_GetRuntimeStackWalkInfo = (pfn_GetRuntimeStackWalkInfo)
GetProcAddress(GetCLRModuleHack(), "GetRuntimeStackWalkInfo");
if (_GetRuntimeStackWalkInfo == NULL)
return NULL;
}
DWORD_PTR moduleBase;
_GetRuntimeStackWalkInfo((ULONG64)dwAddr, (UINT_PTR*)&moduleBase, NULL);
if (moduleBase != NULL)
return moduleBase;
#endif // HOST_64BIT
return 0;
}
#if !defined(DACCESS_COMPILE)
/****************************************************************************
* GetStackBacktrace *
*-------------------*
* Description:
* Gets a stacktrace of the current stack, including symbols.
*
* Return:
* The number of elements actually retrieved.
****************************************************************************/
UINT GetStackBacktrace
(
UINT ifrStart, // How many stack elements to skip before starting.
UINT cfrTotal, // How many elements to trace after starting.
DWORD_PTR* pdwEip, // Array to be filled with stack addresses.
SYM_INFO* psiSymbols, // This array is filled with symbol information.
// It should be big enough to hold cfrTotal elts.
// If NULL, no symbol information is stored.
CONTEXT * pContext // Context to use (or NULL to use current)
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
UINT nElements = 0;
DWORD_PTR* pdw = pdwEip;
SYM_INFO* psi = psiSymbols;
MagicInit();
memset(pdwEip, 0, cfrTotal*sizeof(DWORD_PTR));
if (psiSymbols)
{
memset(psiSymbols, 0, cfrTotal * sizeof(SYM_INFO));
}
if (!g_fLoadedImageHlp)
{
return 0;
}
CONTEXT context;
if (pContext == NULL)
{
ClrCaptureContext(&context);
}
else
{
memcpy(&context, pContext, sizeof(CONTEXT));
}
#ifdef HOST_64BIT
STACKFRAME64 stkfrm;
memset(&stkfrm, 0, sizeof(STACKFRAME64));
#else
STACKFRAME stkfrm;
memset(&stkfrm, 0, sizeof(STACKFRAME));
#endif
stkfrm.AddrPC.Mode = AddrModeFlat;
stkfrm.AddrStack.Mode = AddrModeFlat;
stkfrm.AddrFrame.Mode = AddrModeFlat;
#if defined(_M_IX86)
stkfrm.AddrPC.Offset = context.Eip;
stkfrm.AddrStack.Offset = context.Esp;
stkfrm.AddrFrame.Offset = context.Ebp; // Frame Pointer
#endif
#ifndef HOST_X86
// If we don't have a user-supplied context, then don't skip any frames.
// So ignore this function (GetStackBackTrace)
// ClrCaptureContext on x86 gives us the ESP/EBP/EIP of its caller's caller
// so we don't need to do this.
if (pContext == NULL)
{
ifrStart += 1;
}
#endif // !HOST_X86
for (UINT i = 0; i < ifrStart + cfrTotal; i++)
{
if (!_StackWalk(IMAGE_FILE_MACHINE_NATIVE,
g_hProcess,
GetCurrentThread(),
&stkfrm,
&context,
NULL,
(PFUNCTION_TABLE_ACCESS_ROUTINE)FunctionTableAccess,
(PGET_MODULE_BASE_ROUTINE)GetModuleBase,
NULL))
{
break;
}
if (i >= ifrStart)
{
*pdw++ = stkfrm.AddrPC.Offset;
nElements++;
if (psi)
{
FillSymbolInfo(psi++, stkfrm.AddrPC.Offset);
}
}
}
LOCAL_ASSERT(nElements == (UINT)(pdw - pdwEip));
return nElements;
}
#endif // !defined(DACCESS_COMPILE)
/****************************************************************************
* GetStringFromSymbolInfo *
*-------------------------*
* Description:
* Actually prints the info into the string for the symbol.
****************************************************************************/
#ifdef HOST_64BIT
#define FMT_ADDR_BARE "%08x`%08x"
#define FMT_ADDR_OFFSET "%llX"
#else
#define FMT_ADDR_BARE "%08x"
#define FMT_ADDR_OFFSET "%lX"
#endif
void GetStringFromSymbolInfo
(
DWORD_PTR dwAddr,
SYM_INFO *psi, // @parm Pointer to SYMBOL_INFO. Can be NULL.
__out_ecount (cchMaxAssertStackLevelStringLen) CHAR *pszString // @parm Place to put string.
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
LOCAL_ASSERT(pszString);
// <module>! <symbol> + 0x<offset> 0x<addr>\n
if (psi)
{
sprintf_s(pszString,
cchMaxAssertStackLevelStringLen,
"%s! %s + 0x" FMT_ADDR_OFFSET " (0x" FMT_ADDR_BARE ")",
(psi->achModule[0]) ? psi->achModule : "<no module>",
(psi->achSymbol[0]) ? psi->achSymbol : "<no symbol>",
psi->dwOffset,
DBG_ADDR(dwAddr));
}
else
{
sprintf_s(pszString, cchMaxAssertStackLevelStringLen, "<symbols not available> (0x%p)", (void *)dwAddr);
}
LOCAL_ASSERT(strlen(pszString) < cchMaxAssertStackLevelStringLen);
}
#if !defined(DACCESS_COMPILE)
/****************************************************************************
* GetStringFromStackLevels *
*--------------------------*
* Description:
* Retrieves a string from the stack frame. If more than one frame, they
* are separated by newlines
****************************************************************************/
void GetStringFromStackLevels
(
UINT ifrStart, // @parm How many stack elements to skip before starting.
UINT cfrTotal, // @parm How many elements to trace after starting.
// Can't be more than cfrMaxAssertStackLevels.
__out_ecount(cchMaxAssertStackLevelStringLen * cfrTotal) CHAR *pszString, // @parm Place to put string.
// Max size will be cchMaxAssertStackLevelStringLen * cfrTotal.
CONTEXT * pContext // @parm Context to start the stack trace at; null for current context.
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_CANNOT_TAKE_LOCK;
LOCAL_ASSERT(pszString);
LOCAL_ASSERT(cfrTotal < cfrMaxAssertStackLevels);
*pszString = '\0';
if (cfrTotal == 0)
{
return;
}
DWORD_PTR rgdwStackAddrs[cfrMaxAssertStackLevels];
SYM_INFO rgsi[cfrMaxAssertStackLevels];
// Ignore this function (GetStringFromStackLevels) if we don't have a user-supplied context.
if (pContext == NULL)
{
ifrStart += 1;
}
UINT uiRetrieved =
GetStackBacktrace(ifrStart, cfrTotal, rgdwStackAddrs, rgsi, pContext);
// First level
CHAR aszLevel[cchMaxAssertStackLevelStringLen];
GetStringFromSymbolInfo(rgdwStackAddrs[0], &rgsi[0], aszLevel);
size_t bufSize = cchMaxAssertStackLevelStringLen * cfrTotal;
strcpy_s(pszString, bufSize, aszLevel);
// Additional levels
for (UINT i = 1; i < uiRetrieved; ++i)
{
strcat_s(pszString, bufSize, "\n");
GetStringFromSymbolInfo(rgdwStackAddrs[i],
&rgsi[i], aszLevel);
strcat_s(pszString, bufSize, aszLevel);
}
LOCAL_ASSERT(strlen(pszString) <= cchMaxAssertStackLevelStringLen * cfrTotal);
}
#endif // !defined(DACCESS_COMPILE)
/****************************************************************************
* GetStringFromAddr *
*-------------------*
* Description:
* Returns a string from an address.
****************************************************************************/
void GetStringFromAddr
(
DWORD_PTR dwAddr,
_Out_writes_(cchMaxAssertStackLevelStringLen) LPSTR szString // Place to put string.
// Buffer must hold at least cchMaxAssertStackLevelStringLen.
)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
LOCAL_ASSERT(szString);
SYM_INFO si;
FillSymbolInfo(&si, dwAddr);
sprintf_s(szString,
cchMaxAssertStackLevelStringLen,
"%s! %s + 0x%p (0x%p)",
(si.achModule[0]) ? si.achModule : "<no module>",
(si.achSymbol[0]) ? si.achSymbol : "<no symbol>",
(void*)si.dwOffset,
(void*)dwAddr);
}
/****************************************************************************
* MagicDeinit *
*-------------*
* Description:
* Cleans up for the symbol loading code. Should be called before exit
* to free the dynamically loaded imagehlp.dll.
****************************************************************************/
void MagicDeinit(void)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
if (g_hinstImageHlp)
{
FreeLibrary(g_hinstImageHlp);
g_hinstImageHlp = NULL;
g_fLoadedImageHlp = FALSE;
}
}
#if defined(HOST_X86)
/****************************************************************************
* ClrCaptureContext *
*-------------------*
* Description:
* Exactly the contents of RtlCaptureContext for Win7 - Win2K doesn't
* support this, so we need it for CoreCLR 4, if we require Win2K support
****************************************************************************/
extern "C" __declspec(naked) void __stdcall
ClrCaptureContext(_Out_ PCONTEXT ctx)
{
__asm {
push ebx;
mov ebx,dword ptr [esp+8]
mov dword ptr [ebx+0B0h],eax
mov dword ptr [ebx+0ACh],ecx
mov dword ptr [ebx+0A8h],edx
mov eax,dword ptr [esp]
mov dword ptr [ebx+0A4h],eax
mov dword ptr [ebx+0A0h],esi
mov dword ptr [ebx+09Ch],edi
mov word ptr [ebx+0BCh],cs
mov word ptr [ebx+098h],ds
mov word ptr [ebx+094h],es
mov word ptr [ebx+090h],fs
mov word ptr [ebx+08Ch],gs
mov word ptr [ebx+0C8h],ss
pushfd
pop dword ptr [ebx+0C0h]
mov eax,dword ptr [ebp+4]
mov dword ptr [ebx+0B8h],eax
mov eax,dword ptr [ebp]
mov dword ptr [ebx+0B4h],eax
lea eax,[ebp+8]
mov dword ptr [ebx+0C4h],eax
mov dword ptr [ebx],10007h
pop ebx
ret 4
}
}
#endif // HOST_X86
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/mono/mono/tests/verifier/unverifiable_fallthru_into_catch_block.il
|
.assembly 'invalid_fallthru_into_catch_block'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.method public static int32 Main() cil managed
{
.entrypoint
.maxstack 8
.locals init (int32 V0)
ldloc.0
brfalse BB_MIDDLE
BB_00:
newobj instance void class [mscorlib]System.Exception::.ctor()
throw
leave END
BB_01:
BB_MIDDLE:
nop
nop
BB_02:
pop
nop
nop
leave END
BB_03:
END:
ldc.i4.0
ret
.try BB_00 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_03
}
|
.assembly 'invalid_fallthru_into_catch_block'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.method public static int32 Main() cil managed
{
.entrypoint
.maxstack 8
.locals init (int32 V0)
ldloc.0
brfalse BB_MIDDLE
BB_00:
newobj instance void class [mscorlib]System.Exception::.ctor()
throw
leave END
BB_01:
BB_MIDDLE:
nop
nop
BB_02:
pop
nop
nop
leave END
BB_03:
END:
ldc.i4.0
ret
.try BB_00 to BB_01 catch [mscorlib]System.Exception handler BB_02 to BB_03
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/CoreMangLib/system/threading/interlocked/InterlockedIncrement2.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="interlockedincrement2.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="interlockedincrement2.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/Loader/classloader/TypeGeneratorTests/TypeGeneratorTest746/Generated746.ilproj
|
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Generated746.il" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TestFramework\TestFramework.csproj" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
<Compile Include="Generated746.il" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TestFramework\TestFramework.csproj" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/HardwareIntrinsics/Arm/AdvSimd/AddSaturate.Vector128.Int32.Vector128.Int32.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/******************************************************************************
* This file is auto-generated from a template file by the GenerateTests.csx *
* script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make *
* changes, please update the corresponding template and run according to the *
* directions listed in the file. *
******************************************************************************/
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;
namespace JIT.HardwareIntrinsics.Arm
{
public static partial class Program
{
private static void AddSaturate_Vector128_Int32_Vector128_Int32()
{
var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32();
if (test.IsSupported)
{
// Validates basic functionality works, using Unsafe.Read
test.RunBasicScenario_UnsafeRead();
if (AdvSimd.IsSupported)
{
// Validates basic functionality works, using Load
test.RunBasicScenario_Load();
}
// Validates calling via reflection works, using Unsafe.Read
test.RunReflectionScenario_UnsafeRead();
if (AdvSimd.IsSupported)
{
// Validates calling via reflection works, using Load
test.RunReflectionScenario_Load();
}
// Validates passing a static member works
test.RunClsVarScenario();
if (AdvSimd.IsSupported)
{
// Validates passing a static member works, using pinning and Load
test.RunClsVarScenario_Load();
}
// Validates passing a local works, using Unsafe.Read
test.RunLclVarScenario_UnsafeRead();
if (AdvSimd.IsSupported)
{
// Validates passing a local works, using Load
test.RunLclVarScenario_Load();
}
// Validates passing the field of a local class works
test.RunClassLclFldScenario();
if (AdvSimd.IsSupported)
{
// Validates passing the field of a local class works, using pinning and Load
test.RunClassLclFldScenario_Load();
}
// Validates passing an instance member of a class works
test.RunClassFldScenario();
if (AdvSimd.IsSupported)
{
// Validates passing an instance member of a class works, using pinning and Load
test.RunClassFldScenario_Load();
}
// Validates passing the field of a local struct works
test.RunStructLclFldScenario();
if (AdvSimd.IsSupported)
{
// Validates passing the field of a local struct works, using pinning and Load
test.RunStructLclFldScenario_Load();
}
// Validates passing an instance member of a struct works
test.RunStructFldScenario();
if (AdvSimd.IsSupported)
{
// Validates passing an instance member of a struct works, using pinning and Load
test.RunStructFldScenario_Load();
}
}
else
{
// Validates we throw on unsupported hardware
test.RunUnsupportedScenario();
}
if (!test.Succeeded)
{
throw new Exception("One or more scenarios did not complete as expected.");
}
}
}
public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32
{
private struct DataTable
{
private byte[] inArray1;
private byte[] inArray2;
private byte[] outArray;
private GCHandle inHandle1;
private GCHandle inHandle2;
private GCHandle outHandle;
private ulong alignment;
public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment)
{
int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<Int32>();
int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<Int32>();
int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<Int32>();
if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray)
{
throw new ArgumentException("Invalid value of alignment");
}
this.inArray1 = new byte[alignment * 2];
this.inArray2 = new byte[alignment * 2];
this.outArray = new byte[alignment * 2];
this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned);
this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned);
this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned);
this.alignment = (ulong)alignment;
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray1Ptr), ref Unsafe.As<Int32, byte>(ref inArray1[0]), (uint)sizeOfinArray1);
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray2Ptr), ref Unsafe.As<Int32, byte>(ref inArray2[0]), (uint)sizeOfinArray2);
}
public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment);
public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment);
public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment);
public void Dispose()
{
inHandle1.Free();
inHandle2.Free();
outHandle.Free();
}
private static unsafe void* Align(byte* buffer, ulong expectedAlignment)
{
return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1));
}
}
private struct TestStruct
{
public Vector128<Int32> _fld1;
public Vector128<Int32> _fld2;
public static TestStruct Create()
{
var testStruct = new TestStruct();
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref testStruct._fld1), ref Unsafe.As<Int32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref testStruct._fld2), ref Unsafe.As<Int32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
return testStruct;
}
public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32 testClass)
{
var result = AdvSimd.AddSaturate(_fld1, _fld2);
Unsafe.Write(testClass._dataTable.outArrayPtr, result);
testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);
}
public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32 testClass)
{
fixed (Vector128<Int32>* pFld1 = &_fld1)
fixed (Vector128<Int32>* pFld2 = &_fld2)
{
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(pFld1)),
AdvSimd.LoadVector128((Int32*)(pFld2))
);
Unsafe.Write(testClass._dataTable.outArrayPtr, result);
testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);
}
}
}
private static readonly int LargestVectorSize = 16;
private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Int32>>() / sizeof(Int32);
private static readonly int Op2ElementCount = Unsafe.SizeOf<Vector128<Int32>>() / sizeof(Int32);
private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Int32>>() / sizeof(Int32);
private static Int32[] _data1 = new Int32[Op1ElementCount];
private static Int32[] _data2 = new Int32[Op2ElementCount];
private static Vector128<Int32> _clsVar1;
private static Vector128<Int32> _clsVar2;
private Vector128<Int32> _fld1;
private Vector128<Int32> _fld2;
private DataTable _dataTable;
static SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32()
{
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref _clsVar1), ref Unsafe.As<Int32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref _clsVar2), ref Unsafe.As<Int32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
}
public SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32()
{
Succeeded = true;
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref _fld1), ref Unsafe.As<Int32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref _fld2), ref Unsafe.As<Int32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }
_dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize);
}
public bool IsSupported => AdvSimd.IsSupported;
public bool Succeeded { get; set; }
public void RunBasicScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));
var result = AdvSimd.AddSaturate(
Unsafe.Read<Vector128<Int32>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector128<Int32>>(_dataTable.inArray2Ptr)
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
}
public void RunBasicScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load));
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)),
AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead));
var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128<Int32>), typeof(Vector128<Int32>) })
.Invoke(null, new object[] {
Unsafe.Read<Vector128<Int32>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector128<Int32>>(_dataTable.inArray2Ptr)
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Int32>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load));
var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128<Int32>), typeof(Vector128<Int32>) })
.Invoke(null, new object[] {
AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)),
AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr))
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Int32>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
}
public void RunClsVarScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario));
var result = AdvSimd.AddSaturate(
_clsVar1,
_clsVar2
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr);
}
public void RunClsVarScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load));
fixed (Vector128<Int32>* pClsVar1 = &_clsVar1)
fixed (Vector128<Int32>* pClsVar2 = &_clsVar2)
{
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(pClsVar1)),
AdvSimd.LoadVector128((Int32*)(pClsVar2))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr);
}
}
public void RunLclVarScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));
var op1 = Unsafe.Read<Vector128<Int32>>(_dataTable.inArray1Ptr);
var op2 = Unsafe.Read<Vector128<Int32>>(_dataTable.inArray2Ptr);
var result = AdvSimd.AddSaturate(op1, op2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, _dataTable.outArrayPtr);
}
public void RunLclVarScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load));
var op1 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr));
var op2 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr));
var result = AdvSimd.AddSaturate(op1, op2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, _dataTable.outArrayPtr);
}
public void RunClassLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));
var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32();
var result = AdvSimd.AddSaturate(test._fld1, test._fld2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
}
public void RunClassLclFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load));
var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32();
fixed (Vector128<Int32>* pFld1 = &test._fld1)
fixed (Vector128<Int32>* pFld2 = &test._fld2)
{
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(pFld1)),
AdvSimd.LoadVector128((Int32*)(pFld2))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
}
}
public void RunClassFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));
var result = AdvSimd.AddSaturate(_fld1, _fld2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);
}
public void RunClassFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load));
fixed (Vector128<Int32>* pFld1 = &_fld1)
fixed (Vector128<Int32>* pFld2 = &_fld2)
{
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(pFld1)),
AdvSimd.LoadVector128((Int32*)(pFld2))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);
}
}
public void RunStructLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));
var test = TestStruct.Create();
var result = AdvSimd.AddSaturate(test._fld1, test._fld2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
}
public void RunStructLclFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load));
var test = TestStruct.Create();
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(&test._fld1)),
AdvSimd.LoadVector128((Int32*)(&test._fld2))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
}
public void RunStructFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario));
var test = TestStruct.Create();
test.RunStructFldScenario(this);
}
public void RunStructFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load));
var test = TestStruct.Create();
test.RunStructFldScenario_Load(this);
}
public void RunUnsupportedScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario));
bool succeeded = false;
try
{
RunBasicScenario_UnsafeRead();
}
catch (PlatformNotSupportedException)
{
succeeded = true;
}
if (!succeeded)
{
Succeeded = false;
}
}
private void ValidateResult(Vector128<Int32> op1, Vector128<Int32> op2, void* result, [CallerMemberName] string method = "")
{
Int32[] inArray1 = new Int32[Op1ElementCount];
Int32[] inArray2 = new Int32[Op2ElementCount];
Int32[] outArray = new Int32[RetElementCount];
Unsafe.WriteUnaligned(ref Unsafe.As<Int32, byte>(ref inArray1[0]), op1);
Unsafe.WriteUnaligned(ref Unsafe.As<Int32, byte>(ref inArray2[0]), op2);
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int32, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Int32>>());
ValidateResult(inArray1, inArray2, outArray, method);
}
private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "")
{
Int32[] inArray1 = new Int32[Op1ElementCount];
Int32[] inArray2 = new Int32[Op2ElementCount];
Int32[] outArray = new Int32[RetElementCount];
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int32, byte>(ref inArray1[0]), ref Unsafe.AsRef<byte>(op1), (uint)Unsafe.SizeOf<Vector128<Int32>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int32, byte>(ref inArray2[0]), ref Unsafe.AsRef<byte>(op2), (uint)Unsafe.SizeOf<Vector128<Int32>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int32, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Int32>>());
ValidateResult(inArray1, inArray2, outArray, method);
}
private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "")
{
bool succeeded = true;
for (var i = 0; i < RetElementCount; i++)
{
if (Helpers.AddSaturate(left[i], right[i]) != result[i])
{
succeeded = false;
break;
}
}
if (!succeeded)
{
TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}<Int32>(Vector128<Int32>, Vector128<Int32>): {method} failed:");
TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})");
TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})");
TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})");
TestLibrary.TestFramework.LogInformation(string.Empty);
Succeeded = false;
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/******************************************************************************
* This file is auto-generated from a template file by the GenerateTests.csx *
* script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make *
* changes, please update the corresponding template and run according to the *
* directions listed in the file. *
******************************************************************************/
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;
namespace JIT.HardwareIntrinsics.Arm
{
public static partial class Program
{
private static void AddSaturate_Vector128_Int32_Vector128_Int32()
{
var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32();
if (test.IsSupported)
{
// Validates basic functionality works, using Unsafe.Read
test.RunBasicScenario_UnsafeRead();
if (AdvSimd.IsSupported)
{
// Validates basic functionality works, using Load
test.RunBasicScenario_Load();
}
// Validates calling via reflection works, using Unsafe.Read
test.RunReflectionScenario_UnsafeRead();
if (AdvSimd.IsSupported)
{
// Validates calling via reflection works, using Load
test.RunReflectionScenario_Load();
}
// Validates passing a static member works
test.RunClsVarScenario();
if (AdvSimd.IsSupported)
{
// Validates passing a static member works, using pinning and Load
test.RunClsVarScenario_Load();
}
// Validates passing a local works, using Unsafe.Read
test.RunLclVarScenario_UnsafeRead();
if (AdvSimd.IsSupported)
{
// Validates passing a local works, using Load
test.RunLclVarScenario_Load();
}
// Validates passing the field of a local class works
test.RunClassLclFldScenario();
if (AdvSimd.IsSupported)
{
// Validates passing the field of a local class works, using pinning and Load
test.RunClassLclFldScenario_Load();
}
// Validates passing an instance member of a class works
test.RunClassFldScenario();
if (AdvSimd.IsSupported)
{
// Validates passing an instance member of a class works, using pinning and Load
test.RunClassFldScenario_Load();
}
// Validates passing the field of a local struct works
test.RunStructLclFldScenario();
if (AdvSimd.IsSupported)
{
// Validates passing the field of a local struct works, using pinning and Load
test.RunStructLclFldScenario_Load();
}
// Validates passing an instance member of a struct works
test.RunStructFldScenario();
if (AdvSimd.IsSupported)
{
// Validates passing an instance member of a struct works, using pinning and Load
test.RunStructFldScenario_Load();
}
}
else
{
// Validates we throw on unsupported hardware
test.RunUnsupportedScenario();
}
if (!test.Succeeded)
{
throw new Exception("One or more scenarios did not complete as expected.");
}
}
}
public sealed unsafe class SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32
{
private struct DataTable
{
private byte[] inArray1;
private byte[] inArray2;
private byte[] outArray;
private GCHandle inHandle1;
private GCHandle inHandle2;
private GCHandle outHandle;
private ulong alignment;
public DataTable(Int32[] inArray1, Int32[] inArray2, Int32[] outArray, int alignment)
{
int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<Int32>();
int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<Int32>();
int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<Int32>();
if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray)
{
throw new ArgumentException("Invalid value of alignment");
}
this.inArray1 = new byte[alignment * 2];
this.inArray2 = new byte[alignment * 2];
this.outArray = new byte[alignment * 2];
this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned);
this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned);
this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned);
this.alignment = (ulong)alignment;
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray1Ptr), ref Unsafe.As<Int32, byte>(ref inArray1[0]), (uint)sizeOfinArray1);
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray2Ptr), ref Unsafe.As<Int32, byte>(ref inArray2[0]), (uint)sizeOfinArray2);
}
public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment);
public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment);
public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment);
public void Dispose()
{
inHandle1.Free();
inHandle2.Free();
outHandle.Free();
}
private static unsafe void* Align(byte* buffer, ulong expectedAlignment)
{
return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1));
}
}
private struct TestStruct
{
public Vector128<Int32> _fld1;
public Vector128<Int32> _fld2;
public static TestStruct Create()
{
var testStruct = new TestStruct();
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref testStruct._fld1), ref Unsafe.As<Int32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref testStruct._fld2), ref Unsafe.As<Int32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
return testStruct;
}
public void RunStructFldScenario(SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32 testClass)
{
var result = AdvSimd.AddSaturate(_fld1, _fld2);
Unsafe.Write(testClass._dataTable.outArrayPtr, result);
testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);
}
public void RunStructFldScenario_Load(SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32 testClass)
{
fixed (Vector128<Int32>* pFld1 = &_fld1)
fixed (Vector128<Int32>* pFld2 = &_fld2)
{
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(pFld1)),
AdvSimd.LoadVector128((Int32*)(pFld2))
);
Unsafe.Write(testClass._dataTable.outArrayPtr, result);
testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);
}
}
}
private static readonly int LargestVectorSize = 16;
private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Int32>>() / sizeof(Int32);
private static readonly int Op2ElementCount = Unsafe.SizeOf<Vector128<Int32>>() / sizeof(Int32);
private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Int32>>() / sizeof(Int32);
private static Int32[] _data1 = new Int32[Op1ElementCount];
private static Int32[] _data2 = new Int32[Op2ElementCount];
private static Vector128<Int32> _clsVar1;
private static Vector128<Int32> _clsVar2;
private Vector128<Int32> _fld1;
private Vector128<Int32> _fld2;
private DataTable _dataTable;
static SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32()
{
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref _clsVar1), ref Unsafe.As<Int32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref _clsVar2), ref Unsafe.As<Int32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
}
public SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32()
{
Succeeded = true;
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref _fld1), ref Unsafe.As<Int32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int32>, byte>(ref _fld2), ref Unsafe.As<Int32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Int32>>());
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }
_dataTable = new DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize);
}
public bool IsSupported => AdvSimd.IsSupported;
public bool Succeeded { get; set; }
public void RunBasicScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));
var result = AdvSimd.AddSaturate(
Unsafe.Read<Vector128<Int32>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector128<Int32>>(_dataTable.inArray2Ptr)
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
}
public void RunBasicScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load));
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)),
AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead));
var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128<Int32>), typeof(Vector128<Int32>) })
.Invoke(null, new object[] {
Unsafe.Read<Vector128<Int32>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector128<Int32>>(_dataTable.inArray2Ptr)
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Int32>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load));
var result = typeof(AdvSimd).GetMethod(nameof(AdvSimd.AddSaturate), new Type[] { typeof(Vector128<Int32>), typeof(Vector128<Int32>) })
.Invoke(null, new object[] {
AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr)),
AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr))
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Int32>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
}
public void RunClsVarScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario));
var result = AdvSimd.AddSaturate(
_clsVar1,
_clsVar2
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr);
}
public void RunClsVarScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load));
fixed (Vector128<Int32>* pClsVar1 = &_clsVar1)
fixed (Vector128<Int32>* pClsVar2 = &_clsVar2)
{
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(pClsVar1)),
AdvSimd.LoadVector128((Int32*)(pClsVar2))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr);
}
}
public void RunLclVarScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));
var op1 = Unsafe.Read<Vector128<Int32>>(_dataTable.inArray1Ptr);
var op2 = Unsafe.Read<Vector128<Int32>>(_dataTable.inArray2Ptr);
var result = AdvSimd.AddSaturate(op1, op2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, _dataTable.outArrayPtr);
}
public void RunLclVarScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load));
var op1 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray1Ptr));
var op2 = AdvSimd.LoadVector128((Int32*)(_dataTable.inArray2Ptr));
var result = AdvSimd.AddSaturate(op1, op2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, _dataTable.outArrayPtr);
}
public void RunClassLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));
var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32();
var result = AdvSimd.AddSaturate(test._fld1, test._fld2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
}
public void RunClassLclFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load));
var test = new SimpleBinaryOpTest__AddSaturate_Vector128_Int32_Vector128_Int32();
fixed (Vector128<Int32>* pFld1 = &test._fld1)
fixed (Vector128<Int32>* pFld2 = &test._fld2)
{
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(pFld1)),
AdvSimd.LoadVector128((Int32*)(pFld2))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
}
}
public void RunClassFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));
var result = AdvSimd.AddSaturate(_fld1, _fld2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);
}
public void RunClassFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load));
fixed (Vector128<Int32>* pFld1 = &_fld1)
fixed (Vector128<Int32>* pFld2 = &_fld2)
{
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(pFld1)),
AdvSimd.LoadVector128((Int32*)(pFld2))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);
}
}
public void RunStructLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));
var test = TestStruct.Create();
var result = AdvSimd.AddSaturate(test._fld1, test._fld2);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
}
public void RunStructLclFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load));
var test = TestStruct.Create();
var result = AdvSimd.AddSaturate(
AdvSimd.LoadVector128((Int32*)(&test._fld1)),
AdvSimd.LoadVector128((Int32*)(&test._fld2))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
}
public void RunStructFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario));
var test = TestStruct.Create();
test.RunStructFldScenario(this);
}
public void RunStructFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load));
var test = TestStruct.Create();
test.RunStructFldScenario_Load(this);
}
public void RunUnsupportedScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario));
bool succeeded = false;
try
{
RunBasicScenario_UnsafeRead();
}
catch (PlatformNotSupportedException)
{
succeeded = true;
}
if (!succeeded)
{
Succeeded = false;
}
}
private void ValidateResult(Vector128<Int32> op1, Vector128<Int32> op2, void* result, [CallerMemberName] string method = "")
{
Int32[] inArray1 = new Int32[Op1ElementCount];
Int32[] inArray2 = new Int32[Op2ElementCount];
Int32[] outArray = new Int32[RetElementCount];
Unsafe.WriteUnaligned(ref Unsafe.As<Int32, byte>(ref inArray1[0]), op1);
Unsafe.WriteUnaligned(ref Unsafe.As<Int32, byte>(ref inArray2[0]), op2);
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int32, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Int32>>());
ValidateResult(inArray1, inArray2, outArray, method);
}
private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "")
{
Int32[] inArray1 = new Int32[Op1ElementCount];
Int32[] inArray2 = new Int32[Op2ElementCount];
Int32[] outArray = new Int32[RetElementCount];
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int32, byte>(ref inArray1[0]), ref Unsafe.AsRef<byte>(op1), (uint)Unsafe.SizeOf<Vector128<Int32>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int32, byte>(ref inArray2[0]), ref Unsafe.AsRef<byte>(op2), (uint)Unsafe.SizeOf<Vector128<Int32>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int32, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Int32>>());
ValidateResult(inArray1, inArray2, outArray, method);
}
private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = "")
{
bool succeeded = true;
for (var i = 0; i < RetElementCount; i++)
{
if (Helpers.AddSaturate(left[i], right[i]) != result[i])
{
succeeded = false;
break;
}
}
if (!succeeded)
{
TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.AddSaturate)}<Int32>(Vector128<Int32>, Vector128<Int32>): {method} failed:");
TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})");
TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})");
TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})");
TestLibrary.TestFramework.LogInformation(string.Empty);
Succeeded = false;
}
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/CodeGenBringUpTests/FPRem_do.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="FPRem.cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="FPRem.cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Linq.Expressions/src/System/Dynamic/GetIndexBinder.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Dynamic.Utils;
namespace System.Dynamic
{
/// <summary>
/// Represents the dynamic get index operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
public abstract class GetIndexBinder : DynamicMetaObjectBinder
{
/// <summary>
/// Initializes a new instance of the <see cref="GetIndexBinder" />.
/// </summary>
/// <param name="callInfo">The signature of the arguments at the call site.</param>
protected GetIndexBinder(CallInfo callInfo)
{
ContractUtils.RequiresNotNull(callInfo, nameof(callInfo));
CallInfo = callInfo;
}
/// <summary>
/// The result type of the operation.
/// </summary>
public override sealed Type ReturnType => typeof(object);
/// <summary>
/// Gets the signature of the arguments at the call site.
/// </summary>
public CallInfo CallInfo { get; }
/// <summary>
/// Performs the binding of the dynamic get index operation.
/// </summary>
/// <param name="target">The target of the dynamic get index operation.</param>
/// <param name="args">An array of arguments of the dynamic get index operation.</param>
/// <returns>The <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
{
ContractUtils.RequiresNotNull(target, nameof(target));
ContractUtils.RequiresNotNullItems(args, nameof(args));
return target.BindGetIndex(this, args);
}
/// <summary>
/// Always returns <c>true</c> because this is a standard <see cref="DynamicMetaObjectBinder"/>.
/// </summary>
internal override sealed bool IsStandardBinder => true;
/// <summary>
/// Performs the binding of the dynamic get index operation if the target dynamic object cannot bind.
/// </summary>
/// <param name="target">The target of the dynamic get index operation.</param>
/// <param name="indexes">The arguments of the dynamic get index operation.</param>
/// <returns>The <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
public DynamicMetaObject FallbackGetIndex(DynamicMetaObject target, DynamicMetaObject[] indexes)
{
return FallbackGetIndex(target, indexes, null);
}
/// <summary>
/// When overridden in the derived class, performs the binding of the dynamic get index operation if the target dynamic object cannot bind.
/// </summary>
/// <param name="target">The target of the dynamic get index operation.</param>
/// <param name="indexes">The arguments of the dynamic get index operation.</param>
/// <param name="errorSuggestion">The binding result to use if binding fails, or null.</param>
/// <returns>The <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
public abstract DynamicMetaObject FallbackGetIndex(DynamicMetaObject target, DynamicMetaObject[] indexes, DynamicMetaObject? errorSuggestion);
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Dynamic.Utils;
namespace System.Dynamic
{
/// <summary>
/// Represents the dynamic get index operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
public abstract class GetIndexBinder : DynamicMetaObjectBinder
{
/// <summary>
/// Initializes a new instance of the <see cref="GetIndexBinder" />.
/// </summary>
/// <param name="callInfo">The signature of the arguments at the call site.</param>
protected GetIndexBinder(CallInfo callInfo)
{
ContractUtils.RequiresNotNull(callInfo, nameof(callInfo));
CallInfo = callInfo;
}
/// <summary>
/// The result type of the operation.
/// </summary>
public override sealed Type ReturnType => typeof(object);
/// <summary>
/// Gets the signature of the arguments at the call site.
/// </summary>
public CallInfo CallInfo { get; }
/// <summary>
/// Performs the binding of the dynamic get index operation.
/// </summary>
/// <param name="target">The target of the dynamic get index operation.</param>
/// <param name="args">An array of arguments of the dynamic get index operation.</param>
/// <returns>The <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
{
ContractUtils.RequiresNotNull(target, nameof(target));
ContractUtils.RequiresNotNullItems(args, nameof(args));
return target.BindGetIndex(this, args);
}
/// <summary>
/// Always returns <c>true</c> because this is a standard <see cref="DynamicMetaObjectBinder"/>.
/// </summary>
internal override sealed bool IsStandardBinder => true;
/// <summary>
/// Performs the binding of the dynamic get index operation if the target dynamic object cannot bind.
/// </summary>
/// <param name="target">The target of the dynamic get index operation.</param>
/// <param name="indexes">The arguments of the dynamic get index operation.</param>
/// <returns>The <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
public DynamicMetaObject FallbackGetIndex(DynamicMetaObject target, DynamicMetaObject[] indexes)
{
return FallbackGetIndex(target, indexes, null);
}
/// <summary>
/// When overridden in the derived class, performs the binding of the dynamic get index operation if the target dynamic object cannot bind.
/// </summary>
/// <param name="target">The target of the dynamic get index operation.</param>
/// <param name="indexes">The arguments of the dynamic get index operation.</param>
/// <param name="errorSuggestion">The binding result to use if binding fails, or null.</param>
/// <returns>The <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
public abstract DynamicMetaObject FallbackGetIndex(DynamicMetaObject target, DynamicMetaObject[] indexes, DynamicMetaObject? errorSuggestion);
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Buffers.Text
{
public static partial class Utf8Parser
{
private static bool TryParseByteX(ReadOnlySpan<byte> source, out byte value, out int bytesConsumed)
{
if (source.Length < 1)
{
bytesConsumed = 0;
value = default;
return false;
}
byte nextCharacter;
byte nextDigit;
ReadOnlySpan<byte> hexLookup = HexConverter.CharToHexLookup;
// Parse the first digit separately. If invalid here, we need to return false.
nextCharacter = source[0];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = 0;
value = default;
return false;
}
uint parsedValue = nextDigit;
if (source.Length <= ParserHelpers.ByteOverflowLengthHex)
{
// Length is less than or equal to Parsers.ByteOverflowLengthHex; overflow is not possible
for (int index = 1; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (byte)(parsedValue);
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
else
{
// Length is greater than Parsers.ByteOverflowLengthHex; overflow is only possible after Parsers.ByteOverflowLengthHex
// digits. There may be no overflow after Parsers.ByteOverflowLengthHex if there are leading zeroes.
for (int index = 1; index < ParserHelpers.ByteOverflowLengthHex; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (byte)(parsedValue);
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
for (int index = ParserHelpers.ByteOverflowLengthHex; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (byte)(parsedValue);
return true;
}
// If we try to append a digit to anything larger than byte.MaxValue / 0x10, there will be overflow
if (parsedValue > byte.MaxValue / 0x10)
{
bytesConsumed = 0;
value = default;
return false;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
bytesConsumed = source.Length;
value = (byte)(parsedValue);
return true;
}
private static bool TryParseUInt16X(ReadOnlySpan<byte> source, out ushort value, out int bytesConsumed)
{
if (source.Length < 1)
{
bytesConsumed = 0;
value = default;
return false;
}
byte nextCharacter;
byte nextDigit;
ReadOnlySpan<byte> hexLookup = HexConverter.CharToHexLookup;
// Parse the first digit separately. If invalid here, we need to return false.
nextCharacter = source[0];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = 0;
value = default;
return false;
}
uint parsedValue = nextDigit;
if (source.Length <= ParserHelpers.Int16OverflowLengthHex)
{
// Length is less than or equal to Parsers.Int16OverflowLengthHex; overflow is not possible
for (int index = 1; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (ushort)(parsedValue);
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
else
{
// Length is greater than Parsers.Int16OverflowLengthHex; overflow is only possible after Parsers.Int16OverflowLengthHex
// digits. There may be no overflow after Parsers.Int16OverflowLengthHex if there are leading zeroes.
for (int index = 1; index < ParserHelpers.Int16OverflowLengthHex; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (ushort)(parsedValue);
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
for (int index = ParserHelpers.Int16OverflowLengthHex; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (ushort)(parsedValue);
return true;
}
// If we try to append a digit to anything larger than ushort.MaxValue / 0x10, there will be overflow
if (parsedValue > ushort.MaxValue / 0x10)
{
bytesConsumed = 0;
value = default;
return false;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
bytesConsumed = source.Length;
value = (ushort)(parsedValue);
return true;
}
private static bool TryParseUInt32X(ReadOnlySpan<byte> source, out uint value, out int bytesConsumed)
{
if (source.Length < 1)
{
bytesConsumed = 0;
value = default;
return false;
}
byte nextCharacter;
byte nextDigit;
ReadOnlySpan<byte> hexLookup = HexConverter.CharToHexLookup;
// Parse the first digit separately. If invalid here, we need to return false.
nextCharacter = source[0];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = 0;
value = default;
return false;
}
uint parsedValue = nextDigit;
if (source.Length <= ParserHelpers.Int32OverflowLengthHex)
{
// Length is less than or equal to Parsers.Int32OverflowLengthHex; overflow is not possible
for (int index = 1; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
else
{
// Length is greater than Parsers.Int32OverflowLengthHex; overflow is only possible after Parsers.Int32OverflowLengthHex
// digits. There may be no overflow after Parsers.Int32OverflowLengthHex if there are leading zeroes.
for (int index = 1; index < ParserHelpers.Int32OverflowLengthHex; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
for (int index = ParserHelpers.Int32OverflowLengthHex; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
// If we try to append a digit to anything larger than uint.MaxValue / 0x10, there will be overflow
if (parsedValue > uint.MaxValue / 0x10)
{
bytesConsumed = 0;
value = default;
return false;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
bytesConsumed = source.Length;
value = parsedValue;
return true;
}
private static bool TryParseUInt64X(ReadOnlySpan<byte> source, out ulong value, out int bytesConsumed)
{
if (source.Length < 1)
{
bytesConsumed = 0;
value = default;
return false;
}
byte nextCharacter;
byte nextDigit;
ReadOnlySpan<byte> hexLookup = HexConverter.CharToHexLookup;
// Parse the first digit separately. If invalid here, we need to return false.
nextCharacter = source[0];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = 0;
value = default;
return false;
}
ulong parsedValue = nextDigit;
if (source.Length <= ParserHelpers.Int64OverflowLengthHex)
{
// Length is less than or equal to Parsers.Int64OverflowLengthHex; overflow is not possible
for (int index = 1; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
else
{
// Length is greater than Parsers.Int64OverflowLengthHex; overflow is only possible after Parsers.Int64OverflowLengthHex
// digits. There may be no overflow after Parsers.Int64OverflowLengthHex if there are leading zeroes.
for (int index = 1; index < ParserHelpers.Int64OverflowLengthHex; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
for (int index = ParserHelpers.Int64OverflowLengthHex; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
// If we try to append a digit to anything larger than ulong.MaxValue / 0x10, there will be overflow
if (parsedValue > ulong.MaxValue / 0x10)
{
bytesConsumed = 0;
value = default;
return false;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
bytesConsumed = source.Length;
value = parsedValue;
return true;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Buffers.Text
{
public static partial class Utf8Parser
{
private static bool TryParseByteX(ReadOnlySpan<byte> source, out byte value, out int bytesConsumed)
{
if (source.Length < 1)
{
bytesConsumed = 0;
value = default;
return false;
}
byte nextCharacter;
byte nextDigit;
ReadOnlySpan<byte> hexLookup = HexConverter.CharToHexLookup;
// Parse the first digit separately. If invalid here, we need to return false.
nextCharacter = source[0];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = 0;
value = default;
return false;
}
uint parsedValue = nextDigit;
if (source.Length <= ParserHelpers.ByteOverflowLengthHex)
{
// Length is less than or equal to Parsers.ByteOverflowLengthHex; overflow is not possible
for (int index = 1; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (byte)(parsedValue);
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
else
{
// Length is greater than Parsers.ByteOverflowLengthHex; overflow is only possible after Parsers.ByteOverflowLengthHex
// digits. There may be no overflow after Parsers.ByteOverflowLengthHex if there are leading zeroes.
for (int index = 1; index < ParserHelpers.ByteOverflowLengthHex; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (byte)(parsedValue);
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
for (int index = ParserHelpers.ByteOverflowLengthHex; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (byte)(parsedValue);
return true;
}
// If we try to append a digit to anything larger than byte.MaxValue / 0x10, there will be overflow
if (parsedValue > byte.MaxValue / 0x10)
{
bytesConsumed = 0;
value = default;
return false;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
bytesConsumed = source.Length;
value = (byte)(parsedValue);
return true;
}
private static bool TryParseUInt16X(ReadOnlySpan<byte> source, out ushort value, out int bytesConsumed)
{
if (source.Length < 1)
{
bytesConsumed = 0;
value = default;
return false;
}
byte nextCharacter;
byte nextDigit;
ReadOnlySpan<byte> hexLookup = HexConverter.CharToHexLookup;
// Parse the first digit separately. If invalid here, we need to return false.
nextCharacter = source[0];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = 0;
value = default;
return false;
}
uint parsedValue = nextDigit;
if (source.Length <= ParserHelpers.Int16OverflowLengthHex)
{
// Length is less than or equal to Parsers.Int16OverflowLengthHex; overflow is not possible
for (int index = 1; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (ushort)(parsedValue);
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
else
{
// Length is greater than Parsers.Int16OverflowLengthHex; overflow is only possible after Parsers.Int16OverflowLengthHex
// digits. There may be no overflow after Parsers.Int16OverflowLengthHex if there are leading zeroes.
for (int index = 1; index < ParserHelpers.Int16OverflowLengthHex; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (ushort)(parsedValue);
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
for (int index = ParserHelpers.Int16OverflowLengthHex; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = (ushort)(parsedValue);
return true;
}
// If we try to append a digit to anything larger than ushort.MaxValue / 0x10, there will be overflow
if (parsedValue > ushort.MaxValue / 0x10)
{
bytesConsumed = 0;
value = default;
return false;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
bytesConsumed = source.Length;
value = (ushort)(parsedValue);
return true;
}
private static bool TryParseUInt32X(ReadOnlySpan<byte> source, out uint value, out int bytesConsumed)
{
if (source.Length < 1)
{
bytesConsumed = 0;
value = default;
return false;
}
byte nextCharacter;
byte nextDigit;
ReadOnlySpan<byte> hexLookup = HexConverter.CharToHexLookup;
// Parse the first digit separately. If invalid here, we need to return false.
nextCharacter = source[0];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = 0;
value = default;
return false;
}
uint parsedValue = nextDigit;
if (source.Length <= ParserHelpers.Int32OverflowLengthHex)
{
// Length is less than or equal to Parsers.Int32OverflowLengthHex; overflow is not possible
for (int index = 1; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
else
{
// Length is greater than Parsers.Int32OverflowLengthHex; overflow is only possible after Parsers.Int32OverflowLengthHex
// digits. There may be no overflow after Parsers.Int32OverflowLengthHex if there are leading zeroes.
for (int index = 1; index < ParserHelpers.Int32OverflowLengthHex; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
for (int index = ParserHelpers.Int32OverflowLengthHex; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
// If we try to append a digit to anything larger than uint.MaxValue / 0x10, there will be overflow
if (parsedValue > uint.MaxValue / 0x10)
{
bytesConsumed = 0;
value = default;
return false;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
bytesConsumed = source.Length;
value = parsedValue;
return true;
}
private static bool TryParseUInt64X(ReadOnlySpan<byte> source, out ulong value, out int bytesConsumed)
{
if (source.Length < 1)
{
bytesConsumed = 0;
value = default;
return false;
}
byte nextCharacter;
byte nextDigit;
ReadOnlySpan<byte> hexLookup = HexConverter.CharToHexLookup;
// Parse the first digit separately. If invalid here, we need to return false.
nextCharacter = source[0];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = 0;
value = default;
return false;
}
ulong parsedValue = nextDigit;
if (source.Length <= ParserHelpers.Int64OverflowLengthHex)
{
// Length is less than or equal to Parsers.Int64OverflowLengthHex; overflow is not possible
for (int index = 1; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
else
{
// Length is greater than Parsers.Int64OverflowLengthHex; overflow is only possible after Parsers.Int64OverflowLengthHex
// digits. There may be no overflow after Parsers.Int64OverflowLengthHex if there are leading zeroes.
for (int index = 1; index < ParserHelpers.Int64OverflowLengthHex; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
for (int index = ParserHelpers.Int64OverflowLengthHex; index < source.Length; index++)
{
nextCharacter = source[index];
nextDigit = hexLookup[nextCharacter];
if (nextDigit == 0xFF)
{
bytesConsumed = index;
value = parsedValue;
return true;
}
// If we try to append a digit to anything larger than ulong.MaxValue / 0x10, there will be overflow
if (parsedValue > ulong.MaxValue / 0x10)
{
bytesConsumed = 0;
value = default;
return false;
}
parsedValue = (parsedValue << 4) + nextDigit;
}
}
bytesConsumed = source.Length;
value = parsedValue;
return true;
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Private.CoreLib/src/System/Text/DecoderNLS.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Buffers;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace System.Text
{
// A Decoder is used to decode a sequence of blocks of bytes into a
// sequence of blocks of characters. Following instantiation of a decoder,
// sequential blocks of bytes are converted into blocks of characters through
// calls to the GetChars method. The decoder maintains state between the
// conversions, allowing it to correctly decode byte sequences that span
// adjacent blocks.
//
// Instances of specific implementations of the Decoder abstract base
// class are typically obtained through calls to the GetDecoder method
// of Encoding objects.
internal class DecoderNLS : Decoder
{
// Remember our encoding
private readonly Encoding _encoding;
private bool _mustFlush;
internal bool _throwOnOverflow;
internal int _bytesUsed;
private int _leftoverBytes; // leftover data from a previous invocation of GetChars (up to 4 bytes)
private int _leftoverByteCount; // number of bytes of actual data in _leftoverBytes
internal DecoderNLS(Encoding encoding)
{
_encoding = encoding;
_fallback = this._encoding.DecoderFallback;
this.Reset();
}
public override void Reset()
{
ClearLeftoverData();
_fallbackBuffer?.Reset();
}
public override int GetCharCount(byte[] bytes, int index, int count)
{
return GetCharCount(bytes, index, count, false);
}
public override unsafe int GetCharCount(byte[] bytes!!, int index, int count, bool flush)
{
// Validate Parameters
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count),
SR.ArgumentOutOfRange_NeedNonNegNum);
if (bytes.Length - index < count)
throw new ArgumentOutOfRangeException(nameof(bytes),
SR.ArgumentOutOfRange_IndexCountBuffer);
// Just call pointer version
fixed (byte* pBytes = &MemoryMarshal.GetReference((Span<byte>)bytes))
return GetCharCount(pBytes + index, count, flush);
}
public override unsafe int GetCharCount(byte* bytes!!, int count, bool flush)
{
// Validate parameters
if (count < 0)
throw new ArgumentOutOfRangeException(nameof(count),
SR.ArgumentOutOfRange_NeedNonNegNum);
// Remember the flush
_mustFlush = flush;
_throwOnOverflow = true;
// By default just call the encoding version, no flush by default
Debug.Assert(_encoding != null);
return _encoding.GetCharCount(bytes, count, this);
}
public override int GetChars(byte[] bytes, int byteIndex, int byteCount,
char[] chars, int charIndex)
{
return GetChars(bytes, byteIndex, byteCount, chars, charIndex, false);
}
public override unsafe int GetChars(byte[] bytes!!, int byteIndex, int byteCount,
char[] chars!!, int charIndex, bool flush)
{
// Validate Parameters
if (byteIndex < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException(byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
if (bytes.Length - byteIndex < byteCount)
throw new ArgumentOutOfRangeException(nameof(bytes),
SR.ArgumentOutOfRange_IndexCountBuffer);
if (charIndex < 0 || charIndex > chars.Length)
throw new ArgumentOutOfRangeException(nameof(charIndex),
SR.ArgumentOutOfRange_Index);
int charCount = chars.Length - charIndex;
// Just call pointer version
fixed (byte* pBytes = &MemoryMarshal.GetReference((Span<byte>)bytes))
fixed (char* pChars = &MemoryMarshal.GetReference((Span<char>)chars))
// Remember that charCount is # to decode, not size of array
return GetChars(pBytes + byteIndex, byteCount,
pChars + charIndex, charCount, flush);
}
public override unsafe int GetChars(byte* bytes!!, int byteCount,
char* chars!!, int charCount, bool flush)
{
// Validate parameters
if (byteCount < 0 || charCount < 0)
throw new ArgumentOutOfRangeException(byteCount < 0 ? nameof(byteCount) : nameof(charCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
// Remember our flush
_mustFlush = flush;
_throwOnOverflow = true;
// By default just call the encodings version
Debug.Assert(_encoding != null);
return _encoding.GetChars(bytes, byteCount, chars, charCount, this);
}
// This method is used when the output buffer might not be big enough.
// Just call the pointer version. (This gets chars)
public override unsafe void Convert(byte[] bytes!!, int byteIndex, int byteCount,
char[] chars!!, int charIndex, int charCount, bool flush,
out int bytesUsed, out int charsUsed, out bool completed)
{
// Validate parameters
if (byteIndex < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException(byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
if (charIndex < 0 || charCount < 0)
throw new ArgumentOutOfRangeException(charIndex < 0 ? nameof(charIndex) : nameof(charCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
if (bytes.Length - byteIndex < byteCount)
throw new ArgumentOutOfRangeException(nameof(bytes),
SR.ArgumentOutOfRange_IndexCountBuffer);
if (chars.Length - charIndex < charCount)
throw new ArgumentOutOfRangeException(nameof(chars),
SR.ArgumentOutOfRange_IndexCountBuffer);
// Just call the pointer version (public overrides can't do this)
fixed (byte* pBytes = &MemoryMarshal.GetReference((Span<byte>)bytes))
{
fixed (char* pChars = &MemoryMarshal.GetReference((Span<char>)chars))
{
Convert(pBytes + byteIndex, byteCount, pChars + charIndex, charCount, flush,
out bytesUsed, out charsUsed, out completed);
}
}
}
// This is the version that used pointers. We call the base encoding worker function
// after setting our appropriate internal variables. This is getting chars
public override unsafe void Convert(byte* bytes, int byteCount,
char* chars, int charCount, bool flush,
out int bytesUsed, out int charsUsed, out bool completed)
{
// Validate input parameters
if (chars == null || bytes == null)
throw new ArgumentNullException(chars == null ? nameof(chars) : nameof(bytes),
SR.ArgumentNull_Array);
if (byteCount < 0 || charCount < 0)
throw new ArgumentOutOfRangeException(byteCount < 0 ? nameof(byteCount) : nameof(charCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
// We don't want to throw
_mustFlush = flush;
_throwOnOverflow = false;
_bytesUsed = 0;
// Do conversion
Debug.Assert(_encoding != null);
charsUsed = _encoding.GetChars(bytes, byteCount, chars, charCount, this);
bytesUsed = _bytesUsed;
// See comment in EncoderNLS.Convert for the details of the logic below.
completed = (bytesUsed == byteCount)
&& (!flush || !this.HasState)
&& (_fallbackBuffer is null || _fallbackBuffer.Remaining == 0);
}
public bool MustFlush => _mustFlush;
// Anything left in our decoder?
internal virtual bool HasState => _leftoverByteCount != 0;
// Allow encoding to clear our must flush instead of throwing (in ThrowCharsOverflow)
internal void ClearMustFlush()
{
_mustFlush = false;
}
internal ReadOnlySpan<byte> GetLeftoverData() =>
MemoryMarshal.AsBytes(new ReadOnlySpan<int>(ref _leftoverBytes, 1)).Slice(0, _leftoverByteCount);
internal void SetLeftoverData(ReadOnlySpan<byte> bytes)
{
bytes.CopyTo(MemoryMarshal.AsBytes(new Span<int>(ref _leftoverBytes, 1)));
_leftoverByteCount = bytes.Length;
}
internal bool HasLeftoverData => _leftoverByteCount != 0;
internal void ClearLeftoverData()
{
_leftoverByteCount = 0;
}
internal int DrainLeftoverDataForGetCharCount(ReadOnlySpan<byte> bytes, out int bytesConsumed)
{
// Quick check: we _should not_ have leftover fallback data from a previous invocation,
// as we'd end up consuming any such data and would corrupt whatever Convert call happens
// to be in progress. Unlike EncoderNLS, this is simply a Debug.Assert. No exception is thrown.
Debug.Assert(_fallbackBuffer is null || _fallbackBuffer.Remaining == 0, "Should have no data remaining in the fallback buffer.");
Debug.Assert(HasLeftoverData, "Caller shouldn't invoke this routine unless there's leftover data in the decoder.");
// Copy the existing leftover data plus as many bytes as possible of the new incoming data
// into a temporary concated buffer, then get its char count by decoding it.
Span<byte> combinedBuffer = stackalloc byte[4];
combinedBuffer = combinedBuffer.Slice(0, ConcatInto(GetLeftoverData(), bytes, combinedBuffer));
int charCount = 0;
Debug.Assert(_encoding != null);
switch (_encoding.DecodeFirstRune(combinedBuffer, out Rune value, out int combinedBufferBytesConsumed))
{
case OperationStatus.Done:
charCount = value.Utf16SequenceLength;
goto Finish; // successfully transcoded bytes -> chars
case OperationStatus.NeedMoreData:
if (MustFlush)
{
goto case OperationStatus.InvalidData; // treat as equivalent to bad data
}
else
{
goto Finish; // consumed some bytes, output 0 chars
}
case OperationStatus.InvalidData:
break;
default:
Debug.Fail("Unexpected OperationStatus return value.");
break;
}
// Couldn't decode the buffer. Fallback the buffer instead. See comment in DrainLeftoverDataForGetChars
// for more information on why a negative index is provided.
if (FallbackBuffer.Fallback(combinedBuffer.Slice(0, combinedBufferBytesConsumed).ToArray(), index: -_leftoverByteCount))
{
charCount = _fallbackBuffer!.DrainRemainingDataForGetCharCount();
Debug.Assert(charCount >= 0, "Fallback buffer shouldn't have returned a negative char count.");
}
Finish:
bytesConsumed = combinedBufferBytesConsumed - _leftoverByteCount; // amount of 'bytes' buffer consumed just now
return charCount;
}
internal int DrainLeftoverDataForGetChars(ReadOnlySpan<byte> bytes, Span<char> chars, out int bytesConsumed)
{
// Quick check: we _should not_ have leftover fallback data from a previous invocation,
// as we'd end up consuming any such data and would corrupt whatever Convert call happens
// to be in progress. Unlike EncoderNLS, this is simply a Debug.Assert. No exception is thrown.
Debug.Assert(_fallbackBuffer is null || _fallbackBuffer.Remaining == 0, "Should have no data remaining in the fallback buffer.");
Debug.Assert(HasLeftoverData, "Caller shouldn't invoke this routine unless there's leftover data in the decoder.");
// Copy the existing leftover data plus as many bytes as possible of the new incoming data
// into a temporary concated buffer, then transcode it from bytes to chars.
Span<byte> combinedBuffer = stackalloc byte[4];
combinedBuffer = combinedBuffer.Slice(0, ConcatInto(GetLeftoverData(), bytes, combinedBuffer));
int charsWritten = 0;
bool persistNewCombinedBuffer = false;
Debug.Assert(_encoding != null);
switch (_encoding.DecodeFirstRune(combinedBuffer, out Rune value, out int combinedBufferBytesConsumed))
{
case OperationStatus.Done:
if (value.TryEncodeToUtf16(chars, out charsWritten))
{
goto Finish; // successfully transcoded bytes -> chars
}
else
{
goto DestinationTooSmall;
}
case OperationStatus.NeedMoreData:
if (MustFlush)
{
goto case OperationStatus.InvalidData; // treat as equivalent to bad data
}
else
{
persistNewCombinedBuffer = true;
goto Finish; // successfully consumed some bytes, output no chars
}
case OperationStatus.InvalidData:
break;
default:
Debug.Fail("Unexpected OperationStatus return value.");
break;
}
// Couldn't decode the buffer. Fallback the buffer instead. The fallback mechanism relies
// on a negative index to convey "the start of the invalid sequence was some number of
// bytes back before the current buffer." Since we know the invalid sequence must have
// started at the beginning of our leftover byte buffer, we can signal to our caller that
// they must backtrack that many bytes to find the real start of the invalid sequence.
if (FallbackBuffer.Fallback(combinedBuffer.Slice(0, combinedBufferBytesConsumed).ToArray(), index: -_leftoverByteCount)
&& !_fallbackBuffer!.TryDrainRemainingDataForGetChars(chars, out charsWritten))
{
goto DestinationTooSmall;
}
Finish:
// Report back the number of bytes (from the new incoming span) we consumed just now.
// This calculation is simple: it's the difference between the original leftover byte
// count and the number of bytes from the combined buffer we needed to decode the first
// scalar value. We need to report this before the call to SetLeftoverData /
// ClearLeftoverData because those methods will overwrite the _leftoverByteCount field.
bytesConsumed = combinedBufferBytesConsumed - _leftoverByteCount;
if (persistNewCombinedBuffer)
{
Debug.Assert(combinedBufferBytesConsumed == combinedBuffer.Length, "We should be asked to persist the entire combined buffer.");
SetLeftoverData(combinedBuffer); // the buffer still only contains partial data; a future call to Convert will need it
}
else
{
ClearLeftoverData(); // the buffer contains no partial data; we'll go down the normal paths
}
return charsWritten;
DestinationTooSmall:
// If we got to this point, we're trying to write chars to the output buffer, but we're unable to do
// so. Unlike EncoderNLS, this type does not allow partial writes to the output buffer. Since we know
// draining leftover data is the first operation performed by any DecoderNLS API, there was no
// opportunity for any code before us to make forward progress, so we must fail immediately.
_encoding.ThrowCharsOverflow(this, nothingDecoded: true);
throw null!; // will never reach this point
}
/// <summary>
/// Given a byte buffer <paramref name="dest"/>, concatenates as much of <paramref name="srcLeft"/> followed
/// by <paramref name="srcRight"/> into it as will fit, then returns the total number of bytes copied.
/// </summary>
private static int ConcatInto(ReadOnlySpan<byte> srcLeft, ReadOnlySpan<byte> srcRight, Span<byte> dest)
{
int total = 0;
for (int i = 0; i < srcLeft.Length; i++)
{
if ((uint)total >= (uint)dest.Length)
{
goto Finish;
}
else
{
dest[total++] = srcLeft[i];
}
}
for (int i = 0; i < srcRight.Length; i++)
{
if ((uint)total >= (uint)dest.Length)
{
goto Finish;
}
else
{
dest[total++] = srcRight[i];
}
}
Finish:
return total;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Buffers;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace System.Text
{
// A Decoder is used to decode a sequence of blocks of bytes into a
// sequence of blocks of characters. Following instantiation of a decoder,
// sequential blocks of bytes are converted into blocks of characters through
// calls to the GetChars method. The decoder maintains state between the
// conversions, allowing it to correctly decode byte sequences that span
// adjacent blocks.
//
// Instances of specific implementations of the Decoder abstract base
// class are typically obtained through calls to the GetDecoder method
// of Encoding objects.
internal class DecoderNLS : Decoder
{
// Remember our encoding
private readonly Encoding _encoding;
private bool _mustFlush;
internal bool _throwOnOverflow;
internal int _bytesUsed;
private int _leftoverBytes; // leftover data from a previous invocation of GetChars (up to 4 bytes)
private int _leftoverByteCount; // number of bytes of actual data in _leftoverBytes
internal DecoderNLS(Encoding encoding)
{
_encoding = encoding;
_fallback = this._encoding.DecoderFallback;
this.Reset();
}
public override void Reset()
{
ClearLeftoverData();
_fallbackBuffer?.Reset();
}
public override int GetCharCount(byte[] bytes, int index, int count)
{
return GetCharCount(bytes, index, count, false);
}
public override unsafe int GetCharCount(byte[] bytes!!, int index, int count, bool flush)
{
// Validate Parameters
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count),
SR.ArgumentOutOfRange_NeedNonNegNum);
if (bytes.Length - index < count)
throw new ArgumentOutOfRangeException(nameof(bytes),
SR.ArgumentOutOfRange_IndexCountBuffer);
// Just call pointer version
fixed (byte* pBytes = &MemoryMarshal.GetReference((Span<byte>)bytes))
return GetCharCount(pBytes + index, count, flush);
}
public override unsafe int GetCharCount(byte* bytes!!, int count, bool flush)
{
// Validate parameters
if (count < 0)
throw new ArgumentOutOfRangeException(nameof(count),
SR.ArgumentOutOfRange_NeedNonNegNum);
// Remember the flush
_mustFlush = flush;
_throwOnOverflow = true;
// By default just call the encoding version, no flush by default
Debug.Assert(_encoding != null);
return _encoding.GetCharCount(bytes, count, this);
}
public override int GetChars(byte[] bytes, int byteIndex, int byteCount,
char[] chars, int charIndex)
{
return GetChars(bytes, byteIndex, byteCount, chars, charIndex, false);
}
public override unsafe int GetChars(byte[] bytes!!, int byteIndex, int byteCount,
char[] chars!!, int charIndex, bool flush)
{
// Validate Parameters
if (byteIndex < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException(byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
if (bytes.Length - byteIndex < byteCount)
throw new ArgumentOutOfRangeException(nameof(bytes),
SR.ArgumentOutOfRange_IndexCountBuffer);
if (charIndex < 0 || charIndex > chars.Length)
throw new ArgumentOutOfRangeException(nameof(charIndex),
SR.ArgumentOutOfRange_Index);
int charCount = chars.Length - charIndex;
// Just call pointer version
fixed (byte* pBytes = &MemoryMarshal.GetReference((Span<byte>)bytes))
fixed (char* pChars = &MemoryMarshal.GetReference((Span<char>)chars))
// Remember that charCount is # to decode, not size of array
return GetChars(pBytes + byteIndex, byteCount,
pChars + charIndex, charCount, flush);
}
public override unsafe int GetChars(byte* bytes!!, int byteCount,
char* chars!!, int charCount, bool flush)
{
// Validate parameters
if (byteCount < 0 || charCount < 0)
throw new ArgumentOutOfRangeException(byteCount < 0 ? nameof(byteCount) : nameof(charCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
// Remember our flush
_mustFlush = flush;
_throwOnOverflow = true;
// By default just call the encodings version
Debug.Assert(_encoding != null);
return _encoding.GetChars(bytes, byteCount, chars, charCount, this);
}
// This method is used when the output buffer might not be big enough.
// Just call the pointer version. (This gets chars)
public override unsafe void Convert(byte[] bytes!!, int byteIndex, int byteCount,
char[] chars!!, int charIndex, int charCount, bool flush,
out int bytesUsed, out int charsUsed, out bool completed)
{
// Validate parameters
if (byteIndex < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException(byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
if (charIndex < 0 || charCount < 0)
throw new ArgumentOutOfRangeException(charIndex < 0 ? nameof(charIndex) : nameof(charCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
if (bytes.Length - byteIndex < byteCount)
throw new ArgumentOutOfRangeException(nameof(bytes),
SR.ArgumentOutOfRange_IndexCountBuffer);
if (chars.Length - charIndex < charCount)
throw new ArgumentOutOfRangeException(nameof(chars),
SR.ArgumentOutOfRange_IndexCountBuffer);
// Just call the pointer version (public overrides can't do this)
fixed (byte* pBytes = &MemoryMarshal.GetReference((Span<byte>)bytes))
{
fixed (char* pChars = &MemoryMarshal.GetReference((Span<char>)chars))
{
Convert(pBytes + byteIndex, byteCount, pChars + charIndex, charCount, flush,
out bytesUsed, out charsUsed, out completed);
}
}
}
// This is the version that used pointers. We call the base encoding worker function
// after setting our appropriate internal variables. This is getting chars
public override unsafe void Convert(byte* bytes, int byteCount,
char* chars, int charCount, bool flush,
out int bytesUsed, out int charsUsed, out bool completed)
{
// Validate input parameters
if (chars == null || bytes == null)
throw new ArgumentNullException(chars == null ? nameof(chars) : nameof(bytes),
SR.ArgumentNull_Array);
if (byteCount < 0 || charCount < 0)
throw new ArgumentOutOfRangeException(byteCount < 0 ? nameof(byteCount) : nameof(charCount),
SR.ArgumentOutOfRange_NeedNonNegNum);
// We don't want to throw
_mustFlush = flush;
_throwOnOverflow = false;
_bytesUsed = 0;
// Do conversion
Debug.Assert(_encoding != null);
charsUsed = _encoding.GetChars(bytes, byteCount, chars, charCount, this);
bytesUsed = _bytesUsed;
// See comment in EncoderNLS.Convert for the details of the logic below.
completed = (bytesUsed == byteCount)
&& (!flush || !this.HasState)
&& (_fallbackBuffer is null || _fallbackBuffer.Remaining == 0);
}
public bool MustFlush => _mustFlush;
// Anything left in our decoder?
internal virtual bool HasState => _leftoverByteCount != 0;
// Allow encoding to clear our must flush instead of throwing (in ThrowCharsOverflow)
internal void ClearMustFlush()
{
_mustFlush = false;
}
internal ReadOnlySpan<byte> GetLeftoverData() =>
MemoryMarshal.AsBytes(new ReadOnlySpan<int>(ref _leftoverBytes, 1)).Slice(0, _leftoverByteCount);
internal void SetLeftoverData(ReadOnlySpan<byte> bytes)
{
bytes.CopyTo(MemoryMarshal.AsBytes(new Span<int>(ref _leftoverBytes, 1)));
_leftoverByteCount = bytes.Length;
}
internal bool HasLeftoverData => _leftoverByteCount != 0;
internal void ClearLeftoverData()
{
_leftoverByteCount = 0;
}
internal int DrainLeftoverDataForGetCharCount(ReadOnlySpan<byte> bytes, out int bytesConsumed)
{
// Quick check: we _should not_ have leftover fallback data from a previous invocation,
// as we'd end up consuming any such data and would corrupt whatever Convert call happens
// to be in progress. Unlike EncoderNLS, this is simply a Debug.Assert. No exception is thrown.
Debug.Assert(_fallbackBuffer is null || _fallbackBuffer.Remaining == 0, "Should have no data remaining in the fallback buffer.");
Debug.Assert(HasLeftoverData, "Caller shouldn't invoke this routine unless there's leftover data in the decoder.");
// Copy the existing leftover data plus as many bytes as possible of the new incoming data
// into a temporary concated buffer, then get its char count by decoding it.
Span<byte> combinedBuffer = stackalloc byte[4];
combinedBuffer = combinedBuffer.Slice(0, ConcatInto(GetLeftoverData(), bytes, combinedBuffer));
int charCount = 0;
Debug.Assert(_encoding != null);
switch (_encoding.DecodeFirstRune(combinedBuffer, out Rune value, out int combinedBufferBytesConsumed))
{
case OperationStatus.Done:
charCount = value.Utf16SequenceLength;
goto Finish; // successfully transcoded bytes -> chars
case OperationStatus.NeedMoreData:
if (MustFlush)
{
goto case OperationStatus.InvalidData; // treat as equivalent to bad data
}
else
{
goto Finish; // consumed some bytes, output 0 chars
}
case OperationStatus.InvalidData:
break;
default:
Debug.Fail("Unexpected OperationStatus return value.");
break;
}
// Couldn't decode the buffer. Fallback the buffer instead. See comment in DrainLeftoverDataForGetChars
// for more information on why a negative index is provided.
if (FallbackBuffer.Fallback(combinedBuffer.Slice(0, combinedBufferBytesConsumed).ToArray(), index: -_leftoverByteCount))
{
charCount = _fallbackBuffer!.DrainRemainingDataForGetCharCount();
Debug.Assert(charCount >= 0, "Fallback buffer shouldn't have returned a negative char count.");
}
Finish:
bytesConsumed = combinedBufferBytesConsumed - _leftoverByteCount; // amount of 'bytes' buffer consumed just now
return charCount;
}
internal int DrainLeftoverDataForGetChars(ReadOnlySpan<byte> bytes, Span<char> chars, out int bytesConsumed)
{
// Quick check: we _should not_ have leftover fallback data from a previous invocation,
// as we'd end up consuming any such data and would corrupt whatever Convert call happens
// to be in progress. Unlike EncoderNLS, this is simply a Debug.Assert. No exception is thrown.
Debug.Assert(_fallbackBuffer is null || _fallbackBuffer.Remaining == 0, "Should have no data remaining in the fallback buffer.");
Debug.Assert(HasLeftoverData, "Caller shouldn't invoke this routine unless there's leftover data in the decoder.");
// Copy the existing leftover data plus as many bytes as possible of the new incoming data
// into a temporary concated buffer, then transcode it from bytes to chars.
Span<byte> combinedBuffer = stackalloc byte[4];
combinedBuffer = combinedBuffer.Slice(0, ConcatInto(GetLeftoverData(), bytes, combinedBuffer));
int charsWritten = 0;
bool persistNewCombinedBuffer = false;
Debug.Assert(_encoding != null);
switch (_encoding.DecodeFirstRune(combinedBuffer, out Rune value, out int combinedBufferBytesConsumed))
{
case OperationStatus.Done:
if (value.TryEncodeToUtf16(chars, out charsWritten))
{
goto Finish; // successfully transcoded bytes -> chars
}
else
{
goto DestinationTooSmall;
}
case OperationStatus.NeedMoreData:
if (MustFlush)
{
goto case OperationStatus.InvalidData; // treat as equivalent to bad data
}
else
{
persistNewCombinedBuffer = true;
goto Finish; // successfully consumed some bytes, output no chars
}
case OperationStatus.InvalidData:
break;
default:
Debug.Fail("Unexpected OperationStatus return value.");
break;
}
// Couldn't decode the buffer. Fallback the buffer instead. The fallback mechanism relies
// on a negative index to convey "the start of the invalid sequence was some number of
// bytes back before the current buffer." Since we know the invalid sequence must have
// started at the beginning of our leftover byte buffer, we can signal to our caller that
// they must backtrack that many bytes to find the real start of the invalid sequence.
if (FallbackBuffer.Fallback(combinedBuffer.Slice(0, combinedBufferBytesConsumed).ToArray(), index: -_leftoverByteCount)
&& !_fallbackBuffer!.TryDrainRemainingDataForGetChars(chars, out charsWritten))
{
goto DestinationTooSmall;
}
Finish:
// Report back the number of bytes (from the new incoming span) we consumed just now.
// This calculation is simple: it's the difference between the original leftover byte
// count and the number of bytes from the combined buffer we needed to decode the first
// scalar value. We need to report this before the call to SetLeftoverData /
// ClearLeftoverData because those methods will overwrite the _leftoverByteCount field.
bytesConsumed = combinedBufferBytesConsumed - _leftoverByteCount;
if (persistNewCombinedBuffer)
{
Debug.Assert(combinedBufferBytesConsumed == combinedBuffer.Length, "We should be asked to persist the entire combined buffer.");
SetLeftoverData(combinedBuffer); // the buffer still only contains partial data; a future call to Convert will need it
}
else
{
ClearLeftoverData(); // the buffer contains no partial data; we'll go down the normal paths
}
return charsWritten;
DestinationTooSmall:
// If we got to this point, we're trying to write chars to the output buffer, but we're unable to do
// so. Unlike EncoderNLS, this type does not allow partial writes to the output buffer. Since we know
// draining leftover data is the first operation performed by any DecoderNLS API, there was no
// opportunity for any code before us to make forward progress, so we must fail immediately.
_encoding.ThrowCharsOverflow(this, nothingDecoded: true);
throw null!; // will never reach this point
}
/// <summary>
/// Given a byte buffer <paramref name="dest"/>, concatenates as much of <paramref name="srcLeft"/> followed
/// by <paramref name="srcRight"/> into it as will fit, then returns the total number of bytes copied.
/// </summary>
private static int ConcatInto(ReadOnlySpan<byte> srcLeft, ReadOnlySpan<byte> srcRight, Span<byte> dest)
{
int total = 0;
for (int i = 0; i < srcLeft.Length; i++)
{
if ((uint)total >= (uint)dest.Length)
{
goto Finish;
}
else
{
dest[total++] = srcLeft[i];
}
}
for (int i = 0; i < srcRight.Length; i++)
{
if ((uint)total >= (uint)dest.Length)
{
goto Finish;
}
else
{
dest[total++] = srcRight[i];
}
}
Finish:
return total;
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
internal static partial class Interop
{
internal static partial class Kernel32
{
internal static class PurgeFlags
{
internal const uint PURGE_TXABORT = 0x0001; // Kill the pending/current writes to the comm port.
internal const uint PURGE_RXABORT = 0x0002; // Kill the pending/current reads to the comm port.
internal const uint PURGE_TXCLEAR = 0x0004; // Kill the transmit queue if there.
internal const uint PURGE_RXCLEAR = 0x0008; // Kill the typeahead buffer if there.
}
[LibraryImport(Libraries.Kernel32, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static partial bool PurgeComm(
SafeFileHandle hFile,
uint dwFlags);
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
internal static partial class Interop
{
internal static partial class Kernel32
{
internal static class PurgeFlags
{
internal const uint PURGE_TXABORT = 0x0001; // Kill the pending/current writes to the comm port.
internal const uint PURGE_RXABORT = 0x0002; // Kill the pending/current reads to the comm port.
internal const uint PURGE_TXCLEAR = 0x0004; // Kill the transmit queue if there.
internal const uint PURGE_RXCLEAR = 0x0008; // Kill the typeahead buffer if there.
}
[LibraryImport(Libraries.Kernel32, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static partial bool PurgeComm(
SafeFileHandle hFile,
uint dwFlags);
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/coreclr/pal/src/libunwind/src/s390x/Ginit.c
|
/* libunwind - a platform-independent unwind library
Copyright (C) 2002 Hewlett-Packard Co
Copyright (C) 2007 David Mosberger-Tang
Contributed by David Mosberger-Tang <[email protected]>
Modified for x86_64 by Max Asbock <[email protected]>
Modified for s390x by Michael Munday <[email protected]>
This file is part of libunwind.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include "unwind_i.h"
#ifdef UNW_REMOTE_ONLY
/* unw_local_addr_space is a NULL pointer in this case. */
unw_addr_space_t unw_local_addr_space;
#else /* !UNW_REMOTE_ONLY */
static struct unw_addr_space local_addr_space;
unw_addr_space_t unw_local_addr_space = &local_addr_space;
static inline void *
uc_addr (ucontext_t *uc, int reg)
{
if (reg >= UNW_S390X_R0 && reg <= UNW_S390X_R15)
return &uc->uc_mcontext.gregs[reg - UNW_S390X_R0];
if (reg >= UNW_S390X_F0 && reg <= UNW_S390X_F15)
return &uc->uc_mcontext.fpregs.fprs[reg - UNW_S390X_F0];
if (reg == UNW_S390X_IP)
return &uc->uc_mcontext.psw.addr;
return NULL;
}
# ifdef UNW_LOCAL_ONLY
HIDDEN void *
tdep_uc_addr (ucontext_t *uc, int reg)
{
return uc_addr (uc, reg);
}
# endif /* UNW_LOCAL_ONLY */
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
/* it's a no-op */
}
static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
#ifndef UNW_LOCAL_ONLY
# pragma weak _U_dyn_info_list_addr
if (!_U_dyn_info_list_addr)
return -UNW_ENOINFO;
#endif
// Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
*dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
#define PAGE_SIZE 4096
#define PAGE_START(a) ((a) & ~(PAGE_SIZE-1))
static int mem_validate_pipe[2] = {-1, -1};
static inline void
open_pipe (void)
{
/* ignore errors for closing invalid fd's */
close (mem_validate_pipe[0]);
close (mem_validate_pipe[1]);
pipe2 (mem_validate_pipe, O_CLOEXEC | O_NONBLOCK);
}
ALWAYS_INLINE
static int
write_validate (void *addr)
{
int ret = -1;
ssize_t bytes = 0;
do
{
char buf;
bytes = read (mem_validate_pipe[0], &buf, 1);
}
while ( errno == EINTR );
int valid_read = (bytes > 0 || errno == EAGAIN || errno == EWOULDBLOCK);
if (!valid_read)
{
// re-open closed pipe
open_pipe ();
}
do
{
/* use syscall insteadof write() so that ASAN does not complain */
ret = syscall (SYS_write, mem_validate_pipe[1], addr, 1);
}
while ( errno == EINTR );
return ret;
}
static int (*mem_validate_func) (void *addr, size_t len);
static int msync_validate (void *addr, size_t len)
{
if (msync (addr, len, MS_ASYNC) != 0)
{
return -1;
}
return write_validate (addr);
}
#ifdef HAVE_MINCORE
static int mincore_validate (void *addr, size_t len)
{
unsigned char mvec[2]; /* Unaligned access may cross page boundary */
size_t i;
/* mincore could fail with EAGAIN but we conservatively return -1
instead of looping. */
if (mincore (addr, len, mvec) != 0)
{
return -1;
}
for (i = 0; i < (len + PAGE_SIZE - 1) / PAGE_SIZE; i++)
{
if (!(mvec[i] & 1)) return -1;
}
return write_validate (addr);
}
#endif
/* Initialise memory validation method. On linux kernels <2.6.21,
mincore() returns incorrect value for MAP_PRIVATE mappings,
such as stacks. If mincore() was available at compile time,
check if we can actually use it. If not, use msync() instead. */
HIDDEN void
tdep_init_mem_validate (void)
{
open_pipe ();
#ifdef HAVE_MINCORE
unsigned char present = 1;
unw_word_t addr = PAGE_START((unw_word_t)&present);
unsigned char mvec[1];
int ret;
while ((ret = mincore ((void*)addr, PAGE_SIZE, mvec)) == -1 &&
errno == EAGAIN) {}
if (ret == 0 && (mvec[0] & 1))
{
Debug(1, "using mincore to validate memory\n");
mem_validate_func = mincore_validate;
}
else
#endif
{
Debug(1, "using msync to validate memory\n");
mem_validate_func = msync_validate;
}
}
/* Cache of already validated addresses */
#define NLGA 4
static unw_word_t last_good_addr[NLGA];
static int lga_victim;
static int
validate_mem (unw_word_t addr)
{
int i, victim;
size_t len;
if (PAGE_START(addr + sizeof (unw_word_t) - 1) == PAGE_START(addr))
len = PAGE_SIZE;
else
len = PAGE_SIZE * 2;
addr = PAGE_START(addr);
if (addr == 0)
return -1;
for (i = 0; i < NLGA; i++)
{
if (last_good_addr[i] && (addr == last_good_addr[i]))
return 0;
}
if (mem_validate_func ((void *) addr, len) == -1)
return -1;
victim = lga_victim;
for (i = 0; i < NLGA; i++) {
if (!last_good_addr[victim]) {
last_good_addr[victim++] = addr;
return 0;
}
victim = (victim + 1) % NLGA;
}
/* All slots full. Evict the victim. */
last_good_addr[victim] = addr;
victim = (victim + 1) % NLGA;
lga_victim = victim;
return 0;
}
static int
access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
void *arg)
{
if (unlikely (write))
{
Debug (16, "mem[%016lx] <- %lx\n", addr, *val);
*(unw_word_t *) addr = *val;
}
else
{
/* validate address */
const struct cursor *c = (const struct cursor *)arg;
if (likely (c != NULL) && unlikely (c->validate)
&& unlikely (validate_mem (addr))) {
Debug (16, "mem[%016lx] -> invalid\n", addr);
return -1;
}
*val = *(unw_word_t *) addr;
Debug (16, "mem[%016lx] -> %lx\n", addr, *val);
}
return 0;
}
static int
access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
void *arg)
{
unw_word_t *addr;
ucontext_t *uc = ((struct cursor *)arg)->uc;
if (unw_is_fpreg (reg))
goto badreg;
if (!(addr = uc_addr (uc, reg)))
goto badreg;
if (write)
{
*(unw_word_t *) addr = *val;
Debug (12, "%s <- 0x%016lx\n", unw_regname (reg), *val);
}
else
{
*val = *(unw_word_t *) addr;
Debug (12, "%s -> 0x%016lx\n", unw_regname (reg), *val);
}
return 0;
badreg:
Debug (1, "bad register number %u\n", reg);
return -UNW_EBADREG;
}
static int
access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
int write, void *arg)
{
ucontext_t *uc = ((struct cursor *)arg)->uc;
unw_fpreg_t *addr;
if (!unw_is_fpreg (reg))
goto badreg;
if (!(addr = uc_addr (uc, reg)))
goto badreg;
if (write)
{
Debug (12, "%s <- %08lx.%08lx.%08lx\n", unw_regname (reg),
((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
*(unw_fpreg_t *) addr = *val;
}
else
{
*val = *(unw_fpreg_t *) addr;
Debug (12, "%s -> %08lx.%08lx.%08lx\n", unw_regname (reg),
((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
}
return 0;
badreg:
Debug (1, "bad register number %u\n", reg);
/* attempt to access a non-preserved register */
return -UNW_EBADREG;
}
static int
get_static_proc_name (unw_addr_space_t as, unw_word_t ip,
char *buf, size_t buf_len, unw_word_t *offp,
void *arg)
{
return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp);
}
HIDDEN void
s390x_local_addr_space_init (void)
{
memset (&local_addr_space, 0, sizeof (local_addr_space));
local_addr_space.caching_policy = UNW_CACHE_GLOBAL;
local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
local_addr_space.acc.put_unwind_info = put_unwind_info;
local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr;
local_addr_space.acc.access_mem = access_mem;
local_addr_space.acc.access_reg = access_reg;
local_addr_space.acc.access_fpreg = access_fpreg;
local_addr_space.acc.resume = s390x_local_resume;
local_addr_space.acc.get_proc_name = get_static_proc_name;
unw_flush_cache (&local_addr_space, 0, 0);
memset (last_good_addr, 0, sizeof (unw_word_t) * NLGA);
lga_victim = 0;
}
#endif /* !UNW_REMOTE_ONLY */
|
/* libunwind - a platform-independent unwind library
Copyright (C) 2002 Hewlett-Packard Co
Copyright (C) 2007 David Mosberger-Tang
Contributed by David Mosberger-Tang <[email protected]>
Modified for x86_64 by Max Asbock <[email protected]>
Modified for s390x by Michael Munday <[email protected]>
This file is part of libunwind.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include "unwind_i.h"
#ifdef UNW_REMOTE_ONLY
/* unw_local_addr_space is a NULL pointer in this case. */
unw_addr_space_t unw_local_addr_space;
#else /* !UNW_REMOTE_ONLY */
static struct unw_addr_space local_addr_space;
unw_addr_space_t unw_local_addr_space = &local_addr_space;
static inline void *
uc_addr (ucontext_t *uc, int reg)
{
if (reg >= UNW_S390X_R0 && reg <= UNW_S390X_R15)
return &uc->uc_mcontext.gregs[reg - UNW_S390X_R0];
if (reg >= UNW_S390X_F0 && reg <= UNW_S390X_F15)
return &uc->uc_mcontext.fpregs.fprs[reg - UNW_S390X_F0];
if (reg == UNW_S390X_IP)
return &uc->uc_mcontext.psw.addr;
return NULL;
}
# ifdef UNW_LOCAL_ONLY
HIDDEN void *
tdep_uc_addr (ucontext_t *uc, int reg)
{
return uc_addr (uc, reg);
}
# endif /* UNW_LOCAL_ONLY */
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
/* it's a no-op */
}
static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
#ifndef UNW_LOCAL_ONLY
# pragma weak _U_dyn_info_list_addr
if (!_U_dyn_info_list_addr)
return -UNW_ENOINFO;
#endif
// Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
*dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
#define PAGE_SIZE 4096
#define PAGE_START(a) ((a) & ~(PAGE_SIZE-1))
static int mem_validate_pipe[2] = {-1, -1};
static inline void
open_pipe (void)
{
/* ignore errors for closing invalid fd's */
close (mem_validate_pipe[0]);
close (mem_validate_pipe[1]);
pipe2 (mem_validate_pipe, O_CLOEXEC | O_NONBLOCK);
}
ALWAYS_INLINE
static int
write_validate (void *addr)
{
int ret = -1;
ssize_t bytes = 0;
do
{
char buf;
bytes = read (mem_validate_pipe[0], &buf, 1);
}
while ( errno == EINTR );
int valid_read = (bytes > 0 || errno == EAGAIN || errno == EWOULDBLOCK);
if (!valid_read)
{
// re-open closed pipe
open_pipe ();
}
do
{
/* use syscall insteadof write() so that ASAN does not complain */
ret = syscall (SYS_write, mem_validate_pipe[1], addr, 1);
}
while ( errno == EINTR );
return ret;
}
static int (*mem_validate_func) (void *addr, size_t len);
static int msync_validate (void *addr, size_t len)
{
if (msync (addr, len, MS_ASYNC) != 0)
{
return -1;
}
return write_validate (addr);
}
#ifdef HAVE_MINCORE
static int mincore_validate (void *addr, size_t len)
{
unsigned char mvec[2]; /* Unaligned access may cross page boundary */
size_t i;
/* mincore could fail with EAGAIN but we conservatively return -1
instead of looping. */
if (mincore (addr, len, mvec) != 0)
{
return -1;
}
for (i = 0; i < (len + PAGE_SIZE - 1) / PAGE_SIZE; i++)
{
if (!(mvec[i] & 1)) return -1;
}
return write_validate (addr);
}
#endif
/* Initialise memory validation method. On linux kernels <2.6.21,
mincore() returns incorrect value for MAP_PRIVATE mappings,
such as stacks. If mincore() was available at compile time,
check if we can actually use it. If not, use msync() instead. */
HIDDEN void
tdep_init_mem_validate (void)
{
open_pipe ();
#ifdef HAVE_MINCORE
unsigned char present = 1;
unw_word_t addr = PAGE_START((unw_word_t)&present);
unsigned char mvec[1];
int ret;
while ((ret = mincore ((void*)addr, PAGE_SIZE, mvec)) == -1 &&
errno == EAGAIN) {}
if (ret == 0 && (mvec[0] & 1))
{
Debug(1, "using mincore to validate memory\n");
mem_validate_func = mincore_validate;
}
else
#endif
{
Debug(1, "using msync to validate memory\n");
mem_validate_func = msync_validate;
}
}
/* Cache of already validated addresses */
#define NLGA 4
static unw_word_t last_good_addr[NLGA];
static int lga_victim;
static int
validate_mem (unw_word_t addr)
{
int i, victim;
size_t len;
if (PAGE_START(addr + sizeof (unw_word_t) - 1) == PAGE_START(addr))
len = PAGE_SIZE;
else
len = PAGE_SIZE * 2;
addr = PAGE_START(addr);
if (addr == 0)
return -1;
for (i = 0; i < NLGA; i++)
{
if (last_good_addr[i] && (addr == last_good_addr[i]))
return 0;
}
if (mem_validate_func ((void *) addr, len) == -1)
return -1;
victim = lga_victim;
for (i = 0; i < NLGA; i++) {
if (!last_good_addr[victim]) {
last_good_addr[victim++] = addr;
return 0;
}
victim = (victim + 1) % NLGA;
}
/* All slots full. Evict the victim. */
last_good_addr[victim] = addr;
victim = (victim + 1) % NLGA;
lga_victim = victim;
return 0;
}
static int
access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
void *arg)
{
if (unlikely (write))
{
Debug (16, "mem[%016lx] <- %lx\n", addr, *val);
*(unw_word_t *) addr = *val;
}
else
{
/* validate address */
const struct cursor *c = (const struct cursor *)arg;
if (likely (c != NULL) && unlikely (c->validate)
&& unlikely (validate_mem (addr))) {
Debug (16, "mem[%016lx] -> invalid\n", addr);
return -1;
}
*val = *(unw_word_t *) addr;
Debug (16, "mem[%016lx] -> %lx\n", addr, *val);
}
return 0;
}
static int
access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
void *arg)
{
unw_word_t *addr;
ucontext_t *uc = ((struct cursor *)arg)->uc;
if (unw_is_fpreg (reg))
goto badreg;
if (!(addr = uc_addr (uc, reg)))
goto badreg;
if (write)
{
*(unw_word_t *) addr = *val;
Debug (12, "%s <- 0x%016lx\n", unw_regname (reg), *val);
}
else
{
*val = *(unw_word_t *) addr;
Debug (12, "%s -> 0x%016lx\n", unw_regname (reg), *val);
}
return 0;
badreg:
Debug (1, "bad register number %u\n", reg);
return -UNW_EBADREG;
}
static int
access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
int write, void *arg)
{
ucontext_t *uc = ((struct cursor *)arg)->uc;
unw_fpreg_t *addr;
if (!unw_is_fpreg (reg))
goto badreg;
if (!(addr = uc_addr (uc, reg)))
goto badreg;
if (write)
{
Debug (12, "%s <- %08lx.%08lx.%08lx\n", unw_regname (reg),
((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
*(unw_fpreg_t *) addr = *val;
}
else
{
*val = *(unw_fpreg_t *) addr;
Debug (12, "%s -> %08lx.%08lx.%08lx\n", unw_regname (reg),
((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
}
return 0;
badreg:
Debug (1, "bad register number %u\n", reg);
/* attempt to access a non-preserved register */
return -UNW_EBADREG;
}
static int
get_static_proc_name (unw_addr_space_t as, unw_word_t ip,
char *buf, size_t buf_len, unw_word_t *offp,
void *arg)
{
return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp);
}
HIDDEN void
s390x_local_addr_space_init (void)
{
memset (&local_addr_space, 0, sizeof (local_addr_space));
local_addr_space.caching_policy = UNW_CACHE_GLOBAL;
local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
local_addr_space.acc.put_unwind_info = put_unwind_info;
local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr;
local_addr_space.acc.access_mem = access_mem;
local_addr_space.acc.access_reg = access_reg;
local_addr_space.acc.access_fpreg = access_fpreg;
local_addr_space.acc.resume = s390x_local_resume;
local_addr_space.acc.get_proc_name = get_static_proc_name;
unw_flush_cache (&local_addr_space, 0, 0);
memset (last_good_addr, 0, sizeof (unw_word_t) * NLGA);
lga_victim = 0;
}
#endif /* !UNW_REMOTE_ONLY */
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Private.Xml/tests/XmlReaderLib/CXMLReaderAttrTest.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using OLEDB.Test.ModuleCore;
using System.IO;
using XmlCoreTest.Common;
namespace System.Xml.Tests
{
////////////////////////////////////////////////////////////////
// TestCase TCXML AttributeAccess
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCAttributeAccess : TCXMLReaderBaseGeneral
{
[Variation("Attribute Access test using ordinal (Ascending Order)", Pri = 0)]
public int TestAttributeAccess1()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
string[] astr = new string[10];
string n;
string qname;
DataReader.PositionOnElement("ACT0");
CError.WriteLine("============With Namespace");
int start = 1;
int end = DataReader.AttributeCount;
if (IsXsltReader())
{
// That's because after the Transform the order of the attribute is changed
// <ACT0 xmlns:foo="http://www.foo.com" foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" />
// becomes
// <ACT0 foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" xmlns:foo="http://www.foo.com" />
start = 0;
end = DataReader.AttributeCount - 1;
}
for (int i = start; i < end; i++)
{
if (IsXsltReader() || IsXPathNavigatorReader())
{
astr[i] = DataReader[i];
n = strAttr + i;
}
else
{
astr[i - 1] = DataReader[i];
n = strAttr + (i - 1);
}
qname = "foo:" + n;
CError.WriteLine(qname);
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n, strNamespace], DataReader.GetAttribute(n, strNamespace), "Compare this(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.Compare(DataReader[i], DataReader[n, strNamespace], "Compare this(i) with this(name,strNamespace)");
CError.Compare(DataReader.MoveToAttribute(n, strNamespace), true, "MoveToAttribute(name,strNamespace)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n, strNamespace), "Compare MoveToAttribute(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.WriteLine(i + " GetAttribute(n,strNamespace)=" + DataReader.GetAttribute(n, strNamespace) + " this[n,strNamespace]=" + DataReader[n, strNamespace] + " Value=" + DataReader.Value);
CError.Compare(DataReader[i], DataReader[qname], "Compare this(i) with this(qname)");
CError.Compare(DataReader.MoveToAttribute(qname), true, "MoveToAttribute(qname)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(qname), "Compare MoveToAttribute(qname) with GetAttribute(qname)");
CError.WriteLine(i + " GetAttribute(qname)=" + DataReader.GetAttribute(qname) + " this[qname]=" + DataReader[qname] + " Value=" + DataReader.Value);
}
DataReader.PositionOnElement("ACT1");
CError.WriteLine("============Without Namespace");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(astr[i], DataReader.GetAttribute(i), "Compare value with GetAttribute");
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
n = strAttr + i;
CError.Compare(DataReader[n], DataReader.GetAttribute(n), "Compare this(name) with GetAttribute(name)");
CError.Compare(DataReader[i], DataReader[n], "Compare this(i) with this(name)");
CError.Compare(DataReader.MoveToAttribute(n), true, "MoveToAttribute(name)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n), "Compare MoveToAttribute(name) with GetAttribute(name)");
CError.WriteLine(i + " GetAttribute(n)=" + DataReader.GetAttribute(n) + " this[n]=" + DataReader[n] + " Value=" + DataReader.Value);
}
return TEST_PASS;
}
[Variation("Attribute Access test using ordinal (Descending Order)")]
public int TestAttributeAccess2()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
string[] astr = new string[10];
string n;
string qname;
DataReader.PositionOnElement("ACT0");
CError.WriteLine("============With Namespace");
int start = 1;
int end = DataReader.AttributeCount;
if (IsXsltReader() || IsXPathNavigatorReader())
{
// That's because after the Transform the order of the attribute is changed
// <ACT0 xmlns:foo="http://www.foo.com" foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" />
// becomes
// <ACT0 foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" xmlns:foo="http://www.foo.com" />
start = 0;
end = DataReader.AttributeCount - 1;
}
for (int i = end - 1; i >= start; i--)
{
if (IsXsltReader())
{
astr[i] = DataReader[i];
n = strAttr + i;
}
else
{
astr[i - 1] = DataReader[i];
n = strAttr + (i - 1);
}
qname = "foo:" + n;
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n, strNamespace], DataReader.GetAttribute(n, strNamespace), "Compare this(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.Compare(DataReader[i], DataReader[n, strNamespace], "Compare this(i) with this(name,strNamespace)");
CError.Compare(DataReader.MoveToAttribute(n, strNamespace), true, "MoveToAttribute(name,strNamespace)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n, strNamespace), "Compare MoveToAttribute(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.WriteLine(i + " GetAttribute(n,strNamespace)=" + DataReader.GetAttribute(n, strNamespace) + " this[n,strNamespace]=" + DataReader[n, strNamespace] + " Value=" + DataReader.Value);
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Compare this(qname) with GetAttribute(qname)");
CError.Compare(DataReader[i], DataReader[qname], "Compare this(i) with this(qname)");
CError.Compare(DataReader.MoveToAttribute(qname), true, "MoveToAttribute(qname)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(qname), "Compare MoveToAttribute(qname) with GetAttribute(qname)");
CError.WriteLine(i + " GetAttribute(qname)=" + DataReader.GetAttribute(qname) + " this[qname]=" + DataReader[qname] + " Value=" + DataReader.Value);
}
DataReader.PositionOnElement("ACT1");
CError.WriteLine("============Without Namespace");
for (int i = (DataReader.AttributeCount - 1); i > 0; i--)
{
n = strAttr + i;
CError.WriteLine(i + " " + astr[i] + " GetAttribute(i)=" + DataReader.GetAttribute(i));
CError.Compare(astr[i], DataReader.GetAttribute(i), "Compare value with GetAttribute");
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n], DataReader.GetAttribute(n), "Compare this(name) with GetAttribute(name)");
CError.Compare(DataReader[i], DataReader[n], "Compare this(i) with this(name)");
CError.Compare(DataReader.MoveToAttribute(n), true, "MoveToAttribute(name)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n), "Compare MoveToAttribute(name) with GetAttribute(name)");
CError.WriteLine(i + " GetAttribute(n)=" + DataReader.GetAttribute(n) + " this[n]=" + DataReader[n] + " Value=" + DataReader.Value);
}
return TEST_PASS;
}
[Variation("Attribute Access test using ordinal (Odd number)", Pri = 0)]
public int TestAttributeAccess3()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
string[] astr = new string[10];
string n;
string qname;
DataReader.PositionOnElement("ACT0");
CError.WriteLine("============With Namespace");
int start = 1;
int end = DataReader.AttributeCount;
if (IsXsltReader() || IsXPathNavigatorReader())
{
// That's because after the Transform the order of the attribute is changed
// <ACT0 xmlns:foo="http://www.foo.com" foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" />
// becomes
// <ACT0 foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" xmlns:foo="http://www.foo.com" />
start = 0;
end = DataReader.AttributeCount - 1;
}
for (int i = start; i < end; i += 2)
{
if (IsXsltReader() || IsXPathNavigatorReader())
{
astr[i] = DataReader[i];
n = strAttr + i;
}
else
{
astr[i - 1] = DataReader[i];
n = strAttr + (i - 1);
}
qname = "foo:" + n;
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n, strNamespace], DataReader.GetAttribute(n, strNamespace), "Compare this(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.Compare(DataReader[i], DataReader[n, strNamespace], "Compare this(i) with this(name,strNamespace)");
CError.Compare(DataReader.MoveToAttribute(n, strNamespace), true, "MoveToAttribute(name,strNamespace)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n, strNamespace), "Compare MoveToAttribute(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.WriteLine(i + " GetAttribute(n,strNamespace)=" + DataReader.GetAttribute(n, strNamespace) + " this[n,strNamespace]=" + DataReader[n, strNamespace] + " Value=" + DataReader.Value);
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Compare this(qname) with GetAttribute(qname)");
CError.Compare(DataReader[i], DataReader[qname], "Compare this(i) with this(qname)");
CError.Compare(DataReader.MoveToAttribute(qname), true, "MoveToAttribute(qname)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(qname), "Compare MoveToAttribute(qname) with GetAttribute(qname)");
CError.WriteLine(i + " GetAttribute(qname)=" + DataReader.GetAttribute(qname) + " this[qname]=" + DataReader[qname] + " Value=" + DataReader.Value);
}
DataReader.PositionOnElement("ACT1");
CError.WriteLine("============Without Namespace");
for (int i = 0; i < DataReader.AttributeCount; i += 2)
{
CError.Compare(astr[i], DataReader.GetAttribute(i), "Compare value with GetAttribute");
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
n = strAttr + i;
CError.Compare(DataReader[n], DataReader.GetAttribute(n), "Compare this(name) with GetAttribute(name)");
CError.Compare(DataReader[i], DataReader[n], "Compare this(i) with this(name)");
CError.Compare(DataReader.MoveToAttribute(n), true, "MoveToAttribute(name)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n), "Compare MoveToAttribute(name) with GetAttribute(name)");
CError.WriteLine(i + " GetAttribute(n)=" + DataReader.GetAttribute(n) + " this[n]=" + DataReader[n] + " Value=" + DataReader.Value);
}
return TEST_PASS;
}
[Variation("Attribute Access test using ordinal (Even number)")]
public int TestAttributeAccess4()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED; ReloadSource();
string[] astr = new string[10];
string n;
string qname;
DataReader.PositionOnElement("ACT0");
CError.WriteLine("============With Namespace");
int start = 1;
int end = DataReader.AttributeCount;
if (IsXsltReader())
{
// That's because after the Transform the order of the attribute is changed
// <ACT0 xmlns:foo="http://www.foo.com" foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" />
// becomes
// <ACT0 foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" xmlns:foo="http://www.foo.com" />
start = 0;
end = DataReader.AttributeCount - 1;
}
for (int i = start; i < end; i += 3)
{
if (IsXsltReader() || IsXPathNavigatorReader())
{
astr[i] = DataReader[i];
n = strAttr + i;
}
else
{
astr[i - 1] = DataReader[i];
n = strAttr + (i - 1);
}
qname = "foo:" + n;
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n, strNamespace], DataReader.GetAttribute(n, strNamespace), "Compare this(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.Compare(DataReader[i], DataReader[n, strNamespace], "Compare this(i) with this(name,strNamespace)");
CError.Compare(DataReader.MoveToAttribute(n, strNamespace), true, "MoveToAttribute(name,strNamespace)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n, strNamespace), "Compare MoveToAttribute(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.WriteLine(i + " GetAttribute(n,strNamespace)=" + DataReader.GetAttribute(n, strNamespace) + " this[n,strNamespace]=" + DataReader[n, strNamespace] + " Value=" + DataReader.Value);
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Compare this(qname) with GetAttribute(qname)");
CError.Compare(DataReader[i], DataReader[qname], "Compare this(i) with this(qname)");
CError.Compare(DataReader.MoveToAttribute(qname), true, "MoveToAttribute(qname)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(qname), "Compare MoveToAttribute(qname) with GetAttribute(qname)");
CError.WriteLine(i + " GetAttribute(qname)=" + DataReader.GetAttribute(qname) + " this[qname]=" + DataReader[qname] + " Value=" + DataReader.Value);
}
DataReader.PositionOnElement("ACT1");
CError.WriteLine("============Without Namespace");
for (int i = 0; i < DataReader.AttributeCount; i += 3)
{
CError.Compare(astr[i], DataReader.GetAttribute(i), "Compare value with GetAttribute");
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
n = strAttr + i;
CError.Compare(DataReader[n], DataReader.GetAttribute(n), "Compare this(name) with GetAttribute(name)");
CError.Compare(DataReader[i], DataReader[n], "Compare this(i) with this(name)");
CError.Compare(DataReader.MoveToAttribute(n), true, "MoveToAttribute(name)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n), "Compare MoveToAttribute(name) with GetAttribute(name)");
CError.WriteLine(i + " GetAttribute(n)=" + DataReader.GetAttribute(n) + " this[n]=" + DataReader[n] + " Value=" + DataReader.Value);
}
return TEST_PASS;
}
[Variation("Attribute Access with namespace=null")]
public int TestAttributeAccess5()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
CError.Compare(DataReader[strAttr + 1, null], "1111111101", "Item");
CError.Compare(DataReader.GetAttribute(strAttr + 1, null), "1111111101", "GA");
CError.Compare(DataReader.MoveToAttribute(strAttr + 1, null), "MTA");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML This[Name] and This[Name, Namespace]
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCThisName : TCXMLReaderBaseGeneral
{
[Variation("This[Name] Verify with GetAttribute(Name)", Pri = 0)]
public int ThisWithName1()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName], DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name, null] Verify with GetAttribute(Name)")]
public int ThisWithName2()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName, null], DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name] Verify with GetAttribute(Name,null)")]
public int ThisWithName3()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName], DataReader.GetAttribute(strName, null), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name, NamespaceURI] Verify with GetAttribute(Name, NamespaceURI)", Pri = 0)]
public int ThisWithName4()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName, strNamespace], DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName,strNamespace) and this[strName,strNamespace]");
}
return TEST_PASS;
}
[Variation("This[Name, null] Verify not the same as GetAttribute(Name, NamespaceURI)")]
public int ThisWithName5()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
DataReader.DumpOneNode();
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
if (DataReader.GetAttribute(strName, strNamespace) == DataReader[strName, null])
{
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
}
return TEST_PASS;
}
[Variation("This[Name, NamespaceURI] Verify not the same as GetAttribute(Name, null)")]
public int ThisWithName6()
{
string strName;
ReloadSource();
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
if (DataReader.GetAttribute(strName, null) == DataReader[strName, strNamespace])
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("This[Name] Verify with MoveToAttribute(Name)", Pri = 0)]
public int ThisWithName7()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName);
CError.Compare(DataReader.Value, DataReader[strName], "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name, null] Verify with MoveToAttribute(Name)")]
public int ThisWithName8()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName);
CError.Compare(DataReader.Value, DataReader[strName, null], "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name] Verify with MoveToAttribute(Name,null)")]
public int ThisWithName9()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName, null);
CError.Compare(DataReader.Value, DataReader[strName], "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name, NamespaceURI] Verify not the same as MoveToAttribute(Name, null)", Pri = 0)]
public int ThisWithName10()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
DataReader.MoveToAttribute(strName, null);
if (DataReader[strName, strNamespace] == DataReader.Value)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("This[Name, null] Verify not the same as MoveToAttribute(Name, NamespaceURI)")]
public int ThisWithName11()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName, strNamespace);
if (DataReader[strName, null] == DataReader.Value)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("This[Name, namespace] Verify not the same as MoveToAttribute(Name, namespace)")]
public int ThisWithName12()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
DataReader.MoveToAttribute(strName, strNamespace);
CError.WriteLine(strName + " " + strNamespace + " DataReader.Value=" + DataReader.Value + " DataReader[strName, strNamespace]=" + DataReader[strName, strNamespace]);
CError.Compare(DataReader.Value, DataReader[strName, strNamespace], "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This(String.Empty)")]
public int ThisWithName13()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader[string.Empty], null, "Compare this[String.Empty] with null");
return TEST_PASS;
}
[Variation("This[String.Empty,String.Empty]")]
public int ThisWithName14()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader[string.Empty, string.Empty], null, "Compare GetAttribute(strName) and this[strName]");
return TEST_PASS;
}
[Variation("This[QName] Verify with GetAttribute(Name, NamespaceURI)", Pri = 0)]
public int ThisWithName15()
{
string strName;
string qname;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
qname = "foo:" + strName;
CError.Compare(DataReader[qname], DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName,strNamespace) and this[qname]");
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Ordinal (" + i + "): Compare GetAttribute(qname) and this[qname]");
}
return TEST_PASS;
}
[Variation("This[QName] invalid Qname")]
public int ThisWithName16()
{
string strName;
string qname;
ReloadSource();
DataReader.PositionOnElement("ACT0");
int i = 1;
strName = strAttr + i;
qname = "foo1:" + strName;
CError.Compare(DataReader.MoveToAttribute(qname), false, "MoveToAttribute(invalid qname)");
CError.Compare(DataReader[qname], null, "Compare this[invalid qname] with null");
CError.Compare(DataReader.GetAttribute(qname), null, "Compare GetAttribute(invalid qname) with null");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML MoveToAttribute(Name) and MoveToAttribute(Name, Namespace)
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCMoveToAttribute : TCXMLReaderBaseGeneral
{
[Variation("MoveToAttribute(String.Empty)")]
public int MoveToAttributeWithName1()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader.MoveToAttribute(string.Empty), false, "Compare the call to MoveToAttribute");
CError.Compare(DataReader.Value, string.Empty, "Compare MoveToAttribute with String.Empty");
return TEST_PASS;
}
[Variation("MoveToAttribute(String.Empty,String.Empty)")]
public int MoveToAttributeWithName2()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader.MoveToAttribute(string.Empty, string.Empty), false, "Compare the call to MoveToAttribute");
CError.Compare(DataReader.Value, string.Empty, "Compare MoveToAttribute(strName)");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML GetAttribute(Ordinal)
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCGetAttributeOrdinal : TCXMLReaderBaseGeneral
{
[Variation("GetAttribute(i) Verify with This[i] - Double Quote", Pri = 0)]
public int GetAttributeWithGetAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare GetAttribute(i) and this[i]");
}
return TEST_PASS;
}
[Variation("GetAttribute[i] Verify with This[i] - Single Quote")]
public int OrdinalWithGetAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare GetAttribute(i) and this[i]");
}
return TEST_PASS;
}
[Variation("GetAttribute(i) Verify with MoveToAttribute[i] - Double Quote", Pri = 0)]
public int GetAttributeWithMoveAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader.GetAttribute(i);
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("GetAttribute(i) Verify with MoveToAttribute[i] - Single Quote")]
public int GetAttributeWithMoveAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader.GetAttribute(i);
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader[i], "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("GetAttribute(i) NegativeOneOrdinal", Pri = 0)]
public int NegativeOneOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader.GetAttribute(-1);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
catch (Exception e)
{
CError.WriteLine(e + " : " + e.Message);
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
CError.WriteLine("No Exception Thrown");
return TEST_FAIL;
}
[Variation("GetAttribute(i) FieldCountOrdinal")]
public int FieldCountOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
try
{
string str = DataReader.GetAttribute(DataReader.AttributeCount);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("GetAttribute(i) OrdinalPlusOne", Pri = 0)]
public int OrdinalPlusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader.GetAttribute(DataReader.AttributeCount + 1);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
catch (Exception e)
{
CError.WriteLine(e + " : " + e.Message);
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
CError.WriteLine("No Exception Thrown");
return TEST_FAIL;
}
[Variation("GetAttribute(i) OrdinalMinusOne")]
public int OrdinalMinusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader.GetAttribute(-2);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML GetAttribute(Name) and GetAttribute(Name, Namespace)
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCGetAttributeName : TCXMLReaderBaseGeneral
{
[Variation("GetAttribute(Name) Verify with This[Name]", Pri = 0)]
public int GetAttributeWithName1()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName], DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, null) Verify with This[Name]")]
public int GetAttributeWithName2()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName], DataReader.GetAttribute(strName, null), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name) Verify with This[Name,null]")]
public int GetAttributeWithName3()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName, null], DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, NamespaceURI) Verify with This[Name, NamespaceURI]", Pri = 0)]
public int GetAttributeWithName4()
{
string strName;
string qname;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
qname = "foo:" + strName;
CError.Compare(DataReader[strName, strNamespace], DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName,strNamespace) and this[strName,strNamespace]");
CError.Compare(DataReader[qname], DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName,strNamespace) and this[strName,strNamespace]");
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Ordinal (" + i + "): Compare GetAttribute(qname) and this[qname]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, null) Verify not the same as This[Name, NamespaceURI]")]
public int GetAttributeWithName5()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
if (DataReader.GetAttribute(strName, null) == DataReader[strName, strNamespace])
{
if (DataReader[strName, strNamespace] == string.Empty)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, NamespaceURI) Verify not the same as This[Name, null]")]
public int GetAttributeWithName6()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
DataReader.DumpOneNode();
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
if (DataReader.GetAttribute(strName, strNamespace) == DataReader[strName, null])
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("GetAttribute(Name) Verify with MoveToAttribute(Name)")]
public int GetAttributeWithName7()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName);
CError.Compare(DataReader.Value, DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name,null) Verify with MoveToAttribute(Name)", Pri = 1)]
public int GetAttributeWithName8()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName);
CError.Compare(DataReader.Value, DataReader.GetAttribute(strName, null), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name) Verify with MoveToAttribute(Name,null)", Pri = 1)]
public int GetAttributeWithName9()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName, null);
CError.Compare(DataReader.Value, DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, NamespaceURI) Verify not the same as MoveToAttribute(Name, null)")]
public int GetAttributeWithName10()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
DataReader.MoveToAttribute(strName, null);
if (DataReader.GetAttribute(strName, strNamespace) == DataReader.Value)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, null) Verify not the same as MoveToAttribute(Name, NamespaceURI)")]
public int GetAttributeWithName11()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName, strNamespace);
if (DataReader.GetAttribute(strName, null) == DataReader.Value)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, namespace) Verify not the same as MoveToAttribute(Name, namespace)")]
public int GetAttributeWithName12()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
DataReader.MoveToAttribute(strName, strNamespace);
CError.Compare(DataReader.Value, DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(String.Empty)")]
public int GetAttributeWithName13()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
CError.Compare(DataReader.GetAttribute(string.Empty), null, "Compare GetAttribute(strName) and this[strName]");
return TEST_PASS;
}
[Variation("GetAttribute(String.Empty,String.Empty)")]
public int GetAttributeWithName14()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
CError.Compare(DataReader.GetAttribute(string.Empty, string.Empty), null, "Compare GetAttribute(strName) and this[strName]");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML This[Ordinal]
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCThisOrdinal : TCXMLReaderBaseGeneral
{
[Variation("This[i] Verify with GetAttribute[i] - Double Quote", Pri = 0)]
public int OrdinalWithGetAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare GetAttribute[i] and this[i]");
}
return TEST_PASS;
}
[Variation("This[i] Verify with GetAttribute[i] - Single Quote")]
public int OrdinalWithGetAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare GetAttribute[i] and this[i]");
}
return TEST_PASS;
}
[Variation("This[i] Verify with MoveToAttribute[i] - Double Quote", Pri = 0)]
public int OrdinalWithMoveAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader[i];
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader[i], "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("This[i] Verify with MoveToAttribute[i] - Single Quote")]
public int OrdinalWithMoveAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader[i];
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader[i], "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("ThisOrdinal NegativeOneOrdinal", Pri = 0)]
public int NegativeOneOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader[-1];
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
catch (Exception e)
{
CError.WriteLine(e + " : " + e.Message);
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
CError.WriteLine("No Exception Thrown");
return TEST_FAIL;
}
[Variation("ThisOrdinal FieldCountOrdinal")]
public int FieldCountOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
try
{
string str = DataReader[DataReader.AttributeCount];
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("ThisOrdinal OrdinalPlusOne", Pri = 0)]
public int OrdinalPlusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader[DataReader.AttributeCount + 1];
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
catch (Exception e)
{
CError.WriteLine(e + " : " + e.Message);
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
CError.WriteLine("No Exception Thrown");
return TEST_FAIL;
}
[Variation("ThisOrdinal OrdinalMinusOne")]
public int OrdinalMinusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader[-2];
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML MoveToAttribute(Ordinal)
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCMoveToAttributeOrdinal : TCXMLReaderBaseGeneral
{
[Variation("MoveToAttribute(i) Verify with This[i] - Double Quote", Pri = 0)]
public int MoveToAttributeWithGetAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
DataReader.MoveToAttribute(i);
CError.Compare(DataReader[i], DataReader.Value, "Ordinal (" + i + "): Compare GetAttribute(i) and this[i]");
}
return TEST_PASS;
}
[Variation("MoveToAttribute(i) Verify with This[i] - Single Quote")]
public int MoveToAttributeWithGetAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
DataReader.MoveToAttribute(i);
CError.Compare(DataReader[i], DataReader.Value, "Ordinal (" + i + "): Compare GetAttribute(i) and this[i]");
}
return TEST_PASS;
}
[Variation("MoveToAttribute(i) Verify with GetAttribute(i) - Double Quote", Pri = 0)]
public int MoveToAttributeWithMoveAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader.GetAttribute(i);
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("MoveToAttribute(i) Verify with GetAttribute[i] - Single Quote")]
public int MoveToAttributeWithMoveAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader.GetAttribute(i);
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader[i], "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("MoveToAttribute(i) NegativeOneOrdinal", Pri = 0)]
public int NegativeOneOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
DataReader.MoveToAttribute(-1);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("MoveToAttribute(i) FieldCountOrdinal")]
public int FieldCountOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
try
{
DataReader.MoveToAttribute(DataReader.AttributeCount);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("MoveToAttribute(i) OrdinalPlusOne", Pri = 0)]
public int OrdinalPlusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
DataReader.MoveToAttribute(DataReader.AttributeCount + 1);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("MoveToAttribute(i) OrdinalMinusOne")]
public int OrdinalMinusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
DataReader.MoveToAttribute(-2);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML MoveToFirstAttribute()
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCMoveToFirstAttribute : TCXMLReaderBaseGeneral
{
[Variation("MoveToFirstAttribute() When AttributeCount=0, <EMPTY1/> ", Pri = 0)]
public int MoveToFirstAttribute1()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader.MoveToFirstAttribute(), false, CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When AttributeCount=0, <NONEMPTY1>ABCDE</NONEMPTY1> ")]
public int MoveToFirstAttribute2()
{
ReloadSource();
DataReader.PositionOnElement("NONEMPTY1");
CError.Compare(DataReader.MoveToFirstAttribute(), false, CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=0, with namespace")]
public int MoveToFirstAttribute3()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strFirst;
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=0, without namespace")]
public int MoveToFirstAttribute4()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strFirst;
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=middle, with namespace")]
public int MoveToFirstAttribute5()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strFirst;
DataReader.MoveToAttribute((int)((DataReader.AttributeCount) / 2));
CError.WriteLine("Middle value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=middle, without namespace")]
public int MoveToFirstAttribute6()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strFirst;
DataReader.MoveToAttribute((int)((DataReader.AttributeCount) / 2));
CError.WriteLine("Middle value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=end, with namespace")]
public int MoveToFirstAttribute7()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strFirst;
DataReader.MoveToAttribute((DataReader.AttributeCount) - 1);
CError.WriteLine("End value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=end, without namespace")]
public int MoveToFirstAttribute8()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strFirst;
DataReader.MoveToAttribute((DataReader.AttributeCount) - 1);
CError.WriteLine("End value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML MoveToNextAttribute()
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCMoveToNextAttribute : TCXMLReaderBaseGeneral
{
[Variation("MoveToNextAttribute() When AttributeCount=0, <EMPTY1/> ", Pri = 0)]
public int MoveToNextAttribute1()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader.MoveToNextAttribute(), false, CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToNextAttribute() When AttributeCount=0, <NONEMPTY1>ABCDE</NONEMPTY1> ")]
public int MoveToNextAttribute2()
{
ReloadSource();
DataReader.PositionOnElement("NONEMPTY1");
CError.Compare(DataReader.MoveToNextAttribute(), false, CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToNextAttribute() When iOrdinal=0, with namespace")]
public int MoveToNextAttribute3()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strValue;
CError.WriteLine("Move to first Attribute===========");
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue, DataReader.GetAttribute(0), CurVariation.Desc);
CError.WriteLine("Move to second Attribute===========");
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue, DataReader.GetAttribute(1), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToNextAttribute() When iOrdinal=0, without namespace")]
public int MoveToNextAttribute4()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strValue;
CError.WriteLine("Move to first Attribute===========");
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue, DataReader.GetAttribute(0), CurVariation.Desc);
CError.WriteLine("Move to second Attribute===========");
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue, DataReader.GetAttribute(1), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=middle, with namespace")]
public int MoveToFirstAttribute5()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strValue0;
string strValue;
int iMid = (DataReader.AttributeCount) / 2;
DataReader.MoveToAttribute(iMid + 1);
CError.WriteLine("NextFromMiddle value=" + DataReader.Value);
strValue0 = DataReader.Value;
DataReader.MoveToAttribute(iMid);
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue0, strValue, CurVariation.Desc);
CError.Compare(strValue, DataReader.GetAttribute(iMid + 1), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=middle, without namespace")]
public int MoveToFirstAttribute6()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strValue0;
string strValue;
int iMid = (DataReader.AttributeCount) / 2;
DataReader.MoveToAttribute(iMid + 1);
CError.WriteLine("Middle value=" + DataReader.Value);
strValue0 = DataReader.Value;
DataReader.MoveToAttribute(iMid);
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue0, strValue, CurVariation.Desc);
CError.Compare(strValue, DataReader.GetAttribute(iMid + 1), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=end, with namespace")]
public int MoveToFirstAttribute7()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strFirst;
DataReader.MoveToAttribute((DataReader.AttributeCount) - 1);
CError.WriteLine("End value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=end, without namespace")]
public int MoveToFirstAttribute8()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strFirst;
DataReader.MoveToAttribute((DataReader.AttributeCount) - 1);
CError.WriteLine("End value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("XmlReader: Does not count depth for attributes of xml decl. and Doctype")]
public int MoveToNextAttribute9()
{
ReloadSource(Path.Combine(TestData, "Common", "Bug424573.xml"));
DataReader.Read();
if (DataReader.HasAttributes)
{
for (int i = 0; i < DataReader.AttributeCount; i++)
{
DataReader.MoveToNextAttribute();
if (DataReader.NodeType == XmlNodeType.Attribute && DataReader.Depth != 1)
{
CError.WriteLine("Unexpected attribute depth: {0}\n", DataReader.Depth);
return TEST_FAIL;
}
}
}
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML Attribute Test when NodeType != Attributes
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCAttributeTest : TCXMLReaderBaseGeneral
{
[Variation("Attribute Test On None")]
public int TestAttributeTestNodeType_None()
{
ReloadSource();
if (FindNodeType(XmlNodeType.None) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On Element", Pri = 0)]
public int TestAttributeTestNodeType_Element()
{
ReloadSource();
if (FindNodeType(XmlNodeType.Element) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On Text", Pri = 0)]
public int TestAttributeTestNodeType_Text()
{
ReloadSource();
if (FindNodeType(XmlNodeType.Text) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On CDATA")]
public int TestAttributeTestNodeType_CDATA()
{
ReloadSource();
// No CDATA for Xslt
if (IsXsltReader() || IsXPathNavigatorReader())
{
while (FindNodeType(XmlNodeType.CDATA) == TEST_PASS)
return TEST_FAIL;
return TEST_PASS;
}
if (FindNodeType(XmlNodeType.CDATA) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On ProcessingInstruction")]
public int TestAttributeTestNodeType_ProcessingInstruction()
{
ReloadSource();
if (FindNodeType(XmlNodeType.ProcessingInstruction) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On Comment")]
public int TestAttributeTestNodeType_Comment()
{
ReloadSource();
if (FindNodeType(XmlNodeType.Comment) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On DocumentType", Pri = 0)]
public int TestAttributeTestNodeType_DocumentType()
{
ReloadSource();
if (FindNodeType(XmlNodeType.DocumentType) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 1, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, true, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), true, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On Whitespace")]
public int TestAttributeTestNodeType_Whitespace()
{
ReloadSource();
if (FindNodeType(XmlNodeType.Whitespace) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On EndElement")]
public int TestAttributeTestNodeType_EndElement()
{
ReloadSource();
if (FindNodeType(XmlNodeType.EndElement) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On XmlDeclaration", Pri = 0)]
public int TestAttributeTestNodeType_XmlDeclaration()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) == TEST_PASS)
{
int nCount = (IsXsltReader() || IsXPathNavigatorReader()) ? 1 : 3;
CError.Compare(DataReader.AttributeCount, nCount, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, true, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), true, "Checking MoveToFirstAttribute");
bool bNext = !(IsXsltReader() || IsXPathNavigatorReader()); // XsltReader has only one attribute for XmlDeclaration
CError.Compare(DataReader.MoveToNextAttribute(), bNext, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On EntityReference")]
public int TestAttributeTestNodeType_EntityReference()
{
if (!IsXmlTextReader())
return TEST_SKIPPED;
ReloadSource();
if (FindNodeType(XmlNodeType.EntityReference) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
return TEST_PASS;
}
return TEST_FAIL;
}
[Variation("AttributeTest On EndEntity")]
public int TestAttributeTestNodeType_EndEntity()
{
if (!IsXmlTextReader())
return TEST_SKIPPED;
ReloadSource();
PositionOnNodeType(XmlNodeType.EndEntity);
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML AttributeTest on XmlDeclaration DCR52258
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCAttributeXmlDeclaration : TCXMLReaderBaseGeneral
{
private static string[] s_attrNames = { "version", "encoding", "standalone" };
private static string[] s_attrValues = { "1.0", "UTF-8", "no" };
private static int s_attrCount = 3;
public override int Init(object objParam)
{
int ret = base.Init(objParam);
// xslt doesn't have encoding and standalone
s_attrCount = (IsXsltReader() || IsXPathNavigatorReader()) ? 1 : 3;
if (IsBinaryReader())
{
s_attrValues = new string[] { "1.0", "utf-8", "no" };
}
return ret;
}
private void CheckAttribute(int nPos)
{
CheckAttribute(nPos, XmlNodeType.Attribute);
}
private void CheckAttribute(int nPos, XmlNodeType nt)
{
CError.Compare(DataReader.VerifyNode(nt, s_attrNames[nPos], s_attrValues[nPos]), true, "CheckAttribute");
}
[Variation("AttributeCount and HasAttributes", Pri = 0)]
public int TAXmlDecl_1()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, (s_attrCount > 0), "Checking HasAttributes");
return TEST_PASS;
}
[Variation("MoveToFirstAttribute/MoveToNextAttribute navigation", Pri = 0)]
public int TAXmlDecl_2()
{
if (IsBinaryReader())
return TEST_SKIPPED;
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
// Check version attribute
CError.Compare(DataReader.MoveToFirstAttribute(), true, "MTFA");
CheckAttribute(0);
if (!(IsXsltReader() || IsXPathNavigatorReader())) // Xslt has only one XmlDeclaration attribute
{
// Check encoding attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(1);
// Check standalone attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(2);
}
// Check if no more attribute
CError.Compare(DataReader.MoveToNextAttribute(), false, "MTNA");
return TEST_PASS;
}
[Variation("MoveToFirstAttribute/MoveToNextAttribute succesive calls")]
public int TAXmlDecl_3()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
// Call MoveToNextAttribute first
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(0);
if (!(IsXsltReader() || IsXPathNavigatorReader())) // Xslt has only one XmlDeclaration attribute
{
// Go to 2nd attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(1);
// Rewind
CError.Compare(DataReader.MoveToFirstAttribute(), true, "MTNA");
CheckAttribute(0);
// Go to last attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(2);
// Rewind
CError.Compare(DataReader.MoveToFirstAttribute(), true, "MTNA");
CheckAttribute(0);
// Go to after the last attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CError.Compare(DataReader.MoveToNextAttribute(), false, "MTNA");
CheckAttribute(2);
}
// Rewind
CError.Compare(DataReader.MoveToFirstAttribute(), true, "MTNA");
CheckAttribute(0);
return TEST_PASS;
}
[Variation("MoveToAttribute attribute access")]
public int TAXmlDecl_4()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
// Ordinal access
for (int i = 0; i < s_attrCount; i++)
{
DataReader.MoveToAttribute(i);
CheckAttribute(i);
}
// Name access
for (int i = s_attrCount - 1; i >= 0; i--)
{
CError.Compare(DataReader.MoveToAttribute(s_attrNames[i]), true, "MTA");
CheckAttribute(i);
}
// Name & Namespace access
for (int i = s_attrCount - 1; i >= 0; i--)
{
CError.Compare(DataReader.MoveToAttribute(s_attrNames[i], null), true, "MTA");
CheckAttribute(i);
}
// Name & Namespace access
for (int i = s_attrCount - 1; i >= 0; i--)
{
CError.Compare(DataReader.MoveToAttribute(s_attrNames[i], string.Empty), true, "MTA");
CheckAttribute(i);
}
return TEST_PASS;
}
[Variation("MoveToAttribute attribute access with invalid index")]
public int TAXmlDecl_5()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
DataReader.MoveToAttribute(s_attrCount / 2);
CheckAttribute(s_attrCount / 2);
// Invalid index
try
{
DataReader.MoveToAttribute(-1);
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
return TEST_PASS;
}
[Variation("GetAttribute attribute access")]
public int TAXmlDecl_6()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
// reader on element
for (int i = 0; i < s_attrCount; i++)
{
// Ordinal access
CError.Compare(DataReader.GetAttribute(i), s_attrValues[i], "GA ordinal");
// Name access
CError.Compare(DataReader.GetAttribute(s_attrNames[i]), s_attrValues[i], "GA name");
// Name & Namespace access
CError.Compare(DataReader.GetAttribute(s_attrNames[i], null), s_attrValues[i], "GA name & namespace");
// Name & Namespace access
CError.Compare(DataReader.GetAttribute(s_attrNames[i], string.Empty), s_attrValues[i], "GA name & namespace");
}
// reader on middle attribute
DataReader.MoveToAttribute(s_attrCount / 2);
for (int i = s_attrCount - 1; i >= 0; i--)
{
// Ordinal access
CError.Compare(DataReader.GetAttribute(i), s_attrValues[i], "GA ordinal");
// Name access
CError.Compare(DataReader.GetAttribute(s_attrNames[i]), s_attrValues[i], "GA name");
// Name & Namespace access
CError.Compare(DataReader.GetAttribute(s_attrNames[i], null), s_attrValues[i], "GA name & namespace");
// Name & Namespace access
CError.Compare(DataReader.GetAttribute(s_attrNames[i], string.Empty), s_attrValues[i], "GA name & namespace");
}
return TEST_PASS;
}
[Variation("GetAttribute attribute access with invalid index")]
public int TAXmlDecl_7()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
// Invalid index
try
{
DataReader.GetAttribute(-1);
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
try
{
DataReader.GetAttribute(s_attrCount);
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
// Invalid name
CError.Compare(DataReader.GetAttribute("s"), null, "GA");
// Invalid namespace
CError.Compare(DataReader.GetAttribute(s_attrNames[0], "zzz"), null, "GA");
return TEST_PASS;
}
[Variation("this[] attribute access")]
public int TAXmlDecl_8()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
// reader on element
for (int i = 0; i < s_attrCount; i++)
{
// Ordinal access
CError.Compare(DataReader[i], s_attrValues[i], "[] ordinal");
// Name access
CError.Compare(DataReader[s_attrNames[i]], s_attrValues[i], "[] name");
// Name & Namespace access
CError.Compare(DataReader[s_attrNames[i], null], s_attrValues[i], "[] name & namespace");
// Name & Namespace access
CError.Compare(DataReader[s_attrNames[i], string.Empty], s_attrValues[i], "[] name & namespace");
}
// reader on middle attribute
DataReader.MoveToAttribute(s_attrCount / 2);
for (int i = s_attrCount - 1; i >= 0; i--)
{
// Ordinal access
CError.Compare(DataReader[i], s_attrValues[i], "[] ordinal");
// Name access
CError.Compare(DataReader[s_attrNames[i]], s_attrValues[i], "[] name");
// Name & Namespace access
CError.Compare(DataReader[s_attrNames[i], null], s_attrValues[i], "[] name & namespace");
// Name & Namespace access
CError.Compare(DataReader[s_attrNames[i], string.Empty], s_attrValues[i], "[] name & namespace");
}
return TEST_PASS;
}
[Variation("this[] attribute access with invalid index")]
public int TAXmlDecl_9()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
// Invalid index
try
{
string s = DataReader[-1];
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
try
{
string s = DataReader[s_attrCount];
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
// Invalid name
CError.Compare(DataReader["s"], null, "[]");
// Invalid namespace
CError.Compare(DataReader[s_attrNames[0], "zzz"], null, "[]");
return TEST_PASS;
}
[Variation("ReadAttributeValue on XmlDecl attributes")]
public int TAXmlDecl_10()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
for (int i = 0; i < s_attrCount; i++)
{
DataReader.MoveToAttribute(i);
// Ordinal access
CError.Compare(DataReader.ReadAttributeValue(), true, "RAV");
CError.Compare(DataReader.VerifyNode(XmlNodeType.Text, string.Empty, s_attrValues[i]), true, "Attribute");
CError.Compare(DataReader.ReadAttributeValue(), false, "RAV");
}
return TEST_PASS;
}
[Variation("LocalName, NamespaceURI and Prefix on XmlDecl attributes")]
public int TAXmlDecl_11()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
for (int i = 0; i < s_attrCount; i++)
{
DataReader.MoveToAttribute(i);
// Ordinal access
CError.Compare(DataReader.LocalName, s_attrNames[i], "LN");
CError.Compare(DataReader.Prefix, string.Empty, "P");
CError.Compare(DataReader.NamespaceURI, string.Empty, "NU");
}
return TEST_PASS;
}
[Variation("Whitespace between XmlDecl attributes")]
public int TAXmlDecl_12()
{
if (IsXmlNodeReader() || IsXmlNodeReaderDataDoc() || IsXPathNavigatorReader() || IsBinaryReader())
return TEST_SKIPPED;
string strxml = "<?xml version='1.0' standalone='yes'?><ROOT/>";
ReloadSourceStr(strxml);
DataReader.Read();
CError.Compare(DataReader.Value, "version='1.0' standalone='yes'", "value");
return TEST_PASS;
}
[Variation("MoveToElement on XmlDeclaration attributes")]
public int TAXmlDecl_13()
{
ReloadSource();
PositionOnNodeType(XmlNodeType.XmlDeclaration);
DataReader.MoveToFirstAttribute();
CError.Compare(DataReader.VerifyNode(XmlNodeType.Attribute, s_attrNames[0], s_attrValues[0]), "Attribute");
DataReader.MoveToElement();
CError.Compare(DataReader.NodeType, XmlNodeType.XmlDeclaration, "nt");
CError.Compare(DataReader.Name, "xml", "name");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML xmlns as local name DCR50345
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCXmlns : TCXMLReaderBaseGeneral
{
private string _ST_ENS1 = "EMPTY_NAMESPACE1"; //<EMPTY_NAMESPACE1 Attr0="0" xmlns="14"/>
private string _ST_NS2 = "NAMESPACE2"; //<NAMESPACE2 xmlns:bar="1">
[Variation("Name, LocalName, Prefix and Value with xmlns=ns attribute", Pri = 0)]
public int TXmlns1()
{
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
DataReader.MoveToAttribute("xmlns");
CError.Compare(DataReader.LocalName, "xmlns", "ln");
CError.Compare(DataReader.Name, "xmlns", "n");
CError.Compare(DataReader.Prefix, string.Empty, "p");
CError.Compare(DataReader.Value, "14", "v");
return TEST_PASS;
}
[Variation("Name, LocalName, Prefix and Value with xmlns:p=ns attribute")]
public int TXmlns2()
{
ReloadSource();
DataReader.PositionOnElement(_ST_NS2);
DataReader.MoveToAttribute(0);
CError.Compare(DataReader.LocalName, "bar", "ln");
CError.Compare(DataReader.Name, "xmlns:bar", "n");
CError.Compare(DataReader.Prefix, "xmlns", "p");
CError.Compare(DataReader.Value, "1", "v");
return TEST_PASS;
}
[Variation("LookupNamespace with xmlns=ns attribute")]
public int TXmlns3()
{
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
DataReader.MoveToAttribute(1);
CError.Compare(DataReader.LookupNamespace("xmlns"), "http://www.w3.org/2000/xmlns/", "ln");
return TEST_PASS;
}
[Variation("MoveToAttribute access on xmlns attribute")]
public int TXmlns4()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
DataReader.MoveToAttribute(1);
CError.Compare(DataReader.LocalName, "xmlns", "ln");
CError.Compare(DataReader.Name, "xmlns", "n");
CError.Compare(DataReader.Prefix, string.Empty, "p");
CError.Compare(DataReader.Value, "14", "v");
DataReader.MoveToElement();
CError.Compare(DataReader.MoveToAttribute("xmlns"), true, "mta(str)");
CError.Compare(DataReader.LocalName, "xmlns", "ln");
CError.Compare(DataReader.Name, "xmlns", "n");
CError.Compare(DataReader.Prefix, string.Empty, "p");
CError.Compare(DataReader.Value, "14", "v");
DataReader.MoveToElement();
CError.Compare(DataReader.MoveToAttribute("xmlns", "http://www.w3.org/2000/xmlns/"), true, "mta(str, str)");
CError.Compare(DataReader.LocalName, "xmlns", "ln");
CError.Compare(DataReader.Name, "xmlns", "n");
CError.Compare(DataReader.Prefix, string.Empty, "p");
CError.Compare(DataReader.Value, "14", "v");
DataReader.MoveToElement();
CError.Compare(DataReader.MoveToAttribute("xmlns", "14"), false, "mta inv");
return TEST_PASS;
}
[Variation("GetAttribute access on xmlns attribute")]
public int TXmlns5()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
CError.Compare(DataReader.GetAttribute(1), "14", "ga(i)");
CError.Compare(DataReader.GetAttribute("xmlns"), "14", "ga(str)");
CError.Compare(DataReader.GetAttribute("xmlns", "http://www.w3.org/2000/xmlns/"), "14", "ga(str, str)");
CError.Compare(DataReader.GetAttribute("xmlns", "14"), null, "ga inv");
return TEST_PASS;
}
[Variation("this[xmlns] attribute access")]
public int TXmlns6()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
CError.Compare(DataReader[1], "14", "this[i]");
CError.Compare(DataReader["xmlns"], "14", "this[str]");
CError.Compare(DataReader["xmlns", "http://www.w3.org/2000/xmlns/"], "14", "this[str, str]");
CError.Compare(DataReader["xmlns", "14"], null, "this inv");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase bounded namespace to xmlns prefix DCR50881, DCR57490
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCXmlnsPrefix : TCXMLReaderBaseGeneral
{
private string _ST_ENS1 = "EMPTY_NAMESPACE1"; //<EMPTY_NAMESPACE1 Attr0="0" xmlns="14"/>
private string _ST_NS2 = "NAMESPACE2"; //<NAMESPACE2 xmlns:bar="1">
private string _strXmlns = "http://www.w3.org/2000/xmlns/";
[Variation("NamespaceURI of xmlns:a attribute", Pri = 0)]
public int TXmlnsPrefix1()
{
ReloadSource();
DataReader.PositionOnElement(_ST_NS2);
DataReader.MoveToAttribute(0);
CError.Compare(DataReader.NamespaceURI, _strXmlns, "nu");
return TEST_PASS;
}
[Variation("NamespaceURI of element/attribute with xmlns attribute", Pri = 0)]
public int TXmlnsPrefix2()
{
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
CError.Compare(DataReader.NamespaceURI, "14", "nue");
DataReader.MoveToAttribute("Attr0");
CError.Compare(DataReader.NamespaceURI, string.Empty, "nu");
DataReader.MoveToAttribute("xmlns");
CError.Compare(DataReader.NamespaceURI, _strXmlns, "nu");
return TEST_PASS;
}
[Variation("LookupNamespace with xmlns prefix")]
public int TXmlnsPrefix3()
{
ReloadSource();
DataReader.Read();
CError.Compare(DataReader.LookupNamespace("xmlns"), _strXmlns, "ln");
return TEST_PASS;
}
[Variation("Define prefix for 'www.w3.org/2000/xmlns'", Pri = 0)]
public int TXmlnsPrefix4()
{
if (!IsXmlTextReader())
return TEST_SKIPPED;
string strxml = "<ROOT xmlns:pxmlns='http://www.w3.org/2000/xmlns/'/>";
ReloadSourceStr(strxml);
try
{
DataReader.Read();
}
catch (XmlException)
{
return TEST_PASS;
}
return TEST_FAIL;
}
[Variation("Redefine namespace attached to xmlns prefix")]
public int TXmlnsPrefix5()
{
if (!IsXmlTextReader())
return TEST_SKIPPED;
string strxml = "<ROOT xmlns:xmlns='http://www.w3.org/2002/xmlns/'/>";
ReloadSourceStr(strxml);
try
{
DataReader.Read();
}
catch (XmlException)
{
return TEST_PASS;
}
return TEST_FAIL;
}
//[Variation("False duplicates and non-duplicates possible in the XmlReader during attribute normalization", Param = true)]
//[Variation("False duplicates and non-duplicates possible in the XmlReader during attribute normalization", Param = false)]
public int TXmlnsPrefix6()
{
bool param = (bool)CurVariation.Param;
string xml = "bug511965" + param + ".xml";
MemoryStream ms = new MemoryStream();
XmlWriter w = XmlWriter.Create(ms);
w.WriteStartDocument(true);
w.WriteStartElement("root");
for (int i = 0; i < 250; i++)
{
WriteAttribute(w, param, "a" + i, "stra\u00DFe");
}
WriteAttribute(w, param, "strasse", "stra\u00DFe");
WriteAttribute(w, param, "stra\u00DFe", "stra\u00DFe");
w.WriteEndElement();
w.WriteEndDocument();
w.Flush();
FilePathUtil.addStream(xml, ms);
ReloadSource(xml);
while (DataReader.Read()) ;
return TEST_PASS;
}
public void WriteAttribute(XmlWriter w, bool param, string name, string value)
{
if (param)
w.WriteAttributeString(name, "xmlns", value);
else
w.WriteAttributeString(name, value);
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using OLEDB.Test.ModuleCore;
using System.IO;
using XmlCoreTest.Common;
namespace System.Xml.Tests
{
////////////////////////////////////////////////////////////////
// TestCase TCXML AttributeAccess
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCAttributeAccess : TCXMLReaderBaseGeneral
{
[Variation("Attribute Access test using ordinal (Ascending Order)", Pri = 0)]
public int TestAttributeAccess1()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
string[] astr = new string[10];
string n;
string qname;
DataReader.PositionOnElement("ACT0");
CError.WriteLine("============With Namespace");
int start = 1;
int end = DataReader.AttributeCount;
if (IsXsltReader())
{
// That's because after the Transform the order of the attribute is changed
// <ACT0 xmlns:foo="http://www.foo.com" foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" />
// becomes
// <ACT0 foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" xmlns:foo="http://www.foo.com" />
start = 0;
end = DataReader.AttributeCount - 1;
}
for (int i = start; i < end; i++)
{
if (IsXsltReader() || IsXPathNavigatorReader())
{
astr[i] = DataReader[i];
n = strAttr + i;
}
else
{
astr[i - 1] = DataReader[i];
n = strAttr + (i - 1);
}
qname = "foo:" + n;
CError.WriteLine(qname);
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n, strNamespace], DataReader.GetAttribute(n, strNamespace), "Compare this(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.Compare(DataReader[i], DataReader[n, strNamespace], "Compare this(i) with this(name,strNamespace)");
CError.Compare(DataReader.MoveToAttribute(n, strNamespace), true, "MoveToAttribute(name,strNamespace)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n, strNamespace), "Compare MoveToAttribute(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.WriteLine(i + " GetAttribute(n,strNamespace)=" + DataReader.GetAttribute(n, strNamespace) + " this[n,strNamespace]=" + DataReader[n, strNamespace] + " Value=" + DataReader.Value);
CError.Compare(DataReader[i], DataReader[qname], "Compare this(i) with this(qname)");
CError.Compare(DataReader.MoveToAttribute(qname), true, "MoveToAttribute(qname)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(qname), "Compare MoveToAttribute(qname) with GetAttribute(qname)");
CError.WriteLine(i + " GetAttribute(qname)=" + DataReader.GetAttribute(qname) + " this[qname]=" + DataReader[qname] + " Value=" + DataReader.Value);
}
DataReader.PositionOnElement("ACT1");
CError.WriteLine("============Without Namespace");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(astr[i], DataReader.GetAttribute(i), "Compare value with GetAttribute");
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
n = strAttr + i;
CError.Compare(DataReader[n], DataReader.GetAttribute(n), "Compare this(name) with GetAttribute(name)");
CError.Compare(DataReader[i], DataReader[n], "Compare this(i) with this(name)");
CError.Compare(DataReader.MoveToAttribute(n), true, "MoveToAttribute(name)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n), "Compare MoveToAttribute(name) with GetAttribute(name)");
CError.WriteLine(i + " GetAttribute(n)=" + DataReader.GetAttribute(n) + " this[n]=" + DataReader[n] + " Value=" + DataReader.Value);
}
return TEST_PASS;
}
[Variation("Attribute Access test using ordinal (Descending Order)")]
public int TestAttributeAccess2()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
string[] astr = new string[10];
string n;
string qname;
DataReader.PositionOnElement("ACT0");
CError.WriteLine("============With Namespace");
int start = 1;
int end = DataReader.AttributeCount;
if (IsXsltReader() || IsXPathNavigatorReader())
{
// That's because after the Transform the order of the attribute is changed
// <ACT0 xmlns:foo="http://www.foo.com" foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" />
// becomes
// <ACT0 foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" xmlns:foo="http://www.foo.com" />
start = 0;
end = DataReader.AttributeCount - 1;
}
for (int i = end - 1; i >= start; i--)
{
if (IsXsltReader())
{
astr[i] = DataReader[i];
n = strAttr + i;
}
else
{
astr[i - 1] = DataReader[i];
n = strAttr + (i - 1);
}
qname = "foo:" + n;
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n, strNamespace], DataReader.GetAttribute(n, strNamespace), "Compare this(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.Compare(DataReader[i], DataReader[n, strNamespace], "Compare this(i) with this(name,strNamespace)");
CError.Compare(DataReader.MoveToAttribute(n, strNamespace), true, "MoveToAttribute(name,strNamespace)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n, strNamespace), "Compare MoveToAttribute(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.WriteLine(i + " GetAttribute(n,strNamespace)=" + DataReader.GetAttribute(n, strNamespace) + " this[n,strNamespace]=" + DataReader[n, strNamespace] + " Value=" + DataReader.Value);
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Compare this(qname) with GetAttribute(qname)");
CError.Compare(DataReader[i], DataReader[qname], "Compare this(i) with this(qname)");
CError.Compare(DataReader.MoveToAttribute(qname), true, "MoveToAttribute(qname)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(qname), "Compare MoveToAttribute(qname) with GetAttribute(qname)");
CError.WriteLine(i + " GetAttribute(qname)=" + DataReader.GetAttribute(qname) + " this[qname]=" + DataReader[qname] + " Value=" + DataReader.Value);
}
DataReader.PositionOnElement("ACT1");
CError.WriteLine("============Without Namespace");
for (int i = (DataReader.AttributeCount - 1); i > 0; i--)
{
n = strAttr + i;
CError.WriteLine(i + " " + astr[i] + " GetAttribute(i)=" + DataReader.GetAttribute(i));
CError.Compare(astr[i], DataReader.GetAttribute(i), "Compare value with GetAttribute");
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n], DataReader.GetAttribute(n), "Compare this(name) with GetAttribute(name)");
CError.Compare(DataReader[i], DataReader[n], "Compare this(i) with this(name)");
CError.Compare(DataReader.MoveToAttribute(n), true, "MoveToAttribute(name)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n), "Compare MoveToAttribute(name) with GetAttribute(name)");
CError.WriteLine(i + " GetAttribute(n)=" + DataReader.GetAttribute(n) + " this[n]=" + DataReader[n] + " Value=" + DataReader.Value);
}
return TEST_PASS;
}
[Variation("Attribute Access test using ordinal (Odd number)", Pri = 0)]
public int TestAttributeAccess3()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
string[] astr = new string[10];
string n;
string qname;
DataReader.PositionOnElement("ACT0");
CError.WriteLine("============With Namespace");
int start = 1;
int end = DataReader.AttributeCount;
if (IsXsltReader() || IsXPathNavigatorReader())
{
// That's because after the Transform the order of the attribute is changed
// <ACT0 xmlns:foo="http://www.foo.com" foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" />
// becomes
// <ACT0 foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" xmlns:foo="http://www.foo.com" />
start = 0;
end = DataReader.AttributeCount - 1;
}
for (int i = start; i < end; i += 2)
{
if (IsXsltReader() || IsXPathNavigatorReader())
{
astr[i] = DataReader[i];
n = strAttr + i;
}
else
{
astr[i - 1] = DataReader[i];
n = strAttr + (i - 1);
}
qname = "foo:" + n;
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n, strNamespace], DataReader.GetAttribute(n, strNamespace), "Compare this(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.Compare(DataReader[i], DataReader[n, strNamespace], "Compare this(i) with this(name,strNamespace)");
CError.Compare(DataReader.MoveToAttribute(n, strNamespace), true, "MoveToAttribute(name,strNamespace)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n, strNamespace), "Compare MoveToAttribute(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.WriteLine(i + " GetAttribute(n,strNamespace)=" + DataReader.GetAttribute(n, strNamespace) + " this[n,strNamespace]=" + DataReader[n, strNamespace] + " Value=" + DataReader.Value);
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Compare this(qname) with GetAttribute(qname)");
CError.Compare(DataReader[i], DataReader[qname], "Compare this(i) with this(qname)");
CError.Compare(DataReader.MoveToAttribute(qname), true, "MoveToAttribute(qname)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(qname), "Compare MoveToAttribute(qname) with GetAttribute(qname)");
CError.WriteLine(i + " GetAttribute(qname)=" + DataReader.GetAttribute(qname) + " this[qname]=" + DataReader[qname] + " Value=" + DataReader.Value);
}
DataReader.PositionOnElement("ACT1");
CError.WriteLine("============Without Namespace");
for (int i = 0; i < DataReader.AttributeCount; i += 2)
{
CError.Compare(astr[i], DataReader.GetAttribute(i), "Compare value with GetAttribute");
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
n = strAttr + i;
CError.Compare(DataReader[n], DataReader.GetAttribute(n), "Compare this(name) with GetAttribute(name)");
CError.Compare(DataReader[i], DataReader[n], "Compare this(i) with this(name)");
CError.Compare(DataReader.MoveToAttribute(n), true, "MoveToAttribute(name)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n), "Compare MoveToAttribute(name) with GetAttribute(name)");
CError.WriteLine(i + " GetAttribute(n)=" + DataReader.GetAttribute(n) + " this[n]=" + DataReader[n] + " Value=" + DataReader.Value);
}
return TEST_PASS;
}
[Variation("Attribute Access test using ordinal (Even number)")]
public int TestAttributeAccess4()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED; ReloadSource();
string[] astr = new string[10];
string n;
string qname;
DataReader.PositionOnElement("ACT0");
CError.WriteLine("============With Namespace");
int start = 1;
int end = DataReader.AttributeCount;
if (IsXsltReader())
{
// That's because after the Transform the order of the attribute is changed
// <ACT0 xmlns:foo="http://www.foo.com" foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" />
// becomes
// <ACT0 foo:Attr0="0" foo:Attr1="1111111101" foo:Attr2="222222202" foo:Attr3="333333303" foo:Attr4="444444404" xmlns:foo="http://www.foo.com" />
start = 0;
end = DataReader.AttributeCount - 1;
}
for (int i = start; i < end; i += 3)
{
if (IsXsltReader() || IsXPathNavigatorReader())
{
astr[i] = DataReader[i];
n = strAttr + i;
}
else
{
astr[i - 1] = DataReader[i];
n = strAttr + (i - 1);
}
qname = "foo:" + n;
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
CError.Compare(DataReader[n, strNamespace], DataReader.GetAttribute(n, strNamespace), "Compare this(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.Compare(DataReader[i], DataReader[n, strNamespace], "Compare this(i) with this(name,strNamespace)");
CError.Compare(DataReader.MoveToAttribute(n, strNamespace), true, "MoveToAttribute(name,strNamespace)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n, strNamespace), "Compare MoveToAttribute(name,strNamespace) with GetAttribute(name,strNamespace)");
CError.WriteLine(i + " GetAttribute(n,strNamespace)=" + DataReader.GetAttribute(n, strNamespace) + " this[n,strNamespace]=" + DataReader[n, strNamespace] + " Value=" + DataReader.Value);
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Compare this(qname) with GetAttribute(qname)");
CError.Compare(DataReader[i], DataReader[qname], "Compare this(i) with this(qname)");
CError.Compare(DataReader.MoveToAttribute(qname), true, "MoveToAttribute(qname)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(qname), "Compare MoveToAttribute(qname) with GetAttribute(qname)");
CError.WriteLine(i + " GetAttribute(qname)=" + DataReader.GetAttribute(qname) + " this[qname]=" + DataReader[qname] + " Value=" + DataReader.Value);
}
DataReader.PositionOnElement("ACT1");
CError.WriteLine("============Without Namespace");
for (int i = 0; i < DataReader.AttributeCount; i += 3)
{
CError.Compare(astr[i], DataReader.GetAttribute(i), "Compare value with GetAttribute");
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Compare this with GetAttribute");
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Compare MoveToAttribute(i) with GetAttribute");
CError.WriteLine(i + " GetAttribute(i)=" + DataReader.GetAttribute(i) + " this[i]=" + DataReader[i] + " Value=" + DataReader.Value);
n = strAttr + i;
CError.Compare(DataReader[n], DataReader.GetAttribute(n), "Compare this(name) with GetAttribute(name)");
CError.Compare(DataReader[i], DataReader[n], "Compare this(i) with this(name)");
CError.Compare(DataReader.MoveToAttribute(n), true, "MoveToAttribute(name)");
CError.Compare(DataReader.Value, DataReader.GetAttribute(n), "Compare MoveToAttribute(name) with GetAttribute(name)");
CError.WriteLine(i + " GetAttribute(n)=" + DataReader.GetAttribute(n) + " this[n]=" + DataReader[n] + " Value=" + DataReader.Value);
}
return TEST_PASS;
}
[Variation("Attribute Access with namespace=null")]
public int TestAttributeAccess5()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
CError.Compare(DataReader[strAttr + 1, null], "1111111101", "Item");
CError.Compare(DataReader.GetAttribute(strAttr + 1, null), "1111111101", "GA");
CError.Compare(DataReader.MoveToAttribute(strAttr + 1, null), "MTA");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML This[Name] and This[Name, Namespace]
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCThisName : TCXMLReaderBaseGeneral
{
[Variation("This[Name] Verify with GetAttribute(Name)", Pri = 0)]
public int ThisWithName1()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName], DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name, null] Verify with GetAttribute(Name)")]
public int ThisWithName2()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName, null], DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name] Verify with GetAttribute(Name,null)")]
public int ThisWithName3()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName], DataReader.GetAttribute(strName, null), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name, NamespaceURI] Verify with GetAttribute(Name, NamespaceURI)", Pri = 0)]
public int ThisWithName4()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName, strNamespace], DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName,strNamespace) and this[strName,strNamespace]");
}
return TEST_PASS;
}
[Variation("This[Name, null] Verify not the same as GetAttribute(Name, NamespaceURI)")]
public int ThisWithName5()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
DataReader.DumpOneNode();
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
if (DataReader.GetAttribute(strName, strNamespace) == DataReader[strName, null])
{
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
}
return TEST_PASS;
}
[Variation("This[Name, NamespaceURI] Verify not the same as GetAttribute(Name, null)")]
public int ThisWithName6()
{
string strName;
ReloadSource();
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
if (DataReader.GetAttribute(strName, null) == DataReader[strName, strNamespace])
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("This[Name] Verify with MoveToAttribute(Name)", Pri = 0)]
public int ThisWithName7()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName);
CError.Compare(DataReader.Value, DataReader[strName], "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name, null] Verify with MoveToAttribute(Name)")]
public int ThisWithName8()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName);
CError.Compare(DataReader.Value, DataReader[strName, null], "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name] Verify with MoveToAttribute(Name,null)")]
public int ThisWithName9()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName, null);
CError.Compare(DataReader.Value, DataReader[strName], "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This[Name, NamespaceURI] Verify not the same as MoveToAttribute(Name, null)", Pri = 0)]
public int ThisWithName10()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
DataReader.MoveToAttribute(strName, null);
if (DataReader[strName, strNamespace] == DataReader.Value)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("This[Name, null] Verify not the same as MoveToAttribute(Name, NamespaceURI)")]
public int ThisWithName11()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName, strNamespace);
if (DataReader[strName, null] == DataReader.Value)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("This[Name, namespace] Verify not the same as MoveToAttribute(Name, namespace)")]
public int ThisWithName12()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
DataReader.MoveToAttribute(strName, strNamespace);
CError.WriteLine(strName + " " + strNamespace + " DataReader.Value=" + DataReader.Value + " DataReader[strName, strNamespace]=" + DataReader[strName, strNamespace]);
CError.Compare(DataReader.Value, DataReader[strName, strNamespace], "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("This(String.Empty)")]
public int ThisWithName13()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader[string.Empty], null, "Compare this[String.Empty] with null");
return TEST_PASS;
}
[Variation("This[String.Empty,String.Empty]")]
public int ThisWithName14()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader[string.Empty, string.Empty], null, "Compare GetAttribute(strName) and this[strName]");
return TEST_PASS;
}
[Variation("This[QName] Verify with GetAttribute(Name, NamespaceURI)", Pri = 0)]
public int ThisWithName15()
{
string strName;
string qname;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
qname = "foo:" + strName;
CError.Compare(DataReader[qname], DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName,strNamespace) and this[qname]");
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Ordinal (" + i + "): Compare GetAttribute(qname) and this[qname]");
}
return TEST_PASS;
}
[Variation("This[QName] invalid Qname")]
public int ThisWithName16()
{
string strName;
string qname;
ReloadSource();
DataReader.PositionOnElement("ACT0");
int i = 1;
strName = strAttr + i;
qname = "foo1:" + strName;
CError.Compare(DataReader.MoveToAttribute(qname), false, "MoveToAttribute(invalid qname)");
CError.Compare(DataReader[qname], null, "Compare this[invalid qname] with null");
CError.Compare(DataReader.GetAttribute(qname), null, "Compare GetAttribute(invalid qname) with null");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML MoveToAttribute(Name) and MoveToAttribute(Name, Namespace)
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCMoveToAttribute : TCXMLReaderBaseGeneral
{
[Variation("MoveToAttribute(String.Empty)")]
public int MoveToAttributeWithName1()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader.MoveToAttribute(string.Empty), false, "Compare the call to MoveToAttribute");
CError.Compare(DataReader.Value, string.Empty, "Compare MoveToAttribute with String.Empty");
return TEST_PASS;
}
[Variation("MoveToAttribute(String.Empty,String.Empty)")]
public int MoveToAttributeWithName2()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader.MoveToAttribute(string.Empty, string.Empty), false, "Compare the call to MoveToAttribute");
CError.Compare(DataReader.Value, string.Empty, "Compare MoveToAttribute(strName)");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML GetAttribute(Ordinal)
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCGetAttributeOrdinal : TCXMLReaderBaseGeneral
{
[Variation("GetAttribute(i) Verify with This[i] - Double Quote", Pri = 0)]
public int GetAttributeWithGetAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare GetAttribute(i) and this[i]");
}
return TEST_PASS;
}
[Variation("GetAttribute[i] Verify with This[i] - Single Quote")]
public int OrdinalWithGetAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare GetAttribute(i) and this[i]");
}
return TEST_PASS;
}
[Variation("GetAttribute(i) Verify with MoveToAttribute[i] - Double Quote", Pri = 0)]
public int GetAttributeWithMoveAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader.GetAttribute(i);
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("GetAttribute(i) Verify with MoveToAttribute[i] - Single Quote")]
public int GetAttributeWithMoveAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader.GetAttribute(i);
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader[i], "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("GetAttribute(i) NegativeOneOrdinal", Pri = 0)]
public int NegativeOneOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader.GetAttribute(-1);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
catch (Exception e)
{
CError.WriteLine(e + " : " + e.Message);
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
CError.WriteLine("No Exception Thrown");
return TEST_FAIL;
}
[Variation("GetAttribute(i) FieldCountOrdinal")]
public int FieldCountOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
try
{
string str = DataReader.GetAttribute(DataReader.AttributeCount);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("GetAttribute(i) OrdinalPlusOne", Pri = 0)]
public int OrdinalPlusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader.GetAttribute(DataReader.AttributeCount + 1);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
catch (Exception e)
{
CError.WriteLine(e + " : " + e.Message);
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
CError.WriteLine("No Exception Thrown");
return TEST_FAIL;
}
[Variation("GetAttribute(i) OrdinalMinusOne")]
public int OrdinalMinusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader.GetAttribute(-2);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML GetAttribute(Name) and GetAttribute(Name, Namespace)
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCGetAttributeName : TCXMLReaderBaseGeneral
{
[Variation("GetAttribute(Name) Verify with This[Name]", Pri = 0)]
public int GetAttributeWithName1()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName], DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, null) Verify with This[Name]")]
public int GetAttributeWithName2()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName], DataReader.GetAttribute(strName, null), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name) Verify with This[Name,null]")]
public int GetAttributeWithName3()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
CError.Compare(DataReader[strName, null], DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, NamespaceURI) Verify with This[Name, NamespaceURI]", Pri = 0)]
public int GetAttributeWithName4()
{
string strName;
string qname;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
qname = "foo:" + strName;
CError.Compare(DataReader[strName, strNamespace], DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName,strNamespace) and this[strName,strNamespace]");
CError.Compare(DataReader[qname], DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName,strNamespace) and this[strName,strNamespace]");
CError.Compare(DataReader[qname], DataReader.GetAttribute(qname), "Ordinal (" + i + "): Compare GetAttribute(qname) and this[qname]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, null) Verify not the same as This[Name, NamespaceURI]")]
public int GetAttributeWithName5()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
if (DataReader.GetAttribute(strName, null) == DataReader[strName, strNamespace])
{
if (DataReader[strName, strNamespace] == string.Empty)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, NamespaceURI) Verify not the same as This[Name, null]")]
public int GetAttributeWithName6()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
DataReader.DumpOneNode();
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
if (DataReader.GetAttribute(strName, strNamespace) == DataReader[strName, null])
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("GetAttribute(Name) Verify with MoveToAttribute(Name)")]
public int GetAttributeWithName7()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName);
CError.Compare(DataReader.Value, DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name,null) Verify with MoveToAttribute(Name)", Pri = 1)]
public int GetAttributeWithName8()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName);
CError.Compare(DataReader.Value, DataReader.GetAttribute(strName, null), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name) Verify with MoveToAttribute(Name,null)", Pri = 1)]
public int GetAttributeWithName9()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName, null);
CError.Compare(DataReader.Value, DataReader.GetAttribute(strName), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, NamespaceURI) Verify not the same as MoveToAttribute(Name, null)")]
public int GetAttributeWithName10()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
DataReader.MoveToAttribute(strName, null);
if (DataReader.GetAttribute(strName, strNamespace) == DataReader.Value)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, null) Verify not the same as MoveToAttribute(Name, NamespaceURI)")]
public int GetAttributeWithName11()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
strName = strAttr + i;
DataReader.MoveToAttribute(strName, strNamespace);
if (DataReader.GetAttribute(strName, null) == DataReader.Value)
throw new CTestException(CTestBase.TEST_FAIL, CurVariation.Desc);
}
return TEST_PASS;
}
[Variation("GetAttribute(Name, namespace) Verify not the same as MoveToAttribute(Name, namespace)")]
public int GetAttributeWithName12()
{
string strName;
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 1; i < DataReader.AttributeCount; i++)
{
strName = strAttr + (i - 1);
DataReader.MoveToAttribute(strName, strNamespace);
CError.Compare(DataReader.Value, DataReader.GetAttribute(strName, strNamespace), "Ordinal (" + i + "): Compare GetAttribute(strName) and this[strName]");
}
return TEST_PASS;
}
[Variation("GetAttribute(String.Empty)")]
public int GetAttributeWithName13()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
CError.Compare(DataReader.GetAttribute(string.Empty), null, "Compare GetAttribute(strName) and this[strName]");
return TEST_PASS;
}
[Variation("GetAttribute(String.Empty,String.Empty)")]
public int GetAttributeWithName14()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
CError.Compare(DataReader.GetAttribute(string.Empty, string.Empty), null, "Compare GetAttribute(strName) and this[strName]");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML This[Ordinal]
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCThisOrdinal : TCXMLReaderBaseGeneral
{
[Variation("This[i] Verify with GetAttribute[i] - Double Quote", Pri = 0)]
public int OrdinalWithGetAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare GetAttribute[i] and this[i]");
}
return TEST_PASS;
}
[Variation("This[i] Verify with GetAttribute[i] - Single Quote")]
public int OrdinalWithGetAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
CError.Compare(DataReader[i], DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare GetAttribute[i] and this[i]");
}
return TEST_PASS;
}
[Variation("This[i] Verify with MoveToAttribute[i] - Double Quote", Pri = 0)]
public int OrdinalWithMoveAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader[i];
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader[i], "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("This[i] Verify with MoveToAttribute[i] - Single Quote")]
public int OrdinalWithMoveAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader[i];
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader[i], "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("ThisOrdinal NegativeOneOrdinal", Pri = 0)]
public int NegativeOneOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader[-1];
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
catch (Exception e)
{
CError.WriteLine(e + " : " + e.Message);
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
CError.WriteLine("No Exception Thrown");
return TEST_FAIL;
}
[Variation("ThisOrdinal FieldCountOrdinal")]
public int FieldCountOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
try
{
string str = DataReader[DataReader.AttributeCount];
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("ThisOrdinal OrdinalPlusOne", Pri = 0)]
public int OrdinalPlusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader[DataReader.AttributeCount + 1];
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
catch (Exception e)
{
CError.WriteLine(e + " : " + e.Message);
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
CError.WriteLine("No Exception Thrown");
return TEST_FAIL;
}
[Variation("ThisOrdinal OrdinalMinusOne")]
public int OrdinalMinusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
string str = DataReader[-2];
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML MoveToAttribute(Ordinal)
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCMoveToAttributeOrdinal : TCXMLReaderBaseGeneral
{
[Variation("MoveToAttribute(i) Verify with This[i] - Double Quote", Pri = 0)]
public int MoveToAttributeWithGetAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
DataReader.MoveToAttribute(i);
CError.Compare(DataReader[i], DataReader.Value, "Ordinal (" + i + "): Compare GetAttribute(i) and this[i]");
}
return TEST_PASS;
}
[Variation("MoveToAttribute(i) Verify with This[i] - Single Quote")]
public int MoveToAttributeWithGetAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
DataReader.MoveToAttribute(i);
CError.Compare(DataReader[i], DataReader.Value, "Ordinal (" + i + "): Compare GetAttribute(i) and this[i]");
}
return TEST_PASS;
}
[Variation("MoveToAttribute(i) Verify with GetAttribute(i) - Double Quote", Pri = 0)]
public int MoveToAttributeWithMoveAttrDoubleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader.GetAttribute(i);
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader.GetAttribute(i), "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("MoveToAttribute(i) Verify with GetAttribute[i] - Single Quote")]
public int MoveToAttributeWithMoveAttrSingleQ()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
for (int i = 0; i < DataReader.AttributeCount; i++)
{
string str = DataReader.GetAttribute(i);
DataReader.MoveToAttribute(i);
CError.Compare(DataReader.Value, DataReader[i], "Ordinal (" + i + "): Compare MoveToAttribute[i] and this[i]");
CError.Compare(str, DataReader.Value, "Ordinal (" + i + "): Compare MoveToAttribute[i] and string");
}
return TEST_PASS;
}
[Variation("MoveToAttribute(i) NegativeOneOrdinal", Pri = 0)]
public int NegativeOneOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
DataReader.MoveToAttribute(-1);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("MoveToAttribute(i) FieldCountOrdinal")]
public int FieldCountOrdinal()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
try
{
DataReader.MoveToAttribute(DataReader.AttributeCount);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("MoveToAttribute(i) OrdinalPlusOne", Pri = 0)]
public int OrdinalPlusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
DataReader.MoveToAttribute(DataReader.AttributeCount + 1);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
[Variation("MoveToAttribute(i) OrdinalMinusOne")]
public int OrdinalMinusOne()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
try
{
DataReader.MoveToAttribute(-2);
}
catch (ArgumentOutOfRangeException exc)
{
CError.WriteLine(exc + " : " + exc.Message);
return TEST_PASS;
}
throw new CTestException(CTestBase.TEST_FAIL, WRONG_EXCEPTION);
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML MoveToFirstAttribute()
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCMoveToFirstAttribute : TCXMLReaderBaseGeneral
{
[Variation("MoveToFirstAttribute() When AttributeCount=0, <EMPTY1/> ", Pri = 0)]
public int MoveToFirstAttribute1()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader.MoveToFirstAttribute(), false, CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When AttributeCount=0, <NONEMPTY1>ABCDE</NONEMPTY1> ")]
public int MoveToFirstAttribute2()
{
ReloadSource();
DataReader.PositionOnElement("NONEMPTY1");
CError.Compare(DataReader.MoveToFirstAttribute(), false, CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=0, with namespace")]
public int MoveToFirstAttribute3()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strFirst;
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=0, without namespace")]
public int MoveToFirstAttribute4()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strFirst;
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=middle, with namespace")]
public int MoveToFirstAttribute5()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strFirst;
DataReader.MoveToAttribute((int)((DataReader.AttributeCount) / 2));
CError.WriteLine("Middle value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=middle, without namespace")]
public int MoveToFirstAttribute6()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strFirst;
DataReader.MoveToAttribute((int)((DataReader.AttributeCount) / 2));
CError.WriteLine("Middle value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=end, with namespace")]
public int MoveToFirstAttribute7()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strFirst;
DataReader.MoveToAttribute((DataReader.AttributeCount) - 1);
CError.WriteLine("End value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=end, without namespace")]
public int MoveToFirstAttribute8()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strFirst;
DataReader.MoveToAttribute((DataReader.AttributeCount) - 1);
CError.WriteLine("End value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML MoveToNextAttribute()
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCMoveToNextAttribute : TCXMLReaderBaseGeneral
{
[Variation("MoveToNextAttribute() When AttributeCount=0, <EMPTY1/> ", Pri = 0)]
public int MoveToNextAttribute1()
{
ReloadSource();
DataReader.PositionOnElement("EMPTY1");
CError.Compare(DataReader.MoveToNextAttribute(), false, CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToNextAttribute() When AttributeCount=0, <NONEMPTY1>ABCDE</NONEMPTY1> ")]
public int MoveToNextAttribute2()
{
ReloadSource();
DataReader.PositionOnElement("NONEMPTY1");
CError.Compare(DataReader.MoveToNextAttribute(), false, CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToNextAttribute() When iOrdinal=0, with namespace")]
public int MoveToNextAttribute3()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strValue;
CError.WriteLine("Move to first Attribute===========");
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue, DataReader.GetAttribute(0), CurVariation.Desc);
CError.WriteLine("Move to second Attribute===========");
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue, DataReader.GetAttribute(1), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToNextAttribute() When iOrdinal=0, without namespace")]
public int MoveToNextAttribute4()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strValue;
CError.WriteLine("Move to first Attribute===========");
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue, DataReader.GetAttribute(0), CurVariation.Desc);
CError.WriteLine("Move to second Attribute===========");
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue, DataReader.GetAttribute(1), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=middle, with namespace")]
public int MoveToFirstAttribute5()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strValue0;
string strValue;
int iMid = (DataReader.AttributeCount) / 2;
DataReader.MoveToAttribute(iMid + 1);
CError.WriteLine("NextFromMiddle value=" + DataReader.Value);
strValue0 = DataReader.Value;
DataReader.MoveToAttribute(iMid);
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue0, strValue, CurVariation.Desc);
CError.Compare(strValue, DataReader.GetAttribute(iMid + 1), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=middle, without namespace")]
public int MoveToFirstAttribute6()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strValue0;
string strValue;
int iMid = (DataReader.AttributeCount) / 2;
DataReader.MoveToAttribute(iMid + 1);
CError.WriteLine("Middle value=" + DataReader.Value);
strValue0 = DataReader.Value;
DataReader.MoveToAttribute(iMid);
CError.Compare(DataReader.MoveToNextAttribute(), true, CurVariation.Desc);
strValue = DataReader.Value;
CError.Compare(strValue0, strValue, CurVariation.Desc);
CError.Compare(strValue, DataReader.GetAttribute(iMid + 1), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=end, with namespace")]
public int MoveToFirstAttribute7()
{
ReloadSource();
DataReader.PositionOnElement("ACT0");
string strFirst;
DataReader.MoveToAttribute((DataReader.AttributeCount) - 1);
CError.WriteLine("End value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("MoveToFirstAttribute() When iOrdinal=end, without namespace")]
public int MoveToFirstAttribute8()
{
ReloadSource();
DataReader.PositionOnElement("ACT1");
string strFirst;
DataReader.MoveToAttribute((DataReader.AttributeCount) - 1);
CError.WriteLine("End value=" + DataReader.Value);
CError.Compare(DataReader.MoveToFirstAttribute(), true, CurVariation.Desc);
strFirst = DataReader.Value;
CError.Compare(strFirst, DataReader.GetAttribute(0), CurVariation.Desc);
return TEST_PASS;
}
[Variation("XmlReader: Does not count depth for attributes of xml decl. and Doctype")]
public int MoveToNextAttribute9()
{
ReloadSource(Path.Combine(TestData, "Common", "Bug424573.xml"));
DataReader.Read();
if (DataReader.HasAttributes)
{
for (int i = 0; i < DataReader.AttributeCount; i++)
{
DataReader.MoveToNextAttribute();
if (DataReader.NodeType == XmlNodeType.Attribute && DataReader.Depth != 1)
{
CError.WriteLine("Unexpected attribute depth: {0}\n", DataReader.Depth);
return TEST_FAIL;
}
}
}
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML Attribute Test when NodeType != Attributes
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCAttributeTest : TCXMLReaderBaseGeneral
{
[Variation("Attribute Test On None")]
public int TestAttributeTestNodeType_None()
{
ReloadSource();
if (FindNodeType(XmlNodeType.None) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On Element", Pri = 0)]
public int TestAttributeTestNodeType_Element()
{
ReloadSource();
if (FindNodeType(XmlNodeType.Element) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On Text", Pri = 0)]
public int TestAttributeTestNodeType_Text()
{
ReloadSource();
if (FindNodeType(XmlNodeType.Text) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On CDATA")]
public int TestAttributeTestNodeType_CDATA()
{
ReloadSource();
// No CDATA for Xslt
if (IsXsltReader() || IsXPathNavigatorReader())
{
while (FindNodeType(XmlNodeType.CDATA) == TEST_PASS)
return TEST_FAIL;
return TEST_PASS;
}
if (FindNodeType(XmlNodeType.CDATA) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On ProcessingInstruction")]
public int TestAttributeTestNodeType_ProcessingInstruction()
{
ReloadSource();
if (FindNodeType(XmlNodeType.ProcessingInstruction) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On Comment")]
public int TestAttributeTestNodeType_Comment()
{
ReloadSource();
if (FindNodeType(XmlNodeType.Comment) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On DocumentType", Pri = 0)]
public int TestAttributeTestNodeType_DocumentType()
{
ReloadSource();
if (FindNodeType(XmlNodeType.DocumentType) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 1, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, true, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), true, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On Whitespace")]
public int TestAttributeTestNodeType_Whitespace()
{
ReloadSource();
if (FindNodeType(XmlNodeType.Whitespace) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On EndElement")]
public int TestAttributeTestNodeType_EndElement()
{
ReloadSource();
if (FindNodeType(XmlNodeType.EndElement) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("AttributeTest On XmlDeclaration", Pri = 0)]
public int TestAttributeTestNodeType_XmlDeclaration()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) == TEST_PASS)
{
int nCount = (IsXsltReader() || IsXPathNavigatorReader()) ? 1 : 3;
CError.Compare(DataReader.AttributeCount, nCount, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, true, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), true, "Checking MoveToFirstAttribute");
bool bNext = !(IsXsltReader() || IsXPathNavigatorReader()); // XsltReader has only one attribute for XmlDeclaration
CError.Compare(DataReader.MoveToNextAttribute(), bNext, "Checking MoveToNextAttribute");
}
return TEST_PASS;
}
[Variation("Attribute Test On EntityReference")]
public int TestAttributeTestNodeType_EntityReference()
{
if (!IsXmlTextReader())
return TEST_SKIPPED;
ReloadSource();
if (FindNodeType(XmlNodeType.EntityReference) == TEST_PASS)
{
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCoung");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
return TEST_PASS;
}
return TEST_FAIL;
}
[Variation("AttributeTest On EndEntity")]
public int TestAttributeTestNodeType_EndEntity()
{
if (!IsXmlTextReader())
return TEST_SKIPPED;
ReloadSource();
PositionOnNodeType(XmlNodeType.EndEntity);
CError.Compare(DataReader.AttributeCount, 0, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, false, "Checking HasAttributes");
CError.Compare(DataReader.MoveToFirstAttribute(), false, "Checking MoveToFirstAttribute");
CError.Compare(DataReader.MoveToNextAttribute(), false, "Checking MoveToNextAttribute");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML AttributeTest on XmlDeclaration DCR52258
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCAttributeXmlDeclaration : TCXMLReaderBaseGeneral
{
private static string[] s_attrNames = { "version", "encoding", "standalone" };
private static string[] s_attrValues = { "1.0", "UTF-8", "no" };
private static int s_attrCount = 3;
public override int Init(object objParam)
{
int ret = base.Init(objParam);
// xslt doesn't have encoding and standalone
s_attrCount = (IsXsltReader() || IsXPathNavigatorReader()) ? 1 : 3;
if (IsBinaryReader())
{
s_attrValues = new string[] { "1.0", "utf-8", "no" };
}
return ret;
}
private void CheckAttribute(int nPos)
{
CheckAttribute(nPos, XmlNodeType.Attribute);
}
private void CheckAttribute(int nPos, XmlNodeType nt)
{
CError.Compare(DataReader.VerifyNode(nt, s_attrNames[nPos], s_attrValues[nPos]), true, "CheckAttribute");
}
[Variation("AttributeCount and HasAttributes", Pri = 0)]
public int TAXmlDecl_1()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "Checking AttributeCount");
CError.Compare(DataReader.HasAttributes, (s_attrCount > 0), "Checking HasAttributes");
return TEST_PASS;
}
[Variation("MoveToFirstAttribute/MoveToNextAttribute navigation", Pri = 0)]
public int TAXmlDecl_2()
{
if (IsBinaryReader())
return TEST_SKIPPED;
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
// Check version attribute
CError.Compare(DataReader.MoveToFirstAttribute(), true, "MTFA");
CheckAttribute(0);
if (!(IsXsltReader() || IsXPathNavigatorReader())) // Xslt has only one XmlDeclaration attribute
{
// Check encoding attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(1);
// Check standalone attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(2);
}
// Check if no more attribute
CError.Compare(DataReader.MoveToNextAttribute(), false, "MTNA");
return TEST_PASS;
}
[Variation("MoveToFirstAttribute/MoveToNextAttribute succesive calls")]
public int TAXmlDecl_3()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
// Call MoveToNextAttribute first
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(0);
if (!(IsXsltReader() || IsXPathNavigatorReader())) // Xslt has only one XmlDeclaration attribute
{
// Go to 2nd attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(1);
// Rewind
CError.Compare(DataReader.MoveToFirstAttribute(), true, "MTNA");
CheckAttribute(0);
// Go to last attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CheckAttribute(2);
// Rewind
CError.Compare(DataReader.MoveToFirstAttribute(), true, "MTNA");
CheckAttribute(0);
// Go to after the last attribute
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CError.Compare(DataReader.MoveToNextAttribute(), true, "MTNA");
CError.Compare(DataReader.MoveToNextAttribute(), false, "MTNA");
CheckAttribute(2);
}
// Rewind
CError.Compare(DataReader.MoveToFirstAttribute(), true, "MTNA");
CheckAttribute(0);
return TEST_PASS;
}
[Variation("MoveToAttribute attribute access")]
public int TAXmlDecl_4()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
// Ordinal access
for (int i = 0; i < s_attrCount; i++)
{
DataReader.MoveToAttribute(i);
CheckAttribute(i);
}
// Name access
for (int i = s_attrCount - 1; i >= 0; i--)
{
CError.Compare(DataReader.MoveToAttribute(s_attrNames[i]), true, "MTA");
CheckAttribute(i);
}
// Name & Namespace access
for (int i = s_attrCount - 1; i >= 0; i--)
{
CError.Compare(DataReader.MoveToAttribute(s_attrNames[i], null), true, "MTA");
CheckAttribute(i);
}
// Name & Namespace access
for (int i = s_attrCount - 1; i >= 0; i--)
{
CError.Compare(DataReader.MoveToAttribute(s_attrNames[i], string.Empty), true, "MTA");
CheckAttribute(i);
}
return TEST_PASS;
}
[Variation("MoveToAttribute attribute access with invalid index")]
public int TAXmlDecl_5()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
DataReader.MoveToAttribute(s_attrCount / 2);
CheckAttribute(s_attrCount / 2);
// Invalid index
try
{
DataReader.MoveToAttribute(-1);
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
return TEST_PASS;
}
[Variation("GetAttribute attribute access")]
public int TAXmlDecl_6()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
// reader on element
for (int i = 0; i < s_attrCount; i++)
{
// Ordinal access
CError.Compare(DataReader.GetAttribute(i), s_attrValues[i], "GA ordinal");
// Name access
CError.Compare(DataReader.GetAttribute(s_attrNames[i]), s_attrValues[i], "GA name");
// Name & Namespace access
CError.Compare(DataReader.GetAttribute(s_attrNames[i], null), s_attrValues[i], "GA name & namespace");
// Name & Namespace access
CError.Compare(DataReader.GetAttribute(s_attrNames[i], string.Empty), s_attrValues[i], "GA name & namespace");
}
// reader on middle attribute
DataReader.MoveToAttribute(s_attrCount / 2);
for (int i = s_attrCount - 1; i >= 0; i--)
{
// Ordinal access
CError.Compare(DataReader.GetAttribute(i), s_attrValues[i], "GA ordinal");
// Name access
CError.Compare(DataReader.GetAttribute(s_attrNames[i]), s_attrValues[i], "GA name");
// Name & Namespace access
CError.Compare(DataReader.GetAttribute(s_attrNames[i], null), s_attrValues[i], "GA name & namespace");
// Name & Namespace access
CError.Compare(DataReader.GetAttribute(s_attrNames[i], string.Empty), s_attrValues[i], "GA name & namespace");
}
return TEST_PASS;
}
[Variation("GetAttribute attribute access with invalid index")]
public int TAXmlDecl_7()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
// Invalid index
try
{
DataReader.GetAttribute(-1);
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
try
{
DataReader.GetAttribute(s_attrCount);
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
// Invalid name
CError.Compare(DataReader.GetAttribute("s"), null, "GA");
// Invalid namespace
CError.Compare(DataReader.GetAttribute(s_attrNames[0], "zzz"), null, "GA");
return TEST_PASS;
}
[Variation("this[] attribute access")]
public int TAXmlDecl_8()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
// reader on element
for (int i = 0; i < s_attrCount; i++)
{
// Ordinal access
CError.Compare(DataReader[i], s_attrValues[i], "[] ordinal");
// Name access
CError.Compare(DataReader[s_attrNames[i]], s_attrValues[i], "[] name");
// Name & Namespace access
CError.Compare(DataReader[s_attrNames[i], null], s_attrValues[i], "[] name & namespace");
// Name & Namespace access
CError.Compare(DataReader[s_attrNames[i], string.Empty], s_attrValues[i], "[] name & namespace");
}
// reader on middle attribute
DataReader.MoveToAttribute(s_attrCount / 2);
for (int i = s_attrCount - 1; i >= 0; i--)
{
// Ordinal access
CError.Compare(DataReader[i], s_attrValues[i], "[] ordinal");
// Name access
CError.Compare(DataReader[s_attrNames[i]], s_attrValues[i], "[] name");
// Name & Namespace access
CError.Compare(DataReader[s_attrNames[i], null], s_attrValues[i], "[] name & namespace");
// Name & Namespace access
CError.Compare(DataReader[s_attrNames[i], string.Empty], s_attrValues[i], "[] name & namespace");
}
return TEST_PASS;
}
[Variation("this[] attribute access with invalid index")]
public int TAXmlDecl_9()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
// Invalid index
try
{
string s = DataReader[-1];
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
try
{
string s = DataReader[s_attrCount];
return TEST_FAIL;
}
catch (ArgumentOutOfRangeException)
{
}
// Invalid name
CError.Compare(DataReader["s"], null, "[]");
// Invalid namespace
CError.Compare(DataReader[s_attrNames[0], "zzz"], null, "[]");
return TEST_PASS;
}
[Variation("ReadAttributeValue on XmlDecl attributes")]
public int TAXmlDecl_10()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
for (int i = 0; i < s_attrCount; i++)
{
DataReader.MoveToAttribute(i);
// Ordinal access
CError.Compare(DataReader.ReadAttributeValue(), true, "RAV");
CError.Compare(DataReader.VerifyNode(XmlNodeType.Text, string.Empty, s_attrValues[i]), true, "Attribute");
CError.Compare(DataReader.ReadAttributeValue(), false, "RAV");
}
return TEST_PASS;
}
[Variation("LocalName, NamespaceURI and Prefix on XmlDecl attributes")]
public int TAXmlDecl_11()
{
ReloadSource();
if (FindNodeType(XmlNodeType.XmlDeclaration) != TEST_PASS)
return TEST_FAIL;
CError.Compare(DataReader.AttributeCount, s_attrCount, "AttributeCount");
for (int i = 0; i < s_attrCount; i++)
{
DataReader.MoveToAttribute(i);
// Ordinal access
CError.Compare(DataReader.LocalName, s_attrNames[i], "LN");
CError.Compare(DataReader.Prefix, string.Empty, "P");
CError.Compare(DataReader.NamespaceURI, string.Empty, "NU");
}
return TEST_PASS;
}
[Variation("Whitespace between XmlDecl attributes")]
public int TAXmlDecl_12()
{
if (IsXmlNodeReader() || IsXmlNodeReaderDataDoc() || IsXPathNavigatorReader() || IsBinaryReader())
return TEST_SKIPPED;
string strxml = "<?xml version='1.0' standalone='yes'?><ROOT/>";
ReloadSourceStr(strxml);
DataReader.Read();
CError.Compare(DataReader.Value, "version='1.0' standalone='yes'", "value");
return TEST_PASS;
}
[Variation("MoveToElement on XmlDeclaration attributes")]
public int TAXmlDecl_13()
{
ReloadSource();
PositionOnNodeType(XmlNodeType.XmlDeclaration);
DataReader.MoveToFirstAttribute();
CError.Compare(DataReader.VerifyNode(XmlNodeType.Attribute, s_attrNames[0], s_attrValues[0]), "Attribute");
DataReader.MoveToElement();
CError.Compare(DataReader.NodeType, XmlNodeType.XmlDeclaration, "nt");
CError.Compare(DataReader.Name, "xml", "name");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase TCXML xmlns as local name DCR50345
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCXmlns : TCXMLReaderBaseGeneral
{
private string _ST_ENS1 = "EMPTY_NAMESPACE1"; //<EMPTY_NAMESPACE1 Attr0="0" xmlns="14"/>
private string _ST_NS2 = "NAMESPACE2"; //<NAMESPACE2 xmlns:bar="1">
[Variation("Name, LocalName, Prefix and Value with xmlns=ns attribute", Pri = 0)]
public int TXmlns1()
{
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
DataReader.MoveToAttribute("xmlns");
CError.Compare(DataReader.LocalName, "xmlns", "ln");
CError.Compare(DataReader.Name, "xmlns", "n");
CError.Compare(DataReader.Prefix, string.Empty, "p");
CError.Compare(DataReader.Value, "14", "v");
return TEST_PASS;
}
[Variation("Name, LocalName, Prefix and Value with xmlns:p=ns attribute")]
public int TXmlns2()
{
ReloadSource();
DataReader.PositionOnElement(_ST_NS2);
DataReader.MoveToAttribute(0);
CError.Compare(DataReader.LocalName, "bar", "ln");
CError.Compare(DataReader.Name, "xmlns:bar", "n");
CError.Compare(DataReader.Prefix, "xmlns", "p");
CError.Compare(DataReader.Value, "1", "v");
return TEST_PASS;
}
[Variation("LookupNamespace with xmlns=ns attribute")]
public int TXmlns3()
{
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
DataReader.MoveToAttribute(1);
CError.Compare(DataReader.LookupNamespace("xmlns"), "http://www.w3.org/2000/xmlns/", "ln");
return TEST_PASS;
}
[Variation("MoveToAttribute access on xmlns attribute")]
public int TXmlns4()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
DataReader.MoveToAttribute(1);
CError.Compare(DataReader.LocalName, "xmlns", "ln");
CError.Compare(DataReader.Name, "xmlns", "n");
CError.Compare(DataReader.Prefix, string.Empty, "p");
CError.Compare(DataReader.Value, "14", "v");
DataReader.MoveToElement();
CError.Compare(DataReader.MoveToAttribute("xmlns"), true, "mta(str)");
CError.Compare(DataReader.LocalName, "xmlns", "ln");
CError.Compare(DataReader.Name, "xmlns", "n");
CError.Compare(DataReader.Prefix, string.Empty, "p");
CError.Compare(DataReader.Value, "14", "v");
DataReader.MoveToElement();
CError.Compare(DataReader.MoveToAttribute("xmlns", "http://www.w3.org/2000/xmlns/"), true, "mta(str, str)");
CError.Compare(DataReader.LocalName, "xmlns", "ln");
CError.Compare(DataReader.Name, "xmlns", "n");
CError.Compare(DataReader.Prefix, string.Empty, "p");
CError.Compare(DataReader.Value, "14", "v");
DataReader.MoveToElement();
CError.Compare(DataReader.MoveToAttribute("xmlns", "14"), false, "mta inv");
return TEST_PASS;
}
[Variation("GetAttribute access on xmlns attribute")]
public int TXmlns5()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
CError.Compare(DataReader.GetAttribute(1), "14", "ga(i)");
CError.Compare(DataReader.GetAttribute("xmlns"), "14", "ga(str)");
CError.Compare(DataReader.GetAttribute("xmlns", "http://www.w3.org/2000/xmlns/"), "14", "ga(str, str)");
CError.Compare(DataReader.GetAttribute("xmlns", "14"), null, "ga inv");
return TEST_PASS;
}
[Variation("this[xmlns] attribute access")]
public int TXmlns6()
{
if (IsXPathNavigatorReader())
return TEST_SKIPPED;
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
CError.Compare(DataReader[1], "14", "this[i]");
CError.Compare(DataReader["xmlns"], "14", "this[str]");
CError.Compare(DataReader["xmlns", "http://www.w3.org/2000/xmlns/"], "14", "this[str, str]");
CError.Compare(DataReader["xmlns", "14"], null, "this inv");
return TEST_PASS;
}
}
////////////////////////////////////////////////////////////////
// TestCase bounded namespace to xmlns prefix DCR50881, DCR57490
//
////////////////////////////////////////////////////////////////
[InheritRequired()]
public abstract partial class TCXmlnsPrefix : TCXMLReaderBaseGeneral
{
private string _ST_ENS1 = "EMPTY_NAMESPACE1"; //<EMPTY_NAMESPACE1 Attr0="0" xmlns="14"/>
private string _ST_NS2 = "NAMESPACE2"; //<NAMESPACE2 xmlns:bar="1">
private string _strXmlns = "http://www.w3.org/2000/xmlns/";
[Variation("NamespaceURI of xmlns:a attribute", Pri = 0)]
public int TXmlnsPrefix1()
{
ReloadSource();
DataReader.PositionOnElement(_ST_NS2);
DataReader.MoveToAttribute(0);
CError.Compare(DataReader.NamespaceURI, _strXmlns, "nu");
return TEST_PASS;
}
[Variation("NamespaceURI of element/attribute with xmlns attribute", Pri = 0)]
public int TXmlnsPrefix2()
{
ReloadSource();
DataReader.PositionOnElement(_ST_ENS1);
CError.Compare(DataReader.NamespaceURI, "14", "nue");
DataReader.MoveToAttribute("Attr0");
CError.Compare(DataReader.NamespaceURI, string.Empty, "nu");
DataReader.MoveToAttribute("xmlns");
CError.Compare(DataReader.NamespaceURI, _strXmlns, "nu");
return TEST_PASS;
}
[Variation("LookupNamespace with xmlns prefix")]
public int TXmlnsPrefix3()
{
ReloadSource();
DataReader.Read();
CError.Compare(DataReader.LookupNamespace("xmlns"), _strXmlns, "ln");
return TEST_PASS;
}
[Variation("Define prefix for 'www.w3.org/2000/xmlns'", Pri = 0)]
public int TXmlnsPrefix4()
{
if (!IsXmlTextReader())
return TEST_SKIPPED;
string strxml = "<ROOT xmlns:pxmlns='http://www.w3.org/2000/xmlns/'/>";
ReloadSourceStr(strxml);
try
{
DataReader.Read();
}
catch (XmlException)
{
return TEST_PASS;
}
return TEST_FAIL;
}
[Variation("Redefine namespace attached to xmlns prefix")]
public int TXmlnsPrefix5()
{
if (!IsXmlTextReader())
return TEST_SKIPPED;
string strxml = "<ROOT xmlns:xmlns='http://www.w3.org/2002/xmlns/'/>";
ReloadSourceStr(strxml);
try
{
DataReader.Read();
}
catch (XmlException)
{
return TEST_PASS;
}
return TEST_FAIL;
}
//[Variation("False duplicates and non-duplicates possible in the XmlReader during attribute normalization", Param = true)]
//[Variation("False duplicates and non-duplicates possible in the XmlReader during attribute normalization", Param = false)]
public int TXmlnsPrefix6()
{
bool param = (bool)CurVariation.Param;
string xml = "bug511965" + param + ".xml";
MemoryStream ms = new MemoryStream();
XmlWriter w = XmlWriter.Create(ms);
w.WriteStartDocument(true);
w.WriteStartElement("root");
for (int i = 0; i < 250; i++)
{
WriteAttribute(w, param, "a" + i, "stra\u00DFe");
}
WriteAttribute(w, param, "strasse", "stra\u00DFe");
WriteAttribute(w, param, "stra\u00DFe", "stra\u00DFe");
w.WriteEndElement();
w.WriteEndDocument();
w.Flush();
FilePathUtil.addStream(xml, ms);
ReloadSource(xml);
while (DataReader.Read()) ;
return TEST_PASS;
}
public void WriteAttribute(XmlWriter w, bool param, string name, string value)
{
if (param)
w.WriteAttributeString(name, "xmlns", value);
else
w.WriteAttributeString(name, value);
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/HardwareIntrinsics/X86/Sse1/UnpackLow_ro.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnpackLow.cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnpackLow.cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/jit64/valuetypes/nullable/castclass/castclass/castclass002.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="castclass002.cs" />
<Compile Include="..\structdef.cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="castclass002.cs" />
<Compile Include="..\structdef.cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Net.Http/src/System/Net/Http/Headers/ProductInfoHeaderValue.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
namespace System.Net.Http.Headers
{
public class ProductInfoHeaderValue : ICloneable
{
private ProductHeaderValue? _product;
private string? _comment;
public ProductHeaderValue? Product
{
get { return _product; }
}
public string? Comment
{
get { return _comment; }
}
public ProductInfoHeaderValue(string productName, string? productVersion)
: this(new ProductHeaderValue(productName, productVersion))
{
}
public ProductInfoHeaderValue(ProductHeaderValue product!!)
{
_product = product;
}
public ProductInfoHeaderValue(string comment)
{
HeaderUtilities.CheckValidComment(comment, nameof(comment));
_comment = comment;
}
private ProductInfoHeaderValue(ProductInfoHeaderValue source)
{
Debug.Assert(source != null);
_product = source._product;
_comment = source._comment;
}
public override string ToString()
{
if (_product == null)
{
Debug.Assert(_comment != null);
return _comment;
}
return _product.ToString();
}
public override bool Equals([NotNullWhen(true)] object? obj)
{
ProductInfoHeaderValue? other = obj as ProductInfoHeaderValue;
if (other == null)
{
return false;
}
if (_product == null)
{
// We compare comments using case-sensitive comparison.
return string.Equals(_comment, other._comment, StringComparison.Ordinal);
}
return _product.Equals(other._product);
}
public override int GetHashCode()
{
if (_product == null)
{
Debug.Assert(_comment != null);
return _comment.GetHashCode();
}
return _product.GetHashCode();
}
public static ProductInfoHeaderValue Parse(string input)
{
int index = 0;
object result = ProductInfoHeaderParser.SingleValueParser.ParseValue(
input, null, ref index);
if (index < input.Length)
{
// There is some invalid leftover data. Normally BaseHeaderParser.TryParseValue would
// handle this, but ProductInfoHeaderValue does not derive from BaseHeaderParser.
throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, input.Substring(index)));
}
return (ProductInfoHeaderValue)result;
}
public static bool TryParse([NotNullWhen(true)] string input, [NotNullWhen(true)] out ProductInfoHeaderValue? parsedValue)
{
int index = 0;
parsedValue = null;
if (ProductInfoHeaderParser.SingleValueParser.TryParseValue(input, null, ref index, out object? output))
{
if (index < input.Length)
{
// There is some invalid leftover data. Normally BaseHeaderParser.TryParseValue would
// handle this, but ProductInfoHeaderValue does not derive from BaseHeaderParser.
return false;
}
parsedValue = (ProductInfoHeaderValue)output;
return true;
}
return false;
}
internal static int GetProductInfoLength(string? input, int startIndex, out ProductInfoHeaderValue? parsedValue)
{
Debug.Assert(startIndex >= 0);
parsedValue = null;
if (string.IsNullOrEmpty(input) || (startIndex >= input.Length))
{
return 0;
}
int current = startIndex;
// Caller must remove leading whitespace.
string? comment;
ProductHeaderValue? product;
if (input[current] == '(')
{
int commentLength;
if (HttpRuleParser.GetCommentLength(input, current, out commentLength) != HttpParseResult.Parsed)
{
return 0;
}
comment = input.Substring(current, commentLength);
current = current + commentLength;
current = current + HttpRuleParser.GetWhitespaceLength(input, current);
parsedValue = new ProductInfoHeaderValue(comment);
}
else
{
// Trailing whitespace is removed by GetProductLength().
int productLength = ProductHeaderValue.GetProductLength(input, current, out product);
if (productLength == 0)
{
return 0;
}
current = current + productLength;
parsedValue = new ProductInfoHeaderValue(product!);
}
return current - startIndex;
}
object ICloneable.Clone()
{
return new ProductInfoHeaderValue(this);
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
namespace System.Net.Http.Headers
{
public class ProductInfoHeaderValue : ICloneable
{
private ProductHeaderValue? _product;
private string? _comment;
public ProductHeaderValue? Product
{
get { return _product; }
}
public string? Comment
{
get { return _comment; }
}
public ProductInfoHeaderValue(string productName, string? productVersion)
: this(new ProductHeaderValue(productName, productVersion))
{
}
public ProductInfoHeaderValue(ProductHeaderValue product!!)
{
_product = product;
}
public ProductInfoHeaderValue(string comment)
{
HeaderUtilities.CheckValidComment(comment, nameof(comment));
_comment = comment;
}
private ProductInfoHeaderValue(ProductInfoHeaderValue source)
{
Debug.Assert(source != null);
_product = source._product;
_comment = source._comment;
}
public override string ToString()
{
if (_product == null)
{
Debug.Assert(_comment != null);
return _comment;
}
return _product.ToString();
}
public override bool Equals([NotNullWhen(true)] object? obj)
{
ProductInfoHeaderValue? other = obj as ProductInfoHeaderValue;
if (other == null)
{
return false;
}
if (_product == null)
{
// We compare comments using case-sensitive comparison.
return string.Equals(_comment, other._comment, StringComparison.Ordinal);
}
return _product.Equals(other._product);
}
public override int GetHashCode()
{
if (_product == null)
{
Debug.Assert(_comment != null);
return _comment.GetHashCode();
}
return _product.GetHashCode();
}
public static ProductInfoHeaderValue Parse(string input)
{
int index = 0;
object result = ProductInfoHeaderParser.SingleValueParser.ParseValue(
input, null, ref index);
if (index < input.Length)
{
// There is some invalid leftover data. Normally BaseHeaderParser.TryParseValue would
// handle this, but ProductInfoHeaderValue does not derive from BaseHeaderParser.
throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, input.Substring(index)));
}
return (ProductInfoHeaderValue)result;
}
public static bool TryParse([NotNullWhen(true)] string input, [NotNullWhen(true)] out ProductInfoHeaderValue? parsedValue)
{
int index = 0;
parsedValue = null;
if (ProductInfoHeaderParser.SingleValueParser.TryParseValue(input, null, ref index, out object? output))
{
if (index < input.Length)
{
// There is some invalid leftover data. Normally BaseHeaderParser.TryParseValue would
// handle this, but ProductInfoHeaderValue does not derive from BaseHeaderParser.
return false;
}
parsedValue = (ProductInfoHeaderValue)output;
return true;
}
return false;
}
internal static int GetProductInfoLength(string? input, int startIndex, out ProductInfoHeaderValue? parsedValue)
{
Debug.Assert(startIndex >= 0);
parsedValue = null;
if (string.IsNullOrEmpty(input) || (startIndex >= input.Length))
{
return 0;
}
int current = startIndex;
// Caller must remove leading whitespace.
string? comment;
ProductHeaderValue? product;
if (input[current] == '(')
{
int commentLength;
if (HttpRuleParser.GetCommentLength(input, current, out commentLength) != HttpParseResult.Parsed)
{
return 0;
}
comment = input.Substring(current, commentLength);
current = current + commentLength;
current = current + HttpRuleParser.GetWhitespaceLength(input, current);
parsedValue = new ProductInfoHeaderValue(comment);
}
else
{
// Trailing whitespace is removed by GetProductLength().
int productLength = ProductHeaderValue.GetProductLength(input, current, out product);
if (productLength == 0)
{
return 0;
}
current = current + productLength;
parsedValue = new ProductInfoHeaderValue(product!);
}
return current - startIndex;
}
object ICloneable.Clone()
{
return new ProductInfoHeaderValue(this);
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestException.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics.CodeAnalysis;
using System.IO;
namespace System.Net.Http
{
public class HttpRequestException : Exception
{
internal RequestRetryType AllowRetry { get; } = RequestRetryType.NoRetry;
public HttpRequestException()
: this(null, null)
{ }
public HttpRequestException(string? message)
: this(message, null)
{ }
public HttpRequestException(string? message, Exception? inner)
: base(message, inner)
{
if (inner != null)
{
HResult = inner.HResult;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="HttpRequestException" /> class with a specific message that describes the current exception, an inner exception, and an HTTP status code.
/// </summary>
/// <param name="message">A message that describes the current exception.</param>
/// <param name="inner">The inner exception.</param>
/// <param name="statusCode">The HTTP status code.</param>
public HttpRequestException(string? message, Exception? inner, HttpStatusCode? statusCode)
: this(message, inner)
{
StatusCode = statusCode;
}
/// <summary>
/// Gets the HTTP status code to be returned with the exception.
/// </summary>
/// <value>
/// An HTTP status code if the exception represents a non-successful result, otherwise <c>null</c>.
/// </value>
public HttpStatusCode? StatusCode { get; }
// This constructor is used internally to indicate that a request was not successfully sent due to an IOException,
// and the exception occurred early enough so that the request may be retried on another connection.
internal HttpRequestException(string? message, Exception? inner, RequestRetryType allowRetry)
: this(message, inner)
{
AllowRetry = allowRetry;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics.CodeAnalysis;
using System.IO;
namespace System.Net.Http
{
public class HttpRequestException : Exception
{
internal RequestRetryType AllowRetry { get; } = RequestRetryType.NoRetry;
public HttpRequestException()
: this(null, null)
{ }
public HttpRequestException(string? message)
: this(message, null)
{ }
public HttpRequestException(string? message, Exception? inner)
: base(message, inner)
{
if (inner != null)
{
HResult = inner.HResult;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="HttpRequestException" /> class with a specific message that describes the current exception, an inner exception, and an HTTP status code.
/// </summary>
/// <param name="message">A message that describes the current exception.</param>
/// <param name="inner">The inner exception.</param>
/// <param name="statusCode">The HTTP status code.</param>
public HttpRequestException(string? message, Exception? inner, HttpStatusCode? statusCode)
: this(message, inner)
{
StatusCode = statusCode;
}
/// <summary>
/// Gets the HTTP status code to be returned with the exception.
/// </summary>
/// <value>
/// An HTTP status code if the exception represents a non-successful result, otherwise <c>null</c>.
/// </value>
public HttpStatusCode? StatusCode { get; }
// This constructor is used internally to indicate that a request was not successfully sent due to an IOException,
// and the exception occurred early enough so that the request may be retried on another connection.
internal HttpRequestException(string? message, Exception? inner, RequestRetryType allowRetry)
: this(message, inner)
{
AllowRetry = allowRetry;
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.Aot.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Internal.TypeSystem;
using Internal.IL;
using Interlocked = System.Threading.Interlocked;
namespace ILCompiler
{
partial class CompilerTypeSystemContext
{
// Chosen rather arbitrarily. For the app that I was looking at, cutoff point of 7 compiled
// more than 10 minutes on a release build of the compiler, and I lost patience.
// Cutoff point of 5 produced an 1.7 GB object file.
// Cutoff point of 4 produced an 830 MB object file.
// Cutoff point of 3 produced an 470 MB object file.
// We want this to be high enough so that it doesn't cut off too early. But also not too
// high because things that are recursive often end up expanding laterally as well
// through various other generic code the deep code calls into.
public const int DefaultGenericCycleCutoffPoint = 4;
public SharedGenericsConfiguration GenericsConfig
{
get;
}
private readonly MetadataFieldLayoutAlgorithm _metadataFieldLayoutAlgorithm = new CompilerMetadataFieldLayoutAlgorithm();
private readonly RuntimeDeterminedFieldLayoutAlgorithm _runtimeDeterminedFieldLayoutAlgorithm = new RuntimeDeterminedFieldLayoutAlgorithm();
private readonly VectorOfTFieldLayoutAlgorithm _vectorOfTFieldLayoutAlgorithm;
private readonly VectorFieldLayoutAlgorithm _vectorFieldLayoutAlgorithm;
private TypeDesc[] _arrayOfTInterfaces;
private ArrayOfTRuntimeInterfacesAlgorithm _arrayOfTRuntimeInterfacesAlgorithm;
private MetadataType _arrayOfTType;
public CompilerTypeSystemContext(TargetDetails details, SharedGenericsMode genericsMode, DelegateFeature delegateFeatures, int genericCycleCutoffPoint = DefaultGenericCycleCutoffPoint)
: base(details)
{
_genericsMode = genericsMode;
_vectorOfTFieldLayoutAlgorithm = new VectorOfTFieldLayoutAlgorithm(_metadataFieldLayoutAlgorithm);
_vectorFieldLayoutAlgorithm = new VectorFieldLayoutAlgorithm(_metadataFieldLayoutAlgorithm);
_delegateInfoHashtable = new DelegateInfoHashtable(delegateFeatures);
_genericCycleDetector = new LazyGenericsSupport.GenericCycleDetector(genericCycleCutoffPoint);
GenericsConfig = new SharedGenericsConfiguration();
}
protected override RuntimeInterfacesAlgorithm GetRuntimeInterfacesAlgorithmForNonPointerArrayType(ArrayType type)
{
if (_arrayOfTRuntimeInterfacesAlgorithm == null)
{
_arrayOfTRuntimeInterfacesAlgorithm = new ArrayOfTRuntimeInterfacesAlgorithm(SystemModule.GetKnownType("System", "Array`1"));
}
return _arrayOfTRuntimeInterfacesAlgorithm;
}
public override FieldLayoutAlgorithm GetLayoutAlgorithmForType(DefType type)
{
if (type == UniversalCanonType)
return UniversalCanonLayoutAlgorithm.Instance;
else if (type.IsRuntimeDeterminedType)
return _runtimeDeterminedFieldLayoutAlgorithm;
else if (VectorOfTFieldLayoutAlgorithm.IsVectorOfTType(type))
return _vectorOfTFieldLayoutAlgorithm;
else if (VectorFieldLayoutAlgorithm.IsVectorType(type))
return _vectorFieldLayoutAlgorithm;
else
return _metadataFieldLayoutAlgorithm;
}
protected override bool ComputeHasGCStaticBase(FieldDesc field)
{
Debug.Assert(field.IsStatic);
if (field.IsThreadStatic)
return true;
TypeDesc fieldType = field.FieldType;
if (fieldType.IsValueType)
return ((DefType)fieldType).ContainsGCPointers;
else
return fieldType.IsGCPointer;
}
/// <summary>
/// Returns true if <paramref name="type"/> is a generic interface type implemented by arrays.
/// </summary>
public bool IsGenericArrayInterfaceType(TypeDesc type)
{
// Hardcode the fact that all generic interfaces on array types have arity 1
if (!type.IsInterface || type.Instantiation.Length != 1)
return false;
if (_arrayOfTInterfaces == null)
{
DefType[] implementedInterfaces = SystemModule.GetKnownType("System", "Array`1").ExplicitlyImplementedInterfaces;
TypeDesc[] interfaceDefinitions = new TypeDesc[implementedInterfaces.Length];
for (int i = 0; i < interfaceDefinitions.Length; i++)
interfaceDefinitions[i] = implementedInterfaces[i].GetTypeDefinition();
Interlocked.CompareExchange(ref _arrayOfTInterfaces, interfaceDefinitions, null);
}
TypeDesc interfaceDefinition = type.GetTypeDefinition();
foreach (var arrayInterfaceDefinition in _arrayOfTInterfaces)
{
if (interfaceDefinition == arrayInterfaceDefinition)
return true;
}
return false;
}
protected override IEnumerable<MethodDesc> GetAllMethods(TypeDesc type)
{
return GetAllMethods(type, virtualOnly: false);
}
protected override IEnumerable<MethodDesc> GetAllVirtualMethods(TypeDesc type)
{
return GetAllMethods(type, virtualOnly: true);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private IEnumerable<MethodDesc> GetAllMethods(TypeDesc type, bool virtualOnly)
{
if (type.IsDelegate)
{
return GetAllMethodsForDelegate(type, virtualOnly);
}
else if (type.IsEnum)
{
return GetAllMethodsForEnum(type, virtualOnly);
}
else if (type.IsValueType)
{
return GetAllMethodsForValueType(type, virtualOnly);
}
return virtualOnly ? type.GetVirtualMethods() : type.GetMethods();
}
protected virtual IEnumerable<MethodDesc> GetAllMethodsForDelegate(TypeDesc type, bool virtualOnly)
{
// Inject the synthetic methods that support the implementation of the delegate.
InstantiatedType instantiatedType = type as InstantiatedType;
if (instantiatedType != null)
{
DelegateInfo info = GetDelegateInfo(type.GetTypeDefinition());
foreach (MethodDesc syntheticMethod in info.Methods)
{
if (!virtualOnly || syntheticMethod.IsVirtual)
yield return GetMethodForInstantiatedType(syntheticMethod, instantiatedType);
}
}
else
{
DelegateInfo info = GetDelegateInfo(type);
foreach (MethodDesc syntheticMethod in info.Methods)
{
if (!virtualOnly || syntheticMethod.IsVirtual)
yield return syntheticMethod;
}
}
// Append all the methods defined in metadata
IEnumerable<MethodDesc> metadataMethods = virtualOnly ? type.GetVirtualMethods() : type.GetMethods();
foreach (var m in metadataMethods)
yield return m;
}
internal DefType GetClosestDefType(TypeDesc type)
{
if (type.IsArray)
{
if (!type.IsArrayTypeWithoutGenericInterfaces())
{
MetadataType arrayShadowType = _arrayOfTType ?? (_arrayOfTType = SystemModule.GetType("System", "Array`1"));
return arrayShadowType.MakeInstantiatedType(((ArrayType)type).ElementType);
}
return GetWellKnownType(WellKnownType.Array);
}
Debug.Assert(type is DefType);
return (DefType)type;
}
private readonly LazyGenericsSupport.GenericCycleDetector _genericCycleDetector;
public void DetectGenericCycles(TypeSystemEntity owner, TypeSystemEntity referent)
{
_genericCycleDetector.DetectCycle(owner, referent);
}
public void LogWarnings(Logger logger)
{
_genericCycleDetector.LogWarnings(logger);
}
}
public class SharedGenericsConfiguration
{
//
// Universal Shared Generics heuristics magic values determined empirically
//
public long UniversalCanonGVMReflectionRootHeuristic_InstantiationCount { get; }
public long UniversalCanonGVMDepthHeuristic_NonCanonDepth { get; }
public long UniversalCanonGVMDepthHeuristic_CanonDepth { get; }
// Controls how many different instantiations of a generic method, or method on generic type
// should be allowed before trying to fall back to only supplying USG in the reflection
// method table.
public long UniversalCanonReflectionMethodRootHeuristic_InstantiationCount { get; }
// To avoid infinite generic recursion issues during debug type record generation, attempt to
// use canonical form for types with high generic complexity.
public long MaxGenericDepthOfDebugRecord { get; }
public SharedGenericsConfiguration()
{
UniversalCanonGVMReflectionRootHeuristic_InstantiationCount = 4;
UniversalCanonGVMDepthHeuristic_NonCanonDepth = 2;
UniversalCanonGVMDepthHeuristic_CanonDepth = 1;
// Unlike the GVM heuristics which are intended to kick in aggressively
// this heuristic exists to make it so that a fair amount of generic
// expansion is allowed. Numbers are chosen to allow a fairly large
// amount of generic expansion before trimming.
UniversalCanonReflectionMethodRootHeuristic_InstantiationCount = 1024;
MaxGenericDepthOfDebugRecord = 15;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Internal.TypeSystem;
using Internal.IL;
using Interlocked = System.Threading.Interlocked;
namespace ILCompiler
{
partial class CompilerTypeSystemContext
{
// Chosen rather arbitrarily. For the app that I was looking at, cutoff point of 7 compiled
// more than 10 minutes on a release build of the compiler, and I lost patience.
// Cutoff point of 5 produced an 1.7 GB object file.
// Cutoff point of 4 produced an 830 MB object file.
// Cutoff point of 3 produced an 470 MB object file.
// We want this to be high enough so that it doesn't cut off too early. But also not too
// high because things that are recursive often end up expanding laterally as well
// through various other generic code the deep code calls into.
public const int DefaultGenericCycleCutoffPoint = 4;
public SharedGenericsConfiguration GenericsConfig
{
get;
}
private readonly MetadataFieldLayoutAlgorithm _metadataFieldLayoutAlgorithm = new CompilerMetadataFieldLayoutAlgorithm();
private readonly RuntimeDeterminedFieldLayoutAlgorithm _runtimeDeterminedFieldLayoutAlgorithm = new RuntimeDeterminedFieldLayoutAlgorithm();
private readonly VectorOfTFieldLayoutAlgorithm _vectorOfTFieldLayoutAlgorithm;
private readonly VectorFieldLayoutAlgorithm _vectorFieldLayoutAlgorithm;
private TypeDesc[] _arrayOfTInterfaces;
private ArrayOfTRuntimeInterfacesAlgorithm _arrayOfTRuntimeInterfacesAlgorithm;
private MetadataType _arrayOfTType;
public CompilerTypeSystemContext(TargetDetails details, SharedGenericsMode genericsMode, DelegateFeature delegateFeatures, int genericCycleCutoffPoint = DefaultGenericCycleCutoffPoint)
: base(details)
{
_genericsMode = genericsMode;
_vectorOfTFieldLayoutAlgorithm = new VectorOfTFieldLayoutAlgorithm(_metadataFieldLayoutAlgorithm);
_vectorFieldLayoutAlgorithm = new VectorFieldLayoutAlgorithm(_metadataFieldLayoutAlgorithm);
_delegateInfoHashtable = new DelegateInfoHashtable(delegateFeatures);
_genericCycleDetector = new LazyGenericsSupport.GenericCycleDetector(genericCycleCutoffPoint);
GenericsConfig = new SharedGenericsConfiguration();
}
protected override RuntimeInterfacesAlgorithm GetRuntimeInterfacesAlgorithmForNonPointerArrayType(ArrayType type)
{
if (_arrayOfTRuntimeInterfacesAlgorithm == null)
{
_arrayOfTRuntimeInterfacesAlgorithm = new ArrayOfTRuntimeInterfacesAlgorithm(SystemModule.GetKnownType("System", "Array`1"));
}
return _arrayOfTRuntimeInterfacesAlgorithm;
}
public override FieldLayoutAlgorithm GetLayoutAlgorithmForType(DefType type)
{
if (type == UniversalCanonType)
return UniversalCanonLayoutAlgorithm.Instance;
else if (type.IsRuntimeDeterminedType)
return _runtimeDeterminedFieldLayoutAlgorithm;
else if (VectorOfTFieldLayoutAlgorithm.IsVectorOfTType(type))
return _vectorOfTFieldLayoutAlgorithm;
else if (VectorFieldLayoutAlgorithm.IsVectorType(type))
return _vectorFieldLayoutAlgorithm;
else
return _metadataFieldLayoutAlgorithm;
}
protected override bool ComputeHasGCStaticBase(FieldDesc field)
{
Debug.Assert(field.IsStatic);
if (field.IsThreadStatic)
return true;
TypeDesc fieldType = field.FieldType;
if (fieldType.IsValueType)
return ((DefType)fieldType).ContainsGCPointers;
else
return fieldType.IsGCPointer;
}
/// <summary>
/// Returns true if <paramref name="type"/> is a generic interface type implemented by arrays.
/// </summary>
public bool IsGenericArrayInterfaceType(TypeDesc type)
{
// Hardcode the fact that all generic interfaces on array types have arity 1
if (!type.IsInterface || type.Instantiation.Length != 1)
return false;
if (_arrayOfTInterfaces == null)
{
DefType[] implementedInterfaces = SystemModule.GetKnownType("System", "Array`1").ExplicitlyImplementedInterfaces;
TypeDesc[] interfaceDefinitions = new TypeDesc[implementedInterfaces.Length];
for (int i = 0; i < interfaceDefinitions.Length; i++)
interfaceDefinitions[i] = implementedInterfaces[i].GetTypeDefinition();
Interlocked.CompareExchange(ref _arrayOfTInterfaces, interfaceDefinitions, null);
}
TypeDesc interfaceDefinition = type.GetTypeDefinition();
foreach (var arrayInterfaceDefinition in _arrayOfTInterfaces)
{
if (interfaceDefinition == arrayInterfaceDefinition)
return true;
}
return false;
}
protected override IEnumerable<MethodDesc> GetAllMethods(TypeDesc type)
{
return GetAllMethods(type, virtualOnly: false);
}
protected override IEnumerable<MethodDesc> GetAllVirtualMethods(TypeDesc type)
{
return GetAllMethods(type, virtualOnly: true);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private IEnumerable<MethodDesc> GetAllMethods(TypeDesc type, bool virtualOnly)
{
if (type.IsDelegate)
{
return GetAllMethodsForDelegate(type, virtualOnly);
}
else if (type.IsEnum)
{
return GetAllMethodsForEnum(type, virtualOnly);
}
else if (type.IsValueType)
{
return GetAllMethodsForValueType(type, virtualOnly);
}
return virtualOnly ? type.GetVirtualMethods() : type.GetMethods();
}
protected virtual IEnumerable<MethodDesc> GetAllMethodsForDelegate(TypeDesc type, bool virtualOnly)
{
// Inject the synthetic methods that support the implementation of the delegate.
InstantiatedType instantiatedType = type as InstantiatedType;
if (instantiatedType != null)
{
DelegateInfo info = GetDelegateInfo(type.GetTypeDefinition());
foreach (MethodDesc syntheticMethod in info.Methods)
{
if (!virtualOnly || syntheticMethod.IsVirtual)
yield return GetMethodForInstantiatedType(syntheticMethod, instantiatedType);
}
}
else
{
DelegateInfo info = GetDelegateInfo(type);
foreach (MethodDesc syntheticMethod in info.Methods)
{
if (!virtualOnly || syntheticMethod.IsVirtual)
yield return syntheticMethod;
}
}
// Append all the methods defined in metadata
IEnumerable<MethodDesc> metadataMethods = virtualOnly ? type.GetVirtualMethods() : type.GetMethods();
foreach (var m in metadataMethods)
yield return m;
}
internal DefType GetClosestDefType(TypeDesc type)
{
if (type.IsArray)
{
if (!type.IsArrayTypeWithoutGenericInterfaces())
{
MetadataType arrayShadowType = _arrayOfTType ?? (_arrayOfTType = SystemModule.GetType("System", "Array`1"));
return arrayShadowType.MakeInstantiatedType(((ArrayType)type).ElementType);
}
return GetWellKnownType(WellKnownType.Array);
}
Debug.Assert(type is DefType);
return (DefType)type;
}
private readonly LazyGenericsSupport.GenericCycleDetector _genericCycleDetector;
public void DetectGenericCycles(TypeSystemEntity owner, TypeSystemEntity referent)
{
_genericCycleDetector.DetectCycle(owner, referent);
}
public void LogWarnings(Logger logger)
{
_genericCycleDetector.LogWarnings(logger);
}
}
public class SharedGenericsConfiguration
{
//
// Universal Shared Generics heuristics magic values determined empirically
//
public long UniversalCanonGVMReflectionRootHeuristic_InstantiationCount { get; }
public long UniversalCanonGVMDepthHeuristic_NonCanonDepth { get; }
public long UniversalCanonGVMDepthHeuristic_CanonDepth { get; }
// Controls how many different instantiations of a generic method, or method on generic type
// should be allowed before trying to fall back to only supplying USG in the reflection
// method table.
public long UniversalCanonReflectionMethodRootHeuristic_InstantiationCount { get; }
// To avoid infinite generic recursion issues during debug type record generation, attempt to
// use canonical form for types with high generic complexity.
public long MaxGenericDepthOfDebugRecord { get; }
public SharedGenericsConfiguration()
{
UniversalCanonGVMReflectionRootHeuristic_InstantiationCount = 4;
UniversalCanonGVMDepthHeuristic_NonCanonDepth = 2;
UniversalCanonGVMDepthHeuristic_CanonDepth = 1;
// Unlike the GVM heuristics which are intended to kick in aggressively
// this heuristic exists to make it so that a fair amount of generic
// expansion is allowed. Numbers are chosen to allow a fairly large
// amount of generic expansion before trimming.
UniversalCanonReflectionMethodRootHeuristic_InstantiationCount = 1024;
MaxGenericDepthOfDebugRecord = 15;
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b42918/b42918.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/Common/tests/System/Net/Sockets/SocketTestServer.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Net.Sockets.Tests
{
// Each individual test must configure this class by defining s_implementationType within
// SocketTestServer.DefaultFactoryConfiguration.cs
public abstract partial class SocketTestServer : IDisposable
{
private const int DefaultNumConnections = 5;
private const int DefaultReceiveBufferSize = 1024;
protected abstract int Port { get; }
public abstract EndPoint EndPoint { get; }
public event Action<Socket> Accepted;
public static SocketTestServer SocketTestServerFactory(SocketImplementationType type, EndPoint endpoint, ProtocolType protocolType = ProtocolType.Tcp)
{
return SocketTestServerFactory(type, DefaultNumConnections, DefaultReceiveBufferSize, endpoint, protocolType);
}
public static SocketTestServer SocketTestServerFactory(SocketImplementationType type, IPAddress address, out int port)
{
return SocketTestServerFactory(type, DefaultNumConnections, DefaultReceiveBufferSize, address, out port);
}
public static SocketTestServer SocketTestServerFactory(SocketImplementationType type, IPAddress address)
=> SocketTestServerFactory(type, address, out _);
public static SocketTestServer SocketTestServerFactory(
SocketImplementationType type,
int numConnections,
int receiveBufferSize,
EndPoint localEndPoint,
ProtocolType protocolType = ProtocolType.Tcp)
{
switch (type)
{
case SocketImplementationType.APM:
return new SocketTestServerAPM(numConnections, receiveBufferSize, localEndPoint);
case SocketImplementationType.Async:
return new SocketTestServerAsync(numConnections, receiveBufferSize, localEndPoint, protocolType);
default:
throw new ArgumentOutOfRangeException(nameof(type));
}
}
public static SocketTestServer SocketTestServerFactory(
SocketImplementationType type,
int numConnections,
int receiveBufferSize,
IPAddress address,
out int port)
{
SocketTestServer server = SocketTestServerFactory(type, numConnections, receiveBufferSize, new IPEndPoint(address, 0));
port = server.Port;
return server;
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected abstract void Dispose(bool disposing);
protected void NotifyAccepted(Socket socket) => Accepted?.Invoke(socket);
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Net.Sockets.Tests
{
// Each individual test must configure this class by defining s_implementationType within
// SocketTestServer.DefaultFactoryConfiguration.cs
public abstract partial class SocketTestServer : IDisposable
{
private const int DefaultNumConnections = 5;
private const int DefaultReceiveBufferSize = 1024;
protected abstract int Port { get; }
public abstract EndPoint EndPoint { get; }
public event Action<Socket> Accepted;
public static SocketTestServer SocketTestServerFactory(SocketImplementationType type, EndPoint endpoint, ProtocolType protocolType = ProtocolType.Tcp)
{
return SocketTestServerFactory(type, DefaultNumConnections, DefaultReceiveBufferSize, endpoint, protocolType);
}
public static SocketTestServer SocketTestServerFactory(SocketImplementationType type, IPAddress address, out int port)
{
return SocketTestServerFactory(type, DefaultNumConnections, DefaultReceiveBufferSize, address, out port);
}
public static SocketTestServer SocketTestServerFactory(SocketImplementationType type, IPAddress address)
=> SocketTestServerFactory(type, address, out _);
public static SocketTestServer SocketTestServerFactory(
SocketImplementationType type,
int numConnections,
int receiveBufferSize,
EndPoint localEndPoint,
ProtocolType protocolType = ProtocolType.Tcp)
{
switch (type)
{
case SocketImplementationType.APM:
return new SocketTestServerAPM(numConnections, receiveBufferSize, localEndPoint);
case SocketImplementationType.Async:
return new SocketTestServerAsync(numConnections, receiveBufferSize, localEndPoint, protocolType);
default:
throw new ArgumentOutOfRangeException(nameof(type));
}
}
public static SocketTestServer SocketTestServerFactory(
SocketImplementationType type,
int numConnections,
int receiveBufferSize,
IPAddress address,
out int port)
{
SocketTestServer server = SocketTestServerFactory(type, numConnections, receiveBufferSize, new IPEndPoint(address, 0));
port = server.Port;
return server;
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected abstract void Dispose(bool disposing);
protected void NotifyAccepted(Socket socket) => Accepted?.Invoke(socket);
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/mono/wasm/debugger/DebuggerTestSuite/appsettings.json
|
{
"Logging": {
"LogLevel": {
"Default": "Error",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.WebAssembly.Diagnostics.TestHarnessProxy": "Information",
"Microsoft.WebAssembly.Diagnostics.DevToolsProxy": "Information",
"Inspector": "Information"
}
}
}
|
{
"Logging": {
"LogLevel": {
"Default": "Error",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.WebAssembly.Diagnostics.TestHarnessProxy": "Information",
"Microsoft.WebAssembly.Diagnostics.DevToolsProxy": "Information",
"Inspector": "Information"
}
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/Loader/classloader/TypeGeneratorTests/TypeGeneratorTest1261/Generated1261.il
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) .ver 4:0:0:0 }
.assembly extern TestFramework { .publickeytoken = ( B0 3F 5F 7F 11 D5 0A 3A ) }
//TYPES IN FORWARDER ASSEMBLIES:
//TEST ASSEMBLY:
.assembly Generated1261 { .hash algorithm 0x00008004 }
.assembly extern xunit.core {}
.class public BaseClass0
{
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
.class public BaseClass1
extends BaseClass0
{
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void BaseClass0::.ctor()
ret
}
}
.class public G3_C1733`1<T0>
extends class G2_C702`2<!T0,class BaseClass0>
implements class IBase2`2<class BaseClass1,class BaseClass0>
{
.method public hidebysig newslot virtual instance string Method7<M0>() cil managed noinlining {
ldstr "G3_C1733::Method7.17701<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string 'IBase2<class BaseClass1,class BaseClass0>.Method7'<M0>() cil managed noinlining {
.override method instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<[1]>()
ldstr "G3_C1733::Method7.MI.17702<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string ClassMethod4865() cil managed noinlining {
ldstr "G3_C1733::ClassMethod4865.17703()"
ret
}
.method public hidebysig newslot virtual instance string ClassMethod4866() cil managed noinlining {
ldstr "G3_C1733::ClassMethod4866.17704()"
ret
}
.method public hidebysig newslot virtual instance string ClassMethod4867<M0>() cil managed noinlining {
ldstr "G3_C1733::ClassMethod4867.17705<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string 'G2_C702<T0,class BaseClass0>.ClassMethod2770'() cil managed noinlining {
.override method instance string class G2_C702`2<!T0,class BaseClass0>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void class G2_C702`2<!T0,class BaseClass0>::.ctor()
ret
}
}
.class public G2_C702`2<T0, T1>
extends class G1_C13`2<class BaseClass1,class BaseClass0>
implements class IBase2`2<class BaseClass0,!T1>, IBase0
{
.method public hidebysig newslot virtual instance string Method7<M0>() cil managed noinlining {
ldstr "G2_C702::Method7.11472<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string 'IBase2<class BaseClass0,T1>.Method7'<M0>() cil managed noinlining {
.override method instance string class IBase2`2<class BaseClass0,!T1>::Method7<[1]>()
ldstr "G2_C702::Method7.MI.11473<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string Method0() cil managed noinlining {
ldstr "G2_C702::Method0.11474()"
ret
}
.method public hidebysig virtual instance string Method1() cil managed noinlining {
ldstr "G2_C702::Method1.11475()"
ret
}
.method public hidebysig virtual instance string Method2<M0>() cil managed noinlining {
ldstr "G2_C702::Method2.11476<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string Method3<M0>() cil managed noinlining {
ldstr "G2_C702::Method3.11477<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string 'IBase0.Method3'<M0>() cil managed noinlining {
.override method instance string IBase0::Method3<[1]>()
ldstr "G2_C702::Method3.MI.11478<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string ClassMethod2769() cil managed noinlining {
ldstr "G2_C702::ClassMethod2769.11479()"
ret
}
.method public hidebysig newslot virtual instance string ClassMethod2770() cil managed noinlining {
ldstr "G2_C702::ClassMethod2770.11480()"
ret
}
.method public hidebysig newslot virtual instance string 'G1_C13<class BaseClass1,class BaseClass0>.ClassMethod1348'<M0>() cil managed noinlining {
.override method instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<[1]>()
ldstr "G2_C702::ClassMethod1348.MI.11481<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void class G1_C13`2<class BaseClass1,class BaseClass0>::.ctor()
ret
}
}
.class interface public abstract IBase2`2<+T0, -T1>
{
.method public hidebysig newslot abstract virtual instance string Method7<M0>() cil managed { }
}
.class public abstract G1_C13`2<T0, T1>
implements class IBase2`2<!T0,!T1>, class IBase1`1<!T0>
{
.method public hidebysig virtual instance string Method7<M0>() cil managed noinlining {
ldstr "G1_C13::Method7.4871<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string Method4() cil managed noinlining {
ldstr "G1_C13::Method4.4872()"
ret
}
.method public hidebysig newslot virtual instance string Method5() cil managed noinlining {
ldstr "G1_C13::Method5.4873()"
ret
}
.method public hidebysig newslot virtual instance string 'IBase1<T0>.Method5'() cil managed noinlining {
.override method instance string class IBase1`1<!T0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ret
}
.method public hidebysig newslot virtual instance string Method6<M0>() cil managed noinlining {
ldstr "G1_C13::Method6.4875<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string ClassMethod1348<M0>() cil managed noinlining {
ldstr "G1_C13::ClassMethod1348.4876<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string ClassMethod1349<M0>() cil managed noinlining {
ldstr "G1_C13::ClassMethod1349.4877<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
.class interface public abstract IBase0
{
.method public hidebysig newslot abstract virtual instance string Method0() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method1() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method2<M0>() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method3<M0>() cil managed { }
}
.class interface public abstract IBase1`1<+T0>
{
.method public hidebysig newslot abstract virtual instance string Method4() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method5() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method6<M0>() cil managed { }
}
.class public auto ansi beforefieldinit Generated1261 {
.method static void M.BaseClass0<(BaseClass0)W>(!!W inst, string exp) cil managed {
.maxstack 5
.locals init (string[] actualResults)
ldc.i4.s 0
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.BaseClass0<(BaseClass0)W>(!!W inst, string exp)"
ldc.i4.s 0
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.BaseClass1<(BaseClass1)W>(!!W inst, string exp) cil managed {
.maxstack 5
.locals init (string[] actualResults)
ldc.i4.s 0
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.BaseClass1<(BaseClass1)W>(!!W inst, string exp)"
ldc.i4.s 0
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G3_C1733.T<T0,(class G3_C1733`1<!!T0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 20
.locals init (string[] actualResults)
ldc.i4.s 15
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G3_C1733.T<T0,(class G3_C1733`1<!!T0>)W>(!!W 'inst', string exp)"
ldc.i4.s 15
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod4865()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod4866()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod4867<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 12
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 13
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 14
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G3_C1733.A<(class G3_C1733`1<class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 20
.locals init (string[] actualResults)
ldc.i4.s 15
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G3_C1733.A<(class G3_C1733`1<class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 15
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4865()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4866()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4867<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 12
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 13
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 14
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G3_C1733.B<(class G3_C1733`1<class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 20
.locals init (string[] actualResults)
ldc.i4.s 15
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G3_C1733.B<(class G3_C1733`1<class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 15
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4865()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4866()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4867<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 12
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 13
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 14
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.T.T<T0,T1,(class G2_C702`2<!!T0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.T.T<T0,T1,(class G2_C702`2<!!T0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.A.T<T1,(class G2_C702`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.A.T<T1,(class G2_C702`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.A.A<(class G2_C702`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.A.A<(class G2_C702`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.A.B<(class G2_C702`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.A.B<(class G2_C702`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.B.T<T1,(class G2_C702`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.B.T<T1,(class G2_C702`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.B.A<(class G2_C702`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.B.A<(class G2_C702`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.B.B<(class G2_C702`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.B.B<(class G2_C702`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.T.T<T0,T1,(class IBase2`2<!!T0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.T.T<T0,T1,(class IBase2`2<!!T0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<!!T0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.A.T<T1,(class IBase2`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.A.T<T1,(class IBase2`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.A.A<(class IBase2`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.A.A<(class IBase2`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.A.B<(class IBase2`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.A.B<(class IBase2`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.B.T<T1,(class IBase2`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.B.T<T1,(class IBase2`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass1,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.B.A<(class IBase2`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.B.A<(class IBase2`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.B.B<(class IBase2`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.B.B<(class IBase2`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.T.T<T0,T1,(class G1_C13`2<!!T0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.T.T<T0,T1,(class G1_C13`2<!!T0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.A.T<T1,(class G1_C13`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.A.T<T1,(class G1_C13`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.A.A<(class G1_C13`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.A.A<(class G1_C13`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.A.B<(class G1_C13`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.A.B<(class G1_C13`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.B.T<T1,(class G1_C13`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.B.T<T1,(class G1_C13`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.B.A<(class G1_C13`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.B.A<(class G1_C13`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.B.B<(class G1_C13`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.B.B<(class G1_C13`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase0<(IBase0)W>(!!W inst, string exp) cil managed {
.maxstack 9
.locals init (string[] actualResults)
ldc.i4.s 4
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase0<(IBase0)W>(!!W inst, string exp)"
ldc.i4.s 4
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string IBase0::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string IBase0::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string IBase0::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string IBase0::Method3<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase1.T<T0,(class IBase1`1<!!T0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 8
.locals init (string[] actualResults)
ldc.i4.s 3
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase1.T<T0,(class IBase1`1<!!T0>)W>(!!W 'inst', string exp)"
ldc.i4.s 3
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<!!T0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<!!T0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<!!T0>::Method6<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase1.A<(class IBase1`1<class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 8
.locals init (string[] actualResults)
ldc.i4.s 3
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase1.A<(class IBase1`1<class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 3
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase1.B<(class IBase1`1<class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 8
.locals init (string[] actualResults)
ldc.i4.s 3
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase1.B<(class IBase1`1<class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 3
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method public hidebysig static void MethodCallingTest() cil managed
{
.maxstack 10
.locals init (object V_0)
ldstr "========================== Method Calling Test =========================="
call void [mscorlib]System.Console::WriteLine(string)
newobj instance void class G3_C1733`1<class BaseClass0>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4867<object>()
ldstr "G3_C1733::ClassMethod4867.17705<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4866()
ldstr "G3_C1733::ClassMethod4866.17704()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4865()
ldstr "G3_C1733::ClassMethod4865.17703()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.17701<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G3_C1733`1<class BaseClass1>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4867<object>()
ldstr "G3_C1733::ClassMethod4867.17705<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4866()
ldstr "G3_C1733::ClassMethod4866.17704()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4865()
ldstr "G3_C1733::ClassMethod4865.17703()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.17701<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass0>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass1>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2770()
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass0>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass1>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2770()
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldstr "========================================================================\n\n"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public hidebysig static void ConstrainedCallsTest() cil managed
{
.maxstack 10
.locals init (object V_0)
ldstr "========================== Constrained Calls Test =========================="
call void [mscorlib]System.Console::WriteLine(string)
newobj instance void class G3_C1733`1<class BaseClass0>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass0,class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G3_C1733::ClassMethod4865.17703()#G3_C1733::ClassMethod4866.17704()#G3_C1733::ClassMethod4867.17705<System.Object>()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G3_C1733::Method7.17701<System.Object>()#"
call void Generated1261::M.G3_C1733.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G3_C1733::ClassMethod4865.17703()#G3_C1733::ClassMethod4866.17704()#G3_C1733::ClassMethod4867.17705<System.Object>()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G3_C1733::Method7.17701<System.Object>()#"
call void Generated1261::M.G3_C1733.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
newobj instance void class G3_C1733`1<class BaseClass1>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G3_C1733::ClassMethod4865.17703()#G3_C1733::ClassMethod4866.17704()#G3_C1733::ClassMethod4867.17705<System.Object>()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G3_C1733::Method7.17701<System.Object>()#"
call void Generated1261::M.G3_C1733.T<class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G3_C1733::ClassMethod4865.17703()#G3_C1733::ClassMethod4866.17704()#G3_C1733::ClassMethod4867.17705<System.Object>()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G3_C1733::Method7.17701<System.Object>()#"
call void Generated1261::M.G3_C1733.B<class G3_C1733`1<class BaseClass1>>(!!0,string)
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass0>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass1>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.B<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass0>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass1>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.B<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldstr "========================================================================\n\n"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public hidebysig static void StructConstrainedInterfaceCallsTest() cil managed
{
.maxstack 10
ldstr "===================== Struct Constrained Interface Calls Test ====================="
call void [mscorlib]System.Console::WriteLine(string)
ldstr "========================================================================\n\n"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public hidebysig static void CalliTest() cil managed
{
.maxstack 10
.locals init (object V_0)
ldstr "========================== Method Calli Test =========================="
call void [mscorlib]System.Console::WriteLine(string)
newobj instance void class G3_C1733`1<class BaseClass0>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod4867<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod4867.17705<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod4866()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod4866.17704()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod4865()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod4865.17703()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.17701<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod2770()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod2769()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method1()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method0()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G3_C1733`1<class BaseClass1>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod4867<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod4867.17705<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod4866()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod4866.17704()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod4865()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod4865.17703()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.17701<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod2770()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod2769()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method1()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method0()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass0>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass1>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2770()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2769()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method3<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method2<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method1()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method0()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass0>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass1>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2770()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2769()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method3<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method2<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method1()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method0()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldstr "========================================================================\n\n"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public hidebysig static int32 Main() cil managed
{
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.entrypoint
.maxstack 10
call void Generated1261::MethodCallingTest()
call void Generated1261::ConstrainedCallsTest()
call void Generated1261::StructConstrainedInterfaceCallsTest()
call void Generated1261::CalliTest()
ldc.i4 100
ret
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) .ver 4:0:0:0 }
.assembly extern TestFramework { .publickeytoken = ( B0 3F 5F 7F 11 D5 0A 3A ) }
//TYPES IN FORWARDER ASSEMBLIES:
//TEST ASSEMBLY:
.assembly Generated1261 { .hash algorithm 0x00008004 }
.assembly extern xunit.core {}
.class public BaseClass0
{
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
.class public BaseClass1
extends BaseClass0
{
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void BaseClass0::.ctor()
ret
}
}
.class public G3_C1733`1<T0>
extends class G2_C702`2<!T0,class BaseClass0>
implements class IBase2`2<class BaseClass1,class BaseClass0>
{
.method public hidebysig newslot virtual instance string Method7<M0>() cil managed noinlining {
ldstr "G3_C1733::Method7.17701<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string 'IBase2<class BaseClass1,class BaseClass0>.Method7'<M0>() cil managed noinlining {
.override method instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<[1]>()
ldstr "G3_C1733::Method7.MI.17702<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string ClassMethod4865() cil managed noinlining {
ldstr "G3_C1733::ClassMethod4865.17703()"
ret
}
.method public hidebysig newslot virtual instance string ClassMethod4866() cil managed noinlining {
ldstr "G3_C1733::ClassMethod4866.17704()"
ret
}
.method public hidebysig newslot virtual instance string ClassMethod4867<M0>() cil managed noinlining {
ldstr "G3_C1733::ClassMethod4867.17705<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string 'G2_C702<T0,class BaseClass0>.ClassMethod2770'() cil managed noinlining {
.override method instance string class G2_C702`2<!T0,class BaseClass0>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void class G2_C702`2<!T0,class BaseClass0>::.ctor()
ret
}
}
.class public G2_C702`2<T0, T1>
extends class G1_C13`2<class BaseClass1,class BaseClass0>
implements class IBase2`2<class BaseClass0,!T1>, IBase0
{
.method public hidebysig newslot virtual instance string Method7<M0>() cil managed noinlining {
ldstr "G2_C702::Method7.11472<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string 'IBase2<class BaseClass0,T1>.Method7'<M0>() cil managed noinlining {
.override method instance string class IBase2`2<class BaseClass0,!T1>::Method7<[1]>()
ldstr "G2_C702::Method7.MI.11473<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string Method0() cil managed noinlining {
ldstr "G2_C702::Method0.11474()"
ret
}
.method public hidebysig virtual instance string Method1() cil managed noinlining {
ldstr "G2_C702::Method1.11475()"
ret
}
.method public hidebysig virtual instance string Method2<M0>() cil managed noinlining {
ldstr "G2_C702::Method2.11476<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string Method3<M0>() cil managed noinlining {
ldstr "G2_C702::Method3.11477<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string 'IBase0.Method3'<M0>() cil managed noinlining {
.override method instance string IBase0::Method3<[1]>()
ldstr "G2_C702::Method3.MI.11478<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string ClassMethod2769() cil managed noinlining {
ldstr "G2_C702::ClassMethod2769.11479()"
ret
}
.method public hidebysig newslot virtual instance string ClassMethod2770() cil managed noinlining {
ldstr "G2_C702::ClassMethod2770.11480()"
ret
}
.method public hidebysig newslot virtual instance string 'G1_C13<class BaseClass1,class BaseClass0>.ClassMethod1348'<M0>() cil managed noinlining {
.override method instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<[1]>()
ldstr "G2_C702::ClassMethod1348.MI.11481<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void class G1_C13`2<class BaseClass1,class BaseClass0>::.ctor()
ret
}
}
.class interface public abstract IBase2`2<+T0, -T1>
{
.method public hidebysig newslot abstract virtual instance string Method7<M0>() cil managed { }
}
.class public abstract G1_C13`2<T0, T1>
implements class IBase2`2<!T0,!T1>, class IBase1`1<!T0>
{
.method public hidebysig virtual instance string Method7<M0>() cil managed noinlining {
ldstr "G1_C13::Method7.4871<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string Method4() cil managed noinlining {
ldstr "G1_C13::Method4.4872()"
ret
}
.method public hidebysig newslot virtual instance string Method5() cil managed noinlining {
ldstr "G1_C13::Method5.4873()"
ret
}
.method public hidebysig newslot virtual instance string 'IBase1<T0>.Method5'() cil managed noinlining {
.override method instance string class IBase1`1<!T0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ret
}
.method public hidebysig newslot virtual instance string Method6<M0>() cil managed noinlining {
ldstr "G1_C13::Method6.4875<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string ClassMethod1348<M0>() cil managed noinlining {
ldstr "G1_C13::ClassMethod1348.4876<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig newslot virtual instance string ClassMethod1349<M0>() cil managed noinlining {
ldstr "G1_C13::ClassMethod1349.4877<"
ldtoken !!M0
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
call string [mscorlib]System.String::Concat(object,object)
ldstr ">()"
call string [mscorlib]System.String::Concat(object,object)
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed {
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
.class interface public abstract IBase0
{
.method public hidebysig newslot abstract virtual instance string Method0() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method1() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method2<M0>() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method3<M0>() cil managed { }
}
.class interface public abstract IBase1`1<+T0>
{
.method public hidebysig newslot abstract virtual instance string Method4() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method5() cil managed { }
.method public hidebysig newslot abstract virtual instance string Method6<M0>() cil managed { }
}
.class public auto ansi beforefieldinit Generated1261 {
.method static void M.BaseClass0<(BaseClass0)W>(!!W inst, string exp) cil managed {
.maxstack 5
.locals init (string[] actualResults)
ldc.i4.s 0
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.BaseClass0<(BaseClass0)W>(!!W inst, string exp)"
ldc.i4.s 0
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.BaseClass1<(BaseClass1)W>(!!W inst, string exp) cil managed {
.maxstack 5
.locals init (string[] actualResults)
ldc.i4.s 0
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.BaseClass1<(BaseClass1)W>(!!W inst, string exp)"
ldc.i4.s 0
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G3_C1733.T<T0,(class G3_C1733`1<!!T0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 20
.locals init (string[] actualResults)
ldc.i4.s 15
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G3_C1733.T<T0,(class G3_C1733`1<!!T0>)W>(!!W 'inst', string exp)"
ldc.i4.s 15
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod4865()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod4866()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::ClassMethod4867<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 12
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 13
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 14
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<!!T0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G3_C1733.A<(class G3_C1733`1<class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 20
.locals init (string[] actualResults)
ldc.i4.s 15
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G3_C1733.A<(class G3_C1733`1<class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 15
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4865()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4866()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4867<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 12
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 13
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 14
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G3_C1733.B<(class G3_C1733`1<class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 20
.locals init (string[] actualResults)
ldc.i4.s 15
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G3_C1733.B<(class G3_C1733`1<class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 15
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4865()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4866()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4867<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 12
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 13
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 14
ldarga.s 0
constrained. !!W
callvirt instance string class G3_C1733`1<class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.T.T<T0,T1,(class G2_C702`2<!!T0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.T.T<T0,T1,(class G2_C702`2<!!T0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<!!T0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.A.T<T1,(class G2_C702`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.A.T<T1,(class G2_C702`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.A.A<(class G2_C702`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.A.A<(class G2_C702`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.A.B<(class G2_C702`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.A.B<(class G2_C702`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.B.T<T1,(class G2_C702`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.B.T<T1,(class G2_C702`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.B.A<(class G2_C702`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.B.A<(class G2_C702`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G2_C702.B.B<(class G2_C702`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 17
.locals init (string[] actualResults)
ldc.i4.s 12
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G2_C702.B.B<(class G2_C702`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 12
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2769()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2770()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 6
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 7
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method3<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 8
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 9
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 10
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 11
ldarga.s 0
constrained. !!W
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.T.T<T0,T1,(class IBase2`2<!!T0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.T.T<T0,T1,(class IBase2`2<!!T0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<!!T0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.A.T<T1,(class IBase2`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.A.T<T1,(class IBase2`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.A.A<(class IBase2`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.A.A<(class IBase2`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.A.B<(class IBase2`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.A.B<(class IBase2`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.B.T<T1,(class IBase2`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.B.T<T1,(class IBase2`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass1,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.B.A<(class IBase2`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.B.A<(class IBase2`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase2.B.B<(class IBase2`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 6
.locals init (string[] actualResults)
ldc.i4.s 1
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase2.B.B<(class IBase2`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 1
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.T.T<T0,T1,(class G1_C13`2<!!T0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.T.T<T0,T1,(class G1_C13`2<!!T0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<!!T0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.A.T<T1,(class G1_C13`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.A.T<T1,(class G1_C13`2<class BaseClass0,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.A.A<(class G1_C13`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.A.A<(class G1_C13`2<class BaseClass0,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.A.B<(class G1_C13`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.A.B<(class G1_C13`2<class BaseClass0,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass0,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.B.T<T1,(class G1_C13`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.B.T<T1,(class G1_C13`2<class BaseClass1,!!T1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,!!T1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.B.A<(class G1_C13`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.B.A<(class G1_C13`2<class BaseClass1,class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.G1_C13.B.B<(class G1_C13`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 11
.locals init (string[] actualResults)
ldc.i4.s 6
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.G1_C13.B.B<(class G1_C13`2<class BaseClass1,class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 6
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::ClassMethod1348<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::ClassMethod1349<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 4
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 5
ldarga.s 0
constrained. !!W
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass1>::Method7<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase0<(IBase0)W>(!!W inst, string exp) cil managed {
.maxstack 9
.locals init (string[] actualResults)
ldc.i4.s 4
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase0<(IBase0)W>(!!W inst, string exp)"
ldc.i4.s 4
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string IBase0::Method0()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string IBase0::Method1()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string IBase0::Method2<object>()
stelem.ref
ldloc.s actualResults
ldc.i4.s 3
ldarga.s 0
constrained. !!W
callvirt instance string IBase0::Method3<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase1.T<T0,(class IBase1`1<!!T0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 8
.locals init (string[] actualResults)
ldc.i4.s 3
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase1.T<T0,(class IBase1`1<!!T0>)W>(!!W 'inst', string exp)"
ldc.i4.s 3
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<!!T0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<!!T0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<!!T0>::Method6<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase1.A<(class IBase1`1<class BaseClass0>)W>(!!W 'inst', string exp) cil managed {
.maxstack 8
.locals init (string[] actualResults)
ldc.i4.s 3
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase1.A<(class IBase1`1<class BaseClass0>)W>(!!W 'inst', string exp)"
ldc.i4.s 3
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method static void M.IBase1.B<(class IBase1`1<class BaseClass1>)W>(!!W 'inst', string exp) cil managed {
.maxstack 8
.locals init (string[] actualResults)
ldc.i4.s 3
newarr string
stloc.s actualResults
ldarg.1
ldstr "M.IBase1.B<(class IBase1`1<class BaseClass1>)W>(!!W 'inst', string exp)"
ldc.i4.s 3
ldloc.s actualResults
ldc.i4.s 0
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
stelem.ref
ldloc.s actualResults
ldc.i4.s 1
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
stelem.ref
ldloc.s actualResults
ldc.i4.s 2
ldarga.s 0
constrained. !!W
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
stelem.ref
ldloc.s actualResults
call void [TestFramework]TestFramework::MethodCallTest(string,string,int32,string[])
ret
}
.method public hidebysig static void MethodCallingTest() cil managed
{
.maxstack 10
.locals init (object V_0)
ldstr "========================== Method Calling Test =========================="
call void [mscorlib]System.Console::WriteLine(string)
newobj instance void class G3_C1733`1<class BaseClass0>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4867<object>()
ldstr "G3_C1733::ClassMethod4867.17705<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4866()
ldstr "G3_C1733::ClassMethod4866.17704()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod4865()
ldstr "G3_C1733::ClassMethod4865.17703()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.17701<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass0>
callvirt instance string class G3_C1733`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G3_C1733`1<class BaseClass1>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4867<object>()
ldstr "G3_C1733::ClassMethod4867.17705<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4866()
ldstr "G3_C1733::ClassMethod4866.17704()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod4865()
ldstr "G3_C1733::ClassMethod4865.17703()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method7<object>()
ldstr "G3_C1733::Method7.17701<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod2770()
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G3_C1733`1<class BaseClass1>
callvirt instance string class G3_C1733`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass0>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass1>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2770()
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass0>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass1>::.ctor()
stloc.0
ldloc.0
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
callvirt instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method5()
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string class IBase1`1<class BaseClass0>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2770()
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2769()
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method3<object>()
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method7<object>()
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1349<object>()
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1348<object>()
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method6<object>()
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method5()
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
callvirt instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method4()
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldloc.0
dup
callvirt instance string IBase0::Method0()
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method1()
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method2<object>()
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
dup
callvirt instance string IBase0::Method3<object>()
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
pop
ldstr "========================================================================\n\n"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public hidebysig static void ConstrainedCallsTest() cil managed
{
.maxstack 10
.locals init (object V_0)
ldstr "========================== Constrained Calls Test =========================="
call void [mscorlib]System.Console::WriteLine(string)
newobj instance void class G3_C1733`1<class BaseClass0>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass0,class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G3_C1733`1<class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G3_C1733::ClassMethod4865.17703()#G3_C1733::ClassMethod4866.17704()#G3_C1733::ClassMethod4867.17705<System.Object>()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G3_C1733::Method7.17701<System.Object>()#"
call void Generated1261::M.G3_C1733.T<class BaseClass0,class G3_C1733`1<class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G3_C1733::ClassMethod4865.17703()#G3_C1733::ClassMethod4866.17704()#G3_C1733::ClassMethod4867.17705<System.Object>()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G3_C1733::Method7.17701<System.Object>()#"
call void Generated1261::M.G3_C1733.A<class G3_C1733`1<class BaseClass0>>(!!0,string)
newobj instance void class G3_C1733`1<class BaseClass1>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G3_C1733::Method7.MI.17702<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass1,class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.T<class BaseClass0,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.A<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G3_C1733`1<class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G3_C1733::ClassMethod4865.17703()#G3_C1733::ClassMethod4866.17704()#G3_C1733::ClassMethod4867.17705<System.Object>()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G3_C1733::Method7.17701<System.Object>()#"
call void Generated1261::M.G3_C1733.T<class BaseClass1,class G3_C1733`1<class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G3_C1733::ClassMethod2770.MI.17706()#G3_C1733::ClassMethod4865.17703()#G3_C1733::ClassMethod4866.17704()#G3_C1733::ClassMethod4867.17705<System.Object>()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G3_C1733::Method7.17701<System.Object>()#"
call void Generated1261::M.G3_C1733.B<class G3_C1733`1<class BaseClass1>>(!!0,string)
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass0>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.A<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G2_C702`2<class BaseClass0,class BaseClass0>>(!!0,string)
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass1>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.T<class BaseClass1,class G2_C702`2<class BaseClass0,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.A.B<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G2_C702`2<class BaseClass0,class BaseClass1>>(!!0,string)
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass0>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass0>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.A<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G2_C702`2<class BaseClass1,class BaseClass0>>(!!0,string)
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass1>::.ctor()
stloc.0
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.G1_C13.B.A<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.A<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.B<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.A.A<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass0,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::Method7.MI.11473<System.Object>()#"
call void Generated1261::M.IBase2.A.B<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method7.4871<System.Object>()#"
call void Generated1261::M.IBase2.B.B<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.T<class BaseClass0,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G1_C13::Method4.4872()#G1_C13::Method5.MI.4874()#G1_C13::Method6.4875<System.Object>()#"
call void Generated1261::M.IBase1.A<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.T.T<class BaseClass1,class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!2,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.T<class BaseClass1,class G2_C702`2<class BaseClass1,class BaseClass1>>(!!1,string)
ldloc.0
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()#G1_C13::ClassMethod1349.4877<System.Object>()#G2_C702::ClassMethod2769.11479()#G2_C702::ClassMethod2770.11480()#G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.11477<System.Object>()#G1_C13::Method4.4872()#G1_C13::Method5.4873()#G1_C13::Method6.4875<System.Object>()#G2_C702::Method7.11472<System.Object>()#"
call void Generated1261::M.G2_C702.B.B<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldloc.0
ldstr "G2_C702::Method0.11474()#G2_C702::Method1.11475()#G2_C702::Method2.11476<System.Object>()#G2_C702::Method3.MI.11478<System.Object>()#"
call void Generated1261::M.IBase0<class G2_C702`2<class BaseClass1,class BaseClass1>>(!!0,string)
ldstr "========================================================================\n\n"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public hidebysig static void StructConstrainedInterfaceCallsTest() cil managed
{
.maxstack 10
ldstr "===================== Struct Constrained Interface Calls Test ====================="
call void [mscorlib]System.Console::WriteLine(string)
ldstr "========================================================================\n\n"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public hidebysig static void CalliTest() cil managed
{
.maxstack 10
.locals init (object V_0)
ldstr "========================== Method Calli Test =========================="
call void [mscorlib]System.Console::WriteLine(string)
newobj instance void class G3_C1733`1<class BaseClass0>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod4867<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod4867.17705<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod4866()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod4866.17704()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod4865()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod4865.17703()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::Method7.17701<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod2770()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod2769()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method1()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method0()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass0>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G3_C1733`1<class BaseClass0> on type class G3_C1733`1<class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G3_C1733`1<class BaseClass1>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.MI.17702<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod4867<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod4867.17705<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod4866()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod4866.17704()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod4865()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod4865.17703()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method7<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::Method7.17701<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod2770()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G3_C1733::ClassMethod2770.MI.17706()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod2769()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method3<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method2<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method1()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method0()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod1349<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::ClassMethod1348<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method6<object>()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method5()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G3_C1733`1<class BaseClass1>
ldloc.0
ldvirtftn instance string class G3_C1733`1<class BaseClass1>::Method4()
calli default string(class G3_C1733`1<class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G3_C1733`1<class BaseClass1> on type class G3_C1733`1<class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass0>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2770()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod2769()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method3<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method2<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method1()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method0()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass0>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G2_C702`2<class BaseClass0,class BaseClass1>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2770()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod2769()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method3<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method2<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method1()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method0()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass0,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass0,class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G2_C702`2<class BaseClass0,class BaseClass1>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass0,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass0>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2770()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod2769()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method3<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method2<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method1()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method0()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass0>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass0>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
newobj instance void class G2_C702`2<class BaseClass1,class BaseClass1>::.ctor()
stloc.0
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G1_C13`2<class BaseClass1,class BaseClass0>
ldloc.0
ldvirtftn instance string class G1_C13`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class G1_C13`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass0>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass0,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method7.MI.11473<System.Object>()"
ldstr "class IBase2`2<class BaseClass0,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase2`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method7.4871<System.Object>()"
ldstr "class IBase2`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method5.MI.4874()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string class IBase1`1<class BaseClass0>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class IBase1`1<class BaseClass0> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2770()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::ClassMethod2770.11480()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod2769()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::ClassMethod2769.11479()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method3<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method3.11477<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method2<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method1()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method0()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method7<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method7.11472<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1349<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::ClassMethod1349.4877<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::ClassMethod1348<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::ClassMethod1348.MI.11481<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method6<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method6.4875<System.Object>()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method5()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method5.4873()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
castclass class G2_C702`2<class BaseClass1,class BaseClass1>
ldloc.0
ldvirtftn instance string class G2_C702`2<class BaseClass1,class BaseClass1>::Method4()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G1_C13::Method4.4872()"
ldstr "class G2_C702`2<class BaseClass1,class BaseClass1> on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method0()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method0.11474()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method1()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method1.11475()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method2<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method2.11476<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldloc.0
ldloc.0
ldvirtftn instance string IBase0::Method3<object>()
calli default string(class G2_C702`2<class BaseClass1,class BaseClass1>)
ldstr "G2_C702::Method3.MI.11478<System.Object>()"
ldstr "IBase0 on type class G2_C702`2<class BaseClass1,class BaseClass1>"
call void [TestFramework]TestFramework::MethodCallTest(string,string,string)
ldstr "========================================================================\n\n"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public hidebysig static int32 Main() cil managed
{
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.entrypoint
.maxstack 10
call void Generated1261::MethodCallingTest()
call void Generated1261::ConstrainedCallsTest()
call void Generated1261::StructConstrainedInterfaceCallsTest()
call void Generated1261::CalliTest()
ldc.i4 100
ret
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/JIT/Methodical/VT/callconv/call_r.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>False</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="call.cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>False</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="call.cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/coreclr/pal/src/libunwind/tests/Lperf-trace.c
|
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#if !defined(UNW_REMOTE_ONLY)
#include "Gperf-trace.c"
#endif
|
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#if !defined(UNW_REMOTE_ONLY)
#include "Gperf-trace.c"
#endif
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/xsltc/baseline/sft27.xsl
|
<xsl:stylesheet version= '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:import href='sft27a.xsl'/>
</xsl:stylesheet>
|
<xsl:stylesheet version= '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:import href='sft27a.xsl'/>
</xsl:stylesheet>
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/Inflater.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Buffers;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Security;
namespace System.IO.Compression
{
/// <summary>
/// Provides a wrapper around the ZLib decompression API.
/// </summary>
internal sealed class Inflater : IDisposable
{
private const int MinWindowBits = -15; // WindowBits must be between -8..-15 to ignore the header, 8..15 for
private const int MaxWindowBits = 47; // zlib headers, 24..31 for GZip headers, or 40..47 for either Zlib or GZip
private bool _finished; // Whether the end of the stream has been reached
private bool _isDisposed; // Prevents multiple disposals
private readonly int _windowBits; // The WindowBits parameter passed to Inflater construction
private ZLibNative.ZLibStreamHandle _zlibStream; // The handle to the primary underlying zlib stream
private MemoryHandle _inputBufferHandle; // The handle to the buffer that provides input to _zlibStream
private readonly long _uncompressedSize;
private long _currentInflatedCount;
private object SyncLock => this; // Used to make writing to unmanaged structures atomic
/// <summary>
/// Initialized the Inflater with the given windowBits size
/// </summary>
internal Inflater(int windowBits, long uncompressedSize = -1)
{
Debug.Assert(windowBits >= MinWindowBits && windowBits <= MaxWindowBits);
_finished = false;
_isDisposed = false;
_windowBits = windowBits;
InflateInit(windowBits);
_uncompressedSize = uncompressedSize;
}
public int AvailableOutput => (int)_zlibStream.AvailOut;
/// <summary>
/// Returns true if the end of the stream has been reached.
/// </summary>
public bool Finished() => _finished;
public unsafe bool Inflate(out byte b)
{
fixed (byte* bufPtr = &b)
{
int bytesRead = InflateVerified(bufPtr, 1);
Debug.Assert(bytesRead == 0 || bytesRead == 1);
return bytesRead != 0;
}
}
public unsafe int Inflate(byte[] bytes, int offset, int length)
{
// If Inflate is called on an invalid or unready inflater, return 0 to indicate no bytes have been read.
if (length == 0)
return 0;
Debug.Assert(null != bytes, "Can't pass in a null output buffer!");
fixed (byte* bufPtr = bytes)
{
return InflateVerified(bufPtr + offset, length);
}
}
public unsafe int Inflate(Span<byte> destination)
{
// If Inflate is called on an invalid or unready inflater, return 0 to indicate no bytes have been read.
if (destination.Length == 0)
return 0;
fixed (byte* bufPtr = &MemoryMarshal.GetReference(destination))
{
return InflateVerified(bufPtr, destination.Length);
}
}
public unsafe int InflateVerified(byte* bufPtr, int length)
{
// State is valid; attempt inflation
try
{
int bytesRead = 0;
if (_uncompressedSize == -1)
{
ReadOutput(bufPtr, length, out bytesRead);
}
else
{
if (_uncompressedSize > _currentInflatedCount)
{
length = (int)Math.Min(length, _uncompressedSize - _currentInflatedCount);
ReadOutput(bufPtr, length, out bytesRead);
_currentInflatedCount += bytesRead;
}
else
{
_finished = true;
_zlibStream.AvailIn = 0;
}
}
return bytesRead;
}
finally
{
// Before returning, make sure to release input buffer if necessary:
if (0 == _zlibStream.AvailIn && IsInputBufferHandleAllocated)
{
DeallocateInputBufferHandle();
}
}
}
private unsafe void ReadOutput(byte* bufPtr, int length, out int bytesRead)
{
if (ReadInflateOutput(bufPtr, length, ZLibNative.FlushCode.NoFlush, out bytesRead) == ZLibNative.ErrorCode.StreamEnd)
{
if (!NeedsInput() && IsGzipStream() && IsInputBufferHandleAllocated)
{
_finished = ResetStreamForLeftoverInput();
}
else
{
_finished = true;
}
}
}
/// <summary>
/// If this stream has some input leftover that hasn't been processed then we should
/// check if it is another GZip file concatenated with this one.
///
/// Returns false if the leftover input is another GZip data stream.
/// </summary>
private unsafe bool ResetStreamForLeftoverInput()
{
Debug.Assert(!NeedsInput());
Debug.Assert(IsGzipStream());
Debug.Assert(IsInputBufferHandleAllocated);
lock (SyncLock)
{
IntPtr nextInPtr = _zlibStream.NextIn;
byte* nextInPointer = (byte*)nextInPtr.ToPointer();
uint nextAvailIn = _zlibStream.AvailIn;
// Check the leftover bytes to see if they start with he gzip header ID bytes
if (*nextInPointer != ZLibNative.GZip_Header_ID1 || (nextAvailIn > 1 && *(nextInPointer + 1) != ZLibNative.GZip_Header_ID2))
{
return true;
}
// Trash our existing zstream.
_zlibStream.Dispose();
// Create a new zstream
InflateInit(_windowBits);
// SetInput on the new stream to the bits remaining from the last stream
_zlibStream.NextIn = nextInPtr;
_zlibStream.AvailIn = nextAvailIn;
_finished = false;
}
return false;
}
internal bool IsGzipStream() => _windowBits >= 24 && _windowBits <= 31;
public bool NeedsInput() => _zlibStream.AvailIn == 0;
public void SetInput(byte[] inputBuffer, int startIndex, int count)
{
Debug.Assert(NeedsInput(), "We have something left in previous input!");
Debug.Assert(inputBuffer != null);
Debug.Assert(startIndex >= 0 && count >= 0 && count + startIndex <= inputBuffer.Length);
Debug.Assert(!IsInputBufferHandleAllocated);
SetInput(inputBuffer.AsMemory(startIndex, count));
}
public unsafe void SetInput(ReadOnlyMemory<byte> inputBuffer)
{
Debug.Assert(NeedsInput(), "We have something left in previous input!");
Debug.Assert(!IsInputBufferHandleAllocated);
if (inputBuffer.IsEmpty)
return;
lock (SyncLock)
{
_inputBufferHandle = inputBuffer.Pin();
_zlibStream.NextIn = (IntPtr)_inputBufferHandle.Pointer;
_zlibStream.AvailIn = (uint)inputBuffer.Length;
_finished = false;
}
}
private void Dispose(bool disposing)
{
if (!_isDisposed)
{
if (disposing)
_zlibStream.Dispose();
if (IsInputBufferHandleAllocated)
DeallocateInputBufferHandle();
_isDisposed = true;
}
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
~Inflater()
{
Dispose(false);
}
/// <summary>
/// Creates the ZStream that will handle inflation.
/// </summary>
[MemberNotNull(nameof(_zlibStream))]
private void InflateInit(int windowBits)
{
ZLibNative.ErrorCode error;
try
{
error = ZLibNative.CreateZLibStreamForInflate(out _zlibStream, windowBits);
}
catch (Exception exception) // could not load the ZLib dll
{
throw new ZLibException(SR.ZLibErrorDLLLoadError, exception);
}
switch (error)
{
case ZLibNative.ErrorCode.Ok: // Successful initialization
return;
case ZLibNative.ErrorCode.MemError: // Not enough memory
throw new ZLibException(SR.ZLibErrorNotEnoughMemory, "inflateInit2_", (int)error, _zlibStream.GetErrorMessage());
case ZLibNative.ErrorCode.VersionError: //zlib library is incompatible with the version assumed
throw new ZLibException(SR.ZLibErrorVersionMismatch, "inflateInit2_", (int)error, _zlibStream.GetErrorMessage());
case ZLibNative.ErrorCode.StreamError: // Parameters are invalid
throw new ZLibException(SR.ZLibErrorIncorrectInitParameters, "inflateInit2_", (int)error, _zlibStream.GetErrorMessage());
default:
throw new ZLibException(SR.ZLibErrorUnexpected, "inflateInit2_", (int)error, _zlibStream.GetErrorMessage());
}
}
/// <summary>
/// Wrapper around the ZLib inflate function, configuring the stream appropriately.
/// </summary>
private unsafe ZLibNative.ErrorCode ReadInflateOutput(byte* bufPtr, int length, ZLibNative.FlushCode flushCode, out int bytesRead)
{
lock (SyncLock)
{
_zlibStream.NextOut = (IntPtr)bufPtr;
_zlibStream.AvailOut = (uint)length;
ZLibNative.ErrorCode errC = Inflate(flushCode);
bytesRead = length - (int)_zlibStream.AvailOut;
return errC;
}
}
/// <summary>
/// Wrapper around the ZLib inflate function
/// </summary>
private ZLibNative.ErrorCode Inflate(ZLibNative.FlushCode flushCode)
{
ZLibNative.ErrorCode errC;
try
{
errC = _zlibStream.Inflate(flushCode);
}
catch (Exception cause) // could not load the Zlib DLL correctly
{
throw new ZLibException(SR.ZLibErrorDLLLoadError, cause);
}
switch (errC)
{
case ZLibNative.ErrorCode.Ok: // progress has been made inflating
case ZLibNative.ErrorCode.StreamEnd: // The end of the input stream has been reached
return errC;
case ZLibNative.ErrorCode.BufError: // No room in the output buffer - inflate() can be called again with more space to continue
return errC;
case ZLibNative.ErrorCode.MemError: // Not enough memory to complete the operation
throw new ZLibException(SR.ZLibErrorNotEnoughMemory, "inflate_", (int)errC, _zlibStream.GetErrorMessage());
case ZLibNative.ErrorCode.DataError: // The input data was corrupted (input stream not conforming to the zlib format or incorrect check value)
throw new InvalidDataException(SR.UnsupportedCompression);
case ZLibNative.ErrorCode.StreamError: //the stream structure was inconsistent (for example if next_in or next_out was NULL),
throw new ZLibException(SR.ZLibErrorInconsistentStream, "inflate_", (int)errC, _zlibStream.GetErrorMessage());
default:
throw new ZLibException(SR.ZLibErrorUnexpected, "inflate_", (int)errC, _zlibStream.GetErrorMessage());
}
}
/// <summary>
/// Frees the GCHandle being used to store the input buffer
/// </summary>
private void DeallocateInputBufferHandle()
{
Debug.Assert(IsInputBufferHandleAllocated);
lock (SyncLock)
{
_zlibStream.AvailIn = 0;
_zlibStream.NextIn = ZLibNative.ZNullPtr;
_inputBufferHandle.Dispose();
}
}
private unsafe bool IsInputBufferHandleAllocated => _inputBufferHandle.Pointer != default;
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Buffers;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Security;
namespace System.IO.Compression
{
/// <summary>
/// Provides a wrapper around the ZLib decompression API.
/// </summary>
internal sealed class Inflater : IDisposable
{
private const int MinWindowBits = -15; // WindowBits must be between -8..-15 to ignore the header, 8..15 for
private const int MaxWindowBits = 47; // zlib headers, 24..31 for GZip headers, or 40..47 for either Zlib or GZip
private bool _finished; // Whether the end of the stream has been reached
private bool _isDisposed; // Prevents multiple disposals
private readonly int _windowBits; // The WindowBits parameter passed to Inflater construction
private ZLibNative.ZLibStreamHandle _zlibStream; // The handle to the primary underlying zlib stream
private MemoryHandle _inputBufferHandle; // The handle to the buffer that provides input to _zlibStream
private readonly long _uncompressedSize;
private long _currentInflatedCount;
private object SyncLock => this; // Used to make writing to unmanaged structures atomic
/// <summary>
/// Initialized the Inflater with the given windowBits size
/// </summary>
internal Inflater(int windowBits, long uncompressedSize = -1)
{
Debug.Assert(windowBits >= MinWindowBits && windowBits <= MaxWindowBits);
_finished = false;
_isDisposed = false;
_windowBits = windowBits;
InflateInit(windowBits);
_uncompressedSize = uncompressedSize;
}
public int AvailableOutput => (int)_zlibStream.AvailOut;
/// <summary>
/// Returns true if the end of the stream has been reached.
/// </summary>
public bool Finished() => _finished;
public unsafe bool Inflate(out byte b)
{
fixed (byte* bufPtr = &b)
{
int bytesRead = InflateVerified(bufPtr, 1);
Debug.Assert(bytesRead == 0 || bytesRead == 1);
return bytesRead != 0;
}
}
public unsafe int Inflate(byte[] bytes, int offset, int length)
{
// If Inflate is called on an invalid or unready inflater, return 0 to indicate no bytes have been read.
if (length == 0)
return 0;
Debug.Assert(null != bytes, "Can't pass in a null output buffer!");
fixed (byte* bufPtr = bytes)
{
return InflateVerified(bufPtr + offset, length);
}
}
public unsafe int Inflate(Span<byte> destination)
{
// If Inflate is called on an invalid or unready inflater, return 0 to indicate no bytes have been read.
if (destination.Length == 0)
return 0;
fixed (byte* bufPtr = &MemoryMarshal.GetReference(destination))
{
return InflateVerified(bufPtr, destination.Length);
}
}
public unsafe int InflateVerified(byte* bufPtr, int length)
{
// State is valid; attempt inflation
try
{
int bytesRead = 0;
if (_uncompressedSize == -1)
{
ReadOutput(bufPtr, length, out bytesRead);
}
else
{
if (_uncompressedSize > _currentInflatedCount)
{
length = (int)Math.Min(length, _uncompressedSize - _currentInflatedCount);
ReadOutput(bufPtr, length, out bytesRead);
_currentInflatedCount += bytesRead;
}
else
{
_finished = true;
_zlibStream.AvailIn = 0;
}
}
return bytesRead;
}
finally
{
// Before returning, make sure to release input buffer if necessary:
if (0 == _zlibStream.AvailIn && IsInputBufferHandleAllocated)
{
DeallocateInputBufferHandle();
}
}
}
private unsafe void ReadOutput(byte* bufPtr, int length, out int bytesRead)
{
if (ReadInflateOutput(bufPtr, length, ZLibNative.FlushCode.NoFlush, out bytesRead) == ZLibNative.ErrorCode.StreamEnd)
{
if (!NeedsInput() && IsGzipStream() && IsInputBufferHandleAllocated)
{
_finished = ResetStreamForLeftoverInput();
}
else
{
_finished = true;
}
}
}
/// <summary>
/// If this stream has some input leftover that hasn't been processed then we should
/// check if it is another GZip file concatenated with this one.
///
/// Returns false if the leftover input is another GZip data stream.
/// </summary>
private unsafe bool ResetStreamForLeftoverInput()
{
Debug.Assert(!NeedsInput());
Debug.Assert(IsGzipStream());
Debug.Assert(IsInputBufferHandleAllocated);
lock (SyncLock)
{
IntPtr nextInPtr = _zlibStream.NextIn;
byte* nextInPointer = (byte*)nextInPtr.ToPointer();
uint nextAvailIn = _zlibStream.AvailIn;
// Check the leftover bytes to see if they start with he gzip header ID bytes
if (*nextInPointer != ZLibNative.GZip_Header_ID1 || (nextAvailIn > 1 && *(nextInPointer + 1) != ZLibNative.GZip_Header_ID2))
{
return true;
}
// Trash our existing zstream.
_zlibStream.Dispose();
// Create a new zstream
InflateInit(_windowBits);
// SetInput on the new stream to the bits remaining from the last stream
_zlibStream.NextIn = nextInPtr;
_zlibStream.AvailIn = nextAvailIn;
_finished = false;
}
return false;
}
internal bool IsGzipStream() => _windowBits >= 24 && _windowBits <= 31;
public bool NeedsInput() => _zlibStream.AvailIn == 0;
public void SetInput(byte[] inputBuffer, int startIndex, int count)
{
Debug.Assert(NeedsInput(), "We have something left in previous input!");
Debug.Assert(inputBuffer != null);
Debug.Assert(startIndex >= 0 && count >= 0 && count + startIndex <= inputBuffer.Length);
Debug.Assert(!IsInputBufferHandleAllocated);
SetInput(inputBuffer.AsMemory(startIndex, count));
}
public unsafe void SetInput(ReadOnlyMemory<byte> inputBuffer)
{
Debug.Assert(NeedsInput(), "We have something left in previous input!");
Debug.Assert(!IsInputBufferHandleAllocated);
if (inputBuffer.IsEmpty)
return;
lock (SyncLock)
{
_inputBufferHandle = inputBuffer.Pin();
_zlibStream.NextIn = (IntPtr)_inputBufferHandle.Pointer;
_zlibStream.AvailIn = (uint)inputBuffer.Length;
_finished = false;
}
}
private void Dispose(bool disposing)
{
if (!_isDisposed)
{
if (disposing)
_zlibStream.Dispose();
if (IsInputBufferHandleAllocated)
DeallocateInputBufferHandle();
_isDisposed = true;
}
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
~Inflater()
{
Dispose(false);
}
/// <summary>
/// Creates the ZStream that will handle inflation.
/// </summary>
[MemberNotNull(nameof(_zlibStream))]
private void InflateInit(int windowBits)
{
ZLibNative.ErrorCode error;
try
{
error = ZLibNative.CreateZLibStreamForInflate(out _zlibStream, windowBits);
}
catch (Exception exception) // could not load the ZLib dll
{
throw new ZLibException(SR.ZLibErrorDLLLoadError, exception);
}
switch (error)
{
case ZLibNative.ErrorCode.Ok: // Successful initialization
return;
case ZLibNative.ErrorCode.MemError: // Not enough memory
throw new ZLibException(SR.ZLibErrorNotEnoughMemory, "inflateInit2_", (int)error, _zlibStream.GetErrorMessage());
case ZLibNative.ErrorCode.VersionError: //zlib library is incompatible with the version assumed
throw new ZLibException(SR.ZLibErrorVersionMismatch, "inflateInit2_", (int)error, _zlibStream.GetErrorMessage());
case ZLibNative.ErrorCode.StreamError: // Parameters are invalid
throw new ZLibException(SR.ZLibErrorIncorrectInitParameters, "inflateInit2_", (int)error, _zlibStream.GetErrorMessage());
default:
throw new ZLibException(SR.ZLibErrorUnexpected, "inflateInit2_", (int)error, _zlibStream.GetErrorMessage());
}
}
/// <summary>
/// Wrapper around the ZLib inflate function, configuring the stream appropriately.
/// </summary>
private unsafe ZLibNative.ErrorCode ReadInflateOutput(byte* bufPtr, int length, ZLibNative.FlushCode flushCode, out int bytesRead)
{
lock (SyncLock)
{
_zlibStream.NextOut = (IntPtr)bufPtr;
_zlibStream.AvailOut = (uint)length;
ZLibNative.ErrorCode errC = Inflate(flushCode);
bytesRead = length - (int)_zlibStream.AvailOut;
return errC;
}
}
/// <summary>
/// Wrapper around the ZLib inflate function
/// </summary>
private ZLibNative.ErrorCode Inflate(ZLibNative.FlushCode flushCode)
{
ZLibNative.ErrorCode errC;
try
{
errC = _zlibStream.Inflate(flushCode);
}
catch (Exception cause) // could not load the Zlib DLL correctly
{
throw new ZLibException(SR.ZLibErrorDLLLoadError, cause);
}
switch (errC)
{
case ZLibNative.ErrorCode.Ok: // progress has been made inflating
case ZLibNative.ErrorCode.StreamEnd: // The end of the input stream has been reached
return errC;
case ZLibNative.ErrorCode.BufError: // No room in the output buffer - inflate() can be called again with more space to continue
return errC;
case ZLibNative.ErrorCode.MemError: // Not enough memory to complete the operation
throw new ZLibException(SR.ZLibErrorNotEnoughMemory, "inflate_", (int)errC, _zlibStream.GetErrorMessage());
case ZLibNative.ErrorCode.DataError: // The input data was corrupted (input stream not conforming to the zlib format or incorrect check value)
throw new InvalidDataException(SR.UnsupportedCompression);
case ZLibNative.ErrorCode.StreamError: //the stream structure was inconsistent (for example if next_in or next_out was NULL),
throw new ZLibException(SR.ZLibErrorInconsistentStream, "inflate_", (int)errC, _zlibStream.GetErrorMessage());
default:
throw new ZLibException(SR.ZLibErrorUnexpected, "inflate_", (int)errC, _zlibStream.GetErrorMessage());
}
}
/// <summary>
/// Frees the GCHandle being used to store the input buffer
/// </summary>
private void DeallocateInputBufferHandle()
{
Debug.Assert(IsInputBufferHandleAllocated);
lock (SyncLock)
{
_zlibStream.AvailIn = 0;
_zlibStream.NextIn = ZLibNative.ZNullPtr;
_inputBufferHandle.Dispose();
}
}
private unsafe bool IsInputBufferHandleAllocated => _inputBufferHandle.Pointer != default;
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/tests/GC/API/GC/ReRegisterForFinalize_null.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Tests ReRegisterForFinalize()
using System;
public class Test_ReRegisterForFinalize_null
{
public bool RunTest()
{
try
{
GC.ReRegisterForFinalize(null); // should call Finalize() for obj1 now.
}
catch (ArgumentNullException)
{
return true;
}
catch (Exception)
{
Console.WriteLine("Unexpected Exception!");
}
return false;
}
public static int Main()
{
Test_ReRegisterForFinalize_null t = new Test_ReRegisterForFinalize_null();
if (t.RunTest())
{
Console.WriteLine("Null Test for ReRegisterForFinalize() passed!");
return 100;
}
Console.WriteLine("Null Test for ReRegisterForFinalize() failed!");
return 1;
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// Tests ReRegisterForFinalize()
using System;
public class Test_ReRegisterForFinalize_null
{
public bool RunTest()
{
try
{
GC.ReRegisterForFinalize(null); // should call Finalize() for obj1 now.
}
catch (ArgumentNullException)
{
return true;
}
catch (Exception)
{
Console.WriteLine("Unexpected Exception!");
}
return false;
}
public static int Main()
{
Test_ReRegisterForFinalize_null t = new Test_ReRegisterForFinalize_null();
if (t.RunTest())
{
Console.WriteLine("Null Test for ReRegisterForFinalize() passed!");
return 100;
}
Console.WriteLine("Null Test for ReRegisterForFinalize() failed!");
return 1;
}
}
| -1 |
dotnet/runtime
| 66,434 |
Expose `LibraryImportAttribute`
|
Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
elinor-fung
| 2022-03-10T05:02:25Z | 2022-03-16T03:05:51Z |
c3dbdea91835d67cc461b22125e652ad5063d746
|
d2688883510318aa0114268930fb2022d3dc64cf
|
Expose `LibraryImportAttribute`. Expose `LibraryImportAttribute` in runtime libraries.
Resolves https://github.com/dotnet/runtime/issues/46822
|
./src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/GifCodecTests.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// GIF Codec class testing unit
//
// Authors:
// Jordi Mas i Hern?ndez ([email protected])
// Sebastien Pouliot <[email protected]>
//
// Copyright (C) 2006, 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using Xunit;
namespace MonoTests.System.Drawing.Imaging
{
public class GifCodecTest
{
/* Checks bitmap features on a known 1bbp bitmap */
private void Bitmap8bitsFeatures(string filename)
{
using (Bitmap bmp = new Bitmap(filename))
{
GraphicsUnit unit = GraphicsUnit.World;
RectangleF rect = bmp.GetBounds(ref unit);
Assert.Equal(PixelFormat.Format8bppIndexed, bmp.PixelFormat);
Assert.Equal(110, bmp.Width);
Assert.Equal(100, bmp.Height);
Assert.Equal(0, rect.X);
Assert.Equal(0, rect.Y);
Assert.Equal(110, rect.Width);
Assert.Equal(100, rect.Height);
Assert.Equal(110, bmp.Size.Width);
Assert.Equal(100, bmp.Size.Height);
}
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Bitmap8bitsFeatures_Gif89()
{
Bitmap8bitsFeatures(Helpers.GetTestBitmapPath("nature24bits.gif"));
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Bitmap8bitsFeatures_Gif87()
{
Bitmap8bitsFeatures(Helpers.GetTestBitmapPath("nature24bits87.gif"));
}
private void Bitmap8bitsPixels(string filename)
{
using (Bitmap bmp = new Bitmap(filename))
{
// sampling values from a well known bitmap
Assert.Equal(-10644802, bmp.GetPixel(0, 0).ToArgb());
Assert.Equal(-12630705, bmp.GetPixel(0, 32).ToArgb());
Assert.Equal(-14537409, bmp.GetPixel(0, 64).ToArgb());
Assert.Equal(-14672099, bmp.GetPixel(0, 96).ToArgb());
Assert.Equal(-526863, bmp.GetPixel(32, 0).ToArgb());
Assert.Equal(-10263970, bmp.GetPixel(32, 32).ToArgb());
Assert.Equal(-10461317, bmp.GetPixel(32, 64).ToArgb());
Assert.Equal(-9722415, bmp.GetPixel(32, 96).ToArgb());
Assert.Equal(-131076, bmp.GetPixel(64, 0).ToArgb());
Assert.Equal(-2702435, bmp.GetPixel(64, 32).ToArgb());
Assert.Equal(-6325922, bmp.GetPixel(64, 64).ToArgb());
Assert.Equal(-12411924, bmp.GetPixel(64, 96).ToArgb());
Assert.Equal(-131076, bmp.GetPixel(96, 0).ToArgb());
Assert.Equal(-7766649, bmp.GetPixel(96, 32).ToArgb());
Assert.Equal(-11512986, bmp.GetPixel(96, 64).ToArgb());
Assert.Equal(-12616230, bmp.GetPixel(96, 96).ToArgb());
}
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Bitmap8bitsPixels_Gif89()
{
Bitmap8bitsPixels(Helpers.GetTestBitmapPath("nature24bits.gif"));
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Bitmap8bitsPixels_Gif87()
{
Bitmap8bitsPixels(Helpers.GetTestBitmapPath("nature24bits87.gif"));
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDrawingSupported), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/28859")]
public void Bitmap8bitsData()
{
string sInFile = Helpers.GetTestBitmapPath("nature24bits.gif");
using (Bitmap bmp = new Bitmap(sInFile))
{
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
try
{
Assert.Equal(bmp.Height, data.Height);
Assert.Equal(bmp.Width, data.Width);
Assert.Equal(PixelFormat.Format24bppRgb, data.PixelFormat);
Assert.Equal(332, data.Stride);
Assert.Equal(100, data.Height);
unsafe
{
byte* scan = (byte*)data.Scan0;
// sampling values from a well known bitmap
Assert.Equal(190, *(scan + 0));
Assert.Equal(217, *(scan + 1009));
Assert.Equal(120, *(scan + 2018));
Assert.Equal(253, *(scan + 3027));
Assert.Equal(233, *(scan + 4036));
Assert.Equal(176, *(scan + 5045));
Assert.Equal(151, *(scan + 6054));
Assert.Equal(220, *(scan + 7063));
Assert.Equal(139, *(scan + 8072));
Assert.Equal(121, *(scan + 9081));
Assert.Equal(160, *(scan + 10090));
Assert.Equal(92, *(scan + 11099));
Assert.Equal(96, *(scan + 12108));
Assert.Equal(64, *(scan + 13117));
Assert.Equal(156, *(scan + 14126));
Assert.Equal(68, *(scan + 15135));
Assert.Equal(156, *(scan + 16144));
Assert.Equal(84, *(scan + 17153));
Assert.Equal(55, *(scan + 18162));
Assert.Equal(68, *(scan + 19171));
Assert.Equal(116, *(scan + 20180));
Assert.Equal(61, *(scan + 21189));
Assert.Equal(69, *(scan + 22198));
Assert.Equal(75, *(scan + 23207));
Assert.Equal(61, *(scan + 24216));
Assert.Equal(66, *(scan + 25225));
Assert.Equal(40, *(scan + 26234));
Assert.Equal(55, *(scan + 27243));
Assert.Equal(53, *(scan + 28252));
Assert.Equal(215, *(scan + 29261));
Assert.Equal(99, *(scan + 30270));
Assert.Equal(67, *(scan + 31279));
Assert.Equal(142, *(scan + 32288));
}
}
finally
{
bmp.UnlockBits(data);
}
}
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Interlaced()
{
string sInFile = Helpers.GetTestBitmapPath("81773-interlaced.gif");
using (Bitmap bmp = new Bitmap(sInFile))
{
for (int i = 0; i < 255; i++)
{
Color c = bmp.GetPixel(0, i);
Assert.Equal(255, c.A);
Assert.Equal(i, c.R);
Assert.Equal(i, c.G);
Assert.Equal(i, c.B);
}
}
}
private void Save(PixelFormat original, PixelFormat expected, bool exactColorCheck)
{
string sOutFile = $"linerect-{expected}.gif";
// Save
Bitmap bmp = new Bitmap(100, 100, original);
Graphics gr = Graphics.FromImage(bmp);
using (Pen p = new Pen(Color.Red, 2))
{
gr.DrawLine(p, 10.0F, 10.0F, 90.0F, 90.0F);
gr.DrawRectangle(p, 10.0F, 10.0F, 80.0F, 80.0F);
}
try
{
bmp.Save(sOutFile, ImageFormat.Gif);
// Load
using (Bitmap bmpLoad = new Bitmap(sOutFile))
{
Assert.Equal(expected, bmpLoad.PixelFormat);
Color color = bmpLoad.GetPixel(10, 10);
if (exactColorCheck)
{
Assert.Equal(Color.FromArgb(255, 255, 0, 0), color);
}
else
{
// FIXME: we don't save a pure red (F8 instead of FF) into the file so the color-check assert will fail
// this is due to libgif's QuantizeBuffer. An alternative would be to make our own that checks if less than 256 colors
// are used in the bitmap (or else use QuantizeBuffer).
Assert.Equal(255, color.A);
Assert.True(color.R >= 248);
Assert.Equal(0, color.G);
Assert.Equal(0, color.B);
}
}
}
finally
{
gr.Dispose();
bmp.Dispose();
try
{
File.Delete(sOutFile);
}
catch
{
}
}
}
[ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
public void Save_24bppRgb()
{
Save(PixelFormat.Format24bppRgb, PixelFormat.Format8bppIndexed, false);
}
[ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
public void Save_32bppRgb()
{
Save(PixelFormat.Format32bppRgb, PixelFormat.Format8bppIndexed, false);
}
[ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
public void Save_32bppArgb()
{
Save(PixelFormat.Format32bppArgb, PixelFormat.Format8bppIndexed, false);
}
[ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
public void Save_32bppPArgb()
{
Save(PixelFormat.Format32bppPArgb, PixelFormat.Format8bppIndexed, false);
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// GIF Codec class testing unit
//
// Authors:
// Jordi Mas i Hern?ndez ([email protected])
// Sebastien Pouliot <[email protected]>
//
// Copyright (C) 2006, 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using Xunit;
namespace MonoTests.System.Drawing.Imaging
{
public class GifCodecTest
{
/* Checks bitmap features on a known 1bbp bitmap */
private void Bitmap8bitsFeatures(string filename)
{
using (Bitmap bmp = new Bitmap(filename))
{
GraphicsUnit unit = GraphicsUnit.World;
RectangleF rect = bmp.GetBounds(ref unit);
Assert.Equal(PixelFormat.Format8bppIndexed, bmp.PixelFormat);
Assert.Equal(110, bmp.Width);
Assert.Equal(100, bmp.Height);
Assert.Equal(0, rect.X);
Assert.Equal(0, rect.Y);
Assert.Equal(110, rect.Width);
Assert.Equal(100, rect.Height);
Assert.Equal(110, bmp.Size.Width);
Assert.Equal(100, bmp.Size.Height);
}
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Bitmap8bitsFeatures_Gif89()
{
Bitmap8bitsFeatures(Helpers.GetTestBitmapPath("nature24bits.gif"));
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Bitmap8bitsFeatures_Gif87()
{
Bitmap8bitsFeatures(Helpers.GetTestBitmapPath("nature24bits87.gif"));
}
private void Bitmap8bitsPixels(string filename)
{
using (Bitmap bmp = new Bitmap(filename))
{
// sampling values from a well known bitmap
Assert.Equal(-10644802, bmp.GetPixel(0, 0).ToArgb());
Assert.Equal(-12630705, bmp.GetPixel(0, 32).ToArgb());
Assert.Equal(-14537409, bmp.GetPixel(0, 64).ToArgb());
Assert.Equal(-14672099, bmp.GetPixel(0, 96).ToArgb());
Assert.Equal(-526863, bmp.GetPixel(32, 0).ToArgb());
Assert.Equal(-10263970, bmp.GetPixel(32, 32).ToArgb());
Assert.Equal(-10461317, bmp.GetPixel(32, 64).ToArgb());
Assert.Equal(-9722415, bmp.GetPixel(32, 96).ToArgb());
Assert.Equal(-131076, bmp.GetPixel(64, 0).ToArgb());
Assert.Equal(-2702435, bmp.GetPixel(64, 32).ToArgb());
Assert.Equal(-6325922, bmp.GetPixel(64, 64).ToArgb());
Assert.Equal(-12411924, bmp.GetPixel(64, 96).ToArgb());
Assert.Equal(-131076, bmp.GetPixel(96, 0).ToArgb());
Assert.Equal(-7766649, bmp.GetPixel(96, 32).ToArgb());
Assert.Equal(-11512986, bmp.GetPixel(96, 64).ToArgb());
Assert.Equal(-12616230, bmp.GetPixel(96, 96).ToArgb());
}
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Bitmap8bitsPixels_Gif89()
{
Bitmap8bitsPixels(Helpers.GetTestBitmapPath("nature24bits.gif"));
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Bitmap8bitsPixels_Gif87()
{
Bitmap8bitsPixels(Helpers.GetTestBitmapPath("nature24bits87.gif"));
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDrawingSupported), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/28859")]
public void Bitmap8bitsData()
{
string sInFile = Helpers.GetTestBitmapPath("nature24bits.gif");
using (Bitmap bmp = new Bitmap(sInFile))
{
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
try
{
Assert.Equal(bmp.Height, data.Height);
Assert.Equal(bmp.Width, data.Width);
Assert.Equal(PixelFormat.Format24bppRgb, data.PixelFormat);
Assert.Equal(332, data.Stride);
Assert.Equal(100, data.Height);
unsafe
{
byte* scan = (byte*)data.Scan0;
// sampling values from a well known bitmap
Assert.Equal(190, *(scan + 0));
Assert.Equal(217, *(scan + 1009));
Assert.Equal(120, *(scan + 2018));
Assert.Equal(253, *(scan + 3027));
Assert.Equal(233, *(scan + 4036));
Assert.Equal(176, *(scan + 5045));
Assert.Equal(151, *(scan + 6054));
Assert.Equal(220, *(scan + 7063));
Assert.Equal(139, *(scan + 8072));
Assert.Equal(121, *(scan + 9081));
Assert.Equal(160, *(scan + 10090));
Assert.Equal(92, *(scan + 11099));
Assert.Equal(96, *(scan + 12108));
Assert.Equal(64, *(scan + 13117));
Assert.Equal(156, *(scan + 14126));
Assert.Equal(68, *(scan + 15135));
Assert.Equal(156, *(scan + 16144));
Assert.Equal(84, *(scan + 17153));
Assert.Equal(55, *(scan + 18162));
Assert.Equal(68, *(scan + 19171));
Assert.Equal(116, *(scan + 20180));
Assert.Equal(61, *(scan + 21189));
Assert.Equal(69, *(scan + 22198));
Assert.Equal(75, *(scan + 23207));
Assert.Equal(61, *(scan + 24216));
Assert.Equal(66, *(scan + 25225));
Assert.Equal(40, *(scan + 26234));
Assert.Equal(55, *(scan + 27243));
Assert.Equal(53, *(scan + 28252));
Assert.Equal(215, *(scan + 29261));
Assert.Equal(99, *(scan + 30270));
Assert.Equal(67, *(scan + 31279));
Assert.Equal(142, *(scan + 32288));
}
}
finally
{
bmp.UnlockBits(data);
}
}
}
[ConditionalFact(Helpers.IsDrawingSupported)]
public void Interlaced()
{
string sInFile = Helpers.GetTestBitmapPath("81773-interlaced.gif");
using (Bitmap bmp = new Bitmap(sInFile))
{
for (int i = 0; i < 255; i++)
{
Color c = bmp.GetPixel(0, i);
Assert.Equal(255, c.A);
Assert.Equal(i, c.R);
Assert.Equal(i, c.G);
Assert.Equal(i, c.B);
}
}
}
private void Save(PixelFormat original, PixelFormat expected, bool exactColorCheck)
{
string sOutFile = $"linerect-{expected}.gif";
// Save
Bitmap bmp = new Bitmap(100, 100, original);
Graphics gr = Graphics.FromImage(bmp);
using (Pen p = new Pen(Color.Red, 2))
{
gr.DrawLine(p, 10.0F, 10.0F, 90.0F, 90.0F);
gr.DrawRectangle(p, 10.0F, 10.0F, 80.0F, 80.0F);
}
try
{
bmp.Save(sOutFile, ImageFormat.Gif);
// Load
using (Bitmap bmpLoad = new Bitmap(sOutFile))
{
Assert.Equal(expected, bmpLoad.PixelFormat);
Color color = bmpLoad.GetPixel(10, 10);
if (exactColorCheck)
{
Assert.Equal(Color.FromArgb(255, 255, 0, 0), color);
}
else
{
// FIXME: we don't save a pure red (F8 instead of FF) into the file so the color-check assert will fail
// this is due to libgif's QuantizeBuffer. An alternative would be to make our own that checks if less than 256 colors
// are used in the bitmap (or else use QuantizeBuffer).
Assert.Equal(255, color.A);
Assert.True(color.R >= 248);
Assert.Equal(0, color.G);
Assert.Equal(0, color.B);
}
}
}
finally
{
gr.Dispose();
bmp.Dispose();
try
{
File.Delete(sOutFile);
}
catch
{
}
}
}
[ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
public void Save_24bppRgb()
{
Save(PixelFormat.Format24bppRgb, PixelFormat.Format8bppIndexed, false);
}
[ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
public void Save_32bppRgb()
{
Save(PixelFormat.Format32bppRgb, PixelFormat.Format8bppIndexed, false);
}
[ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
public void Save_32bppArgb()
{
Save(PixelFormat.Format32bppArgb, PixelFormat.Format8bppIndexed, false);
}
[ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
public void Save_32bppPArgb()
{
Save(PixelFormat.Format32bppPArgb, PixelFormat.Format8bppIndexed, false);
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Buffers.Binary;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
// NOTE: The logic in this file is largely a copy of logic in RegexCompiler, emitting C# instead of MSIL.
// Most changes made to this file should be kept in sync, so far as bug fixes and relevant optimizations
// are concerned.
namespace System.Text.RegularExpressions.Generator
{
public partial class RegexGenerator
{
/// <summary>Code for a [GeneratedCode] attribute to put on the top-level generated members.</summary>
private static readonly string s_generatedCodeAttribute = $"[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{typeof(RegexGenerator).Assembly.GetName().Name}\", \"{typeof(RegexGenerator).Assembly.GetName().Version}\")]";
/// <summary>Header comments and usings to include at the top of every generated file.</summary>
private static readonly string[] s_headers = new string[]
{
"// <auto-generated/>",
"#nullable enable",
"#pragma warning disable CS0162 // Unreachable code",
"#pragma warning disable CS0164 // Unreferenced label",
"#pragma warning disable CS0219 // Variable assigned but never used",
"",
};
/// <summary>Generates the code for one regular expression class.</summary>
private static (string, ImmutableArray<Diagnostic>) EmitRegexType(RegexType regexClass, bool allowUnsafe)
{
var sb = new StringBuilder(1024);
var writer = new IndentedTextWriter(new StringWriter(sb));
// Emit the namespace
if (!string.IsNullOrWhiteSpace(regexClass.Namespace))
{
writer.WriteLine($"namespace {regexClass.Namespace}");
writer.WriteLine("{");
writer.Indent++;
}
// Emit containing types
RegexType? parent = regexClass.ParentClass;
var parentClasses = new Stack<string>();
while (parent is not null)
{
parentClasses.Push($"partial {parent.Keyword} {parent.Name}");
parent = parent.ParentClass;
}
while (parentClasses.Count != 0)
{
writer.WriteLine($"{parentClasses.Pop()}");
writer.WriteLine("{");
writer.Indent++;
}
// Emit the direct parent type
writer.WriteLine($"partial {regexClass.Keyword} {regexClass.Name}");
writer.WriteLine("{");
writer.Indent++;
// Generate a name to describe the regex instance. This includes the method name
// the user provided and a non-randomized (for determinism) hash of it to try to make
// the name that much harder to predict.
Debug.Assert(regexClass.Method is not null);
string generatedName = $"GeneratedRegex_{regexClass.Method.MethodName}_";
generatedName += ComputeStringHash(generatedName).ToString("X");
// Generate the regex type
ImmutableArray<Diagnostic> diagnostics = EmitRegexMethod(writer, regexClass.Method, generatedName, allowUnsafe);
while (writer.Indent != 0)
{
writer.Indent--;
writer.WriteLine("}");
}
writer.Flush();
return (sb.ToString(), diagnostics);
// FNV-1a hash function. The actual algorithm used doesn't matter; just something simple
// to create a deterministic, pseudo-random value that's based on input text.
static uint ComputeStringHash(string s)
{
uint hashCode = 2166136261;
foreach (char c in s)
{
hashCode = (c ^ hashCode) * 16777619;
}
return hashCode;
}
}
/// <summary>Generates the code for a regular expression method.</summary>
private static ImmutableArray<Diagnostic> EmitRegexMethod(IndentedTextWriter writer, RegexMethod rm, string id, bool allowUnsafe)
{
string patternExpression = Literal(rm.Pattern);
string optionsExpression = Literal(rm.Options);
string timeoutExpression = rm.MatchTimeout == Timeout.Infinite ?
"global::System.Threading.Timeout.InfiniteTimeSpan" :
$"global::System.TimeSpan.FromMilliseconds({rm.MatchTimeout.ToString(CultureInfo.InvariantCulture)})";
writer.WriteLine(s_generatedCodeAttribute);
writer.WriteLine($"{rm.Modifiers} global::System.Text.RegularExpressions.Regex {rm.MethodName}() => {id}.Instance;");
writer.WriteLine();
writer.WriteLine(s_generatedCodeAttribute);
writer.WriteLine("[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]");
writer.WriteLine($"{(writer.Indent != 0 ? "private" : "internal")} sealed class {id} : global::System.Text.RegularExpressions.Regex");
writer.WriteLine("{");
writer.Write(" public static global::System.Text.RegularExpressions.Regex Instance { get; } = ");
// If we can't support custom generation for this regex, spit out a Regex constructor call.
if (!rm.Tree.Root.SupportsCompilation(out string? reason))
{
writer.WriteLine();
writer.WriteLine($" // Cannot generate Regex-derived implementation because {reason}.");
writer.WriteLine($" new global::System.Text.RegularExpressions.Regex({patternExpression}, {optionsExpression}, {timeoutExpression});");
writer.WriteLine("}");
return ImmutableArray.Create(Diagnostic.Create(DiagnosticDescriptors.LimitedSourceGeneration, rm.MethodSyntax.GetLocation()));
}
AnalysisResults analysis = RegexTreeAnalyzer.Analyze(rm.Tree);
writer.WriteLine($"new {id}();");
writer.WriteLine();
writer.WriteLine($" private {id}()");
writer.WriteLine($" {{");
writer.WriteLine($" base.pattern = {patternExpression};");
writer.WriteLine($" base.roptions = {optionsExpression};");
writer.WriteLine($" base.internalMatchTimeout = {timeoutExpression};");
writer.WriteLine($" base.factory = new RunnerFactory();");
if (rm.Tree.CaptureNumberSparseMapping is not null)
{
writer.Write(" base.Caps = new global::System.Collections.Hashtable {");
AppendHashtableContents(writer, rm.Tree.CaptureNumberSparseMapping);
writer.WriteLine(" };");
}
if (rm.Tree.CaptureNameToNumberMapping is not null)
{
writer.Write(" base.CapNames = new global::System.Collections.Hashtable {");
AppendHashtableContents(writer, rm.Tree.CaptureNameToNumberMapping);
writer.WriteLine(" };");
}
if (rm.Tree.CaptureNames is not null)
{
writer.Write(" base.capslist = new string[] {");
string separator = "";
foreach (string s in rm.Tree.CaptureNames)
{
writer.Write(separator);
writer.Write(Literal(s));
separator = ", ";
}
writer.WriteLine(" };");
}
writer.WriteLine($" base.capsize = {rm.Tree.CaptureCount};");
writer.WriteLine($" }}");
writer.WriteLine(" ");
writer.WriteLine($" private sealed class RunnerFactory : global::System.Text.RegularExpressions.RegexRunnerFactory");
writer.WriteLine($" {{");
writer.WriteLine($" protected override global::System.Text.RegularExpressions.RegexRunner CreateInstance() => new Runner();");
writer.WriteLine();
writer.WriteLine($" private sealed class Runner : global::System.Text.RegularExpressions.RegexRunner");
writer.WriteLine($" {{");
// Main implementation methods
writer.WriteLine(" // Description:");
DescribeExpression(writer, rm.Tree.Root.Child(0), " // ", analysis); // skip implicit root capture
writer.WriteLine();
writer.WriteLine($" protected override void Scan(global::System.ReadOnlySpan<char> text)");
writer.WriteLine($" {{");
writer.Indent += 4;
EmitScan(writer, rm, id);
writer.Indent -= 4;
writer.WriteLine($" }}");
writer.WriteLine();
writer.WriteLine($" private bool TryFindNextPossibleStartingPosition(global::System.ReadOnlySpan<char> inputSpan)");
writer.WriteLine($" {{");
writer.Indent += 4;
RequiredHelperFunctions requiredHelpers = EmitTryFindNextPossibleStartingPosition(writer, rm, id);
writer.Indent -= 4;
writer.WriteLine($" }}");
writer.WriteLine();
if (allowUnsafe)
{
writer.WriteLine($" [global::System.Runtime.CompilerServices.SkipLocalsInit]");
}
writer.WriteLine($" private bool TryMatchAtCurrentPosition(global::System.ReadOnlySpan<char> inputSpan)");
writer.WriteLine($" {{");
writer.Indent += 4;
requiredHelpers |= EmitTryMatchAtCurrentPosition(writer, rm, id, analysis);
writer.Indent -= 4;
writer.WriteLine($" }}");
if ((requiredHelpers & RequiredHelperFunctions.IsWordChar) != 0)
{
writer.WriteLine();
writer.WriteLine($" /// <summary>Determines whether the character is part of the [\\w] set.</summary>");
writer.WriteLine($" [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
writer.WriteLine($" private static bool IsWordChar(char ch)");
writer.WriteLine($" {{");
writer.WriteLine($" global::System.ReadOnlySpan<byte> ascii = new byte[]");
writer.WriteLine($" {{");
writer.WriteLine($" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,");
writer.WriteLine($" 0xFE, 0xFF, 0xFF, 0x87, 0xFE, 0xFF, 0xFF, 0x07");
writer.WriteLine($" }};");
writer.WriteLine();
writer.WriteLine($" int chDiv8 = ch >> 3;");
writer.WriteLine($" return (uint)chDiv8 < (uint)ascii.Length ?");
writer.WriteLine($" (ascii[chDiv8] & (1 << (ch & 0x7))) != 0 :");
writer.WriteLine($" global::System.Globalization.CharUnicodeInfo.GetUnicodeCategory(ch) switch");
writer.WriteLine($" {{");
writer.WriteLine($" global::System.Globalization.UnicodeCategory.UppercaseLetter or");
writer.WriteLine($" global::System.Globalization.UnicodeCategory.LowercaseLetter or");
writer.WriteLine($" global::System.Globalization.UnicodeCategory.TitlecaseLetter or");
writer.WriteLine($" global::System.Globalization.UnicodeCategory.ModifierLetter or");
writer.WriteLine($" global::System.Globalization.UnicodeCategory.OtherLetter or");
writer.WriteLine($" global::System.Globalization.UnicodeCategory.NonSpacingMark or");
writer.WriteLine($" global::System.Globalization.UnicodeCategory.DecimalDigitNumber or");
writer.WriteLine($" global::System.Globalization.UnicodeCategory.ConnectorPunctuation => true,");
writer.WriteLine($" _ => false,");
writer.WriteLine($" }};");
writer.WriteLine($" }}");
}
if ((requiredHelpers & RequiredHelperFunctions.IsBoundary) != 0)
{
writer.WriteLine();
writer.WriteLine($" /// <summary>Determines whether the character at the specified index is a boundary.</summary>");
writer.WriteLine($" [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
writer.WriteLine($" private static bool IsBoundary(global::System.ReadOnlySpan<char> inputSpan, int index)");
writer.WriteLine($" {{");
writer.WriteLine($" int indexM1 = index - 1;");
writer.WriteLine($" return ((uint)indexM1 < (uint)inputSpan.Length && IsBoundaryWordChar(inputSpan[indexM1])) !=");
writer.WriteLine($" ((uint)index < (uint)inputSpan.Length && IsBoundaryWordChar(inputSpan[index]));");
writer.WriteLine();
writer.WriteLine($" static bool IsBoundaryWordChar(char ch) =>");
writer.WriteLine($" IsWordChar(ch) || (ch == '\\u200C' | ch == '\\u200D');");
writer.WriteLine($" }}");
}
if ((requiredHelpers & RequiredHelperFunctions.IsECMABoundary) != 0)
{
writer.WriteLine();
writer.WriteLine($" /// <summary>Determines whether the character at the specified index is a boundary.</summary>");
writer.WriteLine($" [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
writer.WriteLine($" private static bool IsECMABoundary(global::System.ReadOnlySpan<char> inputSpan, int index)");
writer.WriteLine($" {{");
writer.WriteLine($" int indexM1 = index - 1;");
writer.WriteLine($" return ((uint)indexM1 < (uint)inputSpan.Length && IsECMAWordChar(inputSpan[indexM1])) !=");
writer.WriteLine($" ((uint)index < (uint)inputSpan.Length && IsECMAWordChar(inputSpan[index]));");
writer.WriteLine();
writer.WriteLine($" static bool IsECMAWordChar(char ch) =>");
writer.WriteLine($" ((((uint)ch - 'A') & ~0x20) < 26) || // ASCII letter");
writer.WriteLine($" (((uint)ch - '0') < 10) || // digit");
writer.WriteLine($" ch == '_' || // underscore");
writer.WriteLine($" ch == '\\u0130'; // latin capital letter I with dot above");
writer.WriteLine($" }}");
}
writer.WriteLine($" }}");
writer.WriteLine($" }}");
writer.WriteLine("}");
return ImmutableArray<Diagnostic>.Empty;
static void AppendHashtableContents(IndentedTextWriter writer, Hashtable ht)
{
IDictionaryEnumerator en = ht.GetEnumerator();
string separator = "";
while (en.MoveNext())
{
writer.Write(separator);
separator = ", ";
writer.Write(" { ");
if (en.Key is int key)
{
writer.Write(key);
}
else
{
writer.Write($"\"{en.Key}\"");
}
writer.Write($", {en.Value} }} ");
}
}
}
/// <summary>Emits the body of the Scan method override.</summary>
private static void EmitScan(IndentedTextWriter writer, RegexMethod rm, string id)
{
bool rtl = (rm.Options & RegexOptions.RightToLeft) != 0;
using (EmitBlock(writer, "while (TryFindNextPossibleStartingPosition(text))"))
{
if (rm.MatchTimeout != Timeout.Infinite)
{
writer.WriteLine("base.CheckTimeout();");
writer.WriteLine();
}
writer.WriteLine("// If we find a match on the current position, or we have reached the end of the input, we are done.");
using (EmitBlock(writer, $"if (TryMatchAtCurrentPosition(text) || base.runtextpos == {(!rtl ? "text.Length" : "0")})"))
{
writer.WriteLine("return;");
}
writer.WriteLine();
writer.WriteLine($"base.runtextpos{(!rtl ? "++" : "--")};");
}
}
/// <summary>Emits the body of the TryFindNextPossibleStartingPosition.</summary>
private static RequiredHelperFunctions EmitTryFindNextPossibleStartingPosition(IndentedTextWriter writer, RegexMethod rm, string id)
{
RegexOptions options = (RegexOptions)rm.Options;
RegexTree regexTree = rm.Tree;
bool hasTextInfo = false;
RequiredHelperFunctions requiredHelpers = RequiredHelperFunctions.None;
bool rtl = (options & RegexOptions.RightToLeft) != 0;
// In some cases, we need to emit declarations at the beginning of the method, but we only discover we need them later.
// To handle that, we build up a collection of all the declarations to include, track where they should be inserted,
// and then insert them at that position once everything else has been output.
var additionalDeclarations = new HashSet<string>();
// Emit locals initialization
writer.WriteLine("int pos = base.runtextpos;");
writer.Flush();
int additionalDeclarationsPosition = ((StringWriter)writer.InnerWriter).GetStringBuilder().Length;
int additionalDeclarationsIndent = writer.Indent;
writer.WriteLine();
// Generate length check. If the input isn't long enough to possibly match, fail quickly.
// It's rare for min required length to be 0, so we don't bother special-casing the check,
// especially since we want the "return false" code regardless.
int minRequiredLength = rm.Tree.FindOptimizations.MinRequiredLength;
Debug.Assert(minRequiredLength >= 0);
string clause = (minRequiredLength, rtl) switch
{
(0, false) => "if (pos <= inputSpan.Length)",
(1, false) => "if (pos < inputSpan.Length)",
(_, false) => $"if (pos <= inputSpan.Length - {minRequiredLength})",
(0, true) => "if (pos >= 0)",
(1, true) => "if (pos > 0)",
(_, true) => $"if (pos >= {minRequiredLength})",
};
using (EmitBlock(writer, clause))
{
// Emit any anchors.
if (!EmitAnchors())
{
// Either anchors weren't specified, or they don't completely root all matches to a specific location.
// If whatever search operation we need to perform entails case-insensitive operations
// that weren't already handled via creation of sets, we need to get an store the
// TextInfo object to use (unless RegexOptions.CultureInvariant was specified).
EmitTextInfo(writer, ref hasTextInfo, rm);
// Emit the code for whatever find mode has been determined.
switch (regexTree.FindOptimizations.FindMode)
{
case FindNextStartingPositionMode.LeadingPrefix_LeftToRight_CaseSensitive:
Debug.Assert(!string.IsNullOrEmpty(regexTree.FindOptimizations.LeadingCaseSensitivePrefix));
EmitIndexOf_LeftToRight(regexTree.FindOptimizations.LeadingCaseSensitivePrefix);
break;
case FindNextStartingPositionMode.LeadingPrefix_RightToLeft_CaseSensitive:
Debug.Assert(!string.IsNullOrEmpty(regexTree.FindOptimizations.LeadingCaseSensitivePrefix));
EmitIndexOf_RightToLeft(regexTree.FindOptimizations.LeadingCaseSensitivePrefix);
break;
case FindNextStartingPositionMode.LeadingSet_LeftToRight_CaseSensitive:
case FindNextStartingPositionMode.LeadingSet_LeftToRight_CaseInsensitive:
case FindNextStartingPositionMode.FixedSets_LeftToRight_CaseSensitive:
case FindNextStartingPositionMode.FixedSets_LeftToRight_CaseInsensitive:
Debug.Assert(regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
EmitFixedSet_LeftToRight();
break;
case FindNextStartingPositionMode.LeadingSet_RightToLeft_CaseSensitive:
case FindNextStartingPositionMode.LeadingSet_RightToLeft_CaseInsensitive:
Debug.Assert(regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
EmitFixedSet_RightToLeft();
break;
case FindNextStartingPositionMode.LiteralAfterLoop_LeftToRight_CaseSensitive:
Debug.Assert(regexTree.FindOptimizations.LiteralAfterLoop is not null);
EmitLiteralAfterAtomicLoop();
break;
default:
Debug.Fail($"Unexpected mode: {regexTree.FindOptimizations.FindMode}");
goto case FindNextStartingPositionMode.NoSearch;
case FindNextStartingPositionMode.NoSearch:
writer.WriteLine("return true;");
break;
}
}
}
writer.WriteLine();
const string NoStartingPositionFound = "NoStartingPositionFound";
writer.WriteLine("// No starting position found");
writer.WriteLine($"{NoStartingPositionFound}:");
writer.WriteLine($"base.runtextpos = {(!rtl ? "inputSpan.Length" : "0")};");
writer.WriteLine("return false;");
// We're done. Patch up any additional declarations.
ReplaceAdditionalDeclarations(writer, additionalDeclarations, additionalDeclarationsPosition, additionalDeclarationsIndent);
return requiredHelpers;
// Emit a goto for the specified label.
void Goto(string label) => writer.WriteLine($"goto {label};");
// Emits any anchors. Returns true if the anchor roots any match to a specific location and thus no further
// searching is required; otherwise, false.
bool EmitAnchors()
{
// Anchors that fully implement TryFindNextPossibleStartingPosition, with a check that leads to immediate success or failure determination.
switch (regexTree.FindOptimizations.FindMode)
{
case FindNextStartingPositionMode.LeadingAnchor_LeftToRight_Beginning:
writer.WriteLine("// Beginning \\A anchor");
using (EmitBlock(writer, "if (pos != 0)"))
{
// If we're not currently at the beginning, we'll never be, so fail immediately.
Goto(NoStartingPositionFound);
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_LeftToRight_Start:
case FindNextStartingPositionMode.LeadingAnchor_RightToLeft_Start:
writer.WriteLine("// Start \\G anchor");
using (EmitBlock(writer, "if (pos != base.runtextstart)"))
{
// For both left-to-right and right-to-left, if we're not currently at the starting (because
// we've already moved beyond it), then we'll never be, so fail immediately.
Goto(NoStartingPositionFound);
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_LeftToRight_EndZ:
writer.WriteLine("// Leading end \\Z anchor");
using (EmitBlock(writer, "if (pos < inputSpan.Length - 1)"))
{
// If we're not currently at the end (or a newline just before it), skip ahead
// since nothing until then can possibly match.
writer.WriteLine("base.runtextpos = inputSpan.Length - 1;");
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_LeftToRight_End:
writer.WriteLine("// Leading end \\z anchor");
using (EmitBlock(writer, "if (pos < inputSpan.Length)"))
{
// If we're not currently at the end (or a newline just before it), skip ahead
// since nothing until then can possibly match.
writer.WriteLine("base.runtextpos = inputSpan.Length;");
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_RightToLeft_Beginning:
writer.WriteLine("// Beginning \\A anchor");
using (EmitBlock(writer, "if (pos != 0)"))
{
// If we're not currently at the beginning, skip ahead (or, rather, backwards)
// since nothing until then can possibly match. (We're iterating from the end
// to the beginning in RightToLeft mode.)
writer.WriteLine("base.runtextpos = 0;");
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_RightToLeft_EndZ:
writer.WriteLine("// Leading end \\Z anchor");
using (EmitBlock(writer, "if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\\n'))"))
{
// If we're not currently at the end, we'll never be (we're iterating from end to beginning),
// so fail immediately.
Goto(NoStartingPositionFound);
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_RightToLeft_End:
writer.WriteLine("// Leading end \\z anchor");
using (EmitBlock(writer, "if (pos < inputSpan.Length)"))
{
// If we're not currently at the end, we'll never be (we're iterating from end to beginning),
// so fail immediately.
Goto(NoStartingPositionFound);
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.TrailingAnchor_FixedLength_LeftToRight_EndZ:
// Jump to the end, minus the min required length, which in this case is actually the fixed length, minus 1 (for a possible ending \n).
writer.WriteLine("// Trailing end \\Z anchor with fixed-length match");
using (EmitBlock(writer, $"if (pos < inputSpan.Length - {regexTree.FindOptimizations.MinRequiredLength + 1})"))
{
writer.WriteLine($"base.runtextpos = inputSpan.Length - {regexTree.FindOptimizations.MinRequiredLength + 1};");
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.TrailingAnchor_FixedLength_LeftToRight_End:
// Jump to the end, minus the min required length, which in this case is actually the fixed length.
writer.WriteLine("// Trailing end \\z anchor with fixed-length match");
using (EmitBlock(writer, $"if (pos < inputSpan.Length - {regexTree.FindOptimizations.MinRequiredLength})"))
{
writer.WriteLine($"base.runtextpos = inputSpan.Length - {regexTree.FindOptimizations.MinRequiredLength};");
}
writer.WriteLine("return true;");
return true;
}
// Now handle anchors that boost the position but may not determine immediate success or failure.
switch (regexTree.FindOptimizations.LeadingAnchor)
{
case RegexNodeKind.Bol:
// Optimize the handling of a Beginning-Of-Line (BOL) anchor. BOL is special, in that unlike
// other anchors like Beginning, there are potentially multiple places a BOL can match. So unlike
// the other anchors, which all skip all subsequent processing if found, with BOL we just use it
// to boost our position to the next line, and then continue normally with any searches.
writer.WriteLine("// Beginning-of-line anchor");
using (EmitBlock(writer, "if (pos > 0 && inputSpan[pos - 1] != '\\n')"))
{
writer.WriteLine("int newlinePos = global::System.MemoryExtensions.IndexOf(inputSpan.Slice(pos), '\\n');");
using (EmitBlock(writer, "if ((uint)newlinePos > inputSpan.Length - pos - 1)"))
{
Goto(NoStartingPositionFound);
}
writer.WriteLine("pos = newlinePos + pos + 1;");
// We've updated the position. Make sure there's still enough room in the input for a possible match.
using (EmitBlock(writer, minRequiredLength switch
{
0 => "if (pos > inputSpan.Length)",
1 => "if (pos >= inputSpan.Length)",
_ => $"if (pos > inputSpan.Length - {minRequiredLength})"
}))
{
Goto(NoStartingPositionFound);
}
}
writer.WriteLine();
break;
}
switch (regexTree.FindOptimizations.TrailingAnchor)
{
case RegexNodeKind.End when regexTree.FindOptimizations.MaxPossibleLength is int maxLength:
writer.WriteLine("// End \\z anchor with maximum-length match");
using (EmitBlock(writer, $"if (pos < inputSpan.Length - {maxLength})"))
{
writer.WriteLine($"pos = inputSpan.Length - {maxLength};");
}
writer.WriteLine();
break;
case RegexNodeKind.EndZ when regexTree.FindOptimizations.MaxPossibleLength is int maxLength:
writer.WriteLine("// End \\Z anchor with maximum-length match");
using (EmitBlock(writer, $"if (pos < inputSpan.Length - {maxLength + 1})"))
{
writer.WriteLine($"pos = inputSpan.Length - {maxLength + 1};");
}
writer.WriteLine();
break;
}
return false;
}
// Emits a case-sensitive prefix search for a string at the beginning of the pattern.
void EmitIndexOf_LeftToRight(string prefix)
{
writer.WriteLine($"int i = global::System.MemoryExtensions.IndexOf(inputSpan.Slice(pos), {Literal(prefix)});");
writer.WriteLine("if (i >= 0)");
writer.WriteLine("{");
writer.WriteLine(" base.runtextpos = pos + i;");
writer.WriteLine(" return true;");
writer.WriteLine("}");
}
// Emits a case-sensitive right-to-left prefix search for a string at the beginning of the pattern.
void EmitIndexOf_RightToLeft(string prefix)
{
writer.WriteLine($"pos = global::System.MemoryExtensions.LastIndexOf(inputSpan.Slice(0, pos), {Literal(prefix)});");
writer.WriteLine("if (pos >= 0)");
writer.WriteLine("{");
writer.WriteLine($" base.runtextpos = pos + {prefix.Length};");
writer.WriteLine(" return true;");
writer.WriteLine("}");
}
// Emits a search for a set at a fixed position from the start of the pattern,
// and potentially other sets at other fixed positions in the pattern.
void EmitFixedSet_LeftToRight()
{
List<(char[]? Chars, string Set, int Distance, bool CaseInsensitive)>? sets = regexTree.FindOptimizations.FixedDistanceSets;
(char[]? Chars, string Set, int Distance, bool CaseInsensitive) primarySet = sets![0];
const int MaxSets = 4;
int setsToUse = Math.Min(sets.Count, MaxSets);
// If we can use IndexOf{Any}, try to accelerate the skip loop via vectorization to match the first prefix.
// We can use it if this is a case-sensitive class with a small number of characters in the class.
int setIndex = 0;
bool canUseIndexOf = !primarySet.CaseInsensitive && primarySet.Chars is not null;
bool needLoop = !canUseIndexOf || setsToUse > 1;
FinishEmitScope loopBlock = default;
if (needLoop)
{
writer.WriteLine("global::System.ReadOnlySpan<char> span = inputSpan.Slice(pos);");
string upperBound = "span.Length" + (setsToUse > 1 || primarySet.Distance != 0 ? $" - {minRequiredLength - 1}" : "");
loopBlock = EmitBlock(writer, $"for (int i = 0; i < {upperBound}; i++)");
}
if (canUseIndexOf)
{
string span = needLoop ?
"span" :
"inputSpan.Slice(pos)";
span = (needLoop, primarySet.Distance) switch
{
(false, 0) => span,
(true, 0) => $"{span}.Slice(i)",
(false, _) => $"{span}.Slice({primarySet.Distance})",
(true, _) => $"{span}.Slice(i + {primarySet.Distance})",
};
string indexOf = primarySet.Chars!.Length switch
{
1 => $"global::System.MemoryExtensions.IndexOf({span}, {Literal(primarySet.Chars[0])})",
2 => $"global::System.MemoryExtensions.IndexOfAny({span}, {Literal(primarySet.Chars[0])}, {Literal(primarySet.Chars[1])})",
3 => $"global::System.MemoryExtensions.IndexOfAny({span}, {Literal(primarySet.Chars[0])}, {Literal(primarySet.Chars[1])}, {Literal(primarySet.Chars[2])})",
_ => $"global::System.MemoryExtensions.IndexOfAny({span}, {Literal(new string(primarySet.Chars))})",
};
if (needLoop)
{
writer.WriteLine($"int indexOfPos = {indexOf};");
using (EmitBlock(writer, "if (indexOfPos < 0)"))
{
Goto(NoStartingPositionFound);
}
writer.WriteLine("i += indexOfPos;");
writer.WriteLine();
if (setsToUse > 1)
{
using (EmitBlock(writer, $"if (i >= span.Length - {minRequiredLength - 1})"))
{
Goto(NoStartingPositionFound);
}
writer.WriteLine();
}
}
else
{
writer.WriteLine($"int i = {indexOf};");
using (EmitBlock(writer, "if (i >= 0)"))
{
writer.WriteLine("base.runtextpos = pos + i;");
writer.WriteLine("return true;");
}
}
setIndex = 1;
}
if (needLoop)
{
Debug.Assert(setIndex == 0 || setIndex == 1);
bool hasCharClassConditions = false;
if (setIndex < setsToUse)
{
// if (CharInClass(textSpan[i + charClassIndex], prefix[0], "...") &&
// ...)
Debug.Assert(needLoop);
int start = setIndex;
for (; setIndex < setsToUse; setIndex++)
{
string spanIndex = $"span[i{(sets[setIndex].Distance > 0 ? $" + {sets[setIndex].Distance}" : "")}]";
string charInClassExpr = MatchCharacterClass(hasTextInfo, options, spanIndex, sets[setIndex].Set, sets[setIndex].CaseInsensitive, negate: false, additionalDeclarations, ref requiredHelpers);
if (setIndex == start)
{
writer.Write($"if ({charInClassExpr}");
}
else
{
writer.WriteLine(" &&");
writer.Write($" {charInClassExpr}");
}
}
writer.WriteLine(")");
hasCharClassConditions = true;
}
using (hasCharClassConditions ? EmitBlock(writer, null) : default)
{
writer.WriteLine("base.runtextpos = pos + i;");
writer.WriteLine("return true;");
}
}
loopBlock.Dispose();
}
// Emits a right-to-left search for a set at a fixed position from the start of the pattern.
// (Currently that position will always be a distance of 0, meaning the start of the pattern itself.)
void EmitFixedSet_RightToLeft()
{
(char[]? Chars, string Set, int Distance, bool CaseInsensitive) set = regexTree.FindOptimizations.FixedDistanceSets![0];
Debug.Assert(set.Distance == 0);
if (set.Chars is { Length: 1 } && !set.CaseInsensitive)
{
writer.WriteLine($"pos = global::System.MemoryExtensions.LastIndexOf(inputSpan.Slice(0, pos), {Literal(set.Chars[0])});");
writer.WriteLine("if (pos >= 0)");
writer.WriteLine("{");
writer.WriteLine(" base.runtextpos = pos + 1;");
writer.WriteLine(" return true;");
writer.WriteLine("}");
}
else
{
using (EmitBlock(writer, "while ((uint)--pos < (uint)inputSpan.Length)"))
{
using (EmitBlock(writer, $"if ({MatchCharacterClass(hasTextInfo, options, "inputSpan[pos]", set.Set, set.CaseInsensitive, negate: false, additionalDeclarations, ref requiredHelpers)})"))
{
writer.WriteLine("base.runtextpos = pos + 1;");
writer.WriteLine("return true;");
}
}
}
}
// Emits a search for a literal following a leading atomic single-character loop.
void EmitLiteralAfterAtomicLoop()
{
Debug.Assert(regexTree.FindOptimizations.LiteralAfterLoop is not null);
(RegexNode LoopNode, (char Char, string? String, char[]? Chars) Literal) target = regexTree.FindOptimizations.LiteralAfterLoop.Value;
Debug.Assert(target.LoopNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic);
Debug.Assert(target.LoopNode.N == int.MaxValue);
using (EmitBlock(writer, "while (true)"))
{
writer.WriteLine($"global::System.ReadOnlySpan<char> slice = inputSpan.Slice(pos);");
writer.WriteLine();
// Find the literal. If we can't find it, we're done searching.
writer.Write("int i = global::System.MemoryExtensions.");
writer.WriteLine(
target.Literal.String is string literalString ? $"IndexOf(slice, {Literal(literalString)});" :
target.Literal.Chars is not char[] literalChars ? $"IndexOf(slice, {Literal(target.Literal.Char)});" :
literalChars.Length switch
{
2 => $"IndexOfAny(slice, {Literal(literalChars[0])}, {Literal(literalChars[1])});",
3 => $"IndexOfAny(slice, {Literal(literalChars[0])}, {Literal(literalChars[1])}, {Literal(literalChars[2])});",
_ => $"IndexOfAny(slice, {Literal(new string(literalChars))});",
});
using (EmitBlock(writer, $"if (i < 0)"))
{
writer.WriteLine("break;");
}
writer.WriteLine();
// We found the literal. Walk backwards from it finding as many matches as we can against the loop.
writer.WriteLine("int prev = i;");
writer.WriteLine($"while ((uint)--prev < (uint)slice.Length && {MatchCharacterClass(hasTextInfo, options, "slice[prev]", target.LoopNode.Str!, caseInsensitive: false, negate: false, additionalDeclarations, ref requiredHelpers)});");
if (target.LoopNode.M > 0)
{
// If we found fewer than needed, loop around to try again. The loop doesn't overlap with the literal,
// so we can start from after the last place the literal matched.
writer.WriteLine($"if ((i - prev - 1) < {target.LoopNode.M})");
writer.WriteLine("{");
writer.WriteLine(" pos += i + 1;");
writer.WriteLine(" continue;");
writer.WriteLine("}");
}
writer.WriteLine();
// We have a winner. The starting position is just after the last position that failed to match the loop.
// TODO: It'd be nice to be able to communicate i as a place the matching engine can start matching
// after the loop, so that it doesn't need to re-match the loop.
writer.WriteLine("base.runtextpos = pos + prev + 1;");
writer.WriteLine("return true;");
}
}
// If a TextInfo is needed to perform ToLower operations, emits a local initialized to the TextInfo to use.
static void EmitTextInfo(IndentedTextWriter writer, ref bool hasTextInfo, RegexMethod rm)
{
// Emit local to store current culture if needed
if ((rm.Options & RegexOptions.CultureInvariant) == 0)
{
bool needsCulture = rm.Tree.FindOptimizations.FindMode switch
{
FindNextStartingPositionMode.FixedLiteral_LeftToRight_CaseInsensitive or
FindNextStartingPositionMode.FixedSets_LeftToRight_CaseInsensitive or
FindNextStartingPositionMode.LeadingSet_LeftToRight_CaseInsensitive => true,
_ when rm.Tree.FindOptimizations.FixedDistanceSets is List<(char[]? Chars, string Set, int Distance, bool CaseInsensitive)> sets => sets.Exists(set => set.CaseInsensitive),
_ => false,
};
if (needsCulture)
{
hasTextInfo = true;
writer.WriteLine("global::System.Globalization.TextInfo textInfo = global::System.Globalization.CultureInfo.CurrentCulture.TextInfo;");
}
}
}
}
/// <summary>Emits the body of the TryMatchAtCurrentPosition.</summary>
private static RequiredHelperFunctions EmitTryMatchAtCurrentPosition(IndentedTextWriter writer, RegexMethod rm, string id, AnalysisResults analysis)
{
// In .NET Framework and up through .NET Core 3.1, the code generated for RegexOptions.Compiled was effectively an unrolled
// version of what RegexInterpreter would process. The RegexNode tree would be turned into a series of opcodes via
// RegexWriter; the interpreter would then sit in a loop processing those opcodes, and the RegexCompiler iterated through the
// opcodes generating code for each equivalent to what the interpreter would do albeit with some decisions made at compile-time
// rather than at run-time. This approach, however, lead to complicated code that wasn't pay-for-play (e.g. a big backtracking
// jump table that all compilations went through even if there was no backtracking), that didn't factor in the shape of the
// tree (e.g. it's difficult to add optimizations based on interactions between nodes in the graph), and that didn't read well
// when decompiled from IL to C# or when directly emitted as C# as part of a source generator.
//
// This implementation is instead based on directly walking the RegexNode tree and outputting code for each node in the graph.
// A dedicated for each kind of RegexNode emits the code necessary to handle that node's processing, including recursively
// calling the relevant function for any of its children nodes. Backtracking is handled not via a giant jump table, but instead
// by emitting direct jumps to each backtracking construct. This is achieved by having all match failures jump to a "done"
// label that can be changed by a previous emitter, e.g. before EmitLoop returns, it ensures that "doneLabel" is set to the
// label that code should jump back to when backtracking. That way, a subsequent EmitXx function doesn't need to know exactly
// where to jump: it simply always jumps to "doneLabel" on match failure, and "doneLabel" is always configured to point to
// the right location. In an expression without backtracking, or before any backtracking constructs have been encountered,
// "doneLabel" is simply the final return location from the TryMatchAtCurrentPosition method that will undo any captures and exit, signaling to
// the calling scan loop that nothing was matched.
// Arbitrary limit for unrolling vs creating a loop. We want to balance size in the generated
// code with other costs, like the (small) overhead of slicing to create the temp span to iterate.
const int MaxUnrollSize = 16;
RegexOptions options = (RegexOptions)rm.Options;
RegexTree regexTree = rm.Tree;
RequiredHelperFunctions requiredHelpers = RequiredHelperFunctions.None;
// Helper to define names. Names start unadorned, but as soon as there's repetition,
// they begin to have a numbered suffix.
var usedNames = new Dictionary<string, int>();
// Every RegexTree is rooted in the implicit Capture for the whole expression.
// Skip the Capture node. We handle the implicit root capture specially.
RegexNode node = regexTree.Root;
Debug.Assert(node.Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
Debug.Assert(node.ChildCount() == 1, "Capture nodes should have one child");
node = node.Child(0);
// In some limited cases, TryFindNextPossibleStartingPosition will only return true if it successfully matched the whole expression.
// We can special case these to do essentially nothing in TryMatchAtCurrentPosition other than emit the capture.
switch (node.Kind)
{
case RegexNodeKind.Multi or RegexNodeKind.Notone or RegexNodeKind.One or RegexNodeKind.Set when !IsCaseInsensitive(node):
// This is the case for single and multiple characters, though the whole thing is only guaranteed
// to have been validated in TryFindNextPossibleStartingPosition when doing case-sensitive comparison.
writer.WriteLine($"int start = base.runtextpos;");
writer.WriteLine($"int end = start {((node.Options & RegexOptions.RightToLeft) == 0 ? "+" : "-")} {(node.Kind == RegexNodeKind.Multi ? node.Str!.Length : 1)};");
writer.WriteLine("base.Capture(0, start, end);");
writer.WriteLine("base.runtextpos = end;");
writer.WriteLine("return true;");
return requiredHelpers;
case RegexNodeKind.Empty:
// This case isn't common in production, but it's very common when first getting started with the
// source generator and seeing what happens as you add more to expressions. When approaching
// it from a learning perspective, this is very common, as it's the empty string you start with.
writer.WriteLine("base.Capture(0, base.runtextpos, base.runtextpos);");
writer.WriteLine("return true;");
return requiredHelpers;
}
// In some cases, we need to emit declarations at the beginning of the method, but we only discover we need them later.
// To handle that, we build up a collection of all the declarations to include, track where they should be inserted,
// and then insert them at that position once everything else has been output.
var additionalDeclarations = new HashSet<string>();
var additionalLocalFunctions = new Dictionary<string, string[]>();
// Declare some locals.
string sliceSpan = "slice";
writer.WriteLine("int pos = base.runtextpos;");
writer.WriteLine($"int original_pos = pos;");
bool hasTimeout = EmitLoopTimeoutCounterIfNeeded(writer, rm);
bool hasTextInfo = EmitInitializeCultureForTryMatchAtCurrentPositionIfNecessary(writer, rm, analysis);
writer.Flush();
int additionalDeclarationsPosition = ((StringWriter)writer.InnerWriter).GetStringBuilder().Length;
int additionalDeclarationsIndent = writer.Indent;
// The implementation tries to use const indexes into the span wherever possible, which we can do
// for all fixed-length constructs. In such cases (e.g. single chars, repeaters, strings, etc.)
// we know at any point in the regex exactly how far into it we are, and we can use that to index
// into the span created at the beginning of the routine to begin at exactly where we're starting
// in the input. When we encounter a variable-length construct, we transfer the static value to
// pos, slicing the inputSpan appropriately, and then zero out the static position.
int sliceStaticPos = 0;
SliceInputSpan(writer, defineLocal: true);
writer.WriteLine();
// doneLabel starts out as the top-level label for the whole expression failing to match. However,
// it may be changed by the processing of a node to point to whereever subsequent match failures
// should jump to, in support of backtracking or other constructs. For example, before emitting
// the code for a branch N, an alternation will set the the doneLabel to point to the label for
// processing the next branch N+1: that way, any failures in the branch N's processing will
// implicitly end up jumping to the right location without needing to know in what context it's used.
string doneLabel = ReserveName("NoMatch");
string topLevelDoneLabel = doneLabel;
// Check whether there are captures anywhere in the expression. If there isn't, we can skip all
// the boilerplate logic around uncapturing, as there won't be anything to uncapture.
bool expressionHasCaptures = analysis.MayContainCapture(node);
// Emit the code for all nodes in the tree.
EmitNode(node);
// If we fall through to this place in the code, we've successfully matched the expression.
writer.WriteLine();
writer.WriteLine("// The input matched.");
if (sliceStaticPos > 0)
{
EmitAdd(writer, "pos", sliceStaticPos); // TransferSliceStaticPosToPos would also slice, which isn't needed here
}
writer.WriteLine("base.runtextpos = pos;");
writer.WriteLine("base.Capture(0, original_pos, pos);");
writer.WriteLine("return true;");
// We're done with the match.
// Patch up any additional declarations.
ReplaceAdditionalDeclarations(writer, additionalDeclarations, additionalDeclarationsPosition, additionalDeclarationsIndent);
// And emit any required helpers.
if (additionalLocalFunctions.Count != 0)
{
foreach (KeyValuePair<string, string[]> localFunctions in additionalLocalFunctions.OrderBy(k => k.Key))
{
writer.WriteLine();
foreach (string line in localFunctions.Value)
{
writer.WriteLine(line);
}
}
}
return requiredHelpers;
// Helper to create a name guaranteed to be unique within the function.
string ReserveName(string prefix)
{
usedNames.TryGetValue(prefix, out int count);
usedNames[prefix] = count + 1;
return count == 0 ? prefix : $"{prefix}{count}";
}
// Helper to emit a label. As of C# 10, labels aren't statements of their own and need to adorn a following statement;
// if a label appears just before a closing brace, then, it's a compilation error. To avoid issues there, this by
// default implements a blank statement (a semicolon) after each label, but individual uses can opt-out of the semicolon
// when it's known the label will always be followed by a statement.
void MarkLabel(string label, bool emitSemicolon = true) => writer.WriteLine($"{label}:{(emitSemicolon ? ";" : "")}");
// Emits a goto to jump to the specified label. However, if the specified label is the top-level done label indicating
// that the entire match has failed, we instead emit our epilogue, uncapturing if necessary and returning out of TryMatchAtCurrentPosition.
void Goto(string label)
{
if (label == topLevelDoneLabel)
{
// We only get here in the code if the whole expression fails to match and jumps to
// the original value of doneLabel.
if (expressionHasCaptures)
{
EmitUncaptureUntil("0");
}
writer.WriteLine("return false; // The input didn't match.");
}
else
{
writer.WriteLine($"goto {label};");
}
}
// Emits a case or default line followed by an indented body.
void CaseGoto(string clause, string label)
{
writer.WriteLine(clause);
writer.Indent++;
Goto(label);
writer.Indent--;
}
// Whether the node has RegexOptions.IgnoreCase set.
// TODO: https://github.com/dotnet/runtime/issues/61048. We should be able to delete this and all usage sites once
// IgnoreCase is erradicated from the tree. The only place it should possibly be left after that work is in a Backreference,
// and that can do this check directly as needed.
static bool IsCaseInsensitive(RegexNode node) => (node.Options & RegexOptions.IgnoreCase) != 0;
// Slices the inputSpan starting at pos until end and stores it into slice.
void SliceInputSpan(IndentedTextWriter writer, bool defineLocal = false)
{
if (defineLocal)
{
writer.Write("global::System.ReadOnlySpan<char> ");
}
writer.WriteLine($"{sliceSpan} = inputSpan.Slice(pos);");
}
// Emits the sum of a constant and a value from a local.
string Sum(int constant, string? local = null) =>
local is null ? constant.ToString(CultureInfo.InvariantCulture) :
constant == 0 ? local :
$"{constant} + {local}";
// Emits a check that the span is large enough at the currently known static position to handle the required additional length.
void EmitSpanLengthCheck(int requiredLength, string? dynamicRequiredLength = null)
{
Debug.Assert(requiredLength > 0);
using (EmitBlock(writer, $"if ({SpanLengthCheck(requiredLength, dynamicRequiredLength)})"))
{
Goto(doneLabel);
}
}
// Returns a length check for the current span slice. The check returns true if
// the span isn't long enough for the specified length.
string SpanLengthCheck(int requiredLength, string? dynamicRequiredLength = null) =>
dynamicRequiredLength is null && sliceStaticPos + requiredLength == 1 ? $"{sliceSpan}.IsEmpty" :
$"(uint){sliceSpan}.Length < {Sum(sliceStaticPos + requiredLength, dynamicRequiredLength)}";
// Adds the value of sliceStaticPos into the pos local, slices slice by the corresponding amount,
// and zeros out sliceStaticPos.
void TransferSliceStaticPosToPos(bool forceSliceReload = false)
{
if (sliceStaticPos > 0)
{
EmitAdd(writer, "pos", sliceStaticPos);
sliceStaticPos = 0;
SliceInputSpan(writer);
}
else if (forceSliceReload)
{
SliceInputSpan(writer);
}
}
// Emits the code for an alternation.
void EmitAlternation(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Alternate, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
int childCount = node.ChildCount();
Debug.Assert(childCount >= 2);
string originalDoneLabel = doneLabel;
// Both atomic and non-atomic are supported. While a parent RegexNode.Atomic node will itself
// successfully prevent backtracking into this child node, we can emit better / cheaper code
// for an Alternate when it is atomic, so we still take it into account here.
Debug.Assert(node.Parent is not null);
bool isAtomic = analysis.IsAtomicByAncestor(node);
// If no child branch overlaps with another child branch, we can emit more streamlined code
// that avoids checking unnecessary branches, e.g. with abc|def|ghi if the next character in
// the input is 'a', we needn't try the def or ghi branches. A simple, relatively common case
// of this is if every branch begins with a specific, unique character, in which case
// the whole alternation can be treated as a simple switch, so we special-case that. However,
// we can't goto _into_ switch cases, which means we can't use this approach if there's any
// possibility of backtracking into the alternation.
bool useSwitchedBranches = false;
if ((node.Options & RegexOptions.RightToLeft) == 0)
{
useSwitchedBranches = isAtomic;
if (!useSwitchedBranches)
{
useSwitchedBranches = true;
for (int i = 0; i < childCount; i++)
{
if (analysis.MayBacktrack(node.Child(i)))
{
useSwitchedBranches = false;
break;
}
}
}
}
// Detect whether every branch begins with one or more unique characters.
const int SetCharsSize = 5; // arbitrary limit (for IgnoreCase, we want this to be at least 3 to handle the vast majority of values)
Span<char> setChars = stackalloc char[SetCharsSize];
if (useSwitchedBranches)
{
// Iterate through every branch, seeing if we can easily find a starting One, Multi, or small Set.
// If we can, extract its starting char (or multiple in the case of a set), validate that all such
// starting characters are unique relative to all the branches.
var seenChars = new HashSet<char>();
for (int i = 0; i < childCount && useSwitchedBranches; i++)
{
// If it's not a One, Multi, or Set, we can't apply this optimization.
// If it's IgnoreCase (and wasn't reduced to a non-IgnoreCase set), also ignore it to keep the logic simple.
if (node.Child(i).FindBranchOneMultiOrSetStart() is not RegexNode oneMultiOrSet ||
IsCaseInsensitive(oneMultiOrSet))
{
useSwitchedBranches = false;
break;
}
// If it's a One or a Multi, get the first character and add it to the set.
// If it was already in the set, we can't apply this optimization.
if (oneMultiOrSet.Kind is RegexNodeKind.One or RegexNodeKind.Multi)
{
if (!seenChars.Add(oneMultiOrSet.FirstCharOfOneOrMulti()))
{
useSwitchedBranches = false;
break;
}
}
else
{
// The branch begins with a set. Make sure it's a set of only a few characters
// and get them. If we can't, we can't apply this optimization.
Debug.Assert(oneMultiOrSet.Kind is RegexNodeKind.Set);
int numChars;
if (RegexCharClass.IsNegated(oneMultiOrSet.Str!) ||
(numChars = RegexCharClass.GetSetChars(oneMultiOrSet.Str!, setChars)) == 0)
{
useSwitchedBranches = false;
break;
}
// Check to make sure each of the chars is unique relative to all other branches examined.
foreach (char c in setChars.Slice(0, numChars))
{
if (!seenChars.Add(c))
{
useSwitchedBranches = false;
break;
}
}
}
}
}
if (useSwitchedBranches)
{
// Note: This optimization does not exist with RegexOptions.Compiled. Here we rely on the
// C# compiler to lower the C# switch statement with appropriate optimizations. In some
// cases there are enough branches that the compiler will emit a jump table. In others
// it'll optimize the order of checks in order to minimize the total number in the worst
// case. In any case, we get easier to read and reason about C#.
EmitSwitchedBranches();
}
else
{
EmitAllBranches();
}
return;
// Emits the code for a switch-based alternation of non-overlapping branches.
void EmitSwitchedBranches()
{
// We need at least 1 remaining character in the span, for the char to switch on.
EmitSpanLengthCheck(1);
writer.WriteLine();
// Emit a switch statement on the first char of each branch.
using (EmitBlock(writer, $"switch ({sliceSpan}[{sliceStaticPos++}])"))
{
Span<char> setChars = stackalloc char[SetCharsSize]; // needs to be same size as detection check in caller
int startingSliceStaticPos = sliceStaticPos;
// Emit a case for each branch.
for (int i = 0; i < childCount; i++)
{
sliceStaticPos = startingSliceStaticPos;
RegexNode child = node.Child(i);
Debug.Assert(child.Kind is RegexNodeKind.One or RegexNodeKind.Multi or RegexNodeKind.Set or RegexNodeKind.Concatenate, DescribeNode(child, analysis));
Debug.Assert(child.Kind is not RegexNodeKind.Concatenate || (child.ChildCount() >= 2 && child.Child(0).Kind is RegexNodeKind.One or RegexNodeKind.Multi or RegexNodeKind.Set));
RegexNode? childStart = child.FindBranchOneMultiOrSetStart();
Debug.Assert(childStart is not null, "Unexpectedly couldn't find the branch starting node.");
Debug.Assert(!IsCaseInsensitive(childStart), "Expected only to find non-IgnoreCase branch starts");
if (childStart.Kind is RegexNodeKind.Set)
{
int numChars = RegexCharClass.GetSetChars(childStart.Str!, setChars);
Debug.Assert(numChars != 0);
writer.WriteLine($"case {string.Join(" or ", setChars.Slice(0, numChars).ToArray().Select(c => Literal(c)))}:");
}
else
{
writer.WriteLine($"case {Literal(childStart.FirstCharOfOneOrMulti())}:");
}
writer.Indent++;
// Emit the code for the branch, without the first character that was already matched in the switch.
switch (child.Kind)
{
case RegexNodeKind.Multi:
EmitNode(CloneMultiWithoutFirstChar(child));
writer.WriteLine();
break;
case RegexNodeKind.Concatenate:
var newConcat = new RegexNode(RegexNodeKind.Concatenate, child.Options);
if (childStart.Kind == RegexNodeKind.Multi)
{
newConcat.AddChild(CloneMultiWithoutFirstChar(childStart));
}
int concatChildCount = child.ChildCount();
for (int j = 1; j < concatChildCount; j++)
{
newConcat.AddChild(child.Child(j));
}
EmitNode(newConcat.Reduce());
writer.WriteLine();
break;
static RegexNode CloneMultiWithoutFirstChar(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Multi);
Debug.Assert(node.Str!.Length >= 2);
return node.Str!.Length == 2 ?
new RegexNode(RegexNodeKind.One, node.Options, node.Str![1]) :
new RegexNode(RegexNodeKind.Multi, node.Options, node.Str!.Substring(1));
}
}
// This is only ever used for atomic alternations, so we can simply reset the doneLabel
// after emitting the child, as nothing will backtrack here (and we need to reset it
// so that all branches see the original).
doneLabel = originalDoneLabel;
// If we get here in the generated code, the branch completed successfully.
// Before jumping to the end, we need to zero out sliceStaticPos, so that no
// matter what the value is after the branch, whatever follows the alternate
// will see the same sliceStaticPos.
TransferSliceStaticPosToPos();
writer.WriteLine($"break;");
writer.WriteLine();
writer.Indent--;
}
// Default branch if the character didn't match the start of any branches.
CaseGoto("default:", doneLabel);
}
}
void EmitAllBranches()
{
// Label to jump to when any branch completes successfully.
string matchLabel = ReserveName("AlternationMatch");
// Save off pos. We'll need to reset this each time a branch fails.
string startingPos = ReserveName("alternation_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
int startingSliceStaticPos = sliceStaticPos;
// We need to be able to undo captures in two situations:
// - If a branch of the alternation itself contains captures, then if that branch
// fails to match, any captures from that branch until that failure point need to
// be uncaptured prior to jumping to the next branch.
// - If the expression after the alternation contains captures, then failures
// to match in those expressions could trigger backtracking back into the
// alternation, and thus we need uncapture any of them.
// As such, if the alternation contains captures or if it's not atomic, we need
// to grab the current crawl position so we can unwind back to it when necessary.
// We can do all of the uncapturing as part of falling through to the next branch.
// If we fail in a branch, then such uncapturing will unwind back to the position
// at the start of the alternation. If we fail after the alternation, and the
// matched branch didn't contain any backtracking, then the failure will end up
// jumping to the next branch, which will unwind the captures. And if we fail after
// the alternation and the matched branch did contain backtracking, that backtracking
// construct is responsible for unwinding back to its starting crawl position. If
// it eventually ends up failing, that failure will result in jumping to the next branch
// of the alternation, which will again dutifully unwind the remaining captures until
// what they were at the start of the alternation. Of course, if there are no captures
// anywhere in the regex, we don't have to do any of that.
string? startingCapturePos = null;
if (expressionHasCaptures && (analysis.MayContainCapture(node) || !isAtomic))
{
startingCapturePos = ReserveName("alternation_starting_capturepos");
writer.WriteLine($"int {startingCapturePos} = base.Crawlpos();");
}
writer.WriteLine();
// After executing the alternation, subsequent matching may fail, at which point execution
// will need to backtrack to the alternation. We emit a branching table at the end of the
// alternation, with a label that will be left as the "doneLabel" upon exiting emitting the
// alternation. The branch table is populated with an entry for each branch of the alternation,
// containing either the label for the last backtracking construct in the branch if such a construct
// existed (in which case the doneLabel upon emitting that node will be different from before it)
// or the label for the next branch.
var labelMap = new string[childCount];
string backtrackLabel = ReserveName("AlternationBacktrack");
for (int i = 0; i < childCount; i++)
{
// If the alternation isn't atomic, backtracking may require our jump table jumping back
// into these branches, so we can't use actual scopes, as that would hide the labels.
using (EmitScope(writer, $"Branch {i}", faux: !isAtomic))
{
bool isLastBranch = i == childCount - 1;
string? nextBranch = null;
if (!isLastBranch)
{
// Failure to match any branch other than the last one should result
// in jumping to process the next branch.
nextBranch = ReserveName("AlternationBranch");
doneLabel = nextBranch;
}
else
{
// Failure to match the last branch is equivalent to failing to match
// the whole alternation, which means those failures should jump to
// what "doneLabel" was defined as when starting the alternation.
doneLabel = originalDoneLabel;
}
// Emit the code for each branch.
EmitNode(node.Child(i));
writer.WriteLine();
// Add this branch to the backtracking table. At this point, either the child
// had backtracking constructs, in which case doneLabel points to the last one
// and that's where we'll want to jump to, or it doesn't, in which case doneLabel
// still points to the nextBranch, which similarly is where we'll want to jump to.
if (!isAtomic)
{
EmitStackPush(startingCapturePos is not null ?
new[] { i.ToString(), startingPos, startingCapturePos } :
new[] { i.ToString(), startingPos });
}
labelMap[i] = doneLabel;
// If we get here in the generated code, the branch completed successfully.
// Before jumping to the end, we need to zero out sliceStaticPos, so that no
// matter what the value is after the branch, whatever follows the alternate
// will see the same sliceStaticPos.
TransferSliceStaticPosToPos();
if (!isLastBranch || !isAtomic)
{
// If this isn't the last branch, we're about to output a reset section,
// and if this isn't atomic, there will be a backtracking section before
// the end of the method. In both of those cases, we've successfully
// matched and need to skip over that code. If, however, this is the
// last branch and this is an atomic alternation, we can just fall
// through to the successfully matched location.
Goto(matchLabel);
}
// Reset state for next branch and loop around to generate it. This includes
// setting pos back to what it was at the beginning of the alternation,
// updating slice to be the full length it was, and if there's a capture that
// needs to be reset, uncapturing it.
if (!isLastBranch)
{
writer.WriteLine();
MarkLabel(nextBranch!, emitSemicolon: false);
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
if (startingCapturePos is not null)
{
EmitUncaptureUntil(startingCapturePos);
}
}
}
writer.WriteLine();
}
// We should never fall through to this location in the generated code. Either
// a branch succeeded in matching and jumped to the end, or a branch failed in
// matching and jumped to the next branch location. We only get to this code
// if backtracking occurs and the code explicitly jumps here based on our setting
// "doneLabel" to the label for this section. Thus, we only need to emit it if
// something can backtrack to us, which can't happen if we're inside of an atomic
// node. Thus, emit the backtracking section only if we're non-atomic.
if (isAtomic)
{
doneLabel = originalDoneLabel;
}
else
{
doneLabel = backtrackLabel;
MarkLabel(backtrackLabel, emitSemicolon: false);
EmitStackPop(startingCapturePos is not null ?
new[] { startingCapturePos, startingPos } :
new[] { startingPos});
using (EmitBlock(writer, $"switch ({StackPop()})"))
{
for (int i = 0; i < labelMap.Length; i++)
{
CaseGoto($"case {i}:", labelMap[i]);
}
}
writer.WriteLine();
}
// Successfully completed the alternate.
MarkLabel(matchLabel);
Debug.Assert(sliceStaticPos == 0);
}
}
// Emits the code to handle a backreference.
void EmitBackreference(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Backreference, $"Unexpected type: {node.Kind}");
int capnum = RegexParser.MapCaptureNumber(node.M, rm.Tree.CaptureNumberSparseMapping);
if (sliceStaticPos > 0)
{
TransferSliceStaticPosToPos();
writer.WriteLine();
}
// If the specified capture hasn't yet captured anything, fail to match... except when using RegexOptions.ECMAScript,
// in which case per ECMA 262 section 21.2.2.9 the backreference should succeed.
if ((node.Options & RegexOptions.ECMAScript) != 0)
{
writer.WriteLine($"// If the {DescribeCapture(node.M, analysis)} hasn't matched, the backreference matches with RegexOptions.ECMAScript rules.");
using (EmitBlock(writer, $"if (base.IsMatched({capnum}))"))
{
EmitWhenHasCapture();
}
}
else
{
writer.WriteLine($"// If the {DescribeCapture(node.M, analysis)} hasn't matched, the backreference doesn't match.");
using (EmitBlock(writer, $"if (!base.IsMatched({capnum}))"))
{
Goto(doneLabel);
}
writer.WriteLine();
EmitWhenHasCapture();
}
void EmitWhenHasCapture()
{
writer.WriteLine("// Get the captured text. If it doesn't match at the current position, the backreference doesn't match.");
additionalDeclarations.Add("int matchLength = 0;");
writer.WriteLine($"matchLength = base.MatchLength({capnum});");
bool caseInsensitive = IsCaseInsensitive(node);
if ((node.Options & RegexOptions.RightToLeft) == 0)
{
if (!caseInsensitive)
{
// If we're case-sensitive, we can simply validate that the remaining length of the slice is sufficient
// to possibly match, and then do a SequenceEqual against the matched text.
writer.WriteLine($"if ({sliceSpan}.Length < matchLength || ");
using (EmitBlock(writer, $" !global::System.MemoryExtensions.SequenceEqual(inputSpan.Slice(base.MatchIndex({capnum}), matchLength), {sliceSpan}.Slice(0, matchLength)))"))
{
Goto(doneLabel);
}
}
else
{
// For case-insensitive, we have to walk each character individually.
using (EmitBlock(writer, $"if ({sliceSpan}.Length < matchLength)"))
{
Goto(doneLabel);
}
writer.WriteLine();
additionalDeclarations.Add("int matchIndex = 0;");
writer.WriteLine($"matchIndex = base.MatchIndex({capnum});");
using (EmitBlock(writer, $"for (int i = 0; i < matchLength; i++)"))
{
using (EmitBlock(writer, $"if ({ToLower(hasTextInfo, options, $"inputSpan[matchIndex + i]")} != {ToLower(hasTextInfo, options, $"{sliceSpan}[i]")})"))
{
Goto(doneLabel);
}
}
}
writer.WriteLine();
writer.WriteLine($"pos += matchLength;");
SliceInputSpan(writer);
}
else
{
using (EmitBlock(writer, $"if (pos < matchLength)"))
{
Goto(doneLabel);
}
writer.WriteLine();
additionalDeclarations.Add("int matchIndex = 0;");
writer.WriteLine($"matchIndex = base.MatchIndex({capnum});");
using (EmitBlock(writer, $"for (int i = 0; i < matchLength; i++)"))
{
using (EmitBlock(writer, $"if ({ToLowerIfNeeded(hasTextInfo, options, $"inputSpan[matchIndex + i]", caseInsensitive)} != {ToLowerIfNeeded(hasTextInfo, options, $"inputSpan[pos - matchLength + i]", caseInsensitive)})"))
{
Goto(doneLabel);
}
}
writer.WriteLine();
writer.WriteLine($"pos -= matchLength;");
}
}
}
// Emits the code for an if(backreference)-then-else conditional.
void EmitBackreferenceConditional(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.BackreferenceConditional, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 2, $"Expected 2 children, found {node.ChildCount()}");
// We're branching in a complicated fashion. Make sure sliceStaticPos is 0.
TransferSliceStaticPosToPos();
// Get the capture number to test.
int capnum = RegexParser.MapCaptureNumber(node.M, rm.Tree.CaptureNumberSparseMapping);
// Get the "yes" branch and the "no" branch. The "no" branch is optional in syntax and is thus
// somewhat likely to be Empty.
RegexNode yesBranch = node.Child(0);
RegexNode? noBranch = node.Child(1) is { Kind: not RegexNodeKind.Empty } childNo ? childNo : null;
string originalDoneLabel = doneLabel;
// If the child branches might backtrack, we can't emit the branches inside constructs that
// require braces, e.g. if/else, even though that would yield more idiomatic output.
// But if we know for certain they won't backtrack, we can output the nicer code.
if (analysis.IsAtomicByAncestor(node) || (!analysis.MayBacktrack(yesBranch) && (noBranch is null || !analysis.MayBacktrack(noBranch))))
{
using (EmitBlock(writer, $"if (base.IsMatched({capnum}))"))
{
writer.WriteLine($"// The {DescribeCapture(node.M, analysis)} captured a value. Match the first branch.");
EmitNode(yesBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
}
if (noBranch is not null)
{
using (EmitBlock(writer, $"else"))
{
writer.WriteLine($"// Otherwise, match the second branch.");
EmitNode(noBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
}
}
doneLabel = originalDoneLabel; // atomicity
return;
}
string refNotMatched = ReserveName("ConditionalBackreferenceNotMatched");
string endConditional = ReserveName("ConditionalBackreferenceEnd");
// As with alternations, we have potentially multiple branches, each of which may contain
// backtracking constructs, but the expression after the conditional needs a single target
// to backtrack to. So, we expose a single Backtrack label and track which branch was
// followed in this resumeAt local.
string resumeAt = ReserveName("conditionalbackreference_branch");
writer.WriteLine($"int {resumeAt} = 0;");
// While it would be nicely readable to use an if/else block, if the branches contain
// anything that triggers backtracking, labels will end up being defined, and if they're
// inside the scope block for the if or else, that will prevent jumping to them from
// elsewhere. So we implement the if/else with labels and gotos manually.
// Check to see if the specified capture number was captured.
using (EmitBlock(writer, $"if (!base.IsMatched({capnum}))"))
{
Goto(refNotMatched);
}
writer.WriteLine();
// The specified capture was captured. Run the "yes" branch.
// If it successfully matches, jump to the end.
EmitNode(yesBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
string postYesDoneLabel = doneLabel;
if (postYesDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 0;");
}
bool needsEndConditional = postYesDoneLabel != originalDoneLabel || noBranch is not null;
if (needsEndConditional)
{
Goto(endConditional);
writer.WriteLine();
}
MarkLabel(refNotMatched);
string postNoDoneLabel = originalDoneLabel;
if (noBranch is not null)
{
// Output the no branch.
doneLabel = originalDoneLabel;
EmitNode(noBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
postNoDoneLabel = doneLabel;
if (postNoDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 1;");
}
}
else
{
// There's only a yes branch. If it's going to cause us to output a backtracking
// label but code may not end up taking the yes branch path, we need to emit a resumeAt
// that will cause the backtracking to immediately pass through this node.
if (postYesDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 2;");
}
}
// If either the yes branch or the no branch contained backtracking, subsequent expressions
// might try to backtrack to here, so output a backtracking map based on resumeAt.
bool hasBacktracking = postYesDoneLabel != originalDoneLabel || postNoDoneLabel != originalDoneLabel;
if (hasBacktracking)
{
// Skip the backtracking section.
Goto(endConditional);
writer.WriteLine();
// Backtrack section
string backtrack = ReserveName("ConditionalBackreferenceBacktrack");
doneLabel = backtrack;
MarkLabel(backtrack);
// Pop from the stack the branch that was used and jump back to its backtracking location.
EmitStackPop(resumeAt);
using (EmitBlock(writer, $"switch ({resumeAt})"))
{
if (postYesDoneLabel != originalDoneLabel)
{
CaseGoto("case 0:", postYesDoneLabel);
}
if (postNoDoneLabel != originalDoneLabel)
{
CaseGoto("case 1:", postNoDoneLabel);
}
CaseGoto("default:", originalDoneLabel);
}
}
if (needsEndConditional)
{
MarkLabel(endConditional);
}
if (hasBacktracking)
{
// We're not atomic and at least one of the yes or no branches contained backtracking constructs,
// so finish outputting our backtracking logic, which involves pushing onto the stack which
// branch to backtrack into.
EmitStackPush(resumeAt);
}
}
// Emits the code for an if(expression)-then-else conditional.
void EmitExpressionConditional(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 3, $"Expected 3 children, found {node.ChildCount()}");
bool isAtomic = analysis.IsAtomicByAncestor(node);
// We're branching in a complicated fashion. Make sure sliceStaticPos is 0.
TransferSliceStaticPosToPos();
// The first child node is the condition expression. If this matches, then we branch to the "yes" branch.
// If it doesn't match, then we branch to the optional "no" branch if it exists, or simply skip the "yes"
// branch, otherwise. The condition is treated as a positive lookaround.
RegexNode condition = node.Child(0);
// Get the "yes" branch and the "no" branch. The "no" branch is optional in syntax and is thus
// somewhat likely to be Empty.
RegexNode yesBranch = node.Child(1);
RegexNode? noBranch = node.Child(2) is { Kind: not RegexNodeKind.Empty } childNo ? childNo : null;
string originalDoneLabel = doneLabel;
string expressionNotMatched = ReserveName("ConditionalExpressionNotMatched");
string endConditional = ReserveName("ConditionalExpressionEnd");
// As with alternations, we have potentially multiple branches, each of which may contain
// backtracking constructs, but the expression after the condition needs a single target
// to backtrack to. So, we expose a single Backtrack label and track which branch was
// followed in this resumeAt local.
string resumeAt = ReserveName("conditionalexpression_branch");
if (!isAtomic)
{
writer.WriteLine($"int {resumeAt} = 0;");
}
// If the condition expression has captures, we'll need to uncapture them in the case of no match.
string? startingCapturePos = null;
if (analysis.MayContainCapture(condition))
{
startingCapturePos = ReserveName("conditionalexpression_starting_capturepos");
writer.WriteLine($"int {startingCapturePos} = base.Crawlpos();");
}
// Emit the condition expression. Route any failures to after the yes branch. This code is almost
// the same as for a positive lookaround; however, a positive lookaround only needs to reset the position
// on a successful match, as a failed match fails the whole expression; here, we need to reset the
// position on completion, regardless of whether the match is successful or not.
doneLabel = expressionNotMatched;
// Save off pos. We'll need to reset this upon successful completion of the lookaround.
string startingPos = ReserveName("conditionalexpression_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
writer.WriteLine();
int startingSliceStaticPos = sliceStaticPos;
// Emit the child. The condition expression is a zero-width assertion, which is atomic,
// so prevent backtracking into it.
writer.WriteLine("// Condition:");
EmitNode(condition);
writer.WriteLine();
doneLabel = originalDoneLabel;
// After the condition completes successfully, reset the text positions.
// Do not reset captures, which persist beyond the lookaround.
writer.WriteLine("// Condition matched:");
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
writer.WriteLine();
// The expression matched. Run the "yes" branch. If it successfully matches, jump to the end.
EmitNode(yesBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
string postYesDoneLabel = doneLabel;
if (!isAtomic && postYesDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 0;");
}
Goto(endConditional);
writer.WriteLine();
// After the condition completes unsuccessfully, reset the text positions
// _and_ reset captures, which should not persist when the whole expression failed.
writer.WriteLine("// Condition did not match:");
MarkLabel(expressionNotMatched, emitSemicolon: false);
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
if (startingCapturePos is not null)
{
EmitUncaptureUntil(startingCapturePos);
}
writer.WriteLine();
string postNoDoneLabel = originalDoneLabel;
if (noBranch is not null)
{
// Output the no branch.
doneLabel = originalDoneLabel;
EmitNode(noBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
postNoDoneLabel = doneLabel;
if (!isAtomic && postNoDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 1;");
}
}
else
{
// There's only a yes branch. If it's going to cause us to output a backtracking
// label but code may not end up taking the yes branch path, we need to emit a resumeAt
// that will cause the backtracking to immediately pass through this node.
if (!isAtomic && postYesDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 2;");
}
}
// If either the yes branch or the no branch contained backtracking, subsequent expressions
// might try to backtrack to here, so output a backtracking map based on resumeAt.
if (isAtomic || (postYesDoneLabel == originalDoneLabel && postNoDoneLabel == originalDoneLabel))
{
doneLabel = originalDoneLabel;
MarkLabel(endConditional);
}
else
{
// Skip the backtracking section.
Goto(endConditional);
writer.WriteLine();
string backtrack = ReserveName("ConditionalExpressionBacktrack");
doneLabel = backtrack;
MarkLabel(backtrack, emitSemicolon: false);
EmitStackPop(resumeAt);
using (EmitBlock(writer, $"switch ({resumeAt})"))
{
if (postYesDoneLabel != originalDoneLabel)
{
CaseGoto("case 0:", postYesDoneLabel);
}
if (postNoDoneLabel != originalDoneLabel)
{
CaseGoto("case 1:", postNoDoneLabel);
}
CaseGoto("default:", originalDoneLabel);
}
MarkLabel(endConditional, emitSemicolon: false);
EmitStackPush(resumeAt);
}
}
// Emits the code for a Capture node.
void EmitCapture(RegexNode node, RegexNode? subsequent = null)
{
Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
int capnum = RegexParser.MapCaptureNumber(node.M, rm.Tree.CaptureNumberSparseMapping);
int uncapnum = RegexParser.MapCaptureNumber(node.N, rm.Tree.CaptureNumberSparseMapping);
bool isAtomic = analysis.IsAtomicByAncestor(node);
TransferSliceStaticPosToPos();
string startingPos = ReserveName("capture_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
writer.WriteLine();
RegexNode child = node.Child(0);
if (uncapnum != -1)
{
using (EmitBlock(writer, $"if (!base.IsMatched({uncapnum}))"))
{
Goto(doneLabel);
}
writer.WriteLine();
}
// Emit child node.
string originalDoneLabel = doneLabel;
EmitNode(child, subsequent);
bool childBacktracks = doneLabel != originalDoneLabel;
writer.WriteLine();
TransferSliceStaticPosToPos();
if (uncapnum == -1)
{
writer.WriteLine($"base.Capture({capnum}, {startingPos}, pos);");
}
else
{
writer.WriteLine($"base.TransferCapture({capnum}, {uncapnum}, {startingPos}, pos);");
}
if (isAtomic || !childBacktracks)
{
// If the capture is atomic and nothing can backtrack into it, we're done.
// Similarly, even if the capture isn't atomic, if the captured expression
// doesn't do any backtracking, we're done.
doneLabel = originalDoneLabel;
}
else
{
// We're not atomic and the child node backtracks. When it does, we need
// to ensure that the starting position for the capture is appropriately
// reset to what it was initially (it could have changed as part of being
// in a loop or similar). So, we emit a backtracking section that
// pushes/pops the starting position before falling through.
writer.WriteLine();
EmitStackPush(startingPos);
// Skip past the backtracking section
string end = ReserveName("SkipBacktrack");
Goto(end);
writer.WriteLine();
// Emit a backtracking section that restores the capture's state and then jumps to the previous done label
string backtrack = ReserveName($"CaptureBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
EmitStackPop(startingPos);
Goto(doneLabel);
writer.WriteLine();
doneLabel = backtrack;
MarkLabel(end);
}
}
// Emits the code to handle a positive lookaround assertion. This is a positive lookahead
// for left-to-right and a positive lookbehind for right-to-left.
void EmitPositiveLookaroundAssertion(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.PositiveLookaround, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
if (analysis.HasRightToLeft)
{
// Lookarounds are the only places in the node tree where we might change direction,
// i.e. where we might go from RegexOptions.None to RegexOptions.RightToLeft, or vice
// versa. This is because lookbehinds are implemented by making the whole subgraph be
// RegexOptions.RightToLeft and reversed. Since we use static position to optimize left-to-right
// and don't use it in support of right-to-left, we need to resync the static position
// to the current position when entering a lookaround, just in case we're changing direction.
TransferSliceStaticPosToPos(forceSliceReload: true);
}
// Save off pos. We'll need to reset this upon successful completion of the lookaround.
string startingPos = ReserveName("positivelookaround_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
writer.WriteLine();
int startingSliceStaticPos = sliceStaticPos;
// Emit the child.
RegexNode child = node.Child(0);
if (analysis.MayBacktrack(child))
{
// Lookarounds are implicitly atomic, so we need to emit the node as atomic if it might backtrack.
EmitAtomic(node, null);
}
else
{
EmitNode(child);
}
// After the child completes successfully, reset the text positions.
// Do not reset captures, which persist beyond the lookaround.
writer.WriteLine();
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
}
// Emits the code to handle a negative lookaround assertion. This is a negative lookahead
// for left-to-right and a negative lookbehind for right-to-left.
void EmitNegativeLookaroundAssertion(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
if (analysis.HasRightToLeft)
{
// Lookarounds are the only places in the node tree where we might change direction,
// i.e. where we might go from RegexOptions.None to RegexOptions.RightToLeft, or vice
// versa. This is because lookbehinds are implemented by making the whole subgraph be
// RegexOptions.RightToLeft and reversed. Since we use static position to optimize left-to-right
// and don't use it in support of right-to-left, we need to resync the static position
// to the current position when entering a lookaround, just in case we're changing direction.
TransferSliceStaticPosToPos(forceSliceReload: true);
}
string originalDoneLabel = doneLabel;
// Save off pos. We'll need to reset this upon successful completion of the lookaround.
string startingPos = ReserveName("negativelookaround_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
int startingSliceStaticPos = sliceStaticPos;
string negativeLookaroundDoneLabel = ReserveName("NegativeLookaroundMatch");
doneLabel = negativeLookaroundDoneLabel;
// Emit the child.
RegexNode child = node.Child(0);
if (analysis.MayBacktrack(child))
{
// Lookarounds are implicitly atomic, so we need to emit the node as atomic if it might backtrack.
EmitAtomic(node, null);
}
else
{
EmitNode(child);
}
// If the generated code ends up here, it matched the lookaround, which actually
// means failure for a _negative_ lookaround, so we need to jump to the original done.
writer.WriteLine();
Goto(originalDoneLabel);
writer.WriteLine();
// Failures (success for a negative lookaround) jump here.
MarkLabel(negativeLookaroundDoneLabel, emitSemicolon: false);
// After the child completes in failure (success for negative lookaround), reset the text positions.
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
doneLabel = originalDoneLabel;
}
// Emits the code for the node.
void EmitNode(RegexNode node, RegexNode? subsequent = null, bool emitLengthChecksIfRequired = true)
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
StackHelper.CallOnEmptyStack(EmitNode, node, subsequent, emitLengthChecksIfRequired);
return;
}
if ((node.Options & RegexOptions.RightToLeft) != 0)
{
// RightToLeft doesn't take advantage of static positions. While RightToLeft won't update static
// positions, a previous operation may have left us with a non-zero one. Make sure it's zero'd out
// such that pos and slice are up-to-date. Note that RightToLeft also shouldn't use the slice span,
// as it's not kept up-to-date; any RightToLeft implementation that wants to use it must first update
// it from pos.
TransferSliceStaticPosToPos();
}
// Separate out several node types that, for conciseness, don't need a header nor scope written into the source.
// Effectively these either evaporate, are completely self-explanatory, or only exist for their children to be rendered.
switch (node.Kind)
{
// Nothing is written for an empty.
case RegexNodeKind.Empty:
return;
// A single-line goto for a failure doesn't need a scope or comment.
case RegexNodeKind.Nothing:
Goto(doneLabel);
return;
// Skip atomic nodes that wrap non-backtracking children; in such a case there's nothing to be made atomic.
case RegexNodeKind.Atomic when !analysis.MayBacktrack(node.Child(0)):
EmitNode(node.Child(0));
return;
// Concatenate is a simplification in the node tree so that a series of children can be represented as one.
// We don't need its presence visible in the source.
case RegexNodeKind.Concatenate:
EmitConcatenation(node, subsequent, emitLengthChecksIfRequired);
return;
}
// For everything else, output a comment about what the node is.
writer.WriteLine($"// {DescribeNode(node, analysis)}");
// Separate out several node types that, for conciseness, don't need a scope written into the source as they're
// always a single statement / block.
switch (node.Kind)
{
case RegexNodeKind.Beginning:
case RegexNodeKind.Start:
case RegexNodeKind.Bol:
case RegexNodeKind.Eol:
case RegexNodeKind.End:
case RegexNodeKind.EndZ:
EmitAnchors(node);
return;
case RegexNodeKind.Boundary:
case RegexNodeKind.NonBoundary:
case RegexNodeKind.ECMABoundary:
case RegexNodeKind.NonECMABoundary:
EmitBoundary(node);
return;
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
EmitSingleChar(node, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Multi when !IsCaseInsensitive(node) && (node.Options & RegexOptions.RightToLeft) == 0:
EmitMultiChar(node, emitLengthChecksIfRequired);
return;
case RegexNodeKind.UpdateBumpalong:
EmitUpdateBumpalong(node);
return;
}
// For everything else, put the node's code into its own scope, purely for readability. If the node contains labels
// that may need to be visible outside of its scope, the scope is still emitted for clarity but is commented out.
using (EmitScope(writer, null, faux: analysis.MayBacktrack(node)))
{
switch (node.Kind)
{
case RegexNodeKind.Multi:
EmitMultiChar(node, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Oneloop:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Setloop:
EmitSingleCharLoop(node, subsequent, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Setlazy:
EmitSingleCharLazy(node, subsequent, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Setloopatomic:
EmitSingleCharAtomicLoop(node, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Loop:
EmitLoop(node);
return;
case RegexNodeKind.Lazyloop:
EmitLazy(node);
return;
case RegexNodeKind.Alternate:
EmitAlternation(node);
return;
case RegexNodeKind.Backreference:
EmitBackreference(node);
return;
case RegexNodeKind.BackreferenceConditional:
EmitBackreferenceConditional(node);
return;
case RegexNodeKind.ExpressionConditional:
EmitExpressionConditional(node);
return;
case RegexNodeKind.Atomic:
Debug.Assert(analysis.MayBacktrack(node.Child(0)));
EmitAtomic(node, subsequent);
return;
case RegexNodeKind.Capture:
EmitCapture(node, subsequent);
return;
case RegexNodeKind.PositiveLookaround:
EmitPositiveLookaroundAssertion(node);
return;
case RegexNodeKind.NegativeLookaround:
EmitNegativeLookaroundAssertion(node);
return;
}
}
// All nodes should have been handled.
Debug.Fail($"Unexpected node type: {node.Kind}");
}
// Emits the node for an atomic.
void EmitAtomic(RegexNode node, RegexNode? subsequent)
{
Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
Debug.Assert(analysis.MayBacktrack(node.Child(0)), "Expected child to potentially backtrack");
// Grab the current done label and the current backtracking position. The purpose of the atomic node
// is to ensure that nodes after it that might backtrack skip over the atomic, which means after
// rendering the atomic's child, we need to reset the label so that subsequent backtracking doesn't
// see any label left set by the atomic's child. We also need to reset the backtracking stack position
// so that the state on the stack remains consistent.
string originalDoneLabel = doneLabel;
additionalDeclarations.Add("int stackpos = 0;");
string startingStackpos = ReserveName("atomic_stackpos");
writer.WriteLine($"int {startingStackpos} = stackpos;");
writer.WriteLine();
// Emit the child.
EmitNode(node.Child(0), subsequent);
writer.WriteLine();
// Reset the stack position and done label.
writer.WriteLine($"stackpos = {startingStackpos};");
doneLabel = originalDoneLabel;
}
// Emits the code to handle updating base.runtextpos to pos in response to
// an UpdateBumpalong node. This is used when we want to inform the scan loop that
// it should bump from this location rather than from the original location.
void EmitUpdateBumpalong(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.UpdateBumpalong, $"Unexpected type: {node.Kind}");
TransferSliceStaticPosToPos();
using (EmitBlock(writer, "if (base.runtextpos < pos)"))
{
writer.WriteLine("base.runtextpos = pos;");
}
}
// Emits code for a concatenation
void EmitConcatenation(RegexNode node, RegexNode? subsequent, bool emitLengthChecksIfRequired)
{
Debug.Assert(node.Kind is RegexNodeKind.Concatenate, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
// Emit the code for each child one after the other.
string? prevDescription = null;
int childCount = node.ChildCount();
for (int i = 0; i < childCount; i++)
{
// If we can find a subsequence of fixed-length children, we can emit a length check once for that sequence
// and then skip the individual length checks for each. We can also discover case-insensitive sequences that
// can be checked efficiently with methods like StartsWith. We also want to minimize the repetition of if blocks,
// and so we try to emit a series of clauses all part of the same if block rather than one if block per child.
if ((node.Options & RegexOptions.RightToLeft) == 0 &&
emitLengthChecksIfRequired &&
node.TryGetJoinableLengthCheckChildRange(i, out int requiredLength, out int exclusiveEnd))
{
bool wroteClauses = true;
writer.Write($"if ({SpanLengthCheck(requiredLength)}");
while (i < exclusiveEnd)
{
for (; i < exclusiveEnd; i++)
{
void WritePrefix()
{
if (wroteClauses)
{
writer.WriteLine(prevDescription is not null ? $" || // {prevDescription}" : " ||");
writer.Write(" ");
}
else
{
writer.Write("if (");
}
}
RegexNode child = node.Child(i);
if (node.TryGetOrdinalCaseInsensitiveString(i, exclusiveEnd, out int nodesConsumed, out string? caseInsensitiveString))
{
WritePrefix();
string sourceSpan = sliceStaticPos > 0 ? $"{sliceSpan}.Slice({sliceStaticPos})" : sliceSpan;
writer.Write($"!global::System.MemoryExtensions.StartsWith({sourceSpan}, {Literal(caseInsensitiveString)}, global::System.StringComparison.OrdinalIgnoreCase)");
prevDescription = $"Match the string {Literal(caseInsensitiveString)} (ordinal case-insensitive)";
wroteClauses = true;
sliceStaticPos += caseInsensitiveString.Length;
i += nodesConsumed - 1;
}
else if (child.Kind is RegexNodeKind.Multi && !IsCaseInsensitive(child))
{
WritePrefix();
EmitMultiCharString(child.Str!, caseInsensitive: false, emitLengthCheck: false, clauseOnly: true, rightToLeft: false);
prevDescription = DescribeNode(child, analysis);
wroteClauses = true;
}
else if ((child.IsOneFamily || child.IsNotoneFamily || child.IsSetFamily) &&
child.M == child.N &&
child.M <= MaxUnrollSize)
{
int repeatCount = child.Kind is RegexNodeKind.One or RegexNodeKind.Notone or RegexNodeKind.Set ? 1 : child.M;
for (int c = 0; c < repeatCount; c++)
{
WritePrefix();
EmitSingleChar(child, emitLengthCheck: false, clauseOnly: true);
prevDescription = c == 0 ? DescribeNode(child, analysis) : null;
wroteClauses = true;
}
}
else break;
}
if (wroteClauses)
{
writer.WriteLine(prevDescription is not null ? $") // {prevDescription}" : ")");
using (EmitBlock(writer, null))
{
Goto(doneLabel);
}
if (i < childCount)
{
writer.WriteLine();
}
wroteClauses = false;
prevDescription = null;
}
if (i < exclusiveEnd)
{
EmitNode(node.Child(i), GetSubsequentOrDefault(i, node, subsequent), emitLengthChecksIfRequired: false);
if (i < childCount - 1)
{
writer.WriteLine();
}
i++;
}
}
i--;
continue;
}
EmitNode(node.Child(i), GetSubsequentOrDefault(i, node, subsequent), emitLengthChecksIfRequired: emitLengthChecksIfRequired);
if (i < childCount - 1)
{
writer.WriteLine();
}
}
// Gets the node to treat as the subsequent one to node.Child(index)
static RegexNode? GetSubsequentOrDefault(int index, RegexNode node, RegexNode? defaultNode)
{
int childCount = node.ChildCount();
for (int i = index + 1; i < childCount; i++)
{
RegexNode next = node.Child(i);
if (next.Kind is not RegexNodeKind.UpdateBumpalong) // skip node types that don't have a semantic impact
{
return next;
}
}
return defaultNode;
}
}
// Emits the code to handle a single-character match.
void EmitSingleChar(RegexNode node, bool emitLengthCheck = true, string? offset = null, bool clauseOnly = false)
{
Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
Debug.Assert(!rtl || offset is null);
Debug.Assert(!rtl || !clauseOnly);
string expr = !rtl ?
$"{sliceSpan}[{Sum(sliceStaticPos, offset)}]" :
"inputSpan[pos - 1]";
if (node.IsSetFamily)
{
expr = $"{MatchCharacterClass(hasTextInfo, options, expr, node.Str!, IsCaseInsensitive(node), negate: true, additionalDeclarations, ref requiredHelpers)}";
}
else
{
expr = ToLowerIfNeeded(hasTextInfo, options, expr, IsCaseInsensitive(node));
expr = $"{expr} {(node.IsOneFamily ? "!=" : "==")} {Literal(node.Ch)}";
}
if (clauseOnly)
{
writer.Write(expr);
}
else
{
string clause =
!emitLengthCheck ? $"if ({expr})" :
!rtl ? $"if ({SpanLengthCheck(1, offset)} || {expr})" :
$"if ((uint)(pos - 1) >= inputSpan.Length || {expr})";
using (EmitBlock(writer, clause))
{
Goto(doneLabel);
}
}
if (!rtl)
{
sliceStaticPos++;
}
else
{
writer.WriteLine("pos--;");
}
}
// Emits the code to handle a boundary check on a character.
void EmitBoundary(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary or RegexNodeKind.ECMABoundary or RegexNodeKind.NonECMABoundary, $"Unexpected type: {node.Kind}");
string call = node.Kind switch
{
RegexNodeKind.Boundary => "!IsBoundary",
RegexNodeKind.NonBoundary => "IsBoundary",
RegexNodeKind.ECMABoundary => "!IsECMABoundary",
_ => "IsECMABoundary",
};
RequiredHelperFunctions boundaryFunctionRequired = node.Kind switch
{
RegexNodeKind.Boundary or
RegexNodeKind.NonBoundary => RequiredHelperFunctions.IsBoundary | RequiredHelperFunctions.IsWordChar, // IsBoundary internally uses IsWordChar
_ => RequiredHelperFunctions.IsECMABoundary
};
requiredHelpers |= boundaryFunctionRequired;
using (EmitBlock(writer, $"if ({call}(inputSpan, pos{(sliceStaticPos > 0 ? $" + {sliceStaticPos}" : "")}))"))
{
Goto(doneLabel);
}
}
// Emits the code to handle various anchors.
void EmitAnchors(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Beginning or RegexNodeKind.Start or RegexNodeKind.Bol or RegexNodeKind.End or RegexNodeKind.EndZ or RegexNodeKind.Eol, $"Unexpected type: {node.Kind}");
Debug.Assert((node.Options & RegexOptions.RightToLeft) == 0 || sliceStaticPos == 0);
Debug.Assert(sliceStaticPos >= 0);
switch (node.Kind)
{
case RegexNodeKind.Beginning:
case RegexNodeKind.Start:
if (sliceStaticPos > 0)
{
// If we statically know we've already matched part of the regex, there's no way we're at the
// beginning or start, as we've already progressed past it.
Goto(doneLabel);
}
else
{
using (EmitBlock(writer, node.Kind == RegexNodeKind.Beginning ?
"if (pos != 0)" :
"if (pos != base.runtextstart)"))
{
Goto(doneLabel);
}
}
break;
case RegexNodeKind.Bol:
using (EmitBlock(writer, sliceStaticPos > 0 ?
$"if ({sliceSpan}[{sliceStaticPos - 1}] != '\\n')" :
$"if (pos > 0 && inputSpan[pos - 1] != '\\n')"))
{
Goto(doneLabel);
}
break;
case RegexNodeKind.End:
using (EmitBlock(writer, sliceStaticPos > 0 ?
$"if ({sliceStaticPos} < {sliceSpan}.Length)" :
"if ((uint)pos < (uint)inputSpan.Length)"))
{
Goto(doneLabel);
}
break;
case RegexNodeKind.EndZ:
using (EmitBlock(writer, sliceStaticPos > 0 ?
$"if ({sliceStaticPos + 1} < {sliceSpan}.Length || ({sliceStaticPos} < {sliceSpan}.Length && {sliceSpan}[{sliceStaticPos}] != '\\n'))" :
"if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\\n'))"))
{
Goto(doneLabel);
}
break;
case RegexNodeKind.Eol:
using (EmitBlock(writer, sliceStaticPos > 0 ?
$"if ({sliceStaticPos} < {sliceSpan}.Length && {sliceSpan}[{sliceStaticPos}] != '\\n')" :
"if ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\\n')"))
{
Goto(doneLabel);
}
break;
}
}
// Emits the code to handle a multiple-character match.
void EmitMultiChar(RegexNode node, bool emitLengthCheck)
{
Debug.Assert(node.Kind is RegexNodeKind.Multi, $"Unexpected type: {node.Kind}");
Debug.Assert(node.Str is not null);
EmitMultiCharString(node.Str, IsCaseInsensitive(node), emitLengthCheck, clauseOnly: false, (node.Options & RegexOptions.RightToLeft) != 0);
}
void EmitMultiCharString(string str, bool caseInsensitive, bool emitLengthCheck, bool clauseOnly, bool rightToLeft)
{
Debug.Assert(str.Length >= 2);
Debug.Assert(!clauseOnly || (!emitLengthCheck && !caseInsensitive && !rightToLeft));
if (rightToLeft)
{
Debug.Assert(emitLengthCheck);
using (EmitBlock(writer, $"if ((uint)(pos - {str.Length}) >= inputSpan.Length)"))
{
Goto(doneLabel);
}
writer.WriteLine();
using (EmitBlock(writer, $"for (int i = 0; i < {str.Length}; i++)"))
{
using (EmitBlock(writer, $"if ({ToLowerIfNeeded(hasTextInfo, options, "inputSpan[--pos]", caseInsensitive)} != {Literal(str)}[{str.Length - 1} - i])"))
{
Goto(doneLabel);
}
}
return;
}
if (caseInsensitive) // StartsWith(..., XxIgnoreCase) won't necessarily be the same as char-by-char comparison
{
// This case should be relatively rare. It will only occur with IgnoreCase and a series of non-ASCII characters.
if (emitLengthCheck)
{
EmitSpanLengthCheck(str.Length);
}
using (EmitBlock(writer, $"for (int i = 0; i < {Literal(str)}.Length; i++)"))
{
string textSpanIndex = sliceStaticPos > 0 ? $"i + {sliceStaticPos}" : "i";
using (EmitBlock(writer, $"if ({ToLower(hasTextInfo, options, $"{sliceSpan}[{textSpanIndex}]")} != {Literal(str)}[i])"))
{
Goto(doneLabel);
}
}
}
else
{
string sourceSpan = sliceStaticPos > 0 ? $"{sliceSpan}.Slice({sliceStaticPos})" : sliceSpan;
string clause = $"!global::System.MemoryExtensions.StartsWith({sourceSpan}, {Literal(str)})";
if (clauseOnly)
{
writer.Write(clause);
}
else
{
using (EmitBlock(writer, $"if ({clause})"))
{
Goto(doneLabel);
}
}
}
sliceStaticPos += str.Length;
}
void EmitSingleCharLoop(RegexNode node, RegexNode? subsequent = null, bool emitLengthChecksIfRequired = true)
{
Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop, $"Unexpected type: {node.Kind}");
// If this is actually atomic based on its parent, emit it as atomic instead; no backtracking necessary.
if (analysis.IsAtomicByAncestor(node))
{
EmitSingleCharAtomicLoop(node);
return;
}
// If this is actually a repeater, emit that instead; no backtracking necessary.
if (node.M == node.N)
{
EmitSingleCharRepeater(node, emitLengthChecksIfRequired);
return;
}
// Emit backtracking around an atomic single char loop. We can then implement the backtracking
// as an afterthought, since we know exactly how many characters are accepted by each iteration
// of the wrapped loop (1) and that there's nothing captured by the loop.
Debug.Assert(node.M < node.N);
string backtrackingLabel = ReserveName("CharLoopBacktrack");
string endLoop = ReserveName("CharLoopEnd");
string startingPos = ReserveName("charloop_starting_pos");
string endingPos = ReserveName("charloop_ending_pos");
additionalDeclarations.Add($"int {startingPos} = 0, {endingPos} = 0;");
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
// We're about to enter a loop, so ensure our text position is 0.
TransferSliceStaticPosToPos();
// Grab the current position, then emit the loop as atomic, and then
// grab the current position again. Even though we emit the loop without
// knowledge of backtracking, we can layer it on top by just walking back
// through the individual characters (a benefit of the loop matching exactly
// one character per iteration, no possible captures within the loop, etc.)
writer.WriteLine($"{startingPos} = pos;");
writer.WriteLine();
EmitSingleCharAtomicLoop(node);
writer.WriteLine();
TransferSliceStaticPosToPos();
writer.WriteLine($"{endingPos} = pos;");
EmitAdd(writer, startingPos, !rtl ? node.M : -node.M);
Goto(endLoop);
writer.WriteLine();
// Backtracking section. Subsequent failures will jump to here, at which
// point we decrement the matched count as long as it's above the minimum
// required, and try again by flowing to everything that comes after this.
MarkLabel(backtrackingLabel, emitSemicolon: false);
if (expressionHasCaptures)
{
EmitUncaptureUntil(StackPop());
}
EmitStackPop(endingPos, startingPos);
writer.WriteLine();
if (!rtl && subsequent?.FindStartingLiteral() is ValueTuple<char, string?, string?> literal)
{
writer.WriteLine($"if ({startingPos} >= {endingPos} ||");
using (EmitBlock(writer,
literal.Item2 is not null ? $" ({endingPos} = global::System.MemoryExtensions.LastIndexOf(inputSpan.Slice({startingPos}, global::System.Math.Min(inputSpan.Length, {endingPos} + {literal.Item2.Length - 1}) - {startingPos}), {Literal(literal.Item2)})) < 0)" :
literal.Item3 is null ? $" ({endingPos} = global::System.MemoryExtensions.LastIndexOf(inputSpan.Slice({startingPos}, {endingPos} - {startingPos}), {Literal(literal.Item1)})) < 0)" :
literal.Item3.Length switch
{
2 => $" ({endingPos} = global::System.MemoryExtensions.LastIndexOfAny(inputSpan.Slice({startingPos}, {endingPos} - {startingPos}), {Literal(literal.Item3[0])}, {Literal(literal.Item3[1])})) < 0)",
3 => $" ({endingPos} = global::System.MemoryExtensions.LastIndexOfAny(inputSpan.Slice({startingPos}, {endingPos} - {startingPos}), {Literal(literal.Item3[0])}, {Literal(literal.Item3[1])}, {Literal(literal.Item3[2])})) < 0)",
_ => $" ({endingPos} = global::System.MemoryExtensions.LastIndexOfAny(inputSpan.Slice({startingPos}, {endingPos} - {startingPos}), {Literal(literal.Item3)})) < 0)",
}))
{
Goto(doneLabel);
}
writer.WriteLine($"{endingPos} += {startingPos};");
writer.WriteLine($"pos = {endingPos};");
}
else
{
using (EmitBlock(writer, $"if ({startingPos} {(!rtl ? ">=" : "<=")} {endingPos})"))
{
Goto(doneLabel);
}
writer.WriteLine(!rtl ? $"pos = --{endingPos};" : $"pos = ++{endingPos};");
}
if (!rtl)
{
SliceInputSpan(writer);
}
writer.WriteLine();
MarkLabel(endLoop, emitSemicolon: false);
EmitStackPush(expressionHasCaptures ?
new[] { startingPos, endingPos, "base.Crawlpos()" } :
new[] { startingPos, endingPos });
doneLabel = backtrackingLabel; // leave set to the backtracking label for all subsequent nodes
}
void EmitSingleCharLazy(RegexNode node, RegexNode? subsequent = null, bool emitLengthChecksIfRequired = true)
{
Debug.Assert(node.Kind is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy, $"Unexpected type: {node.Kind}");
// Emit the min iterations as a repeater. Any failures here don't necessitate backtracking,
// as the lazy itself failed to match, and there's no backtracking possible by the individual
// characters/iterations themselves.
if (node.M > 0)
{
EmitSingleCharRepeater(node, emitLengthChecksIfRequired);
}
// If the whole thing was actually that repeater, we're done. Similarly, if this is actually an atomic
// lazy loop, nothing will ever backtrack into this node, so we never need to iterate more than the minimum.
if (node.M == node.N || analysis.IsAtomicByAncestor(node))
{
return;
}
if (node.M > 0)
{
// We emitted a repeater to handle the required iterations; add a newline after it.
writer.WriteLine();
}
Debug.Assert(node.M < node.N);
// We now need to match one character at a time, each time allowing the remainder of the expression
// to try to match, and only matching another character if the subsequent expression fails to match.
// We're about to enter a loop, so ensure our text position is 0.
TransferSliceStaticPosToPos();
// If the loop isn't unbounded, track the number of iterations and the max number to allow.
string? iterationCount = null;
string? maxIterations = null;
if (node.N != int.MaxValue)
{
maxIterations = $"{node.N - node.M}";
iterationCount = ReserveName("lazyloop_iteration");
writer.WriteLine($"int {iterationCount} = 0;");
}
// Track the current crawl position. Upon backtracking, we'll unwind any captures beyond this point.
string? capturePos = null;
if (expressionHasCaptures)
{
capturePos = ReserveName("lazyloop_capturepos");
additionalDeclarations.Add($"int {capturePos} = 0;");
}
// Track the current pos. Each time we backtrack, we'll reset to the stored position, which
// is also incremented each time we match another character in the loop.
string startingPos = ReserveName("lazyloop_pos");
additionalDeclarations.Add($"int {startingPos} = 0;");
writer.WriteLine($"{startingPos} = pos;");
// Skip the backtracking section for the initial subsequent matching. We've already matched the
// minimum number of iterations, which means we can successfully match with zero additional iterations.
string endLoopLabel = ReserveName("LazyLoopEnd");
Goto(endLoopLabel);
writer.WriteLine();
// Backtracking section. Subsequent failures will jump to here.
string backtrackingLabel = ReserveName("LazyLoopBacktrack");
MarkLabel(backtrackingLabel, emitSemicolon: false);
// Uncapture any captures if the expression has any. It's possible the captures it has
// are before this node, in which case this is wasted effort, but still functionally correct.
if (capturePos is not null)
{
EmitUncaptureUntil(capturePos);
}
// If there's a max number of iterations, see if we've exceeded the maximum number of characters
// to match. If we haven't, increment the iteration count.
if (maxIterations is not null)
{
using (EmitBlock(writer, $"if ({iterationCount} >= {maxIterations})"))
{
Goto(doneLabel);
}
writer.WriteLine($"{iterationCount}++;");
}
// Now match the next item in the lazy loop. We need to reset the pos to the position
// just after the last character in this loop was matched, and we need to store the resulting position
// for the next time we backtrack.
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
EmitSingleChar(node);
TransferSliceStaticPosToPos();
// Now that we've appropriately advanced by one character and are set for what comes after the loop,
// see if we can skip ahead more iterations by doing a search for a following literal.
if ((node.Options & RegexOptions.RightToLeft) == 0)
{
if (iterationCount is null &&
node.Kind is RegexNodeKind.Notonelazy &&
!IsCaseInsensitive(node) &&
subsequent?.FindStartingLiteral(4) is ValueTuple<char, string?, string?> literal && // 5 == max optimized by IndexOfAny, and we need to reserve 1 for node.Ch
(literal.Item3 is not null ? !literal.Item3.Contains(node.Ch) : (literal.Item2?[0] ?? literal.Item1) != node.Ch)) // no overlap between node.Ch and the start of the literal
{
// e.g. "<[^>]*?>"
// This lazy loop will consume all characters other than node.Ch until the subsequent literal.
// We can implement it to search for either that char or the literal, whichever comes first.
// If it ends up being that node.Ch, the loop fails (we're only here if we're backtracking).
writer.WriteLine(
literal.Item2 is not null ? $"{startingPos} = global::System.MemoryExtensions.IndexOfAny({sliceSpan}, {Literal(node.Ch)}, {Literal(literal.Item2[0])});" :
literal.Item3 is null ? $"{startingPos} = global::System.MemoryExtensions.IndexOfAny({sliceSpan}, {Literal(node.Ch)}, {Literal(literal.Item1)});" :
literal.Item3.Length switch
{
2 => $"{startingPos} = global::System.MemoryExtensions.IndexOfAny({sliceSpan}, {Literal(node.Ch)}, {Literal(literal.Item3[0])}, {Literal(literal.Item3[1])});",
_ => $"{startingPos} = global::System.MemoryExtensions.IndexOfAny({sliceSpan}, {Literal(node.Ch + literal.Item3)});",
});
using (EmitBlock(writer, $"if ((uint){startingPos} >= (uint){sliceSpan}.Length || {sliceSpan}[{startingPos}] == {Literal(node.Ch)})"))
{
Goto(doneLabel);
}
writer.WriteLine($"pos += {startingPos};");
SliceInputSpan(writer);
}
else if (iterationCount is null &&
node.Kind is RegexNodeKind.Setlazy &&
node.Str == RegexCharClass.AnyClass &&
subsequent?.FindStartingLiteral() is ValueTuple<char, string?, string?> literal2)
{
// e.g. ".*?string" with RegexOptions.Singleline
// This lazy loop will consume all characters until the subsequent literal. If the subsequent literal
// isn't found, the loop fails. We can implement it to just search for that literal.
writer.WriteLine(
literal2.Item2 is not null ? $"{startingPos} = global::System.MemoryExtensions.IndexOf({sliceSpan}, {Literal(literal2.Item2)});" :
literal2.Item3 is null ? $"{startingPos} = global::System.MemoryExtensions.IndexOf({sliceSpan}, {Literal(literal2.Item1)});" :
literal2.Item3.Length switch
{
2 => $"{startingPos} = global::System.MemoryExtensions.IndexOfAny({sliceSpan}, {Literal(literal2.Item3[0])}, {Literal(literal2.Item3[1])});",
3 => $"{startingPos} = global::System.MemoryExtensions.IndexOfAny({sliceSpan}, {Literal(literal2.Item3[0])}, {Literal(literal2.Item3[1])}, {Literal(literal2.Item3[2])});",
_ => $"{startingPos} = global::System.MemoryExtensions.IndexOfAny({sliceSpan}, {Literal(literal2.Item3)});",
});
using (EmitBlock(writer, $"if ({startingPos} < 0)"))
{
Goto(doneLabel);
}
writer.WriteLine($"pos += {startingPos};");
SliceInputSpan(writer);
}
}
// Store the position we've left off at in case we need to iterate again.
writer.WriteLine($"{startingPos} = pos;");
// Update the done label for everything that comes after this node. This is done after we emit the single char
// matching, as that failing indicates the loop itself has failed to match.
string originalDoneLabel = doneLabel;
doneLabel = backtrackingLabel; // leave set to the backtracking label for all subsequent nodes
writer.WriteLine();
MarkLabel(endLoopLabel);
if (capturePos is not null)
{
writer.WriteLine($"{capturePos} = base.Crawlpos();");
}
if (node.IsInLoop())
{
writer.WriteLine();
// Store the loop's state
var toPushPop = new List<string>(3) { startingPos };
if (capturePos is not null)
{
toPushPop.Add(capturePos);
}
if (iterationCount is not null)
{
toPushPop.Add(iterationCount);
}
string[] toPushPopArray = toPushPop.ToArray();
EmitStackPush(toPushPopArray);
// Skip past the backtracking section
string end = ReserveName("SkipBacktrack");
Goto(end);
writer.WriteLine();
// Emit a backtracking section that restores the loop's state and then jumps to the previous done label
string backtrack = ReserveName("CharLazyBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
Array.Reverse(toPushPopArray);
EmitStackPop(toPushPopArray);
Goto(doneLabel);
writer.WriteLine();
doneLabel = backtrack;
MarkLabel(end);
}
}
void EmitLazy(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
int minIterations = node.M;
int maxIterations = node.N;
string originalDoneLabel = doneLabel;
bool isAtomic = analysis.IsAtomicByAncestor(node);
// If this is actually an atomic lazy loop, we need to output just the minimum number of iterations,
// as nothing will backtrack into the lazy loop to get it progress further.
if (isAtomic)
{
switch (minIterations)
{
case 0:
// Atomic lazy with a min count of 0: nop.
return;
case 1:
// Atomic lazy with a min count of 1: just output the child, no looping required.
EmitNode(node.Child(0));
return;
}
writer.WriteLine();
}
// If this is actually a repeater and the child doesn't have any backtracking in it that might
// cause us to need to unwind already taken iterations, just output it as a repeater loop.
if (minIterations == maxIterations && !analysis.MayBacktrack(node.Child(0)))
{
EmitNonBacktrackingRepeater(node);
return;
}
// We might loop any number of times. In order to ensure this loop and subsequent code sees sliceStaticPos
// the same regardless, we always need it to contain the same value, and the easiest such value is 0.
// So, we transfer sliceStaticPos to pos, and ensure that any path out of here has sliceStaticPos as 0.
TransferSliceStaticPosToPos();
string startingPos = ReserveName("lazyloop_starting_pos");
string iterationCount = ReserveName("lazyloop_iteration");
string sawEmpty = ReserveName("lazyLoopEmptySeen");
string body = ReserveName("LazyLoopBody");
string endLoop = ReserveName("LazyLoopEnd");
writer.WriteLine($"int {iterationCount} = 0, {startingPos} = pos, {sawEmpty} = 0;");
// If the min count is 0, start out by jumping right to what's after the loop. Backtracking
// will then bring us back in to do further iterations.
if (minIterations == 0)
{
Goto(endLoop);
}
writer.WriteLine();
// Iteration body
MarkLabel(body, emitSemicolon: false);
EmitTimeoutCheck(writer, hasTimeout);
// We need to store the starting pos and crawl position so that it may
// be backtracked through later. This needs to be the starting position from
// the iteration we're leaving, so it's pushed before updating it to pos.
EmitStackPush(expressionHasCaptures ?
new[] { "base.Crawlpos()", startingPos, "pos", sawEmpty } :
new[] { startingPos, "pos", sawEmpty });
writer.WriteLine();
// Save off some state. We need to store the current pos so we can compare it against
// pos after the iteration, in order to determine whether the iteration was empty. Empty
// iterations are allowed as part of min matches, but once we've met the min quote, empty matches
// are considered match failures.
writer.WriteLine($"{startingPos} = pos;");
// Proactively increase the number of iterations. We do this prior to the match rather than once
// we know it's successful, because we need to decrement it as part of a failed match when
// backtracking; it's thus simpler to just always decrement it as part of a failed match, even
// when initially greedily matching the loop, which then requires we increment it before trying.
writer.WriteLine($"{iterationCount}++;");
// Last but not least, we need to set the doneLabel that a failed match of the body will jump to.
// Such an iteration match failure may or may not fail the whole operation, depending on whether
// we've already matched the minimum required iterations, so we need to jump to a location that
// will make that determination.
string iterationFailedLabel = ReserveName("LazyLoopIterationNoMatch");
doneLabel = iterationFailedLabel;
// Finally, emit the child.
Debug.Assert(sliceStaticPos == 0);
EmitNode(node.Child(0));
writer.WriteLine();
TransferSliceStaticPosToPos(); // ensure sliceStaticPos remains 0
if (doneLabel == iterationFailedLabel)
{
doneLabel = originalDoneLabel;
}
// Loop condition. Continue iterating if we've not yet reached the minimum.
if (minIterations > 0)
{
using (EmitBlock(writer, $"if ({CountIsLessThan(iterationCount, minIterations)})"))
{
Goto(body);
}
}
// If the last iteration was empty, we need to prevent further iteration from this point
// unless we backtrack out of this iteration. We can do that easily just by pretending
// we reached the max iteration count.
using (EmitBlock(writer, $"if (pos == {startingPos})"))
{
writer.WriteLine($"{sawEmpty} = 1;");
}
// We matched the next iteration. Jump to the subsequent code.
Goto(endLoop);
writer.WriteLine();
// Now handle what happens when an iteration fails. We need to reset state to what it was before just that iteration
// started. That includes resetting pos and clearing out any captures from that iteration.
MarkLabel(iterationFailedLabel, emitSemicolon: false);
writer.WriteLine($"{iterationCount}--;");
using (EmitBlock(writer, $"if ({iterationCount} < 0)"))
{
Goto(originalDoneLabel);
}
EmitStackPop(sawEmpty, "pos", startingPos);
if (expressionHasCaptures)
{
EmitUncaptureUntil(StackPop());
}
SliceInputSpan(writer);
if (doneLabel == originalDoneLabel)
{
Goto(originalDoneLabel);
}
else
{
using (EmitBlock(writer, $"if ({iterationCount} == 0)"))
{
Goto(originalDoneLabel);
}
Goto(doneLabel);
}
writer.WriteLine();
MarkLabel(endLoop);
if (!isAtomic)
{
// Store the capture's state and skip the backtracking section
EmitStackPush(startingPos, iterationCount, sawEmpty);
string skipBacktrack = ReserveName("SkipBacktrack");
Goto(skipBacktrack);
writer.WriteLine();
// Emit a backtracking section that restores the capture's state and then jumps to the previous done label
string backtrack = ReserveName($"LazyLoopBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
EmitStackPop(sawEmpty, iterationCount, startingPos);
if (maxIterations == int.MaxValue)
{
using (EmitBlock(writer, $"if ({sawEmpty} == 0)"))
{
Goto(body);
}
}
else
{
using (EmitBlock(writer, $"if ({CountIsLessThan(iterationCount, maxIterations)} && {sawEmpty} == 0)"))
{
Goto(body);
}
}
Goto(doneLabel);
writer.WriteLine();
doneLabel = backtrack;
MarkLabel(skipBacktrack);
}
}
// Emits the code to handle a loop (repeater) with a fixed number of iterations.
// RegexNode.M is used for the number of iterations (RegexNode.N is ignored), as this
// might be used to implement the required iterations of other kinds of loops.
void EmitSingleCharRepeater(RegexNode node, bool emitLengthCheck = true)
{
Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
int iterations = node.M;
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
switch (iterations)
{
case 0:
// No iterations, nothing to do.
return;
case 1:
// Just match the individual item
EmitSingleChar(node, emitLengthCheck);
return;
case <= RegexNode.MultiVsRepeaterLimit when node.IsOneFamily && !IsCaseInsensitive(node):
// This is a repeated case-sensitive character; emit it as a multi in order to get all the optimizations
// afforded to a multi, e.g. unrolling the loop with multi-char reads/comparisons at a time.
EmitMultiCharString(new string(node.Ch, iterations), caseInsensitive: false, emitLengthCheck, clauseOnly: false, rtl);
return;
}
if (rtl)
{
TransferSliceStaticPosToPos(); // we don't use static position with rtl
using (EmitBlock(writer, $"for (int i = 0; i < {iterations}; i++)"))
{
EmitTimeoutCheck(writer, hasTimeout);
EmitSingleChar(node);
}
}
else if (iterations <= MaxUnrollSize)
{
// if ((uint)(sliceStaticPos + iterations - 1) >= (uint)slice.Length ||
// slice[sliceStaticPos] != c1 ||
// slice[sliceStaticPos + 1] != c2 ||
// ...)
// {
// goto doneLabel;
// }
writer.Write($"if (");
if (emitLengthCheck)
{
writer.WriteLine($"{SpanLengthCheck(iterations)} ||");
writer.Write(" ");
}
EmitSingleChar(node, emitLengthCheck: false, clauseOnly: true);
for (int i = 1; i < iterations; i++)
{
writer.WriteLine(" ||");
writer.Write(" ");
EmitSingleChar(node, emitLengthCheck: false, clauseOnly: true);
}
writer.WriteLine(")");
using (EmitBlock(writer, null))
{
Goto(doneLabel);
}
}
else
{
// if ((uint)(sliceStaticPos + iterations - 1) >= (uint)slice.Length) goto doneLabel;
if (emitLengthCheck)
{
EmitSpanLengthCheck(iterations);
}
string repeaterSpan = "repeaterSlice"; // As this repeater doesn't wrap arbitrary node emits, this shouldn't conflict with anything
writer.WriteLine($"global::System.ReadOnlySpan<char> {repeaterSpan} = {sliceSpan}.Slice({sliceStaticPos}, {iterations});");
using (EmitBlock(writer, $"for (int i = 0; i < {repeaterSpan}.Length; i++)"))
{
EmitTimeoutCheck(writer, hasTimeout);
string tmpTextSpanLocal = sliceSpan; // we want EmitSingleChar to refer to this temporary
int tmpSliceStaticPos = sliceStaticPos;
sliceSpan = repeaterSpan;
sliceStaticPos = 0;
EmitSingleChar(node, emitLengthCheck: false, offset: "i");
sliceSpan = tmpTextSpanLocal;
sliceStaticPos = tmpSliceStaticPos;
}
sliceStaticPos += iterations;
}
}
// Emits the code to handle a non-backtracking, variable-length loop around a single character comparison.
void EmitSingleCharAtomicLoop(RegexNode node, bool emitLengthChecksIfRequired = true)
{
Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}");
// If this is actually a repeater, emit that instead.
if (node.M == node.N)
{
EmitSingleCharRepeater(node, emitLengthChecksIfRequired);
return;
}
// If this is actually an optional single char, emit that instead.
if (node.M == 0 && node.N == 1)
{
EmitAtomicSingleCharZeroOrOne(node);
return;
}
Debug.Assert(node.N > node.M);
int minIterations = node.M;
int maxIterations = node.N;
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
Span<char> setChars = stackalloc char[5]; // 5 is max optimized by IndexOfAny today
int numSetChars = 0;
string iterationLocal = ReserveName("iteration");
if (rtl)
{
TransferSliceStaticPosToPos(); // we don't use static position for rtl
string expr = $"inputSpan[pos - {iterationLocal} - 1]";
if (node.IsSetFamily)
{
expr = MatchCharacterClass(hasTextInfo, options, expr, node.Str!, IsCaseInsensitive(node), negate: false, additionalDeclarations, ref requiredHelpers);
}
else
{
expr = ToLowerIfNeeded(hasTextInfo, options, expr, IsCaseInsensitive(node));
expr = $"{expr} {(node.IsOneFamily ? "==" : "!=")} {Literal(node.Ch)}";
}
writer.WriteLine($"int {iterationLocal} = 0;");
string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : "";
using (EmitBlock(writer, $"while ({maxClause}pos > {iterationLocal} && {expr})"))
{
EmitTimeoutCheck(writer, hasTimeout);
writer.WriteLine($"{iterationLocal}++;");
}
writer.WriteLine();
}
else if (node.IsNotoneFamily &&
maxIterations == int.MaxValue &&
(!IsCaseInsensitive(node)))
{
// For Notone, we're looking for a specific character, as everything until we find
// it is consumed by the loop. If we're unbounded, such as with ".*" and if we're case-sensitive,
// we can use the vectorized IndexOf to do the search, rather than open-coding it. The unbounded
// restriction is purely for simplicity; it could be removed in the future with additional code to
// handle the unbounded case.
writer.Write($"int {iterationLocal} = global::System.MemoryExtensions.IndexOf({sliceSpan}");
if (sliceStaticPos > 0)
{
writer.Write($".Slice({sliceStaticPos})");
}
writer.WriteLine($", {Literal(node.Ch)});");
using (EmitBlock(writer, $"if ({iterationLocal} < 0)"))
{
writer.WriteLine(sliceStaticPos > 0 ?
$"{iterationLocal} = {sliceSpan}.Length - {sliceStaticPos};" :
$"{iterationLocal} = {sliceSpan}.Length;");
}
writer.WriteLine();
}
else if (node.IsSetFamily &&
maxIterations == int.MaxValue &&
!IsCaseInsensitive(node) &&
(numSetChars = RegexCharClass.GetSetChars(node.Str!, setChars)) != 0 &&
RegexCharClass.IsNegated(node.Str!))
{
// If the set is negated and contains only a few characters (if it contained 1 and was negated, it should
// have been reduced to a Notone), we can use an IndexOfAny to find any of the target characters.
// As with the notoneloopatomic above, the unbounded constraint is purely for simplicity.
Debug.Assert(numSetChars > 1);
writer.Write($"int {iterationLocal} = global::System.MemoryExtensions.IndexOfAny({sliceSpan}");
if (sliceStaticPos != 0)
{
writer.Write($".Slice({sliceStaticPos})");
}
writer.WriteLine(numSetChars switch
{
2 => $", {Literal(setChars[0])}, {Literal(setChars[1])});",
3 => $", {Literal(setChars[0])}, {Literal(setChars[1])}, {Literal(setChars[2])});",
_ => $", {Literal(setChars.Slice(0, numSetChars).ToString())});",
});
using (EmitBlock(writer, $"if ({iterationLocal} < 0)"))
{
writer.WriteLine(sliceStaticPos > 0 ?
$"{iterationLocal} = {sliceSpan}.Length - {sliceStaticPos};" :
$"{iterationLocal} = {sliceSpan}.Length;");
}
writer.WriteLine();
}
else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass)
{
// .* was used with RegexOptions.Singleline, which means it'll consume everything. Just jump to the end.
// The unbounded constraint is the same as in the Notone case above, done purely for simplicity.
TransferSliceStaticPosToPos();
writer.WriteLine($"int {iterationLocal} = inputSpan.Length - pos;");
}
else
{
// For everything else, do a normal loop.
string expr = $"{sliceSpan}[{iterationLocal}]";
if (node.IsSetFamily)
{
expr = MatchCharacterClass(hasTextInfo, options, expr, node.Str!, IsCaseInsensitive(node), negate: false, additionalDeclarations, ref requiredHelpers);
}
else
{
expr = ToLowerIfNeeded(hasTextInfo, options, expr, IsCaseInsensitive(node));
expr = $"{expr} {(node.IsOneFamily ? "==" : "!=")} {Literal(node.Ch)}";
}
if (minIterations != 0 || maxIterations != int.MaxValue)
{
// For any loops other than * loops, transfer text pos to pos in
// order to zero it out to be able to use the single iteration variable
// for both iteration count and indexer.
TransferSliceStaticPosToPos();
}
writer.WriteLine($"int {iterationLocal} = {sliceStaticPos};");
sliceStaticPos = 0;
string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : "";
using (EmitBlock(writer, $"while ({maxClause}(uint){iterationLocal} < (uint){sliceSpan}.Length && {expr})"))
{
EmitTimeoutCheck(writer, hasTimeout);
writer.WriteLine($"{iterationLocal}++;");
}
writer.WriteLine();
}
// Check to ensure we've found at least min iterations.
if (minIterations > 0)
{
using (EmitBlock(writer, $"if ({CountIsLessThan(iterationLocal, minIterations)})"))
{
Goto(doneLabel);
}
writer.WriteLine();
}
// Now that we've completed our optional iterations, advance the text span
// and pos by the number of iterations completed.
if (!rtl)
{
writer.WriteLine($"{sliceSpan} = {sliceSpan}.Slice({iterationLocal});");
writer.WriteLine($"pos += {iterationLocal};");
}
else
{
writer.WriteLine($"pos -= {iterationLocal};");
}
}
// Emits the code to handle a non-backtracking optional zero-or-one loop.
void EmitAtomicSingleCharZeroOrOne(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}");
Debug.Assert(node.M == 0 && node.N == 1);
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
if (rtl)
{
TransferSliceStaticPosToPos(); // we don't use static pos for rtl
}
string expr = !rtl ?
$"{sliceSpan}[{sliceStaticPos}]" :
"inputSpan[pos - 1]";
if (node.IsSetFamily)
{
expr = MatchCharacterClass(hasTextInfo, options, expr, node.Str!, IsCaseInsensitive(node), negate: false, additionalDeclarations, ref requiredHelpers);
}
else
{
expr = ToLowerIfNeeded(hasTextInfo, options, expr, IsCaseInsensitive(node));
expr = $"{expr} {(node.IsOneFamily ? "==" : "!=")} {Literal(node.Ch)}";
}
string spaceAvailable =
rtl ? "pos > 0" :
sliceStaticPos != 0 ? $"(uint){sliceSpan}.Length > (uint){sliceStaticPos}" :
$"!{sliceSpan}.IsEmpty";
using (EmitBlock(writer, $"if ({spaceAvailable} && {expr})"))
{
if (!rtl)
{
writer.WriteLine($"{sliceSpan} = {sliceSpan}.Slice(1);");
writer.WriteLine($"pos++;");
}
else
{
writer.WriteLine($"pos--;");
}
}
}
void EmitNonBacktrackingRepeater(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
Debug.Assert(node.M == node.N, $"Unexpected M={node.M} == N={node.N}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
Debug.Assert(!analysis.MayBacktrack(node.Child(0)), $"Expected non-backtracking node {node.Kind}");
// Ensure every iteration of the loop sees a consistent value.
TransferSliceStaticPosToPos();
// Loop M==N times to match the child exactly that numbers of times.
string i = ReserveName("loop_iteration");
using (EmitBlock(writer, $"for (int {i} = 0; {i} < {node.M}; {i}++)"))
{
EmitNode(node.Child(0));
TransferSliceStaticPosToPos(); // make sure static the static position remains at 0 for subsequent constructs
}
}
void EmitLoop(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
int minIterations = node.M;
int maxIterations = node.N;
bool isAtomic = analysis.IsAtomicByAncestor(node);
// If this is actually a repeater and the child doesn't have any backtracking in it that might
// cause us to need to unwind already taken iterations, just output it as a repeater loop.
if (minIterations == maxIterations && !analysis.MayBacktrack(node.Child(0)))
{
EmitNonBacktrackingRepeater(node);
return;
}
// We might loop any number of times. In order to ensure this loop and subsequent code sees sliceStaticPos
// the same regardless, we always need it to contain the same value, and the easiest such value is 0.
// So, we transfer sliceStaticPos to pos, and ensure that any path out of here has sliceStaticPos as 0.
TransferSliceStaticPosToPos();
string originalDoneLabel = doneLabel;
string startingPos = ReserveName("loop_starting_pos");
string iterationCount = ReserveName("loop_iteration");
string body = ReserveName("LoopBody");
string endLoop = ReserveName("LoopEnd");
additionalDeclarations.Add($"int {iterationCount} = 0, {startingPos} = 0;");
writer.WriteLine($"{iterationCount} = 0;");
writer.WriteLine($"{startingPos} = pos;");
writer.WriteLine();
// Iteration body
MarkLabel(body, emitSemicolon: false);
EmitTimeoutCheck(writer, hasTimeout);
// We need to store the starting pos and crawl position so that it may
// be backtracked through later. This needs to be the starting position from
// the iteration we're leaving, so it's pushed before updating it to pos.
EmitStackPush(expressionHasCaptures ?
new[] { "base.Crawlpos()", startingPos, "pos" } :
new[] { startingPos, "pos" });
writer.WriteLine();
// Save off some state. We need to store the current pos so we can compare it against
// pos after the iteration, in order to determine whether the iteration was empty. Empty
// iterations are allowed as part of min matches, but once we've met the min quote, empty matches
// are considered match failures.
writer.WriteLine($"{startingPos} = pos;");
// Proactively increase the number of iterations. We do this prior to the match rather than once
// we know it's successful, because we need to decrement it as part of a failed match when
// backtracking; it's thus simpler to just always decrement it as part of a failed match, even
// when initially greedily matching the loop, which then requires we increment it before trying.
writer.WriteLine($"{iterationCount}++;");
writer.WriteLine();
// Last but not least, we need to set the doneLabel that a failed match of the body will jump to.
// Such an iteration match failure may or may not fail the whole operation, depending on whether
// we've already matched the minimum required iterations, so we need to jump to a location that
// will make that determination.
string iterationFailedLabel = ReserveName("LoopIterationNoMatch");
doneLabel = iterationFailedLabel;
// Finally, emit the child.
Debug.Assert(sliceStaticPos == 0);
EmitNode(node.Child(0));
writer.WriteLine();
TransferSliceStaticPosToPos(); // ensure sliceStaticPos remains 0
bool childBacktracks = doneLabel != iterationFailedLabel;
// Loop condition. Continue iterating greedily if we've not yet reached the maximum. We also need to stop
// iterating if the iteration matched empty and we already hit the minimum number of iterations.
using (EmitBlock(writer, (minIterations > 0, maxIterations == int.MaxValue) switch
{
(true, true) => $"if (pos != {startingPos} || {CountIsLessThan(iterationCount, minIterations)})",
(true, false) => $"if ((pos != {startingPos} || {CountIsLessThan(iterationCount, minIterations)}) && {CountIsLessThan(iterationCount, maxIterations)})",
(false, true) => $"if (pos != {startingPos})",
(false, false) => $"if (pos != {startingPos} && {CountIsLessThan(iterationCount, maxIterations)})",
}))
{
Goto(body);
}
// We've matched as many iterations as we can with this configuration. Jump to what comes after the loop.
Goto(endLoop);
writer.WriteLine();
// Now handle what happens when an iteration fails, which could be an initial failure or it
// could be while backtracking. We need to reset state to what it was before just that iteration
// started. That includes resetting pos and clearing out any captures from that iteration.
MarkLabel(iterationFailedLabel, emitSemicolon: false);
writer.WriteLine($"{iterationCount}--;");
using (EmitBlock(writer, $"if ({iterationCount} < 0)"))
{
Goto(originalDoneLabel);
}
EmitStackPop("pos", startingPos);
if (expressionHasCaptures)
{
EmitUncaptureUntil(StackPop());
}
SliceInputSpan(writer);
if (minIterations > 0)
{
using (EmitBlock(writer, $"if ({iterationCount} == 0)"))
{
Goto(originalDoneLabel);
}
using (EmitBlock(writer, $"if ({CountIsLessThan(iterationCount, minIterations)})"))
{
Goto(childBacktracks ? doneLabel : originalDoneLabel);
}
}
if (isAtomic)
{
doneLabel = originalDoneLabel;
MarkLabel(endLoop);
}
else
{
if (childBacktracks)
{
Goto(endLoop);
writer.WriteLine();
string backtrack = ReserveName("LoopBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
using (EmitBlock(writer, $"if ({iterationCount} == 0)"))
{
Goto(originalDoneLabel);
}
Goto(doneLabel);
doneLabel = backtrack;
}
MarkLabel(endLoop);
if (node.IsInLoop())
{
writer.WriteLine();
// Store the loop's state
EmitStackPush(startingPos, iterationCount);
// Skip past the backtracking section
string end = ReserveName("SkipBacktrack");
Goto(end);
writer.WriteLine();
// Emit a backtracking section that restores the loop's state and then jumps to the previous done label
string backtrack = ReserveName("LoopBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
EmitStackPop(iterationCount, startingPos);
Goto(doneLabel);
writer.WriteLine();
doneLabel = backtrack;
MarkLabel(end);
}
}
}
// Gets a comparison for whether the value is less than the upper bound.
static string CountIsLessThan(string value, int exclusiveUpper) =>
exclusiveUpper == 1 ? $"{value} == 0" : $"{value} < {exclusiveUpper}";
// Emits code to unwind the capture stack until the crawl position specified in the provided local.
void EmitUncaptureUntil(string capturepos)
{
string name = "UncaptureUntil";
if (!additionalLocalFunctions.ContainsKey(name))
{
var lines = new string[9];
lines[0] = "// <summary>Undo captures until we reach the specified capture position.</summary>";
lines[1] = "[global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]";
lines[2] = $"void {name}(int capturepos)";
lines[3] = "{";
lines[4] = " while (base.Crawlpos() > capturepos)";
lines[5] = " {";
lines[6] = " base.Uncapture();";
lines[7] = " }";
lines[8] = "}";
additionalLocalFunctions.Add(name, lines);
}
writer.WriteLine($"{name}({capturepos});");
}
/// <summary>Pushes values on to the backtracking stack.</summary>
void EmitStackPush(params string[] args)
{
Debug.Assert(args.Length is >= 1);
string function = $"StackPush{args.Length}";
additionalDeclarations.Add("int stackpos = 0;");
if (!additionalLocalFunctions.ContainsKey(function))
{
var lines = new string[24 + args.Length];
lines[0] = $"// <summary>Push {args.Length} value{(args.Length == 1 ? "" : "s")} onto the backtracking stack.</summary>";
lines[1] = $"[global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]";
lines[2] = $"static void {function}(ref int[] stack, ref int pos{FormatN(", int arg{0}", args.Length)})";
lines[3] = $"{{";
lines[4] = $" // If there's space available for {(args.Length > 1 ? $"all {args.Length} values, store them" : "the value, store it")}.";
lines[5] = $" int[] s = stack;";
lines[6] = $" int p = pos;";
lines[7] = $" if ((uint){(args.Length > 1 ? $"(p + {args.Length - 1})" : "p")} < (uint)s.Length)";
lines[8] = $" {{";
for (int i = 0; i < args.Length; i++)
{
lines[9 + i] = $" s[p{(i == 0 ? "" : $" + {i}")}] = arg{i};";
}
lines[9 + args.Length] = args.Length > 1 ? $" pos += {args.Length};" : " pos++;";
lines[10 + args.Length] = $" return;";
lines[11 + args.Length] = $" }}";
lines[12 + args.Length] = $"";
lines[13 + args.Length] = $" // Otherwise, resize the stack to make room and try again.";
lines[14 + args.Length] = $" WithResize(ref stack, ref pos{FormatN(", arg{0}", args.Length)});";
lines[15 + args.Length] = $"";
lines[16 + args.Length] = $" // <summary>Resize the backtracking stack array and push {args.Length} value{(args.Length == 1 ? "" : "s")} onto the stack.</summary>";
lines[17 + args.Length] = $" [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]";
lines[18 + args.Length] = $" static void WithResize(ref int[] stack, ref int pos{FormatN(", int arg{0}", args.Length)})";
lines[19 + args.Length] = $" {{";
lines[20 + args.Length] = $" global::System.Array.Resize(ref stack, (pos + {args.Length - 1}) * 2);";
lines[21 + args.Length] = $" {function}(ref stack, ref pos{FormatN(", arg{0}", args.Length)});";
lines[22 + args.Length] = $" }}";
lines[23 + args.Length] = $"}}";
additionalLocalFunctions.Add(function, lines);
}
writer.WriteLine($"{function}(ref base.runstack!, ref stackpos, {string.Join(", ", args)});");
}
/// <summary>Pops values from the backtracking stack into the specified locations.</summary>
void EmitStackPop(params string[] args)
{
Debug.Assert(args.Length is >= 1);
if (args.Length == 1)
{
writer.WriteLine($"{args[0]} = {StackPop()};");
return;
}
string function = $"StackPop{args.Length}";
if (!additionalLocalFunctions.ContainsKey(function))
{
var lines = new string[5 + args.Length];
lines[0] = $"// <summary>Pop {args.Length} value{(args.Length == 1 ? "" : "s")} from the backtracking stack.</summary>";
lines[1] = $"[global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]";
lines[2] = $"static void {function}(int[] stack, ref int pos{FormatN(", out int arg{0}", args.Length)})";
lines[3] = $"{{";
for (int i = 0; i < args.Length; i++)
{
lines[4 + i] = $" arg{i} = stack[--pos];";
}
lines[4 + args.Length] = $"}}";
additionalLocalFunctions.Add(function, lines);
}
writer.WriteLine($"{function}(base.runstack, ref stackpos, out {string.Join(", out ", args)});");
}
/// <summary>Expression for popping the next item from the backtracking stack.</summary>
string StackPop() => "base.runstack![--stackpos]";
/// <summary>Concatenates the strings resulting from formatting the format string with the values [0, count).</summary>
static string FormatN(string format, int count) =>
string.Concat(from i in Enumerable.Range(0, count)
select string.Format(format, i));
}
private static bool EmitLoopTimeoutCounterIfNeeded(IndentedTextWriter writer, RegexMethod rm)
{
if (rm.MatchTimeout != Timeout.Infinite)
{
writer.WriteLine("int loopTimeoutCounter = 0;");
return true;
}
return false;
}
/// <summary>Emits a timeout check.</summary>
private static void EmitTimeoutCheck(IndentedTextWriter writer, bool hasTimeout)
{
const int LoopTimeoutCheckCount = 2048; // A conservative value to guarantee the correct timeout handling.
if (hasTimeout)
{
// Increment counter for each loop iteration.
// Emit code to check the timeout every 2048th iteration.
using (EmitBlock(writer, $"if (++loopTimeoutCounter == {LoopTimeoutCheckCount})"))
{
writer.WriteLine("loopTimeoutCounter = 0;");
writer.WriteLine("base.CheckTimeout();");
}
writer.WriteLine();
}
}
private static bool EmitInitializeCultureForTryMatchAtCurrentPositionIfNecessary(IndentedTextWriter writer, RegexMethod rm, AnalysisResults analysis)
{
if (analysis.HasIgnoreCase && ((RegexOptions)rm.Options & RegexOptions.CultureInvariant) == 0)
{
writer.WriteLine("global::System.Globalization.TextInfo textInfo = global::System.Globalization.CultureInfo.CurrentCulture.TextInfo;");
return true;
}
return false;
}
private static bool UseToLowerInvariant(bool hasTextInfo, RegexOptions options) => !hasTextInfo || (options & RegexOptions.CultureInvariant) != 0;
private static string ToLower(bool hasTextInfo, RegexOptions options, string expression) => UseToLowerInvariant(hasTextInfo, options) ? $"char.ToLowerInvariant({expression})" : $"textInfo.ToLower({expression})";
private static string ToLowerIfNeeded(bool hasTextInfo, RegexOptions options, string expression, bool toLower) => toLower ? ToLower(hasTextInfo, options, expression) : expression;
private static string MatchCharacterClass(bool hasTextInfo, RegexOptions options, string chExpr, string charClass, bool caseInsensitive, bool negate, HashSet<string> additionalDeclarations, ref RequiredHelperFunctions requiredHelpers)
{
// We need to perform the equivalent of calling RegexRunner.CharInClass(ch, charClass),
// but that call is relatively expensive. Before we fall back to it, we try to optimize
// some common cases for which we can do much better, such as known character classes
// for which we can call a dedicated method, or a fast-path for ASCII using a lookup table.
// First, see if the char class is a built-in one for which there's a better function
// we can just call directly. Everything in this section must work correctly for both
// case-sensitive and case-insensitive modes, regardless of culture.
switch (charClass)
{
case RegexCharClass.AnyClass:
// ideally this could just be "return true;", but we need to evaluate the expression for its side effects
return $"({chExpr} {(negate ? "<" : ">=")} 0)"; // a char is unsigned and thus won't ever be negative
case RegexCharClass.DigitClass:
case RegexCharClass.NotDigitClass:
negate ^= charClass == RegexCharClass.NotDigitClass;
return $"{(negate ? "!" : "")}char.IsDigit({chExpr})";
case RegexCharClass.SpaceClass:
case RegexCharClass.NotSpaceClass:
negate ^= charClass == RegexCharClass.NotSpaceClass;
return $"{(negate ? "!" : "")}char.IsWhiteSpace({chExpr})";
case RegexCharClass.WordClass:
case RegexCharClass.NotWordClass:
requiredHelpers |= RequiredHelperFunctions.IsWordChar;
negate ^= charClass == RegexCharClass.NotWordClass;
return $"{(negate ? "!" : "")}IsWordChar({chExpr})";
}
// If we're meant to be doing a case-insensitive lookup, and if we're not using the invariant culture,
// lowercase the input. If we're using the invariant culture, we may still end up calling ToLower later
// on, but we may also be able to avoid it, in particular in the case of our lookup table, where we can
// generate the lookup table already factoring in the invariant case sensitivity. There are multiple
// special-code paths between here and the lookup table, but we only take those if invariant is false;
// if it were true, they'd need to use CallToLower().
bool invariant = false;
if (caseInsensitive)
{
invariant = UseToLowerInvariant(hasTextInfo, options);
if (!invariant)
{
chExpr = ToLower(hasTextInfo, options, chExpr);
}
}
// Next, handle simple sets of one range, e.g. [A-Z], [0-9], etc. This includes some built-in classes, like ECMADigitClass.
if (!invariant && RegexCharClass.TryGetSingleRange(charClass, out char lowInclusive, out char highInclusive))
{
negate ^= RegexCharClass.IsNegated(charClass);
return lowInclusive == highInclusive ?
$"({chExpr} {(negate ? "!=" : "==")} {Literal(lowInclusive)})" :
$"(((uint){chExpr}) - {Literal(lowInclusive)} {(negate ? ">" : "<=")} (uint)({Literal(highInclusive)} - {Literal(lowInclusive)}))";
}
// Next if the character class contains nothing but a single Unicode category, we can calle char.GetUnicodeCategory and
// compare against it. It has a fast-lookup path for ASCII, so is as good or better than any lookup we'd generate (plus
// we get smaller code), and it's what we'd do for the fallback (which we get to avoid generating) as part of CharInClass.
if (!invariant && RegexCharClass.TryGetSingleUnicodeCategory(charClass, out UnicodeCategory category, out bool negated))
{
negate ^= negated;
return $"(char.GetUnicodeCategory({chExpr}) {(negate ? "!=" : "==")} global::System.Globalization.UnicodeCategory.{category})";
}
// Next, if there's only 2 or 3 chars in the set (fairly common due to the sets we create for prefixes),
// it may be cheaper and smaller to compare against each than it is to use a lookup table. We can also special-case
// the very common case with case insensitivity of two characters next to each other being the upper and lowercase
// ASCII variants of each other, in which case we can use bit manipulation to avoid a comparison.
if (!invariant && !RegexCharClass.IsNegated(charClass))
{
Span<char> setChars = stackalloc char[3];
int mask;
switch (RegexCharClass.GetSetChars(charClass, setChars))
{
case 2:
if (RegexCharClass.DifferByOneBit(setChars[0], setChars[1], out mask))
{
return $"(({chExpr} | 0x{mask:X}) {(negate ? "!=" : "==")} {Literal((char)(setChars[1] | mask))})";
}
additionalDeclarations.Add("char ch;");
return negate ?
$"(((ch = {chExpr}) != {Literal(setChars[0])}) & (ch != {Literal(setChars[1])}))" :
$"(((ch = {chExpr}) == {Literal(setChars[0])}) | (ch == {Literal(setChars[1])}))";
case 3:
additionalDeclarations.Add("char ch;");
return (negate, RegexCharClass.DifferByOneBit(setChars[0], setChars[1], out mask)) switch
{
(false, false) => $"(((ch = {chExpr}) == {Literal(setChars[0])}) | (ch == {Literal(setChars[1])}) | (ch == {Literal(setChars[2])}))",
(true, false) => $"(((ch = {chExpr}) != {Literal(setChars[0])}) & (ch != {Literal(setChars[1])}) & (ch != {Literal(setChars[2])}))",
(false, true) => $"((((ch = {chExpr}) | 0x{mask:X}) == {Literal((char)(setChars[1] | mask))}) | (ch == {Literal(setChars[2])}))",
(true, true) => $"((((ch = {chExpr}) | 0x{mask:X}) != {Literal((char)(setChars[1] | mask))}) & (ch != {Literal(setChars[2])}))",
};
}
}
// All options after this point require a ch local.
additionalDeclarations.Add("char ch;");
// Analyze the character set more to determine what code to generate.
RegexCharClass.CharClassAnalysisResults analysis = RegexCharClass.Analyze(charClass);
if (!invariant) // if we're being asked to do a case insensitive, invariant comparison, use the lookup table
{
if (analysis.ContainsNoAscii)
{
// We determined that the character class contains only non-ASCII,
// for example if the class were [\p{IsGreek}\p{IsGreekExtended}], which is
// the same as [\u0370-\u03FF\u1F00-1FFF]. (In the future, we could possibly
// extend the analysis to produce a known lower-bound and compare against
// that rather than always using 128 as the pivot point.)
return negate ?
$"((ch = {chExpr}) < 128 || !global::System.Text.RegularExpressions.RegexRunner.CharInClass((char)ch, {Literal(charClass)}))" :
$"((ch = {chExpr}) >= 128 && global::System.Text.RegularExpressions.RegexRunner.CharInClass((char)ch, {Literal(charClass)}))";
}
if (analysis.AllAsciiContained)
{
// We determined that every ASCII character is in the class, for example
// if the class were the negated example from case 1 above:
// [^\p{IsGreek}\p{IsGreekExtended}].
return negate ?
$"((ch = {chExpr}) >= 128 && !global::System.Text.RegularExpressions.RegexRunner.CharInClass((char)ch, {Literal(charClass)}))" :
$"((ch = {chExpr}) < 128 || global::System.Text.RegularExpressions.RegexRunner.CharInClass((char)ch, {Literal(charClass)}))";
}
}
// Now, our big hammer is to generate a lookup table that lets us quickly index by character into a yes/no
// answer as to whether the character is in the target character class. However, we don't want to store
// a lookup table for every possible character for every character class in the regular expression; at one
// bit for each of 65K characters, that would be an 8K bitmap per character class. Instead, we handle the
// common case of ASCII input via such a lookup table, which at one bit for each of 128 characters is only
// 16 bytes per character class. We of course still need to be able to handle inputs that aren't ASCII, so
// we check the input against 128, and have a fallback if the input is >= to it. Determining the right
// fallback could itself be expensive. For example, if it's possible that a value >= 128 could match the
// character class, we output a call to RegexRunner.CharInClass, but we don't want to have to enumerate the
// entire character class evaluating every character against it, just to determine whether it's a match.
// Instead, we employ some quick heuristics that will always ensure we provide a correct answer even if
// we could have sometimes generated better code to give that answer.
// Generate the lookup table to store 128 answers as bits. We use a const string instead of a byte[] / static
// data property because it lets IL emit handle all the details for us.
string bitVectorString = StringExtensions.Create(8, (charClass, invariant), static (dest, state) => // String length is 8 chars == 16 bytes == 128 bits.
{
for (int i = 0; i < 128; i++)
{
char c = (char)i;
bool isSet = state.invariant ?
RegexCharClass.CharInClass(char.ToLowerInvariant(c), state.charClass) :
RegexCharClass.CharInClass(c, state.charClass);
if (isSet)
{
dest[i >> 4] |= (char)(1 << (i & 0xF));
}
}
});
// We determined that the character class may contain ASCII, so we
// output the lookup against the lookup table.
if (analysis.ContainsOnlyAscii)
{
// We know that all inputs that could match are ASCII, for example if the
// character class were [A-Za-z0-9], so since the ch is now known to be >= 128, we
// can just fail the comparison.
return negate ?
$"((ch = {chExpr}) >= 128 || ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) == 0)" :
$"((ch = {chExpr}) < 128 && ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) != 0)";
}
if (analysis.AllNonAsciiContained)
{
// We know that all non-ASCII inputs match, for example if the character
// class were [^\r\n], so since we just determined the ch to be >= 128, we can just
// give back success.
return negate ?
$"((ch = {chExpr}) < 128 && ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) == 0)" :
$"((ch = {chExpr}) >= 128 || ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) != 0)";
}
// We know that the whole class wasn't ASCII, and we don't know anything about the non-ASCII
// characters other than that some might be included, for example if the character class
// were [\w\d], so since ch >= 128, we need to fall back to calling CharInClass.
return (negate, invariant) switch
{
(false, false) => $"((ch = {chExpr}) < 128 ? ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) != 0 : global::System.Text.RegularExpressions.RegexRunner.CharInClass((char)ch, {Literal(charClass)}))",
(true, false) => $"((ch = {chExpr}) < 128 ? ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) == 0 : !global::System.Text.RegularExpressions.RegexRunner.CharInClass((char)ch, {Literal(charClass)}))",
(false, true) => $"((ch = {chExpr}) < 128 ? ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) != 0 : global::System.Text.RegularExpressions.RegexRunner.CharInClass(char.ToLowerInvariant((char)ch), {Literal(charClass)}))",
(true, true) => $"((ch = {chExpr}) < 128 ? ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) == 0 : !global::System.Text.RegularExpressions.RegexRunner.CharInClass(char.ToLowerInvariant((char)ch), {Literal(charClass)}))",
};
}
/// <summary>
/// Replaces <see cref="AdditionalDeclarationsPlaceholder"/> in <paramref name="writer"/> with
/// all of the variable declarations in <paramref name="declarations"/>.
/// </summary>
/// <param name="writer">The writer around a StringWriter to have additional declarations inserted into.</param>
/// <param name="declarations">The additional declarations to insert.</param>
/// <param name="position">The position into the writer at which to insert the additional declarations.</param>
/// <param name="indent">The indentation to use for the additional declarations.</param>
private static void ReplaceAdditionalDeclarations(IndentedTextWriter writer, HashSet<string> declarations, int position, int indent)
{
if (declarations.Count != 0)
{
var tmp = new StringBuilder();
foreach (string decl in declarations.OrderBy(s => s))
{
for (int i = 0; i < indent; i++)
{
tmp.Append(IndentedTextWriter.DefaultTabString);
}
tmp.AppendLine(decl);
}
((StringWriter)writer.InnerWriter).GetStringBuilder().Insert(position, tmp.ToString());
}
}
/// <summary>Formats the character as valid C#.</summary>
private static string Literal(char c) => SymbolDisplay.FormatLiteral(c, quote: true);
/// <summary>Formats the string as valid C#.</summary>
private static string Literal(string s) => SymbolDisplay.FormatLiteral(s, quote: true);
private static string Literal(RegexOptions options)
{
string s = options.ToString();
if (int.TryParse(s, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
{
// The options were formatted as an int, which means the runtime couldn't
// produce a textual representation. So just output casting the value as an int.
Debug.Fail("This shouldn't happen, as we should only get to the point of emitting code if RegexOptions was valid.");
return $"(global::System.Text.RegularExpressions.RegexOptions)({(int)options})";
}
// Parse the runtime-generated "Option1, Option2" into each piece and then concat
// them back together.
string[] parts = s.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < parts.Length; i++)
{
parts[i] = "global::System.Text.RegularExpressions.RegexOptions." + parts[i].Trim();
}
return string.Join(" | ", parts);
}
/// <summary>Gets a textual description of the node fit for rendering in a comment in source.</summary>
private static string DescribeNode(RegexNode node, AnalysisResults analysis)
{
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
return node.Kind switch
{
RegexNodeKind.Alternate => $"Match with {node.ChildCount()} alternative expressions{(analysis.IsAtomicByAncestor(node) ? ", atomically" : "")}.",
RegexNodeKind.Atomic => $"Atomic group.",
RegexNodeKind.Beginning => "Match if at the beginning of the string.",
RegexNodeKind.Bol => "Match if at the beginning of a line.",
RegexNodeKind.Boundary => $"Match if at a word boundary.",
RegexNodeKind.Capture when node.M == -1 && node.N != -1 => $"Non-capturing balancing group. Uncaptures the {DescribeCapture(node.N, analysis)}.",
RegexNodeKind.Capture when node.N != -1 => $"Balancing group. Captures the {DescribeCapture(node.M, analysis)} and uncaptures the {DescribeCapture(node.N, analysis)}.",
RegexNodeKind.Capture when node.N == -1 => $"{DescribeCapture(node.M, analysis)}.",
RegexNodeKind.Concatenate => "Match a sequence of expressions.",
RegexNodeKind.ECMABoundary => $"Match if at a word boundary (according to ECMAScript rules).",
RegexNodeKind.Empty => $"Match an empty string.",
RegexNodeKind.End => "Match if at the end of the string.",
RegexNodeKind.EndZ => "Match if at the end of the string or if before an ending newline.",
RegexNodeKind.Eol => "Match if at the end of a line.",
RegexNodeKind.Loop or RegexNodeKind.Lazyloop => node.M == 0 && node.N == 1 ? $"Optional ({(node.Kind is RegexNodeKind.Loop ? "greedy" : "lazy")})." : $"Loop {DescribeLoop(node, analysis)}.",
RegexNodeKind.Multi => $"Match the string {Literal(node.Str!)}{(rtl ? " backwards" : "")}.",
RegexNodeKind.NonBoundary => $"Match if at anything other than a word boundary.",
RegexNodeKind.NonECMABoundary => $"Match if at anything other than a word boundary (according to ECMAScript rules).",
RegexNodeKind.Nothing => $"Fail to match.",
RegexNodeKind.Notone => $"Match any character other than {Literal(node.Ch)}{(rtl ? " backwards" : "")}.",
RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy => $"Match a character other than {Literal(node.Ch)} {DescribeLoop(node, analysis)}.",
RegexNodeKind.One => $"Match {Literal(node.Ch)}{(rtl ? " backwards" : "")}.",
RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy => $"Match {Literal(node.Ch)} {DescribeLoop(node, analysis)}.",
RegexNodeKind.NegativeLookaround => $"Zero-width negative {(rtl ? "lookbehind" : "lookahead")}.",
RegexNodeKind.Backreference => $"Match the same text as matched by the {DescribeCapture(node.M, analysis)}.",
RegexNodeKind.PositiveLookaround => $"Zero-width positive {(rtl ? "lookbehind" : "lookahead")}.",
RegexNodeKind.Set => $"Match {DescribeSet(node.Str!)}{(rtl ? " backwards" : "")}.",
RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy => $"Match {DescribeSet(node.Str!)} {DescribeLoop(node, analysis)}.",
RegexNodeKind.Start => "Match if at the start position.",
RegexNodeKind.ExpressionConditional => $"Conditionally match one of two expressions depending on whether an initial expression matches.",
RegexNodeKind.BackreferenceConditional => $"Conditionally match one of two expressions depending on whether the {DescribeCapture(node.M, analysis)} matched.",
RegexNodeKind.UpdateBumpalong => $"Advance the next matching position.",
_ => $"Unknown node type {node.Kind}",
};
}
/// <summary>Gets an identifer to describe a capture group.</summary>
private static string DescribeCapture(int capNum, AnalysisResults analysis)
{
// If we can get a capture name from the captures collection and it's not just a numerical representation of the group, use it.
string name = RegexParser.GroupNameFromNumber(analysis.RegexTree.CaptureNumberSparseMapping, analysis.RegexTree.CaptureNames, analysis.RegexTree.CaptureCount, capNum);
if (!string.IsNullOrEmpty(name) &&
(!int.TryParse(name, out int id) || id != capNum))
{
name = Literal(name);
}
else
{
// Otherwise, create a numerical description of the capture group.
int tens = capNum % 10;
name = tens is >= 1 and <= 3 && capNum % 100 is < 10 or > 20 ? // Ends in 1, 2, 3 but not 11, 12, or 13
tens switch
{
1 => $"{capNum}st",
2 => $"{capNum}nd",
_ => $"{capNum}rd",
} :
$"{capNum}th";
}
return $"{name} capture group";
}
/// <summary>Gets a textual description of what characters match a set.</summary>
private static string DescribeSet(string charClass) =>
charClass switch
{
RegexCharClass.AnyClass => "any character",
RegexCharClass.DigitClass => "a Unicode digit",
RegexCharClass.ECMADigitClass => "'0' through '9'",
RegexCharClass.ECMASpaceClass => "a whitespace character (ECMA)",
RegexCharClass.ECMAWordClass => "a word character (ECMA)",
RegexCharClass.NotDigitClass => "any character other than a Unicode digit",
RegexCharClass.NotECMADigitClass => "any character other than '0' through '9'",
RegexCharClass.NotECMASpaceClass => "any character other than a space character (ECMA)",
RegexCharClass.NotECMAWordClass => "any character other than a word character (ECMA)",
RegexCharClass.NotSpaceClass => "any character other than a space character",
RegexCharClass.NotWordClass => "any character other than a word character",
RegexCharClass.SpaceClass => "a whitespace character",
RegexCharClass.WordClass => "a word character",
_ => $"a character in the set {RegexCharClass.DescribeSet(charClass)}",
};
/// <summary>Writes a textual description of the node tree fit for rending in source.</summary>
/// <param name="writer">The writer to which the description should be written.</param>
/// <param name="node">The node being written.</param>
/// <param name="prefix">The prefix to write at the beginning of every line, including a "//" for a comment.</param>
/// <param name="analyses">Analysis of the tree</param>
/// <param name="depth">The depth of the current node.</param>
private static void DescribeExpression(TextWriter writer, RegexNode node, string prefix, AnalysisResults analysis, int depth = 0)
{
bool skip = node.Kind switch
{
// For concatenations, flatten the contents into the parent, but only if the parent isn't a form of alternation,
// where each branch is considered to be independent rather than a concatenation.
RegexNodeKind.Concatenate when node.Parent is not { Kind: RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional } => true,
// For atomic, skip the node if we'll instead render the atomic label as part of rendering the child.
RegexNodeKind.Atomic when node.Child(0).Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop or RegexNodeKind.Alternate => true,
// Don't skip anything else.
_ => false,
};
if (!skip)
{
string tag = node.Parent?.Kind switch
{
RegexNodeKind.ExpressionConditional when node.Parent.Child(0) == node => "Condition: ",
RegexNodeKind.ExpressionConditional when node.Parent.Child(1) == node => "Matched: ",
RegexNodeKind.ExpressionConditional when node.Parent.Child(2) == node => "Not Matched: ",
RegexNodeKind.BackreferenceConditional when node.Parent.Child(0) == node => "Matched: ",
RegexNodeKind.BackreferenceConditional when node.Parent.Child(1) == node => "Not Matched: ",
_ => "",
};
// Write out the line for the node.
const char BulletPoint = '\u25CB';
writer.WriteLine($"{prefix}{new string(' ', depth * 4)}{BulletPoint} {tag}{DescribeNode(node, analysis)}");
}
// Recur into each of its children.
int childCount = node.ChildCount();
for (int i = 0; i < childCount; i++)
{
int childDepth = skip ? depth : depth + 1;
DescribeExpression(writer, node.Child(i), prefix, analysis, childDepth);
}
}
/// <summary>Gets a textual description of a loop's style and bounds.</summary>
private static string DescribeLoop(RegexNode node, AnalysisResults analysis)
{
string style = node.Kind switch
{
_ when node.M == node.N => "exactly",
RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloopatomic => "atomically",
RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop => "greedily",
RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy => "lazily",
RegexNodeKind.Loop => analysis.IsAtomicByAncestor(node) ? "greedily and atomically" : "greedily",
_ /* RegexNodeKind.Lazyloop */ => analysis.IsAtomicByAncestor(node) ? "lazily and atomically" : "lazily",
};
string bounds =
node.M == node.N ? $" {node.M} times" :
(node.M, node.N) switch
{
(0, int.MaxValue) => " any number of times",
(1, int.MaxValue) => " at least once",
(2, int.MaxValue) => " at least twice",
(_, int.MaxValue) => $" at least {node.M} times",
(0, 1) => ", optionally",
(0, _) => $" at most {node.N} times",
_ => $" at least {node.M} and at most {node.N} times"
};
return style + bounds;
}
private static FinishEmitScope EmitScope(IndentedTextWriter writer, string title, bool faux = false) => EmitBlock(writer, $"// {title}", faux: faux);
private static FinishEmitScope EmitBlock(IndentedTextWriter writer, string? clause, bool faux = false)
{
if (clause is not null)
{
writer.WriteLine(clause);
}
writer.WriteLine(faux ? "//{" : "{");
writer.Indent++;
return new FinishEmitScope(writer, faux);
}
private static void EmitAdd(IndentedTextWriter writer, string variable, int value)
{
if (value == 0)
{
return;
}
writer.WriteLine(
value == 1 ? $"{variable}++;" :
value == -1 ? $"{variable}--;" :
value > 0 ? $"{variable} += {value};" :
value < 0 && value > int.MinValue ? $"{variable} -= {-value};" :
$"{variable} += {value.ToString(CultureInfo.InvariantCulture)};");
}
private readonly struct FinishEmitScope : IDisposable
{
private readonly IndentedTextWriter _writer;
private readonly bool _faux;
public FinishEmitScope(IndentedTextWriter writer, bool faux)
{
_writer = writer;
_faux = faux;
}
public void Dispose()
{
if (_writer is not null)
{
_writer.Indent--;
_writer.WriteLine(_faux ? "//}" : "}");
}
}
}
/// <summary>Bit flags indicating which additional helpers should be emitted into the regex class.</summary>
[Flags]
private enum RequiredHelperFunctions
{
/// <summary>No additional functions are required.</summary>
None = 0b0,
/// <summary>The IsWordChar helper is required.</summary>
IsWordChar = 0b1,
/// <summary>The IsBoundary helper is required.</summary>
IsBoundary = 0b10,
/// <summary>The IsECMABoundary helper is required.</summary>
IsECMABoundary = 0b100
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Buffers.Binary;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Cache;
using System.Runtime.InteropServices;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
// NOTE: The logic in this file is largely a duplicate of logic in RegexCompiler, emitting C# instead of MSIL.
// Most changes made to this file should be kept in sync, so far as bug fixes and relevant optimizations
// are concerned.
namespace System.Text.RegularExpressions.Generator
{
public partial class RegexGenerator
{
/// <summary>Emits the definition of the partial method. This method just delegates to the property cache on the generated Regex-derived type.</summary>
private static void EmitRegexPartialMethod(RegexMethod regexMethod, IndentedTextWriter writer, string generatedClassName)
{
// Emit the namespace.
RegexType? parent = regexMethod.DeclaringType;
if (!string.IsNullOrWhiteSpace(parent.Namespace))
{
writer.WriteLine($"namespace {parent.Namespace}");
writer.WriteLine("{");
writer.Indent++;
}
// Emit containing types.
var parentClasses = new Stack<string>();
while (parent is not null)
{
parentClasses.Push($"partial {parent.Keyword} {parent.Name}");
parent = parent.Parent;
}
while (parentClasses.Count != 0)
{
writer.WriteLine($"{parentClasses.Pop()}");
writer.WriteLine("{");
writer.Indent++;
}
// Emit the partial method definition.
writer.WriteLine($"[global::System.CodeDom.Compiler.{s_generatedCodeAttribute}]");
writer.WriteLine($"{regexMethod.Modifiers} global::System.Text.RegularExpressions.Regex {regexMethod.MethodName}() => global::{GeneratedNamespace}.{generatedClassName}.{regexMethod.GeneratedName}.Instance;");
// Unwind all scopes
while (writer.Indent != 0)
{
writer.Indent--;
writer.WriteLine("}");
}
}
/// <summary>Emits the Regex-derived type for a method where we're unable to generate custom code.</summary>
private static void EmitRegexLimitedBoilerplate(
IndentedTextWriter writer, RegexMethod rm, int id, string reason)
{
writer.WriteLine($"/// <summary>Caches a <see cref=\"Regex\"/> instance for the {rm.MethodName} method.</summary>");
writer.WriteLine($"/// <remarks>A custom Regex-derived type could not be generated because {reason}.</remarks>");
writer.WriteLine($"internal sealed class {rm.GeneratedName} : Regex");
writer.WriteLine($"{{");
writer.WriteLine($" /// <summary>Cached, thread-safe singleton instance.</summary>");
writer.WriteLine($" internal static Regex Instance {{ get; }} = new({Literal(rm.Pattern)}, {Literal(rm.Options)}, {GetTimeoutExpression(rm.MatchTimeout)});");
writer.WriteLine($"}}");
}
/// <summary>Emits the Regex-derived type for a method whose RunnerFactory implementation was generated into <paramref name="runnerFactoryImplementation"/>.</summary>
private static void EmitRegexDerivedImplementation(
IndentedTextWriter writer, RegexMethod rm, int id, string runnerFactoryImplementation)
{
writer.WriteLine($"/// <summary>Custom <see cref=\"Regex\"/>-derived type for the {rm.MethodName} method.</summary>");
writer.WriteLine($"internal sealed class {rm.GeneratedName} : Regex");
writer.WriteLine($"{{");
writer.WriteLine($" /// <summary>Cached, thread-safe singleton instance.</summary>");
writer.WriteLine($" internal static {rm.GeneratedName} Instance {{ get; }} = new();");
writer.WriteLine($"");
writer.WriteLine($" /// <summary>Initializes the instance.</summary>");
writer.WriteLine($" private {rm.GeneratedName}()");
writer.WriteLine($" {{");
writer.WriteLine($" base.pattern = {Literal(rm.Pattern)};");
writer.WriteLine($" base.roptions = {Literal(rm.Options)};");
writer.WriteLine($" base.internalMatchTimeout = {GetTimeoutExpression(rm.MatchTimeout)};");
writer.WriteLine($" base.factory = new RunnerFactory();");
if (rm.Tree.CaptureNumberSparseMapping is not null)
{
writer.Write(" base.Caps = new Hashtable {");
AppendHashtableContents(writer, rm.Tree.CaptureNumberSparseMapping);
writer.WriteLine($" }};");
}
if (rm.Tree.CaptureNameToNumberMapping is not null)
{
writer.Write(" base.CapNames = new Hashtable {");
AppendHashtableContents(writer, rm.Tree.CaptureNameToNumberMapping);
writer.WriteLine($" }};");
}
if (rm.Tree.CaptureNames is not null)
{
writer.Write(" base.capslist = new string[] {");
string separator = "";
foreach (string s in rm.Tree.CaptureNames)
{
writer.Write(separator);
writer.Write(Literal(s));
separator = ", ";
}
writer.WriteLine($" }};");
}
writer.WriteLine($" base.capsize = {rm.Tree.CaptureCount};");
writer.WriteLine($" }}");
writer.WriteLine(runnerFactoryImplementation);
writer.WriteLine($"}}");
static void AppendHashtableContents(IndentedTextWriter writer, Hashtable ht)
{
IDictionaryEnumerator en = ht.GetEnumerator();
string separator = "";
while (en.MoveNext())
{
writer.Write(separator);
separator = ", ";
writer.Write(" { ");
if (en.Key is int key)
{
writer.Write(key);
}
else
{
writer.Write($"\"{en.Key}\"");
}
writer.Write($", {en.Value} }} ");
}
}
}
/// <summary>Emits the code for the RunnerFactory. This is the actual logic for the regular expression.</summary>
private static void EmitRegexDerivedTypeRunnerFactory(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers)
{
AnalysisResults analysis = RegexTreeAnalyzer.Analyze(rm.Tree);
writer.WriteLine($"/// <summary>Provides a factory for creating <see cref=\"RegexRunner\"/> instances to be used by methods on <see cref=\"Regex\"/>.</summary>");
writer.WriteLine($"private sealed class RunnerFactory : RegexRunnerFactory");
writer.WriteLine($"{{");
writer.WriteLine($" /// <summary>Creates an instance of a <see cref=\"RegexRunner\"/> used by methods on <see cref=\"Regex\"/>.</summary>");
writer.WriteLine($" protected override RegexRunner CreateInstance() => new Runner();");
writer.WriteLine();
writer.WriteLine($" /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>");
writer.WriteLine($" private sealed class Runner : RegexRunner");
writer.WriteLine($" {{");
// Main implementation methods
writer.WriteLine($" // Description:");
DescribeExpression(writer, rm.Tree.Root.Child(0), " // ", analysis); // skip implicit root capture
writer.WriteLine();
writer.WriteLine($" /// <summary>Scan the <paramref name=\"inputSpan\"/> starting from base.runtextstart for the next match.</summary>");
writer.WriteLine($" /// <param name=\"inputSpan\">The text being scanned by the regular expression.</param>");
writer.WriteLine($" protected override void Scan(ReadOnlySpan<char> inputSpan)");
writer.WriteLine($" {{");
writer.Indent += 3;
EmitScan(writer, rm);
writer.Indent -= 3;
writer.WriteLine($" }}");
writer.WriteLine();
writer.WriteLine($" /// <summary>Search <paramref name=\"inputSpan\"/> starting from base.runtextpos for the next location a match could possibly start.</summary>");
writer.WriteLine($" /// <param name=\"inputSpan\">The text being scanned by the regular expression.</param>");
writer.WriteLine($" /// <returns>true if a possible match was found; false if no more matches are possible.</returns>");
writer.WriteLine($" private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)");
writer.WriteLine($" {{");
writer.Indent += 3;
EmitTryFindNextPossibleStartingPosition(writer, rm, requiredHelpers);
writer.Indent -= 3;
writer.WriteLine($" }}");
writer.WriteLine();
writer.WriteLine($" /// <summary>Determine whether <paramref name=\"inputSpan\"/> at base.runtextpos is a match for the regular expression.</summary>");
writer.WriteLine($" /// <param name=\"inputSpan\">The text being scanned by the regular expression.</param>");
writer.WriteLine($" /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>");
writer.WriteLine($" private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)");
writer.WriteLine($" {{");
writer.Indent += 3;
EmitTryMatchAtCurrentPosition(writer, rm, analysis, requiredHelpers);
writer.Indent -= 3;
writer.WriteLine($" }}");
writer.WriteLine($" }}");
writer.WriteLine($"}}");
}
/// <summary>Gets a C# expression representing the specified timeout value.</summary>
private static string GetTimeoutExpression(int matchTimeout) =>
matchTimeout == Timeout.Infinite ?
"Timeout.InfiniteTimeSpan" :
$"TimeSpan.FromMilliseconds({matchTimeout.ToString(CultureInfo.InvariantCulture)})";
/// <summary>Adds the IsWordChar helper to the required helpers collection.</summary>
private static void AddIsWordCharHelper(Dictionary<string, string[]> requiredHelpers)
{
const string IsWordChar = nameof(IsWordChar);
if (!requiredHelpers.ContainsKey(IsWordChar))
{
requiredHelpers.Add(IsWordChar, new string[]
{
"/// <summary>Determines whether the character is part of the [\\w] set.</summary>",
"[MethodImpl(MethodImplOptions.AggressiveInlining)]",
"internal static bool IsWordChar(char ch)",
"{",
" // Bitmap for whether each character 0 through 127 is in [\\w]",
" ReadOnlySpan<byte> ascii = new byte[]",
" {",
" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,",
" 0xFE, 0xFF, 0xFF, 0x87, 0xFE, 0xFF, 0xFF, 0x07",
" };",
"",
" // If the char is ASCII, look it up in the bitmap. Otherwise, query its Unicode category.",
" int chDiv8 = ch >> 3;",
" return (uint)chDiv8 < (uint)ascii.Length ?",
" (ascii[chDiv8] & (1 << (ch & 0x7))) != 0 :",
" CharUnicodeInfo.GetUnicodeCategory(ch) switch",
" {",
" UnicodeCategory.UppercaseLetter or",
" UnicodeCategory.LowercaseLetter or",
" UnicodeCategory.TitlecaseLetter or",
" UnicodeCategory.ModifierLetter or",
" UnicodeCategory.OtherLetter or",
" UnicodeCategory.NonSpacingMark or",
" UnicodeCategory.DecimalDigitNumber or",
" UnicodeCategory.ConnectorPunctuation => true,",
" _ => false,",
" };",
"}",
});
}
}
/// <summary>Adds the IsBoundary helper to the required helpers collection.</summary>
private static void AddIsBoundaryHelper(Dictionary<string, string[]> requiredHelpers)
{
const string IsBoundary = nameof(IsBoundary);
if (!requiredHelpers.ContainsKey(IsBoundary))
{
requiredHelpers.Add(IsBoundary, new string[]
{
"/// <summary>Determines whether the specified index is a boundary.</summary>",
"[MethodImpl(MethodImplOptions.AggressiveInlining)]",
"internal static bool IsBoundary(ReadOnlySpan<char> inputSpan, int index)",
"{",
" int indexMinus1 = index - 1;",
" return ((uint)indexMinus1 < (uint)inputSpan.Length && IsBoundaryWordChar(inputSpan[indexMinus1])) !=",
" ((uint)index < (uint)inputSpan.Length && IsBoundaryWordChar(inputSpan[index]));",
"",
" static bool IsBoundaryWordChar(char ch) => IsWordChar(ch) || (ch == '\\u200C' | ch == '\\u200D');",
"}",
});
AddIsWordCharHelper(requiredHelpers);
}
}
/// <summary>Adds the IsECMABoundary helper to the required helpers collection.</summary>
private static void AddIsECMABoundaryHelper(Dictionary<string, string[]> requiredHelpers)
{
const string IsECMABoundary = nameof(IsECMABoundary);
if (!requiredHelpers.ContainsKey(IsECMABoundary))
{
requiredHelpers.Add(IsECMABoundary, new string[]
{
"/// <summary>Determines whether the specified index is a boundary (ECMAScript).</summary>",
"[MethodImpl(MethodImplOptions.AggressiveInlining)]",
"internal static bool IsECMABoundary(ReadOnlySpan<char> inputSpan, int index)",
"{",
" int indexMinus1 = index - 1;",
" return ((uint)indexMinus1 < (uint)inputSpan.Length && IsECMAWordChar(inputSpan[indexMinus1])) !=",
" ((uint)index < (uint)inputSpan.Length && IsECMAWordChar(inputSpan[index]));",
"",
" static bool IsECMAWordChar(char ch) =>",
" ((((uint)ch - 'A') & ~0x20) < 26) || // ASCII letter",
" (((uint)ch - '0') < 10) || // digit",
" ch == '_' || // underscore",
" ch == '\\u0130'; // latin capital letter I with dot above",
"}",
});
}
}
/// <summary>Emits the body of the Scan method override.</summary>
private static void EmitScan(IndentedTextWriter writer, RegexMethod rm)
{
bool rtl = (rm.Options & RegexOptions.RightToLeft) != 0;
using (EmitBlock(writer, "while (TryFindNextPossibleStartingPosition(inputSpan))"))
{
if (rm.MatchTimeout != Timeout.Infinite)
{
writer.WriteLine("base.CheckTimeout();");
writer.WriteLine();
}
writer.WriteLine("// If we find a match at the current position, or we have reached the end of the input, we are done.");
using (EmitBlock(writer, $"if (TryMatchAtCurrentPosition(inputSpan) || base.runtextpos == {(!rtl ? "inputSpan.Length" : "0")})"))
{
writer.WriteLine("return;");
}
writer.WriteLine();
writer.WriteLine($"base.runtextpos{(!rtl ? "++" : "--")};");
}
}
/// <summary>Emits the body of the TryFindNextPossibleStartingPosition.</summary>
private static void EmitTryFindNextPossibleStartingPosition(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers)
{
RegexOptions options = (RegexOptions)rm.Options;
RegexTree regexTree = rm.Tree;
bool hasTextInfo = false;
bool rtl = (options & RegexOptions.RightToLeft) != 0;
// In some cases, we need to emit declarations at the beginning of the method, but we only discover we need them later.
// To handle that, we build up a collection of all the declarations to include, track where they should be inserted,
// and then insert them at that position once everything else has been output.
var additionalDeclarations = new HashSet<string>();
// Emit locals initialization
writer.WriteLine("int pos = base.runtextpos;");
writer.Flush();
int additionalDeclarationsPosition = ((StringWriter)writer.InnerWriter).GetStringBuilder().Length;
int additionalDeclarationsIndent = writer.Indent;
writer.WriteLine();
// Generate length check. If the input isn't long enough to possibly match, fail quickly.
// It's rare for min required length to be 0, so we don't bother special-casing the check,
// especially since we want the "return false" code regardless.
int minRequiredLength = rm.Tree.FindOptimizations.MinRequiredLength;
Debug.Assert(minRequiredLength >= 0);
string clause = (minRequiredLength, rtl) switch
{
(0, false) => "if (pos <= inputSpan.Length)",
(1, false) => "if (pos < inputSpan.Length)",
(_, false) => $"if (pos <= inputSpan.Length - {minRequiredLength})",
(0, true) => "if (pos >= 0)",
(1, true) => "if (pos > 0)",
(_, true) => $"if (pos >= {minRequiredLength})",
};
using (EmitBlock(writer, clause))
{
// Emit any anchors.
if (!EmitAnchors())
{
// Either anchors weren't specified, or they don't completely root all matches to a specific location.
// If whatever search operation we need to perform entails case-insensitive operations
// that weren't already handled via creation of sets, we need to get an store the
// TextInfo object to use (unless RegexOptions.CultureInvariant was specified).
EmitTextInfo(writer, ref hasTextInfo, rm);
// Emit the code for whatever find mode has been determined.
switch (regexTree.FindOptimizations.FindMode)
{
case FindNextStartingPositionMode.LeadingPrefix_LeftToRight_CaseSensitive:
Debug.Assert(!string.IsNullOrEmpty(regexTree.FindOptimizations.LeadingCaseSensitivePrefix));
EmitIndexOf_LeftToRight(regexTree.FindOptimizations.LeadingCaseSensitivePrefix);
break;
case FindNextStartingPositionMode.LeadingPrefix_RightToLeft_CaseSensitive:
Debug.Assert(!string.IsNullOrEmpty(regexTree.FindOptimizations.LeadingCaseSensitivePrefix));
EmitIndexOf_RightToLeft(regexTree.FindOptimizations.LeadingCaseSensitivePrefix);
break;
case FindNextStartingPositionMode.LeadingSet_LeftToRight_CaseSensitive:
case FindNextStartingPositionMode.LeadingSet_LeftToRight_CaseInsensitive:
case FindNextStartingPositionMode.FixedSets_LeftToRight_CaseSensitive:
case FindNextStartingPositionMode.FixedSets_LeftToRight_CaseInsensitive:
Debug.Assert(regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
EmitFixedSet_LeftToRight();
break;
case FindNextStartingPositionMode.LeadingSet_RightToLeft_CaseSensitive:
case FindNextStartingPositionMode.LeadingSet_RightToLeft_CaseInsensitive:
Debug.Assert(regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
EmitFixedSet_RightToLeft();
break;
case FindNextStartingPositionMode.LiteralAfterLoop_LeftToRight_CaseSensitive:
Debug.Assert(regexTree.FindOptimizations.LiteralAfterLoop is not null);
EmitLiteralAfterAtomicLoop();
break;
default:
Debug.Fail($"Unexpected mode: {regexTree.FindOptimizations.FindMode}");
goto case FindNextStartingPositionMode.NoSearch;
case FindNextStartingPositionMode.NoSearch:
writer.WriteLine("return true;");
break;
}
}
}
writer.WriteLine();
const string NoStartingPositionFound = "NoStartingPositionFound";
writer.WriteLine("// No starting position found");
writer.WriteLine($"{NoStartingPositionFound}:");
writer.WriteLine($"base.runtextpos = {(!rtl ? "inputSpan.Length" : "0")};");
writer.WriteLine("return false;");
// We're done. Patch up any additional declarations.
ReplaceAdditionalDeclarations(writer, additionalDeclarations, additionalDeclarationsPosition, additionalDeclarationsIndent);
return;
// Emit a goto for the specified label.
void Goto(string label) => writer.WriteLine($"goto {label};");
// Emits any anchors. Returns true if the anchor roots any match to a specific location and thus no further
// searching is required; otherwise, false.
bool EmitAnchors()
{
// Anchors that fully implement TryFindNextPossibleStartingPosition, with a check that leads to immediate success or failure determination.
switch (regexTree.FindOptimizations.FindMode)
{
case FindNextStartingPositionMode.LeadingAnchor_LeftToRight_Beginning:
writer.WriteLine("// Beginning \\A anchor");
using (EmitBlock(writer, "if (pos != 0)"))
{
// If we're not currently at the beginning, we'll never be, so fail immediately.
Goto(NoStartingPositionFound);
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_LeftToRight_Start:
case FindNextStartingPositionMode.LeadingAnchor_RightToLeft_Start:
writer.WriteLine("// Start \\G anchor");
using (EmitBlock(writer, "if (pos != base.runtextstart)"))
{
// For both left-to-right and right-to-left, if we're not currently at the starting (because
// we've already moved beyond it), then we'll never be, so fail immediately.
Goto(NoStartingPositionFound);
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_LeftToRight_EndZ:
writer.WriteLine("// Leading end \\Z anchor");
using (EmitBlock(writer, "if (pos < inputSpan.Length - 1)"))
{
// If we're not currently at the end (or a newline just before it), skip ahead
// since nothing until then can possibly match.
writer.WriteLine("base.runtextpos = inputSpan.Length - 1;");
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_LeftToRight_End:
writer.WriteLine("// Leading end \\z anchor");
using (EmitBlock(writer, "if (pos < inputSpan.Length)"))
{
// If we're not currently at the end (or a newline just before it), skip ahead
// since nothing until then can possibly match.
writer.WriteLine("base.runtextpos = inputSpan.Length;");
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_RightToLeft_Beginning:
writer.WriteLine("// Beginning \\A anchor");
using (EmitBlock(writer, "if (pos != 0)"))
{
// If we're not currently at the beginning, skip ahead (or, rather, backwards)
// since nothing until then can possibly match. (We're iterating from the end
// to the beginning in RightToLeft mode.)
writer.WriteLine("base.runtextpos = 0;");
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_RightToLeft_EndZ:
writer.WriteLine("// Leading end \\Z anchor");
using (EmitBlock(writer, "if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\\n'))"))
{
// If we're not currently at the end, we'll never be (we're iterating from end to beginning),
// so fail immediately.
Goto(NoStartingPositionFound);
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.LeadingAnchor_RightToLeft_End:
writer.WriteLine("// Leading end \\z anchor");
using (EmitBlock(writer, "if (pos < inputSpan.Length)"))
{
// If we're not currently at the end, we'll never be (we're iterating from end to beginning),
// so fail immediately.
Goto(NoStartingPositionFound);
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.TrailingAnchor_FixedLength_LeftToRight_EndZ:
// Jump to the end, minus the min required length, which in this case is actually the fixed length, minus 1 (for a possible ending \n).
writer.WriteLine("// Trailing end \\Z anchor with fixed-length match");
using (EmitBlock(writer, $"if (pos < inputSpan.Length - {regexTree.FindOptimizations.MinRequiredLength + 1})"))
{
writer.WriteLine($"base.runtextpos = inputSpan.Length - {regexTree.FindOptimizations.MinRequiredLength + 1};");
}
writer.WriteLine("return true;");
return true;
case FindNextStartingPositionMode.TrailingAnchor_FixedLength_LeftToRight_End:
// Jump to the end, minus the min required length, which in this case is actually the fixed length.
writer.WriteLine("// Trailing end \\z anchor with fixed-length match");
using (EmitBlock(writer, $"if (pos < inputSpan.Length - {regexTree.FindOptimizations.MinRequiredLength})"))
{
writer.WriteLine($"base.runtextpos = inputSpan.Length - {regexTree.FindOptimizations.MinRequiredLength};");
}
writer.WriteLine("return true;");
return true;
}
// Now handle anchors that boost the position but may not determine immediate success or failure.
switch (regexTree.FindOptimizations.LeadingAnchor)
{
case RegexNodeKind.Bol:
// Optimize the handling of a Beginning-Of-Line (BOL) anchor. BOL is special, in that unlike
// other anchors like Beginning, there are potentially multiple places a BOL can match. So unlike
// the other anchors, which all skip all subsequent processing if found, with BOL we just use it
// to boost our position to the next line, and then continue normally with any searches.
writer.WriteLine("// Beginning-of-line anchor");
using (EmitBlock(writer, "if (pos > 0 && inputSpan[pos - 1] != '\\n')"))
{
writer.WriteLine("int newlinePos = inputSpan.Slice(pos).IndexOf('\\n');");
using (EmitBlock(writer, "if ((uint)newlinePos > inputSpan.Length - pos - 1)"))
{
Goto(NoStartingPositionFound);
}
writer.WriteLine("pos = newlinePos + pos + 1;");
// We've updated the position. Make sure there's still enough room in the input for a possible match.
using (EmitBlock(writer, minRequiredLength switch
{
0 => "if (pos > inputSpan.Length)",
1 => "if (pos >= inputSpan.Length)",
_ => $"if (pos > inputSpan.Length - {minRequiredLength})"
}))
{
Goto(NoStartingPositionFound);
}
}
writer.WriteLine();
break;
}
switch (regexTree.FindOptimizations.TrailingAnchor)
{
case RegexNodeKind.End when regexTree.FindOptimizations.MaxPossibleLength is int maxLength:
writer.WriteLine("// End \\z anchor with maximum-length match");
using (EmitBlock(writer, $"if (pos < inputSpan.Length - {maxLength})"))
{
writer.WriteLine($"pos = inputSpan.Length - {maxLength};");
}
writer.WriteLine();
break;
case RegexNodeKind.EndZ when regexTree.FindOptimizations.MaxPossibleLength is int maxLength:
writer.WriteLine("// End \\Z anchor with maximum-length match");
using (EmitBlock(writer, $"if (pos < inputSpan.Length - {maxLength + 1})"))
{
writer.WriteLine($"pos = inputSpan.Length - {maxLength + 1};");
}
writer.WriteLine();
break;
}
return false;
}
// Emits a case-sensitive prefix search for a string at the beginning of the pattern.
void EmitIndexOf_LeftToRight(string prefix)
{
writer.WriteLine($"int i = inputSpan.Slice(pos).IndexOf({Literal(prefix)});");
writer.WriteLine("if (i >= 0)");
writer.WriteLine("{");
writer.WriteLine(" base.runtextpos = pos + i;");
writer.WriteLine(" return true;");
writer.WriteLine("}");
}
// Emits a case-sensitive right-to-left prefix search for a string at the beginning of the pattern.
void EmitIndexOf_RightToLeft(string prefix)
{
writer.WriteLine($"pos = inputSpan.Slice(0, pos).LastIndexOf({Literal(prefix)});");
writer.WriteLine("if (pos >= 0)");
writer.WriteLine("{");
writer.WriteLine($" base.runtextpos = pos + {prefix.Length};");
writer.WriteLine(" return true;");
writer.WriteLine("}");
}
// Emits a search for a set at a fixed position from the start of the pattern,
// and potentially other sets at other fixed positions in the pattern.
void EmitFixedSet_LeftToRight()
{
List<(char[]? Chars, string Set, int Distance, bool CaseInsensitive)>? sets = regexTree.FindOptimizations.FixedDistanceSets;
(char[]? Chars, string Set, int Distance, bool CaseInsensitive) primarySet = sets![0];
const int MaxSets = 4;
int setsToUse = Math.Min(sets.Count, MaxSets);
// If we can use IndexOf{Any}, try to accelerate the skip loop via vectorization to match the first prefix.
// We can use it if this is a case-sensitive class with a small number of characters in the class.
int setIndex = 0;
bool canUseIndexOf = !primarySet.CaseInsensitive && primarySet.Chars is not null;
bool needLoop = !canUseIndexOf || setsToUse > 1;
FinishEmitScope loopBlock = default;
if (needLoop)
{
writer.WriteLine("ReadOnlySpan<char> span = inputSpan.Slice(pos);");
string upperBound = "span.Length" + (setsToUse > 1 || primarySet.Distance != 0 ? $" - {minRequiredLength - 1}" : "");
loopBlock = EmitBlock(writer, $"for (int i = 0; i < {upperBound}; i++)");
}
if (canUseIndexOf)
{
string span = needLoop ?
"span" :
"inputSpan.Slice(pos)";
span = (needLoop, primarySet.Distance) switch
{
(false, 0) => span,
(true, 0) => $"{span}.Slice(i)",
(false, _) => $"{span}.Slice({primarySet.Distance})",
(true, _) => $"{span}.Slice(i + {primarySet.Distance})",
};
string indexOf = primarySet.Chars!.Length switch
{
1 => $"{span}.IndexOf({Literal(primarySet.Chars[0])})",
2 => $"{span}.IndexOfAny({Literal(primarySet.Chars[0])}, {Literal(primarySet.Chars[1])})",
3 => $"{span}.IndexOfAny({Literal(primarySet.Chars[0])}, {Literal(primarySet.Chars[1])}, {Literal(primarySet.Chars[2])})",
_ => $"{span}.IndexOfAny({Literal(new string(primarySet.Chars))})",
};
if (needLoop)
{
writer.WriteLine($"int indexOfPos = {indexOf};");
using (EmitBlock(writer, "if (indexOfPos < 0)"))
{
Goto(NoStartingPositionFound);
}
writer.WriteLine("i += indexOfPos;");
writer.WriteLine();
if (setsToUse > 1)
{
using (EmitBlock(writer, $"if (i >= span.Length - {minRequiredLength - 1})"))
{
Goto(NoStartingPositionFound);
}
writer.WriteLine();
}
}
else
{
writer.WriteLine($"int i = {indexOf};");
using (EmitBlock(writer, "if (i >= 0)"))
{
writer.WriteLine("base.runtextpos = pos + i;");
writer.WriteLine("return true;");
}
}
setIndex = 1;
}
if (needLoop)
{
Debug.Assert(setIndex == 0 || setIndex == 1);
bool hasCharClassConditions = false;
if (setIndex < setsToUse)
{
// if (CharInClass(textSpan[i + charClassIndex], prefix[0], "...") &&
// ...)
Debug.Assert(needLoop);
int start = setIndex;
for (; setIndex < setsToUse; setIndex++)
{
string spanIndex = $"span[i{(sets[setIndex].Distance > 0 ? $" + {sets[setIndex].Distance}" : "")}]";
string charInClassExpr = MatchCharacterClass(hasTextInfo, options, spanIndex, sets[setIndex].Set, sets[setIndex].CaseInsensitive, negate: false, additionalDeclarations, requiredHelpers);
if (setIndex == start)
{
writer.Write($"if ({charInClassExpr}");
}
else
{
writer.WriteLine(" &&");
writer.Write($" {charInClassExpr}");
}
}
writer.WriteLine(")");
hasCharClassConditions = true;
}
using (hasCharClassConditions ? EmitBlock(writer, null) : default)
{
writer.WriteLine("base.runtextpos = pos + i;");
writer.WriteLine("return true;");
}
}
loopBlock.Dispose();
}
// Emits a right-to-left search for a set at a fixed position from the start of the pattern.
// (Currently that position will always be a distance of 0, meaning the start of the pattern itself.)
void EmitFixedSet_RightToLeft()
{
(char[]? Chars, string Set, int Distance, bool CaseInsensitive) set = regexTree.FindOptimizations.FixedDistanceSets![0];
Debug.Assert(set.Distance == 0);
if (set.Chars is { Length: 1 } && !set.CaseInsensitive)
{
writer.WriteLine($"pos = inputSpan.Slice(0, pos).LastIndexOf({Literal(set.Chars[0])});");
writer.WriteLine("if (pos >= 0)");
writer.WriteLine("{");
writer.WriteLine(" base.runtextpos = pos + 1;");
writer.WriteLine(" return true;");
writer.WriteLine("}");
}
else
{
using (EmitBlock(writer, "while ((uint)--pos < (uint)inputSpan.Length)"))
{
using (EmitBlock(writer, $"if ({MatchCharacterClass(hasTextInfo, options, "inputSpan[pos]", set.Set, set.CaseInsensitive, negate: false, additionalDeclarations, requiredHelpers)})"))
{
writer.WriteLine("base.runtextpos = pos + 1;");
writer.WriteLine("return true;");
}
}
}
}
// Emits a search for a literal following a leading atomic single-character loop.
void EmitLiteralAfterAtomicLoop()
{
Debug.Assert(regexTree.FindOptimizations.LiteralAfterLoop is not null);
(RegexNode LoopNode, (char Char, string? String, char[]? Chars) Literal) target = regexTree.FindOptimizations.LiteralAfterLoop.Value;
Debug.Assert(target.LoopNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic);
Debug.Assert(target.LoopNode.N == int.MaxValue);
using (EmitBlock(writer, "while (true)"))
{
writer.WriteLine($"ReadOnlySpan<char> slice = inputSpan.Slice(pos);");
writer.WriteLine();
// Find the literal. If we can't find it, we're done searching.
writer.Write("int i = slice.");
writer.WriteLine(
target.Literal.String is string literalString ? $"IndexOf({Literal(literalString)});" :
target.Literal.Chars is not char[] literalChars ? $"IndexOf({Literal(target.Literal.Char)});" :
literalChars.Length switch
{
2 => $"IndexOfAny({Literal(literalChars[0])}, {Literal(literalChars[1])});",
3 => $"IndexOfAny({Literal(literalChars[0])}, {Literal(literalChars[1])}, {Literal(literalChars[2])});",
_ => $"IndexOfAny({Literal(new string(literalChars))});",
});
using (EmitBlock(writer, $"if (i < 0)"))
{
writer.WriteLine("break;");
}
writer.WriteLine();
// We found the literal. Walk backwards from it finding as many matches as we can against the loop.
writer.WriteLine("int prev = i;");
writer.WriteLine($"while ((uint)--prev < (uint)slice.Length && {MatchCharacterClass(hasTextInfo, options, "slice[prev]", target.LoopNode.Str!, caseInsensitive: false, negate: false, additionalDeclarations, requiredHelpers)});");
if (target.LoopNode.M > 0)
{
// If we found fewer than needed, loop around to try again. The loop doesn't overlap with the literal,
// so we can start from after the last place the literal matched.
writer.WriteLine($"if ((i - prev - 1) < {target.LoopNode.M})");
writer.WriteLine("{");
writer.WriteLine(" pos += i + 1;");
writer.WriteLine(" continue;");
writer.WriteLine("}");
}
writer.WriteLine();
// We have a winner. The starting position is just after the last position that failed to match the loop.
// TODO: It'd be nice to be able to communicate i as a place the matching engine can start matching
// after the loop, so that it doesn't need to re-match the loop.
writer.WriteLine("base.runtextpos = pos + prev + 1;");
writer.WriteLine("return true;");
}
}
// If a TextInfo is needed to perform ToLower operations, emits a local initialized to the TextInfo to use.
static void EmitTextInfo(IndentedTextWriter writer, ref bool hasTextInfo, RegexMethod rm)
{
// Emit local to store current culture if needed
if ((rm.Options & RegexOptions.CultureInvariant) == 0)
{
bool needsCulture = rm.Tree.FindOptimizations.FindMode switch
{
FindNextStartingPositionMode.FixedLiteral_LeftToRight_CaseInsensitive or
FindNextStartingPositionMode.FixedSets_LeftToRight_CaseInsensitive or
FindNextStartingPositionMode.LeadingSet_LeftToRight_CaseInsensitive => true,
_ when rm.Tree.FindOptimizations.FixedDistanceSets is List<(char[]? Chars, string Set, int Distance, bool CaseInsensitive)> sets => sets.Exists(set => set.CaseInsensitive),
_ => false,
};
if (needsCulture)
{
hasTextInfo = true;
writer.WriteLine("TextInfo textInfo = CultureInfo.CurrentCulture.TextInfo;");
}
}
}
}
/// <summary>Emits the body of the TryMatchAtCurrentPosition.</summary>
private static void EmitTryMatchAtCurrentPosition(IndentedTextWriter writer, RegexMethod rm, AnalysisResults analysis, Dictionary<string, string[]> requiredHelpers)
{
// In .NET Framework and up through .NET Core 3.1, the code generated for RegexOptions.Compiled was effectively an unrolled
// version of what RegexInterpreter would process. The RegexNode tree would be turned into a series of opcodes via
// RegexWriter; the interpreter would then sit in a loop processing those opcodes, and the RegexCompiler iterated through the
// opcodes generating code for each equivalent to what the interpreter would do albeit with some decisions made at compile-time
// rather than at run-time. This approach, however, lead to complicated code that wasn't pay-for-play (e.g. a big backtracking
// jump table that all compilations went through even if there was no backtracking), that didn't factor in the shape of the
// tree (e.g. it's difficult to add optimizations based on interactions between nodes in the graph), and that didn't read well
// when decompiled from IL to C# or when directly emitted as C# as part of a source generator.
//
// This implementation is instead based on directly walking the RegexNode tree and outputting code for each node in the graph.
// A dedicated for each kind of RegexNode emits the code necessary to handle that node's processing, including recursively
// calling the relevant function for any of its children nodes. Backtracking is handled not via a giant jump table, but instead
// by emitting direct jumps to each backtracking construct. This is achieved by having all match failures jump to a "done"
// label that can be changed by a previous emitter, e.g. before EmitLoop returns, it ensures that "doneLabel" is set to the
// label that code should jump back to when backtracking. That way, a subsequent EmitXx function doesn't need to know exactly
// where to jump: it simply always jumps to "doneLabel" on match failure, and "doneLabel" is always configured to point to
// the right location. In an expression without backtracking, or before any backtracking constructs have been encountered,
// "doneLabel" is simply the final return location from the TryMatchAtCurrentPosition method that will undo any captures and exit, signaling to
// the calling scan loop that nothing was matched.
// Arbitrary limit for unrolling vs creating a loop. We want to balance size in the generated
// code with other costs, like the (small) overhead of slicing to create the temp span to iterate.
const int MaxUnrollSize = 16;
RegexOptions options = (RegexOptions)rm.Options;
RegexTree regexTree = rm.Tree;
// Helper to define names. Names start unadorned, but as soon as there's repetition,
// they begin to have a numbered suffix.
var usedNames = new Dictionary<string, int>();
// Every RegexTree is rooted in the implicit Capture for the whole expression.
// Skip the Capture node. We handle the implicit root capture specially.
RegexNode node = regexTree.Root;
Debug.Assert(node.Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
Debug.Assert(node.ChildCount() == 1, "Capture nodes should have one child");
node = node.Child(0);
// In some limited cases, TryFindNextPossibleStartingPosition will only return true if it successfully matched the whole expression.
// We can special case these to do essentially nothing in TryMatchAtCurrentPosition other than emit the capture.
switch (node.Kind)
{
case RegexNodeKind.Multi or RegexNodeKind.Notone or RegexNodeKind.One or RegexNodeKind.Set when !IsCaseInsensitive(node):
// This is the case for single and multiple characters, though the whole thing is only guaranteed
// to have been validated in TryFindNextPossibleStartingPosition when doing case-sensitive comparison.
writer.WriteLine($"int start = base.runtextpos;");
writer.WriteLine($"int end = start {((node.Options & RegexOptions.RightToLeft) == 0 ? "+" : "-")} {(node.Kind == RegexNodeKind.Multi ? node.Str!.Length : 1)};");
writer.WriteLine("base.Capture(0, start, end);");
writer.WriteLine("base.runtextpos = end;");
writer.WriteLine("return true;");
return;
case RegexNodeKind.Empty:
// This case isn't common in production, but it's very common when first getting started with the
// source generator and seeing what happens as you add more to expressions. When approaching
// it from a learning perspective, this is very common, as it's the empty string you start with.
writer.WriteLine("base.Capture(0, base.runtextpos, base.runtextpos);");
writer.WriteLine("return true;");
return;
}
// In some cases, we need to emit declarations at the beginning of the method, but we only discover we need them later.
// To handle that, we build up a collection of all the declarations to include, track where they should be inserted,
// and then insert them at that position once everything else has been output.
var additionalDeclarations = new HashSet<string>();
var additionalLocalFunctions = new Dictionary<string, string[]>();
// Declare some locals.
string sliceSpan = "slice";
writer.WriteLine("int pos = base.runtextpos;");
writer.WriteLine($"int original_pos = pos;");
bool hasTimeout = EmitLoopTimeoutCounterIfNeeded(writer, rm);
bool hasTextInfo = EmitInitializeCultureForTryMatchAtCurrentPositionIfNecessary(writer, rm, analysis);
writer.Flush();
int additionalDeclarationsPosition = ((StringWriter)writer.InnerWriter).GetStringBuilder().Length;
int additionalDeclarationsIndent = writer.Indent;
// The implementation tries to use const indexes into the span wherever possible, which we can do
// for all fixed-length constructs. In such cases (e.g. single chars, repeaters, strings, etc.)
// we know at any point in the regex exactly how far into it we are, and we can use that to index
// into the span created at the beginning of the routine to begin at exactly where we're starting
// in the input. When we encounter a variable-length construct, we transfer the static value to
// pos, slicing the inputSpan appropriately, and then zero out the static position.
int sliceStaticPos = 0;
SliceInputSpan(writer, defineLocal: true);
writer.WriteLine();
// doneLabel starts out as the top-level label for the whole expression failing to match. However,
// it may be changed by the processing of a node to point to whereever subsequent match failures
// should jump to, in support of backtracking or other constructs. For example, before emitting
// the code for a branch N, an alternation will set the the doneLabel to point to the label for
// processing the next branch N+1: that way, any failures in the branch N's processing will
// implicitly end up jumping to the right location without needing to know in what context it's used.
string doneLabel = ReserveName("NoMatch");
string topLevelDoneLabel = doneLabel;
// Check whether there are captures anywhere in the expression. If there isn't, we can skip all
// the boilerplate logic around uncapturing, as there won't be anything to uncapture.
bool expressionHasCaptures = analysis.MayContainCapture(node);
// Emit the code for all nodes in the tree.
EmitNode(node);
// If we fall through to this place in the code, we've successfully matched the expression.
writer.WriteLine();
writer.WriteLine("// The input matched.");
if (sliceStaticPos > 0)
{
EmitAdd(writer, "pos", sliceStaticPos); // TransferSliceStaticPosToPos would also slice, which isn't needed here
}
writer.WriteLine("base.runtextpos = pos;");
writer.WriteLine("base.Capture(0, original_pos, pos);");
writer.WriteLine("return true;");
// We're done with the match.
// Patch up any additional declarations.
ReplaceAdditionalDeclarations(writer, additionalDeclarations, additionalDeclarationsPosition, additionalDeclarationsIndent);
// And emit any required helpers.
if (additionalLocalFunctions.Count != 0)
{
foreach (KeyValuePair<string, string[]> localFunctions in additionalLocalFunctions.OrderBy(k => k.Key))
{
writer.WriteLine();
foreach (string line in localFunctions.Value)
{
writer.WriteLine(line);
}
}
}
return;
// Helper to create a name guaranteed to be unique within the function.
string ReserveName(string prefix)
{
usedNames.TryGetValue(prefix, out int count);
usedNames[prefix] = count + 1;
return count == 0 ? prefix : $"{prefix}{count}";
}
// Helper to emit a label. As of C# 10, labels aren't statements of their own and need to adorn a following statement;
// if a label appears just before a closing brace, then, it's a compilation error. To avoid issues there, this by
// default implements a blank statement (a semicolon) after each label, but individual uses can opt-out of the semicolon
// when it's known the label will always be followed by a statement.
void MarkLabel(string label, bool emitSemicolon = true) => writer.WriteLine($"{label}:{(emitSemicolon ? ";" : "")}");
// Emits a goto to jump to the specified label. However, if the specified label is the top-level done label indicating
// that the entire match has failed, we instead emit our epilogue, uncapturing if necessary and returning out of TryMatchAtCurrentPosition.
void Goto(string label)
{
if (label == topLevelDoneLabel)
{
// We only get here in the code if the whole expression fails to match and jumps to
// the original value of doneLabel.
if (expressionHasCaptures)
{
EmitUncaptureUntil("0");
}
writer.WriteLine("return false; // The input didn't match.");
}
else
{
writer.WriteLine($"goto {label};");
}
}
// Emits a case or default line followed by an indented body.
void CaseGoto(string clause, string label)
{
writer.WriteLine(clause);
writer.Indent++;
Goto(label);
writer.Indent--;
}
// Whether the node has RegexOptions.IgnoreCase set.
// TODO: https://github.com/dotnet/runtime/issues/61048. We should be able to delete this and all usage sites once
// IgnoreCase is erradicated from the tree. The only place it should possibly be left after that work is in a Backreference,
// and that can do this check directly as needed.
static bool IsCaseInsensitive(RegexNode node) => (node.Options & RegexOptions.IgnoreCase) != 0;
// Slices the inputSpan starting at pos until end and stores it into slice.
void SliceInputSpan(IndentedTextWriter writer, bool defineLocal = false)
{
if (defineLocal)
{
writer.Write("ReadOnlySpan<char> ");
}
writer.WriteLine($"{sliceSpan} = inputSpan.Slice(pos);");
}
// Emits the sum of a constant and a value from a local.
string Sum(int constant, string? local = null) =>
local is null ? constant.ToString(CultureInfo.InvariantCulture) :
constant == 0 ? local :
$"{constant} + {local}";
// Emits a check that the span is large enough at the currently known static position to handle the required additional length.
void EmitSpanLengthCheck(int requiredLength, string? dynamicRequiredLength = null)
{
Debug.Assert(requiredLength > 0);
using (EmitBlock(writer, $"if ({SpanLengthCheck(requiredLength, dynamicRequiredLength)})"))
{
Goto(doneLabel);
}
}
// Returns a length check for the current span slice. The check returns true if
// the span isn't long enough for the specified length.
string SpanLengthCheck(int requiredLength, string? dynamicRequiredLength = null) =>
dynamicRequiredLength is null && sliceStaticPos + requiredLength == 1 ? $"{sliceSpan}.IsEmpty" :
$"(uint){sliceSpan}.Length < {Sum(sliceStaticPos + requiredLength, dynamicRequiredLength)}";
// Adds the value of sliceStaticPos into the pos local, slices slice by the corresponding amount,
// and zeros out sliceStaticPos.
void TransferSliceStaticPosToPos(bool forceSliceReload = false)
{
if (sliceStaticPos > 0)
{
EmitAdd(writer, "pos", sliceStaticPos);
sliceStaticPos = 0;
SliceInputSpan(writer);
}
else if (forceSliceReload)
{
SliceInputSpan(writer);
}
}
// Emits the code for an alternation.
void EmitAlternation(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Alternate, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
int childCount = node.ChildCount();
Debug.Assert(childCount >= 2);
string originalDoneLabel = doneLabel;
// Both atomic and non-atomic are supported. While a parent RegexNode.Atomic node will itself
// successfully prevent backtracking into this child node, we can emit better / cheaper code
// for an Alternate when it is atomic, so we still take it into account here.
Debug.Assert(node.Parent is not null);
bool isAtomic = analysis.IsAtomicByAncestor(node);
// If no child branch overlaps with another child branch, we can emit more streamlined code
// that avoids checking unnecessary branches, e.g. with abc|def|ghi if the next character in
// the input is 'a', we needn't try the def or ghi branches. A simple, relatively common case
// of this is if every branch begins with a specific, unique character, in which case
// the whole alternation can be treated as a simple switch, so we special-case that. However,
// we can't goto _into_ switch cases, which means we can't use this approach if there's any
// possibility of backtracking into the alternation.
bool useSwitchedBranches = false;
if ((node.Options & RegexOptions.RightToLeft) == 0)
{
useSwitchedBranches = isAtomic;
if (!useSwitchedBranches)
{
useSwitchedBranches = true;
for (int i = 0; i < childCount; i++)
{
if (analysis.MayBacktrack(node.Child(i)))
{
useSwitchedBranches = false;
break;
}
}
}
}
// Detect whether every branch begins with one or more unique characters.
const int SetCharsSize = 5; // arbitrary limit (for IgnoreCase, we want this to be at least 3 to handle the vast majority of values)
Span<char> setChars = stackalloc char[SetCharsSize];
if (useSwitchedBranches)
{
// Iterate through every branch, seeing if we can easily find a starting One, Multi, or small Set.
// If we can, extract its starting char (or multiple in the case of a set), validate that all such
// starting characters are unique relative to all the branches.
var seenChars = new HashSet<char>();
for (int i = 0; i < childCount && useSwitchedBranches; i++)
{
// If it's not a One, Multi, or Set, we can't apply this optimization.
// If it's IgnoreCase (and wasn't reduced to a non-IgnoreCase set), also ignore it to keep the logic simple.
if (node.Child(i).FindBranchOneMultiOrSetStart() is not RegexNode oneMultiOrSet ||
IsCaseInsensitive(oneMultiOrSet))
{
useSwitchedBranches = false;
break;
}
// If it's a One or a Multi, get the first character and add it to the set.
// If it was already in the set, we can't apply this optimization.
if (oneMultiOrSet.Kind is RegexNodeKind.One or RegexNodeKind.Multi)
{
if (!seenChars.Add(oneMultiOrSet.FirstCharOfOneOrMulti()))
{
useSwitchedBranches = false;
break;
}
}
else
{
// The branch begins with a set. Make sure it's a set of only a few characters
// and get them. If we can't, we can't apply this optimization.
Debug.Assert(oneMultiOrSet.Kind is RegexNodeKind.Set);
int numChars;
if (RegexCharClass.IsNegated(oneMultiOrSet.Str!) ||
(numChars = RegexCharClass.GetSetChars(oneMultiOrSet.Str!, setChars)) == 0)
{
useSwitchedBranches = false;
break;
}
// Check to make sure each of the chars is unique relative to all other branches examined.
foreach (char c in setChars.Slice(0, numChars))
{
if (!seenChars.Add(c))
{
useSwitchedBranches = false;
break;
}
}
}
}
}
if (useSwitchedBranches)
{
// Note: This optimization does not exist with RegexOptions.Compiled. Here we rely on the
// C# compiler to lower the C# switch statement with appropriate optimizations. In some
// cases there are enough branches that the compiler will emit a jump table. In others
// it'll optimize the order of checks in order to minimize the total number in the worst
// case. In any case, we get easier to read and reason about C#.
EmitSwitchedBranches();
}
else
{
EmitAllBranches();
}
return;
// Emits the code for a switch-based alternation of non-overlapping branches.
void EmitSwitchedBranches()
{
// We need at least 1 remaining character in the span, for the char to switch on.
EmitSpanLengthCheck(1);
writer.WriteLine();
// Emit a switch statement on the first char of each branch.
using (EmitBlock(writer, $"switch ({sliceSpan}[{sliceStaticPos++}])"))
{
Span<char> setChars = stackalloc char[SetCharsSize]; // needs to be same size as detection check in caller
int startingSliceStaticPos = sliceStaticPos;
// Emit a case for each branch.
for (int i = 0; i < childCount; i++)
{
sliceStaticPos = startingSliceStaticPos;
RegexNode child = node.Child(i);
Debug.Assert(child.Kind is RegexNodeKind.One or RegexNodeKind.Multi or RegexNodeKind.Set or RegexNodeKind.Concatenate, DescribeNode(child, analysis));
Debug.Assert(child.Kind is not RegexNodeKind.Concatenate || (child.ChildCount() >= 2 && child.Child(0).Kind is RegexNodeKind.One or RegexNodeKind.Multi or RegexNodeKind.Set));
RegexNode? childStart = child.FindBranchOneMultiOrSetStart();
Debug.Assert(childStart is not null, "Unexpectedly couldn't find the branch starting node.");
Debug.Assert(!IsCaseInsensitive(childStart), "Expected only to find non-IgnoreCase branch starts");
if (childStart.Kind is RegexNodeKind.Set)
{
int numChars = RegexCharClass.GetSetChars(childStart.Str!, setChars);
Debug.Assert(numChars != 0);
writer.WriteLine($"case {string.Join(" or ", setChars.Slice(0, numChars).ToArray().Select(c => Literal(c)))}:");
}
else
{
writer.WriteLine($"case {Literal(childStart.FirstCharOfOneOrMulti())}:");
}
writer.Indent++;
// Emit the code for the branch, without the first character that was already matched in the switch.
switch (child.Kind)
{
case RegexNodeKind.Multi:
EmitNode(CloneMultiWithoutFirstChar(child));
writer.WriteLine();
break;
case RegexNodeKind.Concatenate:
var newConcat = new RegexNode(RegexNodeKind.Concatenate, child.Options);
if (childStart.Kind == RegexNodeKind.Multi)
{
newConcat.AddChild(CloneMultiWithoutFirstChar(childStart));
}
int concatChildCount = child.ChildCount();
for (int j = 1; j < concatChildCount; j++)
{
newConcat.AddChild(child.Child(j));
}
EmitNode(newConcat.Reduce());
writer.WriteLine();
break;
static RegexNode CloneMultiWithoutFirstChar(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Multi);
Debug.Assert(node.Str!.Length >= 2);
return node.Str!.Length == 2 ?
new RegexNode(RegexNodeKind.One, node.Options, node.Str![1]) :
new RegexNode(RegexNodeKind.Multi, node.Options, node.Str!.Substring(1));
}
}
// This is only ever used for atomic alternations, so we can simply reset the doneLabel
// after emitting the child, as nothing will backtrack here (and we need to reset it
// so that all branches see the original).
doneLabel = originalDoneLabel;
// If we get here in the generated code, the branch completed successfully.
// Before jumping to the end, we need to zero out sliceStaticPos, so that no
// matter what the value is after the branch, whatever follows the alternate
// will see the same sliceStaticPos.
TransferSliceStaticPosToPos();
writer.WriteLine($"break;");
writer.WriteLine();
writer.Indent--;
}
// Default branch if the character didn't match the start of any branches.
CaseGoto("default:", doneLabel);
}
}
void EmitAllBranches()
{
// Label to jump to when any branch completes successfully.
string matchLabel = ReserveName("AlternationMatch");
// Save off pos. We'll need to reset this each time a branch fails.
string startingPos = ReserveName("alternation_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
int startingSliceStaticPos = sliceStaticPos;
// We need to be able to undo captures in two situations:
// - If a branch of the alternation itself contains captures, then if that branch
// fails to match, any captures from that branch until that failure point need to
// be uncaptured prior to jumping to the next branch.
// - If the expression after the alternation contains captures, then failures
// to match in those expressions could trigger backtracking back into the
// alternation, and thus we need uncapture any of them.
// As such, if the alternation contains captures or if it's not atomic, we need
// to grab the current crawl position so we can unwind back to it when necessary.
// We can do all of the uncapturing as part of falling through to the next branch.
// If we fail in a branch, then such uncapturing will unwind back to the position
// at the start of the alternation. If we fail after the alternation, and the
// matched branch didn't contain any backtracking, then the failure will end up
// jumping to the next branch, which will unwind the captures. And if we fail after
// the alternation and the matched branch did contain backtracking, that backtracking
// construct is responsible for unwinding back to its starting crawl position. If
// it eventually ends up failing, that failure will result in jumping to the next branch
// of the alternation, which will again dutifully unwind the remaining captures until
// what they were at the start of the alternation. Of course, if there are no captures
// anywhere in the regex, we don't have to do any of that.
string? startingCapturePos = null;
if (expressionHasCaptures && (analysis.MayContainCapture(node) || !isAtomic))
{
startingCapturePos = ReserveName("alternation_starting_capturepos");
writer.WriteLine($"int {startingCapturePos} = base.Crawlpos();");
}
writer.WriteLine();
// After executing the alternation, subsequent matching may fail, at which point execution
// will need to backtrack to the alternation. We emit a branching table at the end of the
// alternation, with a label that will be left as the "doneLabel" upon exiting emitting the
// alternation. The branch table is populated with an entry for each branch of the alternation,
// containing either the label for the last backtracking construct in the branch if such a construct
// existed (in which case the doneLabel upon emitting that node will be different from before it)
// or the label for the next branch.
var labelMap = new string[childCount];
string backtrackLabel = ReserveName("AlternationBacktrack");
for (int i = 0; i < childCount; i++)
{
// If the alternation isn't atomic, backtracking may require our jump table jumping back
// into these branches, so we can't use actual scopes, as that would hide the labels.
using (EmitScope(writer, $"Branch {i}", faux: !isAtomic))
{
bool isLastBranch = i == childCount - 1;
string? nextBranch = null;
if (!isLastBranch)
{
// Failure to match any branch other than the last one should result
// in jumping to process the next branch.
nextBranch = ReserveName("AlternationBranch");
doneLabel = nextBranch;
}
else
{
// Failure to match the last branch is equivalent to failing to match
// the whole alternation, which means those failures should jump to
// what "doneLabel" was defined as when starting the alternation.
doneLabel = originalDoneLabel;
}
// Emit the code for each branch.
EmitNode(node.Child(i));
writer.WriteLine();
// Add this branch to the backtracking table. At this point, either the child
// had backtracking constructs, in which case doneLabel points to the last one
// and that's where we'll want to jump to, or it doesn't, in which case doneLabel
// still points to the nextBranch, which similarly is where we'll want to jump to.
if (!isAtomic)
{
EmitStackPush(startingCapturePos is not null ?
new[] { i.ToString(), startingPos, startingCapturePos } :
new[] { i.ToString(), startingPos });
}
labelMap[i] = doneLabel;
// If we get here in the generated code, the branch completed successfully.
// Before jumping to the end, we need to zero out sliceStaticPos, so that no
// matter what the value is after the branch, whatever follows the alternate
// will see the same sliceStaticPos.
TransferSliceStaticPosToPos();
if (!isLastBranch || !isAtomic)
{
// If this isn't the last branch, we're about to output a reset section,
// and if this isn't atomic, there will be a backtracking section before
// the end of the method. In both of those cases, we've successfully
// matched and need to skip over that code. If, however, this is the
// last branch and this is an atomic alternation, we can just fall
// through to the successfully matched location.
Goto(matchLabel);
}
// Reset state for next branch and loop around to generate it. This includes
// setting pos back to what it was at the beginning of the alternation,
// updating slice to be the full length it was, and if there's a capture that
// needs to be reset, uncapturing it.
if (!isLastBranch)
{
writer.WriteLine();
MarkLabel(nextBranch!, emitSemicolon: false);
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
if (startingCapturePos is not null)
{
EmitUncaptureUntil(startingCapturePos);
}
}
}
writer.WriteLine();
}
// We should never fall through to this location in the generated code. Either
// a branch succeeded in matching and jumped to the end, or a branch failed in
// matching and jumped to the next branch location. We only get to this code
// if backtracking occurs and the code explicitly jumps here based on our setting
// "doneLabel" to the label for this section. Thus, we only need to emit it if
// something can backtrack to us, which can't happen if we're inside of an atomic
// node. Thus, emit the backtracking section only if we're non-atomic.
if (isAtomic)
{
doneLabel = originalDoneLabel;
}
else
{
doneLabel = backtrackLabel;
MarkLabel(backtrackLabel, emitSemicolon: false);
EmitStackPop(startingCapturePos is not null ?
new[] { startingCapturePos, startingPos } :
new[] { startingPos});
using (EmitBlock(writer, $"switch ({StackPop()})"))
{
for (int i = 0; i < labelMap.Length; i++)
{
CaseGoto($"case {i}:", labelMap[i]);
}
}
writer.WriteLine();
}
// Successfully completed the alternate.
MarkLabel(matchLabel);
Debug.Assert(sliceStaticPos == 0);
}
}
// Emits the code to handle a backreference.
void EmitBackreference(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Backreference, $"Unexpected type: {node.Kind}");
int capnum = RegexParser.MapCaptureNumber(node.M, rm.Tree.CaptureNumberSparseMapping);
if (sliceStaticPos > 0)
{
TransferSliceStaticPosToPos();
writer.WriteLine();
}
// If the specified capture hasn't yet captured anything, fail to match... except when using RegexOptions.ECMAScript,
// in which case per ECMA 262 section 21.2.2.9 the backreference should succeed.
if ((node.Options & RegexOptions.ECMAScript) != 0)
{
writer.WriteLine($"// If the {DescribeCapture(node.M, analysis)} hasn't matched, the backreference matches with RegexOptions.ECMAScript rules.");
using (EmitBlock(writer, $"if (base.IsMatched({capnum}))"))
{
EmitWhenHasCapture();
}
}
else
{
writer.WriteLine($"// If the {DescribeCapture(node.M, analysis)} hasn't matched, the backreference doesn't match.");
using (EmitBlock(writer, $"if (!base.IsMatched({capnum}))"))
{
Goto(doneLabel);
}
writer.WriteLine();
EmitWhenHasCapture();
}
void EmitWhenHasCapture()
{
writer.WriteLine("// Get the captured text. If it doesn't match at the current position, the backreference doesn't match.");
additionalDeclarations.Add("int matchLength = 0;");
writer.WriteLine($"matchLength = base.MatchLength({capnum});");
bool caseInsensitive = IsCaseInsensitive(node);
if ((node.Options & RegexOptions.RightToLeft) == 0)
{
if (!caseInsensitive)
{
// If we're case-sensitive, we can simply validate that the remaining length of the slice is sufficient
// to possibly match, and then do a SequenceEqual against the matched text.
writer.WriteLine($"if ({sliceSpan}.Length < matchLength || ");
using (EmitBlock(writer, $" !inputSpan.Slice(base.MatchIndex({capnum}), matchLength).SequenceEqual({sliceSpan}.Slice(0, matchLength)))"))
{
Goto(doneLabel);
}
}
else
{
// For case-insensitive, we have to walk each character individually.
using (EmitBlock(writer, $"if ({sliceSpan}.Length < matchLength)"))
{
Goto(doneLabel);
}
writer.WriteLine();
additionalDeclarations.Add("int matchIndex = 0;");
writer.WriteLine($"matchIndex = base.MatchIndex({capnum});");
using (EmitBlock(writer, $"for (int i = 0; i < matchLength; i++)"))
{
using (EmitBlock(writer, $"if ({ToLower(hasTextInfo, options, $"inputSpan[matchIndex + i]")} != {ToLower(hasTextInfo, options, $"{sliceSpan}[i]")})"))
{
Goto(doneLabel);
}
}
}
writer.WriteLine();
writer.WriteLine($"pos += matchLength;");
SliceInputSpan(writer);
}
else
{
using (EmitBlock(writer, $"if (pos < matchLength)"))
{
Goto(doneLabel);
}
writer.WriteLine();
additionalDeclarations.Add("int matchIndex = 0;");
writer.WriteLine($"matchIndex = base.MatchIndex({capnum});");
using (EmitBlock(writer, $"for (int i = 0; i < matchLength; i++)"))
{
using (EmitBlock(writer, $"if ({ToLowerIfNeeded(hasTextInfo, options, $"inputSpan[matchIndex + i]", caseInsensitive)} != {ToLowerIfNeeded(hasTextInfo, options, $"inputSpan[pos - matchLength + i]", caseInsensitive)})"))
{
Goto(doneLabel);
}
}
writer.WriteLine();
writer.WriteLine($"pos -= matchLength;");
}
}
}
// Emits the code for an if(backreference)-then-else conditional.
void EmitBackreferenceConditional(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.BackreferenceConditional, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 2, $"Expected 2 children, found {node.ChildCount()}");
// We're branching in a complicated fashion. Make sure sliceStaticPos is 0.
TransferSliceStaticPosToPos();
// Get the capture number to test.
int capnum = RegexParser.MapCaptureNumber(node.M, rm.Tree.CaptureNumberSparseMapping);
// Get the "yes" branch and the "no" branch. The "no" branch is optional in syntax and is thus
// somewhat likely to be Empty.
RegexNode yesBranch = node.Child(0);
RegexNode? noBranch = node.Child(1) is { Kind: not RegexNodeKind.Empty } childNo ? childNo : null;
string originalDoneLabel = doneLabel;
// If the child branches might backtrack, we can't emit the branches inside constructs that
// require braces, e.g. if/else, even though that would yield more idiomatic output.
// But if we know for certain they won't backtrack, we can output the nicer code.
if (analysis.IsAtomicByAncestor(node) || (!analysis.MayBacktrack(yesBranch) && (noBranch is null || !analysis.MayBacktrack(noBranch))))
{
using (EmitBlock(writer, $"if (base.IsMatched({capnum}))"))
{
writer.WriteLine($"// The {DescribeCapture(node.M, analysis)} captured a value. Match the first branch.");
EmitNode(yesBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
}
if (noBranch is not null)
{
using (EmitBlock(writer, $"else"))
{
writer.WriteLine($"// Otherwise, match the second branch.");
EmitNode(noBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
}
}
doneLabel = originalDoneLabel; // atomicity
return;
}
string refNotMatched = ReserveName("ConditionalBackreferenceNotMatched");
string endConditional = ReserveName("ConditionalBackreferenceEnd");
// As with alternations, we have potentially multiple branches, each of which may contain
// backtracking constructs, but the expression after the conditional needs a single target
// to backtrack to. So, we expose a single Backtrack label and track which branch was
// followed in this resumeAt local.
string resumeAt = ReserveName("conditionalbackreference_branch");
writer.WriteLine($"int {resumeAt} = 0;");
// While it would be nicely readable to use an if/else block, if the branches contain
// anything that triggers backtracking, labels will end up being defined, and if they're
// inside the scope block for the if or else, that will prevent jumping to them from
// elsewhere. So we implement the if/else with labels and gotos manually.
// Check to see if the specified capture number was captured.
using (EmitBlock(writer, $"if (!base.IsMatched({capnum}))"))
{
Goto(refNotMatched);
}
writer.WriteLine();
// The specified capture was captured. Run the "yes" branch.
// If it successfully matches, jump to the end.
EmitNode(yesBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
string postYesDoneLabel = doneLabel;
if (postYesDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 0;");
}
bool needsEndConditional = postYesDoneLabel != originalDoneLabel || noBranch is not null;
if (needsEndConditional)
{
Goto(endConditional);
writer.WriteLine();
}
MarkLabel(refNotMatched);
string postNoDoneLabel = originalDoneLabel;
if (noBranch is not null)
{
// Output the no branch.
doneLabel = originalDoneLabel;
EmitNode(noBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
postNoDoneLabel = doneLabel;
if (postNoDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 1;");
}
}
else
{
// There's only a yes branch. If it's going to cause us to output a backtracking
// label but code may not end up taking the yes branch path, we need to emit a resumeAt
// that will cause the backtracking to immediately pass through this node.
if (postYesDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 2;");
}
}
// If either the yes branch or the no branch contained backtracking, subsequent expressions
// might try to backtrack to here, so output a backtracking map based on resumeAt.
bool hasBacktracking = postYesDoneLabel != originalDoneLabel || postNoDoneLabel != originalDoneLabel;
if (hasBacktracking)
{
// Skip the backtracking section.
Goto(endConditional);
writer.WriteLine();
// Backtrack section
string backtrack = ReserveName("ConditionalBackreferenceBacktrack");
doneLabel = backtrack;
MarkLabel(backtrack);
// Pop from the stack the branch that was used and jump back to its backtracking location.
EmitStackPop(resumeAt);
using (EmitBlock(writer, $"switch ({resumeAt})"))
{
if (postYesDoneLabel != originalDoneLabel)
{
CaseGoto("case 0:", postYesDoneLabel);
}
if (postNoDoneLabel != originalDoneLabel)
{
CaseGoto("case 1:", postNoDoneLabel);
}
CaseGoto("default:", originalDoneLabel);
}
}
if (needsEndConditional)
{
MarkLabel(endConditional);
}
if (hasBacktracking)
{
// We're not atomic and at least one of the yes or no branches contained backtracking constructs,
// so finish outputting our backtracking logic, which involves pushing onto the stack which
// branch to backtrack into.
EmitStackPush(resumeAt);
}
}
// Emits the code for an if(expression)-then-else conditional.
void EmitExpressionConditional(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 3, $"Expected 3 children, found {node.ChildCount()}");
bool isAtomic = analysis.IsAtomicByAncestor(node);
// We're branching in a complicated fashion. Make sure sliceStaticPos is 0.
TransferSliceStaticPosToPos();
// The first child node is the condition expression. If this matches, then we branch to the "yes" branch.
// If it doesn't match, then we branch to the optional "no" branch if it exists, or simply skip the "yes"
// branch, otherwise. The condition is treated as a positive lookaround.
RegexNode condition = node.Child(0);
// Get the "yes" branch and the "no" branch. The "no" branch is optional in syntax and is thus
// somewhat likely to be Empty.
RegexNode yesBranch = node.Child(1);
RegexNode? noBranch = node.Child(2) is { Kind: not RegexNodeKind.Empty } childNo ? childNo : null;
string originalDoneLabel = doneLabel;
string expressionNotMatched = ReserveName("ConditionalExpressionNotMatched");
string endConditional = ReserveName("ConditionalExpressionEnd");
// As with alternations, we have potentially multiple branches, each of which may contain
// backtracking constructs, but the expression after the condition needs a single target
// to backtrack to. So, we expose a single Backtrack label and track which branch was
// followed in this resumeAt local.
string resumeAt = ReserveName("conditionalexpression_branch");
if (!isAtomic)
{
writer.WriteLine($"int {resumeAt} = 0;");
}
// If the condition expression has captures, we'll need to uncapture them in the case of no match.
string? startingCapturePos = null;
if (analysis.MayContainCapture(condition))
{
startingCapturePos = ReserveName("conditionalexpression_starting_capturepos");
writer.WriteLine($"int {startingCapturePos} = base.Crawlpos();");
}
// Emit the condition expression. Route any failures to after the yes branch. This code is almost
// the same as for a positive lookaround; however, a positive lookaround only needs to reset the position
// on a successful match, as a failed match fails the whole expression; here, we need to reset the
// position on completion, regardless of whether the match is successful or not.
doneLabel = expressionNotMatched;
// Save off pos. We'll need to reset this upon successful completion of the lookaround.
string startingPos = ReserveName("conditionalexpression_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
writer.WriteLine();
int startingSliceStaticPos = sliceStaticPos;
// Emit the child. The condition expression is a zero-width assertion, which is atomic,
// so prevent backtracking into it.
writer.WriteLine("// Condition:");
EmitNode(condition);
writer.WriteLine();
doneLabel = originalDoneLabel;
// After the condition completes successfully, reset the text positions.
// Do not reset captures, which persist beyond the lookaround.
writer.WriteLine("// Condition matched:");
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
writer.WriteLine();
// The expression matched. Run the "yes" branch. If it successfully matches, jump to the end.
EmitNode(yesBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
string postYesDoneLabel = doneLabel;
if (!isAtomic && postYesDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 0;");
}
Goto(endConditional);
writer.WriteLine();
// After the condition completes unsuccessfully, reset the text positions
// _and_ reset captures, which should not persist when the whole expression failed.
writer.WriteLine("// Condition did not match:");
MarkLabel(expressionNotMatched, emitSemicolon: false);
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
if (startingCapturePos is not null)
{
EmitUncaptureUntil(startingCapturePos);
}
writer.WriteLine();
string postNoDoneLabel = originalDoneLabel;
if (noBranch is not null)
{
// Output the no branch.
doneLabel = originalDoneLabel;
EmitNode(noBranch);
writer.WriteLine();
TransferSliceStaticPosToPos(); // make sure sliceStaticPos is 0 after each branch
postNoDoneLabel = doneLabel;
if (!isAtomic && postNoDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 1;");
}
}
else
{
// There's only a yes branch. If it's going to cause us to output a backtracking
// label but code may not end up taking the yes branch path, we need to emit a resumeAt
// that will cause the backtracking to immediately pass through this node.
if (!isAtomic && postYesDoneLabel != originalDoneLabel)
{
writer.WriteLine($"{resumeAt} = 2;");
}
}
// If either the yes branch or the no branch contained backtracking, subsequent expressions
// might try to backtrack to here, so output a backtracking map based on resumeAt.
if (isAtomic || (postYesDoneLabel == originalDoneLabel && postNoDoneLabel == originalDoneLabel))
{
doneLabel = originalDoneLabel;
MarkLabel(endConditional);
}
else
{
// Skip the backtracking section.
Goto(endConditional);
writer.WriteLine();
string backtrack = ReserveName("ConditionalExpressionBacktrack");
doneLabel = backtrack;
MarkLabel(backtrack, emitSemicolon: false);
EmitStackPop(resumeAt);
using (EmitBlock(writer, $"switch ({resumeAt})"))
{
if (postYesDoneLabel != originalDoneLabel)
{
CaseGoto("case 0:", postYesDoneLabel);
}
if (postNoDoneLabel != originalDoneLabel)
{
CaseGoto("case 1:", postNoDoneLabel);
}
CaseGoto("default:", originalDoneLabel);
}
MarkLabel(endConditional, emitSemicolon: false);
EmitStackPush(resumeAt);
}
}
// Emits the code for a Capture node.
void EmitCapture(RegexNode node, RegexNode? subsequent = null)
{
Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
int capnum = RegexParser.MapCaptureNumber(node.M, rm.Tree.CaptureNumberSparseMapping);
int uncapnum = RegexParser.MapCaptureNumber(node.N, rm.Tree.CaptureNumberSparseMapping);
bool isAtomic = analysis.IsAtomicByAncestor(node);
TransferSliceStaticPosToPos();
string startingPos = ReserveName("capture_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
writer.WriteLine();
RegexNode child = node.Child(0);
if (uncapnum != -1)
{
using (EmitBlock(writer, $"if (!base.IsMatched({uncapnum}))"))
{
Goto(doneLabel);
}
writer.WriteLine();
}
// Emit child node.
string originalDoneLabel = doneLabel;
EmitNode(child, subsequent);
bool childBacktracks = doneLabel != originalDoneLabel;
writer.WriteLine();
TransferSliceStaticPosToPos();
if (uncapnum == -1)
{
writer.WriteLine($"base.Capture({capnum}, {startingPos}, pos);");
}
else
{
writer.WriteLine($"base.TransferCapture({capnum}, {uncapnum}, {startingPos}, pos);");
}
if (isAtomic || !childBacktracks)
{
// If the capture is atomic and nothing can backtrack into it, we're done.
// Similarly, even if the capture isn't atomic, if the captured expression
// doesn't do any backtracking, we're done.
doneLabel = originalDoneLabel;
}
else
{
// We're not atomic and the child node backtracks. When it does, we need
// to ensure that the starting position for the capture is appropriately
// reset to what it was initially (it could have changed as part of being
// in a loop or similar). So, we emit a backtracking section that
// pushes/pops the starting position before falling through.
writer.WriteLine();
EmitStackPush(startingPos);
// Skip past the backtracking section
string end = ReserveName("SkipBacktrack");
Goto(end);
writer.WriteLine();
// Emit a backtracking section that restores the capture's state and then jumps to the previous done label
string backtrack = ReserveName($"CaptureBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
EmitStackPop(startingPos);
Goto(doneLabel);
writer.WriteLine();
doneLabel = backtrack;
MarkLabel(end);
}
}
// Emits the code to handle a positive lookaround assertion. This is a positive lookahead
// for left-to-right and a positive lookbehind for right-to-left.
void EmitPositiveLookaroundAssertion(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.PositiveLookaround, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
if (analysis.HasRightToLeft)
{
// Lookarounds are the only places in the node tree where we might change direction,
// i.e. where we might go from RegexOptions.None to RegexOptions.RightToLeft, or vice
// versa. This is because lookbehinds are implemented by making the whole subgraph be
// RegexOptions.RightToLeft and reversed. Since we use static position to optimize left-to-right
// and don't use it in support of right-to-left, we need to resync the static position
// to the current position when entering a lookaround, just in case we're changing direction.
TransferSliceStaticPosToPos(forceSliceReload: true);
}
// Save off pos. We'll need to reset this upon successful completion of the lookaround.
string startingPos = ReserveName("positivelookaround_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
writer.WriteLine();
int startingSliceStaticPos = sliceStaticPos;
// Emit the child.
RegexNode child = node.Child(0);
if (analysis.MayBacktrack(child))
{
// Lookarounds are implicitly atomic, so we need to emit the node as atomic if it might backtrack.
EmitAtomic(node, null);
}
else
{
EmitNode(child);
}
// After the child completes successfully, reset the text positions.
// Do not reset captures, which persist beyond the lookaround.
writer.WriteLine();
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
}
// Emits the code to handle a negative lookaround assertion. This is a negative lookahead
// for left-to-right and a negative lookbehind for right-to-left.
void EmitNegativeLookaroundAssertion(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
if (analysis.HasRightToLeft)
{
// Lookarounds are the only places in the node tree where we might change direction,
// i.e. where we might go from RegexOptions.None to RegexOptions.RightToLeft, or vice
// versa. This is because lookbehinds are implemented by making the whole subgraph be
// RegexOptions.RightToLeft and reversed. Since we use static position to optimize left-to-right
// and don't use it in support of right-to-left, we need to resync the static position
// to the current position when entering a lookaround, just in case we're changing direction.
TransferSliceStaticPosToPos(forceSliceReload: true);
}
string originalDoneLabel = doneLabel;
// Save off pos. We'll need to reset this upon successful completion of the lookaround.
string startingPos = ReserveName("negativelookaround_starting_pos");
writer.WriteLine($"int {startingPos} = pos;");
int startingSliceStaticPos = sliceStaticPos;
string negativeLookaroundDoneLabel = ReserveName("NegativeLookaroundMatch");
doneLabel = negativeLookaroundDoneLabel;
// Emit the child.
RegexNode child = node.Child(0);
if (analysis.MayBacktrack(child))
{
// Lookarounds are implicitly atomic, so we need to emit the node as atomic if it might backtrack.
EmitAtomic(node, null);
}
else
{
EmitNode(child);
}
// If the generated code ends up here, it matched the lookaround, which actually
// means failure for a _negative_ lookaround, so we need to jump to the original done.
writer.WriteLine();
Goto(originalDoneLabel);
writer.WriteLine();
// Failures (success for a negative lookaround) jump here.
MarkLabel(negativeLookaroundDoneLabel, emitSemicolon: false);
// After the child completes in failure (success for negative lookaround), reset the text positions.
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
sliceStaticPos = startingSliceStaticPos;
doneLabel = originalDoneLabel;
}
// Emits the code for the node.
void EmitNode(RegexNode node, RegexNode? subsequent = null, bool emitLengthChecksIfRequired = true)
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
StackHelper.CallOnEmptyStack(EmitNode, node, subsequent, emitLengthChecksIfRequired);
return;
}
if ((node.Options & RegexOptions.RightToLeft) != 0)
{
// RightToLeft doesn't take advantage of static positions. While RightToLeft won't update static
// positions, a previous operation may have left us with a non-zero one. Make sure it's zero'd out
// such that pos and slice are up-to-date. Note that RightToLeft also shouldn't use the slice span,
// as it's not kept up-to-date; any RightToLeft implementation that wants to use it must first update
// it from pos.
TransferSliceStaticPosToPos();
}
// Separate out several node types that, for conciseness, don't need a header nor scope written into the source.
// Effectively these either evaporate, are completely self-explanatory, or only exist for their children to be rendered.
switch (node.Kind)
{
// Nothing is written for an empty.
case RegexNodeKind.Empty:
return;
// A single-line goto for a failure doesn't need a scope or comment.
case RegexNodeKind.Nothing:
Goto(doneLabel);
return;
// Skip atomic nodes that wrap non-backtracking children; in such a case there's nothing to be made atomic.
case RegexNodeKind.Atomic when !analysis.MayBacktrack(node.Child(0)):
EmitNode(node.Child(0));
return;
// Concatenate is a simplification in the node tree so that a series of children can be represented as one.
// We don't need its presence visible in the source.
case RegexNodeKind.Concatenate:
EmitConcatenation(node, subsequent, emitLengthChecksIfRequired);
return;
}
// For everything else, output a comment about what the node is.
writer.WriteLine($"// {DescribeNode(node, analysis)}");
// Separate out several node types that, for conciseness, don't need a scope written into the source as they're
// always a single statement / block.
switch (node.Kind)
{
case RegexNodeKind.Beginning:
case RegexNodeKind.Start:
case RegexNodeKind.Bol:
case RegexNodeKind.Eol:
case RegexNodeKind.End:
case RegexNodeKind.EndZ:
EmitAnchors(node);
return;
case RegexNodeKind.Boundary:
case RegexNodeKind.NonBoundary:
case RegexNodeKind.ECMABoundary:
case RegexNodeKind.NonECMABoundary:
EmitBoundary(node);
return;
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
EmitSingleChar(node, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Multi when !IsCaseInsensitive(node) && (node.Options & RegexOptions.RightToLeft) == 0:
EmitMultiChar(node, emitLengthChecksIfRequired);
return;
case RegexNodeKind.UpdateBumpalong:
EmitUpdateBumpalong(node);
return;
}
// For everything else, put the node's code into its own scope, purely for readability. If the node contains labels
// that may need to be visible outside of its scope, the scope is still emitted for clarity but is commented out.
using (EmitScope(writer, null, faux: analysis.MayBacktrack(node)))
{
switch (node.Kind)
{
case RegexNodeKind.Multi:
EmitMultiChar(node, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Oneloop:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Setloop:
EmitSingleCharLoop(node, subsequent, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Setlazy:
EmitSingleCharLazy(node, subsequent, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Setloopatomic:
EmitSingleCharAtomicLoop(node, emitLengthChecksIfRequired);
return;
case RegexNodeKind.Loop:
EmitLoop(node);
return;
case RegexNodeKind.Lazyloop:
EmitLazy(node);
return;
case RegexNodeKind.Alternate:
EmitAlternation(node);
return;
case RegexNodeKind.Backreference:
EmitBackreference(node);
return;
case RegexNodeKind.BackreferenceConditional:
EmitBackreferenceConditional(node);
return;
case RegexNodeKind.ExpressionConditional:
EmitExpressionConditional(node);
return;
case RegexNodeKind.Atomic:
Debug.Assert(analysis.MayBacktrack(node.Child(0)));
EmitAtomic(node, subsequent);
return;
case RegexNodeKind.Capture:
EmitCapture(node, subsequent);
return;
case RegexNodeKind.PositiveLookaround:
EmitPositiveLookaroundAssertion(node);
return;
case RegexNodeKind.NegativeLookaround:
EmitNegativeLookaroundAssertion(node);
return;
}
}
// All nodes should have been handled.
Debug.Fail($"Unexpected node type: {node.Kind}");
}
// Emits the node for an atomic.
void EmitAtomic(RegexNode node, RegexNode? subsequent)
{
Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
Debug.Assert(analysis.MayBacktrack(node.Child(0)), "Expected child to potentially backtrack");
// Grab the current done label and the current backtracking position. The purpose of the atomic node
// is to ensure that nodes after it that might backtrack skip over the atomic, which means after
// rendering the atomic's child, we need to reset the label so that subsequent backtracking doesn't
// see any label left set by the atomic's child. We also need to reset the backtracking stack position
// so that the state on the stack remains consistent.
string originalDoneLabel = doneLabel;
additionalDeclarations.Add("int stackpos = 0;");
string startingStackpos = ReserveName("atomic_stackpos");
writer.WriteLine($"int {startingStackpos} = stackpos;");
writer.WriteLine();
// Emit the child.
EmitNode(node.Child(0), subsequent);
writer.WriteLine();
// Reset the stack position and done label.
writer.WriteLine($"stackpos = {startingStackpos};");
doneLabel = originalDoneLabel;
}
// Emits the code to handle updating base.runtextpos to pos in response to
// an UpdateBumpalong node. This is used when we want to inform the scan loop that
// it should bump from this location rather than from the original location.
void EmitUpdateBumpalong(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.UpdateBumpalong, $"Unexpected type: {node.Kind}");
TransferSliceStaticPosToPos();
using (EmitBlock(writer, "if (base.runtextpos < pos)"))
{
writer.WriteLine("base.runtextpos = pos;");
}
}
// Emits code for a concatenation
void EmitConcatenation(RegexNode node, RegexNode? subsequent, bool emitLengthChecksIfRequired)
{
Debug.Assert(node.Kind is RegexNodeKind.Concatenate, $"Unexpected type: {node.Kind}");
Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
// Emit the code for each child one after the other.
string? prevDescription = null;
int childCount = node.ChildCount();
for (int i = 0; i < childCount; i++)
{
// If we can find a subsequence of fixed-length children, we can emit a length check once for that sequence
// and then skip the individual length checks for each. We can also discover case-insensitive sequences that
// can be checked efficiently with methods like StartsWith. We also want to minimize the repetition of if blocks,
// and so we try to emit a series of clauses all part of the same if block rather than one if block per child.
if ((node.Options & RegexOptions.RightToLeft) == 0 &&
emitLengthChecksIfRequired &&
node.TryGetJoinableLengthCheckChildRange(i, out int requiredLength, out int exclusiveEnd))
{
bool wroteClauses = true;
writer.Write($"if ({SpanLengthCheck(requiredLength)}");
while (i < exclusiveEnd)
{
for (; i < exclusiveEnd; i++)
{
void WritePrefix()
{
if (wroteClauses)
{
writer.WriteLine(prevDescription is not null ? $" || // {prevDescription}" : " ||");
writer.Write(" ");
}
else
{
writer.Write("if (");
}
}
RegexNode child = node.Child(i);
if (node.TryGetOrdinalCaseInsensitiveString(i, exclusiveEnd, out int nodesConsumed, out string? caseInsensitiveString))
{
WritePrefix();
string sourceSpan = sliceStaticPos > 0 ? $"{sliceSpan}.Slice({sliceStaticPos})" : sliceSpan;
writer.Write($"!global::System.MemoryExtensions.StartsWith({sourceSpan}, {Literal(caseInsensitiveString)}, global::System.StringComparison.OrdinalIgnoreCase)");
prevDescription = $"Match the string {Literal(caseInsensitiveString)} (ordinal case-insensitive)";
wroteClauses = true;
sliceStaticPos += caseInsensitiveString.Length;
i += nodesConsumed - 1;
}
else if (child.Kind is RegexNodeKind.Multi && !IsCaseInsensitive(child))
{
WritePrefix();
EmitMultiCharString(child.Str!, caseInsensitive: false, emitLengthCheck: false, clauseOnly: true, rightToLeft: false);
prevDescription = DescribeNode(child, analysis);
wroteClauses = true;
}
else if ((child.IsOneFamily || child.IsNotoneFamily || child.IsSetFamily) &&
child.M == child.N &&
child.M <= MaxUnrollSize)
{
int repeatCount = child.Kind is RegexNodeKind.One or RegexNodeKind.Notone or RegexNodeKind.Set ? 1 : child.M;
for (int c = 0; c < repeatCount; c++)
{
WritePrefix();
EmitSingleChar(child, emitLengthCheck: false, clauseOnly: true);
prevDescription = c == 0 ? DescribeNode(child, analysis) : null;
wroteClauses = true;
}
}
else break;
}
if (wroteClauses)
{
writer.WriteLine(prevDescription is not null ? $") // {prevDescription}" : ")");
using (EmitBlock(writer, null))
{
Goto(doneLabel);
}
if (i < childCount)
{
writer.WriteLine();
}
wroteClauses = false;
prevDescription = null;
}
if (i < exclusiveEnd)
{
EmitNode(node.Child(i), GetSubsequentOrDefault(i, node, subsequent), emitLengthChecksIfRequired: false);
if (i < childCount - 1)
{
writer.WriteLine();
}
i++;
}
}
i--;
continue;
}
EmitNode(node.Child(i), GetSubsequentOrDefault(i, node, subsequent), emitLengthChecksIfRequired: emitLengthChecksIfRequired);
if (i < childCount - 1)
{
writer.WriteLine();
}
}
// Gets the node to treat as the subsequent one to node.Child(index)
static RegexNode? GetSubsequentOrDefault(int index, RegexNode node, RegexNode? defaultNode)
{
int childCount = node.ChildCount();
for (int i = index + 1; i < childCount; i++)
{
RegexNode next = node.Child(i);
if (next.Kind is not RegexNodeKind.UpdateBumpalong) // skip node types that don't have a semantic impact
{
return next;
}
}
return defaultNode;
}
}
// Emits the code to handle a single-character match.
void EmitSingleChar(RegexNode node, bool emitLengthCheck = true, string? offset = null, bool clauseOnly = false)
{
Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
Debug.Assert(!rtl || offset is null);
Debug.Assert(!rtl || !clauseOnly);
string expr = !rtl ?
$"{sliceSpan}[{Sum(sliceStaticPos, offset)}]" :
"inputSpan[pos - 1]";
if (node.IsSetFamily)
{
expr = $"{MatchCharacterClass(hasTextInfo, options, expr, node.Str!, IsCaseInsensitive(node), negate: true, additionalDeclarations, requiredHelpers)}";
}
else
{
expr = ToLowerIfNeeded(hasTextInfo, options, expr, IsCaseInsensitive(node));
expr = $"{expr} {(node.IsOneFamily ? "!=" : "==")} {Literal(node.Ch)}";
}
if (clauseOnly)
{
writer.Write(expr);
}
else
{
string clause =
!emitLengthCheck ? $"if ({expr})" :
!rtl ? $"if ({SpanLengthCheck(1, offset)} || {expr})" :
$"if ((uint)(pos - 1) >= inputSpan.Length || {expr})";
using (EmitBlock(writer, clause))
{
Goto(doneLabel);
}
}
if (!rtl)
{
sliceStaticPos++;
}
else
{
writer.WriteLine("pos--;");
}
}
// Emits the code to handle a boundary check on a character.
void EmitBoundary(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary or RegexNodeKind.ECMABoundary or RegexNodeKind.NonECMABoundary, $"Unexpected kind: {node.Kind}");
string call;
if (node.Kind is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary)
{
call = node.Kind is RegexNodeKind.Boundary ?
$"!{HelpersTypeName}.IsBoundary" :
$"{HelpersTypeName}.IsBoundary";
AddIsBoundaryHelper(requiredHelpers);
}
else
{
call = node.Kind is RegexNodeKind.ECMABoundary ?
$"!{HelpersTypeName}.IsECMABoundary" :
$"{HelpersTypeName}.IsECMABoundary";
AddIsECMABoundaryHelper(requiredHelpers);
}
using (EmitBlock(writer, $"if ({call}(inputSpan, pos{(sliceStaticPos > 0 ? $" + {sliceStaticPos}" : "")}))"))
{
Goto(doneLabel);
}
}
// Emits the code to handle various anchors.
void EmitAnchors(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Beginning or RegexNodeKind.Start or RegexNodeKind.Bol or RegexNodeKind.End or RegexNodeKind.EndZ or RegexNodeKind.Eol, $"Unexpected type: {node.Kind}");
Debug.Assert((node.Options & RegexOptions.RightToLeft) == 0 || sliceStaticPos == 0);
Debug.Assert(sliceStaticPos >= 0);
switch (node.Kind)
{
case RegexNodeKind.Beginning:
case RegexNodeKind.Start:
if (sliceStaticPos > 0)
{
// If we statically know we've already matched part of the regex, there's no way we're at the
// beginning or start, as we've already progressed past it.
Goto(doneLabel);
}
else
{
using (EmitBlock(writer, node.Kind == RegexNodeKind.Beginning ?
"if (pos != 0)" :
"if (pos != base.runtextstart)"))
{
Goto(doneLabel);
}
}
break;
case RegexNodeKind.Bol:
using (EmitBlock(writer, sliceStaticPos > 0 ?
$"if ({sliceSpan}[{sliceStaticPos - 1}] != '\\n')" :
$"if (pos > 0 && inputSpan[pos - 1] != '\\n')"))
{
Goto(doneLabel);
}
break;
case RegexNodeKind.End:
using (EmitBlock(writer, sliceStaticPos > 0 ?
$"if ({sliceStaticPos} < {sliceSpan}.Length)" :
"if ((uint)pos < (uint)inputSpan.Length)"))
{
Goto(doneLabel);
}
break;
case RegexNodeKind.EndZ:
using (EmitBlock(writer, sliceStaticPos > 0 ?
$"if ({sliceStaticPos + 1} < {sliceSpan}.Length || ({sliceStaticPos} < {sliceSpan}.Length && {sliceSpan}[{sliceStaticPos}] != '\\n'))" :
"if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\\n'))"))
{
Goto(doneLabel);
}
break;
case RegexNodeKind.Eol:
using (EmitBlock(writer, sliceStaticPos > 0 ?
$"if ({sliceStaticPos} < {sliceSpan}.Length && {sliceSpan}[{sliceStaticPos}] != '\\n')" :
"if ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\\n')"))
{
Goto(doneLabel);
}
break;
}
}
// Emits the code to handle a multiple-character match.
void EmitMultiChar(RegexNode node, bool emitLengthCheck)
{
Debug.Assert(node.Kind is RegexNodeKind.Multi, $"Unexpected type: {node.Kind}");
Debug.Assert(node.Str is not null);
EmitMultiCharString(node.Str, IsCaseInsensitive(node), emitLengthCheck, clauseOnly: false, (node.Options & RegexOptions.RightToLeft) != 0);
}
void EmitMultiCharString(string str, bool caseInsensitive, bool emitLengthCheck, bool clauseOnly, bool rightToLeft)
{
Debug.Assert(str.Length >= 2);
Debug.Assert(!clauseOnly || (!emitLengthCheck && !caseInsensitive && !rightToLeft));
if (rightToLeft)
{
Debug.Assert(emitLengthCheck);
using (EmitBlock(writer, $"if ((uint)(pos - {str.Length}) >= inputSpan.Length)"))
{
Goto(doneLabel);
}
writer.WriteLine();
using (EmitBlock(writer, $"for (int i = 0; i < {str.Length}; i++)"))
{
using (EmitBlock(writer, $"if ({ToLowerIfNeeded(hasTextInfo, options, "inputSpan[--pos]", caseInsensitive)} != {Literal(str)}[{str.Length - 1} - i])"))
{
Goto(doneLabel);
}
}
return;
}
if (caseInsensitive) // StartsWith(..., XxIgnoreCase) won't necessarily be the same as char-by-char comparison
{
// This case should be relatively rare. It will only occur with IgnoreCase and a series of non-ASCII characters.
if (emitLengthCheck)
{
EmitSpanLengthCheck(str.Length);
}
using (EmitBlock(writer, $"for (int i = 0; i < {Literal(str)}.Length; i++)"))
{
string textSpanIndex = sliceStaticPos > 0 ? $"i + {sliceStaticPos}" : "i";
using (EmitBlock(writer, $"if ({ToLower(hasTextInfo, options, $"{sliceSpan}[{textSpanIndex}]")} != {Literal(str)}[i])"))
{
Goto(doneLabel);
}
}
}
else
{
string sourceSpan = sliceStaticPos > 0 ? $"{sliceSpan}.Slice({sliceStaticPos})" : sliceSpan;
string clause = $"!{sourceSpan}.StartsWith({Literal(str)})";
if (clauseOnly)
{
writer.Write(clause);
}
else
{
using (EmitBlock(writer, $"if ({clause})"))
{
Goto(doneLabel);
}
}
}
sliceStaticPos += str.Length;
}
void EmitSingleCharLoop(RegexNode node, RegexNode? subsequent = null, bool emitLengthChecksIfRequired = true)
{
Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop, $"Unexpected type: {node.Kind}");
// If this is actually atomic based on its parent, emit it as atomic instead; no backtracking necessary.
if (analysis.IsAtomicByAncestor(node))
{
EmitSingleCharAtomicLoop(node);
return;
}
// If this is actually a repeater, emit that instead; no backtracking necessary.
if (node.M == node.N)
{
EmitSingleCharRepeater(node, emitLengthChecksIfRequired);
return;
}
// Emit backtracking around an atomic single char loop. We can then implement the backtracking
// as an afterthought, since we know exactly how many characters are accepted by each iteration
// of the wrapped loop (1) and that there's nothing captured by the loop.
Debug.Assert(node.M < node.N);
string backtrackingLabel = ReserveName("CharLoopBacktrack");
string endLoop = ReserveName("CharLoopEnd");
string startingPos = ReserveName("charloop_starting_pos");
string endingPos = ReserveName("charloop_ending_pos");
additionalDeclarations.Add($"int {startingPos} = 0, {endingPos} = 0;");
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
// We're about to enter a loop, so ensure our text position is 0.
TransferSliceStaticPosToPos();
// Grab the current position, then emit the loop as atomic, and then
// grab the current position again. Even though we emit the loop without
// knowledge of backtracking, we can layer it on top by just walking back
// through the individual characters (a benefit of the loop matching exactly
// one character per iteration, no possible captures within the loop, etc.)
writer.WriteLine($"{startingPos} = pos;");
writer.WriteLine();
EmitSingleCharAtomicLoop(node);
writer.WriteLine();
TransferSliceStaticPosToPos();
writer.WriteLine($"{endingPos} = pos;");
EmitAdd(writer, startingPos, !rtl ? node.M : -node.M);
Goto(endLoop);
writer.WriteLine();
// Backtracking section. Subsequent failures will jump to here, at which
// point we decrement the matched count as long as it's above the minimum
// required, and try again by flowing to everything that comes after this.
MarkLabel(backtrackingLabel, emitSemicolon: false);
if (expressionHasCaptures)
{
EmitUncaptureUntil(StackPop());
}
EmitStackPop(endingPos, startingPos);
writer.WriteLine();
if (!rtl && subsequent?.FindStartingLiteral() is ValueTuple<char, string?, string?> literal)
{
writer.WriteLine($"if ({startingPos} >= {endingPos} ||");
using (EmitBlock(writer,
literal.Item2 is not null ? $" ({endingPos} = inputSpan.Slice({startingPos}, Math.Min(inputSpan.Length, {endingPos} + {literal.Item2.Length - 1}) - {startingPos}).LastIndexOf({Literal(literal.Item2)})) < 0)" :
literal.Item3 is null ? $" ({endingPos} = inputSpan.Slice({startingPos}, {endingPos} - {startingPos}).LastIndexOf({Literal(literal.Item1)})) < 0)" :
literal.Item3.Length switch
{
2 => $" ({endingPos} = inputSpan.Slice({startingPos}, {endingPos} - {startingPos}).LastIndexOfAny({Literal(literal.Item3[0])}, {Literal(literal.Item3[1])})) < 0)",
3 => $" ({endingPos} = inputSpan.Slice({startingPos}, {endingPos} - {startingPos}).LastIndexOfAny({Literal(literal.Item3[0])}, {Literal(literal.Item3[1])}, {Literal(literal.Item3[2])})) < 0)",
_ => $" ({endingPos} = inputSpan.Slice({startingPos}, {endingPos} - {startingPos}).LastIndexOfAny({Literal(literal.Item3)})) < 0)",
}))
{
Goto(doneLabel);
}
writer.WriteLine($"{endingPos} += {startingPos};");
writer.WriteLine($"pos = {endingPos};");
}
else
{
using (EmitBlock(writer, $"if ({startingPos} {(!rtl ? ">=" : "<=")} {endingPos})"))
{
Goto(doneLabel);
}
writer.WriteLine(!rtl ? $"pos = --{endingPos};" : $"pos = ++{endingPos};");
}
if (!rtl)
{
SliceInputSpan(writer);
}
writer.WriteLine();
MarkLabel(endLoop, emitSemicolon: false);
EmitStackPush(expressionHasCaptures ?
new[] { startingPos, endingPos, "base.Crawlpos()" } :
new[] { startingPos, endingPos });
doneLabel = backtrackingLabel; // leave set to the backtracking label for all subsequent nodes
}
void EmitSingleCharLazy(RegexNode node, RegexNode? subsequent = null, bool emitLengthChecksIfRequired = true)
{
Debug.Assert(node.Kind is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy, $"Unexpected type: {node.Kind}");
// Emit the min iterations as a repeater. Any failures here don't necessitate backtracking,
// as the lazy itself failed to match, and there's no backtracking possible by the individual
// characters/iterations themselves.
if (node.M > 0)
{
EmitSingleCharRepeater(node, emitLengthChecksIfRequired);
}
// If the whole thing was actually that repeater, we're done. Similarly, if this is actually an atomic
// lazy loop, nothing will ever backtrack into this node, so we never need to iterate more than the minimum.
if (node.M == node.N || analysis.IsAtomicByAncestor(node))
{
return;
}
if (node.M > 0)
{
// We emitted a repeater to handle the required iterations; add a newline after it.
writer.WriteLine();
}
Debug.Assert(node.M < node.N);
// We now need to match one character at a time, each time allowing the remainder of the expression
// to try to match, and only matching another character if the subsequent expression fails to match.
// We're about to enter a loop, so ensure our text position is 0.
TransferSliceStaticPosToPos();
// If the loop isn't unbounded, track the number of iterations and the max number to allow.
string? iterationCount = null;
string? maxIterations = null;
if (node.N != int.MaxValue)
{
maxIterations = $"{node.N - node.M}";
iterationCount = ReserveName("lazyloop_iteration");
writer.WriteLine($"int {iterationCount} = 0;");
}
// Track the current crawl position. Upon backtracking, we'll unwind any captures beyond this point.
string? capturePos = null;
if (expressionHasCaptures)
{
capturePos = ReserveName("lazyloop_capturepos");
additionalDeclarations.Add($"int {capturePos} = 0;");
}
// Track the current pos. Each time we backtrack, we'll reset to the stored position, which
// is also incremented each time we match another character in the loop.
string startingPos = ReserveName("lazyloop_pos");
additionalDeclarations.Add($"int {startingPos} = 0;");
writer.WriteLine($"{startingPos} = pos;");
// Skip the backtracking section for the initial subsequent matching. We've already matched the
// minimum number of iterations, which means we can successfully match with zero additional iterations.
string endLoopLabel = ReserveName("LazyLoopEnd");
Goto(endLoopLabel);
writer.WriteLine();
// Backtracking section. Subsequent failures will jump to here.
string backtrackingLabel = ReserveName("LazyLoopBacktrack");
MarkLabel(backtrackingLabel, emitSemicolon: false);
// Uncapture any captures if the expression has any. It's possible the captures it has
// are before this node, in which case this is wasted effort, but still functionally correct.
if (capturePos is not null)
{
EmitUncaptureUntil(capturePos);
}
// If there's a max number of iterations, see if we've exceeded the maximum number of characters
// to match. If we haven't, increment the iteration count.
if (maxIterations is not null)
{
using (EmitBlock(writer, $"if ({iterationCount} >= {maxIterations})"))
{
Goto(doneLabel);
}
writer.WriteLine($"{iterationCount}++;");
}
// Now match the next item in the lazy loop. We need to reset the pos to the position
// just after the last character in this loop was matched, and we need to store the resulting position
// for the next time we backtrack.
writer.WriteLine($"pos = {startingPos};");
SliceInputSpan(writer);
EmitSingleChar(node);
TransferSliceStaticPosToPos();
// Now that we've appropriately advanced by one character and are set for what comes after the loop,
// see if we can skip ahead more iterations by doing a search for a following literal.
if ((node.Options & RegexOptions.RightToLeft) == 0)
{
if (iterationCount is null &&
node.Kind is RegexNodeKind.Notonelazy &&
!IsCaseInsensitive(node) &&
subsequent?.FindStartingLiteral(4) is ValueTuple<char, string?, string?> literal && // 5 == max optimized by IndexOfAny, and we need to reserve 1 for node.Ch
(literal.Item3 is not null ? !literal.Item3.Contains(node.Ch) : (literal.Item2?[0] ?? literal.Item1) != node.Ch)) // no overlap between node.Ch and the start of the literal
{
// e.g. "<[^>]*?>"
// This lazy loop will consume all characters other than node.Ch until the subsequent literal.
// We can implement it to search for either that char or the literal, whichever comes first.
// If it ends up being that node.Ch, the loop fails (we're only here if we're backtracking).
writer.WriteLine(
literal.Item2 is not null ? $"{startingPos} = {sliceSpan}.IndexOfAny({Literal(node.Ch)}, {Literal(literal.Item2[0])});" :
literal.Item3 is null ? $"{startingPos} = {sliceSpan}.IndexOfAny({Literal(node.Ch)}, {Literal(literal.Item1)});" :
literal.Item3.Length switch
{
2 => $"{startingPos} = {sliceSpan}.IndexOfAny({Literal(node.Ch)}, {Literal(literal.Item3[0])}, {Literal(literal.Item3[1])});",
_ => $"{startingPos} = {sliceSpan}.IndexOfAny({Literal(node.Ch + literal.Item3)});",
});
using (EmitBlock(writer, $"if ((uint){startingPos} >= (uint){sliceSpan}.Length || {sliceSpan}[{startingPos}] == {Literal(node.Ch)})"))
{
Goto(doneLabel);
}
writer.WriteLine($"pos += {startingPos};");
SliceInputSpan(writer);
}
else if (iterationCount is null &&
node.Kind is RegexNodeKind.Setlazy &&
node.Str == RegexCharClass.AnyClass &&
subsequent?.FindStartingLiteral() is ValueTuple<char, string?, string?> literal2)
{
// e.g. ".*?string" with RegexOptions.Singleline
// This lazy loop will consume all characters until the subsequent literal. If the subsequent literal
// isn't found, the loop fails. We can implement it to just search for that literal.
writer.WriteLine(
literal2.Item2 is not null ? $"{startingPos} = {sliceSpan}.IndexOf({Literal(literal2.Item2)});" :
literal2.Item3 is null ? $"{startingPos} = {sliceSpan}.IndexOf({Literal(literal2.Item1)});" :
literal2.Item3.Length switch
{
2 => $"{startingPos} = {sliceSpan}.IndexOfAny({Literal(literal2.Item3[0])}, {Literal(literal2.Item3[1])});",
3 => $"{startingPos} = {sliceSpan}.IndexOfAny({Literal(literal2.Item3[0])}, {Literal(literal2.Item3[1])}, {Literal(literal2.Item3[2])});",
_ => $"{startingPos} = {sliceSpan}.IndexOfAny({Literal(literal2.Item3)});",
});
using (EmitBlock(writer, $"if ({startingPos} < 0)"))
{
Goto(doneLabel);
}
writer.WriteLine($"pos += {startingPos};");
SliceInputSpan(writer);
}
}
// Store the position we've left off at in case we need to iterate again.
writer.WriteLine($"{startingPos} = pos;");
// Update the done label for everything that comes after this node. This is done after we emit the single char
// matching, as that failing indicates the loop itself has failed to match.
string originalDoneLabel = doneLabel;
doneLabel = backtrackingLabel; // leave set to the backtracking label for all subsequent nodes
writer.WriteLine();
MarkLabel(endLoopLabel);
if (capturePos is not null)
{
writer.WriteLine($"{capturePos} = base.Crawlpos();");
}
if (node.IsInLoop())
{
writer.WriteLine();
// Store the loop's state
var toPushPop = new List<string>(3) { startingPos };
if (capturePos is not null)
{
toPushPop.Add(capturePos);
}
if (iterationCount is not null)
{
toPushPop.Add(iterationCount);
}
string[] toPushPopArray = toPushPop.ToArray();
EmitStackPush(toPushPopArray);
// Skip past the backtracking section
string end = ReserveName("SkipBacktrack");
Goto(end);
writer.WriteLine();
// Emit a backtracking section that restores the loop's state and then jumps to the previous done label
string backtrack = ReserveName("CharLazyBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
Array.Reverse(toPushPopArray);
EmitStackPop(toPushPopArray);
Goto(doneLabel);
writer.WriteLine();
doneLabel = backtrack;
MarkLabel(end);
}
}
void EmitLazy(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
int minIterations = node.M;
int maxIterations = node.N;
string originalDoneLabel = doneLabel;
bool isAtomic = analysis.IsAtomicByAncestor(node);
// If this is actually an atomic lazy loop, we need to output just the minimum number of iterations,
// as nothing will backtrack into the lazy loop to get it progress further.
if (isAtomic)
{
switch (minIterations)
{
case 0:
// Atomic lazy with a min count of 0: nop.
return;
case 1:
// Atomic lazy with a min count of 1: just output the child, no looping required.
EmitNode(node.Child(0));
return;
}
writer.WriteLine();
}
// If this is actually a repeater and the child doesn't have any backtracking in it that might
// cause us to need to unwind already taken iterations, just output it as a repeater loop.
if (minIterations == maxIterations && !analysis.MayBacktrack(node.Child(0)))
{
EmitNonBacktrackingRepeater(node);
return;
}
// We might loop any number of times. In order to ensure this loop and subsequent code sees sliceStaticPos
// the same regardless, we always need it to contain the same value, and the easiest such value is 0.
// So, we transfer sliceStaticPos to pos, and ensure that any path out of here has sliceStaticPos as 0.
TransferSliceStaticPosToPos();
string startingPos = ReserveName("lazyloop_starting_pos");
string iterationCount = ReserveName("lazyloop_iteration");
string sawEmpty = ReserveName("lazyLoopEmptySeen");
string body = ReserveName("LazyLoopBody");
string endLoop = ReserveName("LazyLoopEnd");
writer.WriteLine($"int {iterationCount} = 0, {startingPos} = pos, {sawEmpty} = 0;");
// If the min count is 0, start out by jumping right to what's after the loop. Backtracking
// will then bring us back in to do further iterations.
if (minIterations == 0)
{
Goto(endLoop);
}
writer.WriteLine();
// Iteration body
MarkLabel(body, emitSemicolon: false);
EmitTimeoutCheck(writer, hasTimeout);
// We need to store the starting pos and crawl position so that it may
// be backtracked through later. This needs to be the starting position from
// the iteration we're leaving, so it's pushed before updating it to pos.
EmitStackPush(expressionHasCaptures ?
new[] { "base.Crawlpos()", startingPos, "pos", sawEmpty } :
new[] { startingPos, "pos", sawEmpty });
writer.WriteLine();
// Save off some state. We need to store the current pos so we can compare it against
// pos after the iteration, in order to determine whether the iteration was empty. Empty
// iterations are allowed as part of min matches, but once we've met the min quote, empty matches
// are considered match failures.
writer.WriteLine($"{startingPos} = pos;");
// Proactively increase the number of iterations. We do this prior to the match rather than once
// we know it's successful, because we need to decrement it as part of a failed match when
// backtracking; it's thus simpler to just always decrement it as part of a failed match, even
// when initially greedily matching the loop, which then requires we increment it before trying.
writer.WriteLine($"{iterationCount}++;");
// Last but not least, we need to set the doneLabel that a failed match of the body will jump to.
// Such an iteration match failure may or may not fail the whole operation, depending on whether
// we've already matched the minimum required iterations, so we need to jump to a location that
// will make that determination.
string iterationFailedLabel = ReserveName("LazyLoopIterationNoMatch");
doneLabel = iterationFailedLabel;
// Finally, emit the child.
Debug.Assert(sliceStaticPos == 0);
EmitNode(node.Child(0));
writer.WriteLine();
TransferSliceStaticPosToPos(); // ensure sliceStaticPos remains 0
if (doneLabel == iterationFailedLabel)
{
doneLabel = originalDoneLabel;
}
// Loop condition. Continue iterating if we've not yet reached the minimum.
if (minIterations > 0)
{
using (EmitBlock(writer, $"if ({CountIsLessThan(iterationCount, minIterations)})"))
{
Goto(body);
}
}
// If the last iteration was empty, we need to prevent further iteration from this point
// unless we backtrack out of this iteration. We can do that easily just by pretending
// we reached the max iteration count.
using (EmitBlock(writer, $"if (pos == {startingPos})"))
{
writer.WriteLine($"{sawEmpty} = 1;");
}
// We matched the next iteration. Jump to the subsequent code.
Goto(endLoop);
writer.WriteLine();
// Now handle what happens when an iteration fails. We need to reset state to what it was before just that iteration
// started. That includes resetting pos and clearing out any captures from that iteration.
MarkLabel(iterationFailedLabel, emitSemicolon: false);
writer.WriteLine($"{iterationCount}--;");
using (EmitBlock(writer, $"if ({iterationCount} < 0)"))
{
Goto(originalDoneLabel);
}
EmitStackPop(sawEmpty, "pos", startingPos);
if (expressionHasCaptures)
{
EmitUncaptureUntil(StackPop());
}
SliceInputSpan(writer);
if (doneLabel == originalDoneLabel)
{
Goto(originalDoneLabel);
}
else
{
using (EmitBlock(writer, $"if ({iterationCount} == 0)"))
{
Goto(originalDoneLabel);
}
Goto(doneLabel);
}
writer.WriteLine();
MarkLabel(endLoop);
if (!isAtomic)
{
// Store the capture's state and skip the backtracking section
EmitStackPush(startingPos, iterationCount, sawEmpty);
string skipBacktrack = ReserveName("SkipBacktrack");
Goto(skipBacktrack);
writer.WriteLine();
// Emit a backtracking section that restores the capture's state and then jumps to the previous done label
string backtrack = ReserveName($"LazyLoopBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
EmitStackPop(sawEmpty, iterationCount, startingPos);
if (maxIterations == int.MaxValue)
{
using (EmitBlock(writer, $"if ({sawEmpty} == 0)"))
{
Goto(body);
}
}
else
{
using (EmitBlock(writer, $"if ({CountIsLessThan(iterationCount, maxIterations)} && {sawEmpty} == 0)"))
{
Goto(body);
}
}
Goto(doneLabel);
writer.WriteLine();
doneLabel = backtrack;
MarkLabel(skipBacktrack);
}
}
// Emits the code to handle a loop (repeater) with a fixed number of iterations.
// RegexNode.M is used for the number of iterations (RegexNode.N is ignored), as this
// might be used to implement the required iterations of other kinds of loops.
void EmitSingleCharRepeater(RegexNode node, bool emitLengthCheck = true)
{
Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
int iterations = node.M;
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
switch (iterations)
{
case 0:
// No iterations, nothing to do.
return;
case 1:
// Just match the individual item
EmitSingleChar(node, emitLengthCheck);
return;
case <= RegexNode.MultiVsRepeaterLimit when node.IsOneFamily && !IsCaseInsensitive(node):
// This is a repeated case-sensitive character; emit it as a multi in order to get all the optimizations
// afforded to a multi, e.g. unrolling the loop with multi-char reads/comparisons at a time.
EmitMultiCharString(new string(node.Ch, iterations), caseInsensitive: false, emitLengthCheck, clauseOnly: false, rtl);
return;
}
if (rtl)
{
TransferSliceStaticPosToPos(); // we don't use static position with rtl
using (EmitBlock(writer, $"for (int i = 0; i < {iterations}; i++)"))
{
EmitTimeoutCheck(writer, hasTimeout);
EmitSingleChar(node);
}
}
else if (iterations <= MaxUnrollSize)
{
// if ((uint)(sliceStaticPos + iterations - 1) >= (uint)slice.Length ||
// slice[sliceStaticPos] != c1 ||
// slice[sliceStaticPos + 1] != c2 ||
// ...)
// {
// goto doneLabel;
// }
writer.Write($"if (");
if (emitLengthCheck)
{
writer.WriteLine($"{SpanLengthCheck(iterations)} ||");
writer.Write(" ");
}
EmitSingleChar(node, emitLengthCheck: false, clauseOnly: true);
for (int i = 1; i < iterations; i++)
{
writer.WriteLine(" ||");
writer.Write(" ");
EmitSingleChar(node, emitLengthCheck: false, clauseOnly: true);
}
writer.WriteLine(")");
using (EmitBlock(writer, null))
{
Goto(doneLabel);
}
}
else
{
// if ((uint)(sliceStaticPos + iterations - 1) >= (uint)slice.Length) goto doneLabel;
if (emitLengthCheck)
{
EmitSpanLengthCheck(iterations);
}
string repeaterSpan = "repeaterSlice"; // As this repeater doesn't wrap arbitrary node emits, this shouldn't conflict with anything
writer.WriteLine($"ReadOnlySpan<char> {repeaterSpan} = {sliceSpan}.Slice({sliceStaticPos}, {iterations});");
using (EmitBlock(writer, $"for (int i = 0; i < {repeaterSpan}.Length; i++)"))
{
EmitTimeoutCheck(writer, hasTimeout);
string tmpTextSpanLocal = sliceSpan; // we want EmitSingleChar to refer to this temporary
int tmpSliceStaticPos = sliceStaticPos;
sliceSpan = repeaterSpan;
sliceStaticPos = 0;
EmitSingleChar(node, emitLengthCheck: false, offset: "i");
sliceSpan = tmpTextSpanLocal;
sliceStaticPos = tmpSliceStaticPos;
}
sliceStaticPos += iterations;
}
}
// Emits the code to handle a non-backtracking, variable-length loop around a single character comparison.
void EmitSingleCharAtomicLoop(RegexNode node, bool emitLengthChecksIfRequired = true)
{
Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}");
// If this is actually a repeater, emit that instead.
if (node.M == node.N)
{
EmitSingleCharRepeater(node, emitLengthChecksIfRequired);
return;
}
// If this is actually an optional single char, emit that instead.
if (node.M == 0 && node.N == 1)
{
EmitAtomicSingleCharZeroOrOne(node);
return;
}
Debug.Assert(node.N > node.M);
int minIterations = node.M;
int maxIterations = node.N;
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
Span<char> setChars = stackalloc char[5]; // 5 is max optimized by IndexOfAny today
int numSetChars = 0;
string iterationLocal = ReserveName("iteration");
if (rtl)
{
TransferSliceStaticPosToPos(); // we don't use static position for rtl
string expr = $"inputSpan[pos - {iterationLocal} - 1]";
if (node.IsSetFamily)
{
expr = MatchCharacterClass(hasTextInfo, options, expr, node.Str!, IsCaseInsensitive(node), negate: false, additionalDeclarations, requiredHelpers);
}
else
{
expr = ToLowerIfNeeded(hasTextInfo, options, expr, IsCaseInsensitive(node));
expr = $"{expr} {(node.IsOneFamily ? "==" : "!=")} {Literal(node.Ch)}";
}
writer.WriteLine($"int {iterationLocal} = 0;");
string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : "";
using (EmitBlock(writer, $"while ({maxClause}pos > {iterationLocal} && {expr})"))
{
EmitTimeoutCheck(writer, hasTimeout);
writer.WriteLine($"{iterationLocal}++;");
}
writer.WriteLine();
}
else if (node.IsNotoneFamily &&
maxIterations == int.MaxValue &&
(!IsCaseInsensitive(node)))
{
// For Notone, we're looking for a specific character, as everything until we find
// it is consumed by the loop. If we're unbounded, such as with ".*" and if we're case-sensitive,
// we can use the vectorized IndexOf to do the search, rather than open-coding it. The unbounded
// restriction is purely for simplicity; it could be removed in the future with additional code to
// handle the unbounded case.
writer.Write($"int {iterationLocal} = {sliceSpan}");
if (sliceStaticPos > 0)
{
writer.Write($".Slice({sliceStaticPos})");
}
writer.WriteLine($".IndexOf({Literal(node.Ch)});");
using (EmitBlock(writer, $"if ({iterationLocal} < 0)"))
{
writer.WriteLine(sliceStaticPos > 0 ?
$"{iterationLocal} = {sliceSpan}.Length - {sliceStaticPos};" :
$"{iterationLocal} = {sliceSpan}.Length;");
}
writer.WriteLine();
}
else if (node.IsSetFamily &&
maxIterations == int.MaxValue &&
!IsCaseInsensitive(node) &&
(numSetChars = RegexCharClass.GetSetChars(node.Str!, setChars)) != 0 &&
RegexCharClass.IsNegated(node.Str!))
{
// If the set is negated and contains only a few characters (if it contained 1 and was negated, it should
// have been reduced to a Notone), we can use an IndexOfAny to find any of the target characters.
// As with the notoneloopatomic above, the unbounded constraint is purely for simplicity.
Debug.Assert(numSetChars > 1);
writer.Write($"int {iterationLocal} = {sliceSpan}");
if (sliceStaticPos != 0)
{
writer.Write($".Slice({sliceStaticPos})");
}
writer.WriteLine(numSetChars switch
{
2 => $".IndexOfAny({Literal(setChars[0])}, {Literal(setChars[1])});",
3 => $".IndexOfAny({Literal(setChars[0])}, {Literal(setChars[1])}, {Literal(setChars[2])});",
_ => $".IndexOfAny({Literal(setChars.Slice(0, numSetChars).ToString())});",
});
using (EmitBlock(writer, $"if ({iterationLocal} < 0)"))
{
writer.WriteLine(sliceStaticPos > 0 ?
$"{iterationLocal} = {sliceSpan}.Length - {sliceStaticPos};" :
$"{iterationLocal} = {sliceSpan}.Length;");
}
writer.WriteLine();
}
else if (node.IsSetFamily && maxIterations == int.MaxValue && node.Str == RegexCharClass.AnyClass)
{
// .* was used with RegexOptions.Singleline, which means it'll consume everything. Just jump to the end.
// The unbounded constraint is the same as in the Notone case above, done purely for simplicity.
TransferSliceStaticPosToPos();
writer.WriteLine($"int {iterationLocal} = inputSpan.Length - pos;");
}
else
{
// For everything else, do a normal loop.
string expr = $"{sliceSpan}[{iterationLocal}]";
if (node.IsSetFamily)
{
expr = MatchCharacterClass(hasTextInfo, options, expr, node.Str!, IsCaseInsensitive(node), negate: false, additionalDeclarations, requiredHelpers);
}
else
{
expr = ToLowerIfNeeded(hasTextInfo, options, expr, IsCaseInsensitive(node));
expr = $"{expr} {(node.IsOneFamily ? "==" : "!=")} {Literal(node.Ch)}";
}
if (minIterations != 0 || maxIterations != int.MaxValue)
{
// For any loops other than * loops, transfer text pos to pos in
// order to zero it out to be able to use the single iteration variable
// for both iteration count and indexer.
TransferSliceStaticPosToPos();
}
writer.WriteLine($"int {iterationLocal} = {sliceStaticPos};");
sliceStaticPos = 0;
string maxClause = maxIterations != int.MaxValue ? $"{CountIsLessThan(iterationLocal, maxIterations)} && " : "";
using (EmitBlock(writer, $"while ({maxClause}(uint){iterationLocal} < (uint){sliceSpan}.Length && {expr})"))
{
EmitTimeoutCheck(writer, hasTimeout);
writer.WriteLine($"{iterationLocal}++;");
}
writer.WriteLine();
}
// Check to ensure we've found at least min iterations.
if (minIterations > 0)
{
using (EmitBlock(writer, $"if ({CountIsLessThan(iterationLocal, minIterations)})"))
{
Goto(doneLabel);
}
writer.WriteLine();
}
// Now that we've completed our optional iterations, advance the text span
// and pos by the number of iterations completed.
if (!rtl)
{
writer.WriteLine($"{sliceSpan} = {sliceSpan}.Slice({iterationLocal});");
writer.WriteLine($"pos += {iterationLocal};");
}
else
{
writer.WriteLine($"pos -= {iterationLocal};");
}
}
// Emits the code to handle a non-backtracking optional zero-or-one loop.
void EmitAtomicSingleCharZeroOrOne(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}");
Debug.Assert(node.M == 0 && node.N == 1);
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
if (rtl)
{
TransferSliceStaticPosToPos(); // we don't use static pos for rtl
}
string expr = !rtl ?
$"{sliceSpan}[{sliceStaticPos}]" :
"inputSpan[pos - 1]";
if (node.IsSetFamily)
{
expr = MatchCharacterClass(hasTextInfo, options, expr, node.Str!, IsCaseInsensitive(node), negate: false, additionalDeclarations, requiredHelpers);
}
else
{
expr = ToLowerIfNeeded(hasTextInfo, options, expr, IsCaseInsensitive(node));
expr = $"{expr} {(node.IsOneFamily ? "==" : "!=")} {Literal(node.Ch)}";
}
string spaceAvailable =
rtl ? "pos > 0" :
sliceStaticPos != 0 ? $"(uint){sliceSpan}.Length > (uint){sliceStaticPos}" :
$"!{sliceSpan}.IsEmpty";
using (EmitBlock(writer, $"if ({spaceAvailable} && {expr})"))
{
if (!rtl)
{
writer.WriteLine($"{sliceSpan} = {sliceSpan}.Slice(1);");
writer.WriteLine($"pos++;");
}
else
{
writer.WriteLine($"pos--;");
}
}
}
void EmitNonBacktrackingRepeater(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
Debug.Assert(node.M == node.N, $"Unexpected M={node.M} == N={node.N}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
Debug.Assert(!analysis.MayBacktrack(node.Child(0)), $"Expected non-backtracking node {node.Kind}");
// Ensure every iteration of the loop sees a consistent value.
TransferSliceStaticPosToPos();
// Loop M==N times to match the child exactly that numbers of times.
string i = ReserveName("loop_iteration");
using (EmitBlock(writer, $"for (int {i} = 0; {i} < {node.M}; {i}++)"))
{
EmitNode(node.Child(0));
TransferSliceStaticPosToPos(); // make sure static the static position remains at 0 for subsequent constructs
}
}
void EmitLoop(RegexNode node)
{
Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
int minIterations = node.M;
int maxIterations = node.N;
bool isAtomic = analysis.IsAtomicByAncestor(node);
// If this is actually a repeater and the child doesn't have any backtracking in it that might
// cause us to need to unwind already taken iterations, just output it as a repeater loop.
if (minIterations == maxIterations && !analysis.MayBacktrack(node.Child(0)))
{
EmitNonBacktrackingRepeater(node);
return;
}
// We might loop any number of times. In order to ensure this loop and subsequent code sees sliceStaticPos
// the same regardless, we always need it to contain the same value, and the easiest such value is 0.
// So, we transfer sliceStaticPos to pos, and ensure that any path out of here has sliceStaticPos as 0.
TransferSliceStaticPosToPos();
string originalDoneLabel = doneLabel;
string startingPos = ReserveName("loop_starting_pos");
string iterationCount = ReserveName("loop_iteration");
string body = ReserveName("LoopBody");
string endLoop = ReserveName("LoopEnd");
additionalDeclarations.Add($"int {iterationCount} = 0, {startingPos} = 0;");
writer.WriteLine($"{iterationCount} = 0;");
writer.WriteLine($"{startingPos} = pos;");
writer.WriteLine();
// Iteration body
MarkLabel(body, emitSemicolon: false);
EmitTimeoutCheck(writer, hasTimeout);
// We need to store the starting pos and crawl position so that it may
// be backtracked through later. This needs to be the starting position from
// the iteration we're leaving, so it's pushed before updating it to pos.
EmitStackPush(expressionHasCaptures ?
new[] { "base.Crawlpos()", startingPos, "pos" } :
new[] { startingPos, "pos" });
writer.WriteLine();
// Save off some state. We need to store the current pos so we can compare it against
// pos after the iteration, in order to determine whether the iteration was empty. Empty
// iterations are allowed as part of min matches, but once we've met the min quote, empty matches
// are considered match failures.
writer.WriteLine($"{startingPos} = pos;");
// Proactively increase the number of iterations. We do this prior to the match rather than once
// we know it's successful, because we need to decrement it as part of a failed match when
// backtracking; it's thus simpler to just always decrement it as part of a failed match, even
// when initially greedily matching the loop, which then requires we increment it before trying.
writer.WriteLine($"{iterationCount}++;");
writer.WriteLine();
// Last but not least, we need to set the doneLabel that a failed match of the body will jump to.
// Such an iteration match failure may or may not fail the whole operation, depending on whether
// we've already matched the minimum required iterations, so we need to jump to a location that
// will make that determination.
string iterationFailedLabel = ReserveName("LoopIterationNoMatch");
doneLabel = iterationFailedLabel;
// Finally, emit the child.
Debug.Assert(sliceStaticPos == 0);
EmitNode(node.Child(0));
writer.WriteLine();
TransferSliceStaticPosToPos(); // ensure sliceStaticPos remains 0
bool childBacktracks = doneLabel != iterationFailedLabel;
// Loop condition. Continue iterating greedily if we've not yet reached the maximum. We also need to stop
// iterating if the iteration matched empty and we already hit the minimum number of iterations.
using (EmitBlock(writer, (minIterations > 0, maxIterations == int.MaxValue) switch
{
(true, true) => $"if (pos != {startingPos} || {CountIsLessThan(iterationCount, minIterations)})",
(true, false) => $"if ((pos != {startingPos} || {CountIsLessThan(iterationCount, minIterations)}) && {CountIsLessThan(iterationCount, maxIterations)})",
(false, true) => $"if (pos != {startingPos})",
(false, false) => $"if (pos != {startingPos} && {CountIsLessThan(iterationCount, maxIterations)})",
}))
{
Goto(body);
}
// We've matched as many iterations as we can with this configuration. Jump to what comes after the loop.
Goto(endLoop);
writer.WriteLine();
// Now handle what happens when an iteration fails, which could be an initial failure or it
// could be while backtracking. We need to reset state to what it was before just that iteration
// started. That includes resetting pos and clearing out any captures from that iteration.
MarkLabel(iterationFailedLabel, emitSemicolon: false);
writer.WriteLine($"{iterationCount}--;");
using (EmitBlock(writer, $"if ({iterationCount} < 0)"))
{
Goto(originalDoneLabel);
}
EmitStackPop("pos", startingPos);
if (expressionHasCaptures)
{
EmitUncaptureUntil(StackPop());
}
SliceInputSpan(writer);
if (minIterations > 0)
{
using (EmitBlock(writer, $"if ({iterationCount} == 0)"))
{
Goto(originalDoneLabel);
}
using (EmitBlock(writer, $"if ({CountIsLessThan(iterationCount, minIterations)})"))
{
Goto(childBacktracks ? doneLabel : originalDoneLabel);
}
}
if (isAtomic)
{
doneLabel = originalDoneLabel;
MarkLabel(endLoop);
}
else
{
if (childBacktracks)
{
Goto(endLoop);
writer.WriteLine();
string backtrack = ReserveName("LoopBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
using (EmitBlock(writer, $"if ({iterationCount} == 0)"))
{
Goto(originalDoneLabel);
}
Goto(doneLabel);
doneLabel = backtrack;
}
MarkLabel(endLoop);
if (node.IsInLoop())
{
writer.WriteLine();
// Store the loop's state
EmitStackPush(startingPos, iterationCount);
// Skip past the backtracking section
string end = ReserveName("SkipBacktrack");
Goto(end);
writer.WriteLine();
// Emit a backtracking section that restores the loop's state and then jumps to the previous done label
string backtrack = ReserveName("LoopBacktrack");
MarkLabel(backtrack, emitSemicolon: false);
EmitStackPop(iterationCount, startingPos);
Goto(doneLabel);
writer.WriteLine();
doneLabel = backtrack;
MarkLabel(end);
}
}
}
// Gets a comparison for whether the value is less than the upper bound.
static string CountIsLessThan(string value, int exclusiveUpper) =>
exclusiveUpper == 1 ? $"{value} == 0" : $"{value} < {exclusiveUpper}";
// Emits code to unwind the capture stack until the crawl position specified in the provided local.
void EmitUncaptureUntil(string capturepos)
{
const string UncaptureUntil = nameof(UncaptureUntil);
if (!additionalLocalFunctions.ContainsKey(UncaptureUntil))
{
additionalLocalFunctions.Add(UncaptureUntil, new string[]
{
$"// <summary>Undo captures until it reaches the specified capture position.</summary>",
$"[MethodImpl(MethodImplOptions.AggressiveInlining)]",
$"void {UncaptureUntil}(int capturePosition)",
$"{{",
$" while (base.Crawlpos() > capturePosition)",
$" {{",
$" base.Uncapture();",
$" }}",
$"}}",
});
}
writer.WriteLine($"{UncaptureUntil}({capturepos});");
}
/// <summary>Pushes values on to the backtracking stack.</summary>
void EmitStackPush(params string[] args)
{
Debug.Assert(args.Length is >= 1);
string methodName = $"StackPush{args.Length}";
additionalDeclarations.Add("int stackpos = 0;");
if (!requiredHelpers.ContainsKey(methodName))
{
var lines = new string[24 + args.Length];
lines[0] = $"// <summary>Pushes {args.Length} value{(args.Length == 1 ? "" : "s")} onto the backtracking stack.</summary>";
lines[1] = $"[MethodImpl(MethodImplOptions.AggressiveInlining)]";
lines[2] = $"internal static void {methodName}(ref int[] stack, ref int pos{FormatN(", int arg{0}", args.Length)})";
lines[3] = $"{{";
lines[4] = $" // If there's space available for {(args.Length > 1 ? $"all {args.Length} values, store them" : "the value, store it")}.";
lines[5] = $" int[] s = stack;";
lines[6] = $" int p = pos;";
lines[7] = $" if ((uint){(args.Length > 1 ? $"(p + {args.Length - 1})" : "p")} < (uint)s.Length)";
lines[8] = $" {{";
for (int i = 0; i < args.Length; i++)
{
lines[9 + i] = $" s[p{(i == 0 ? "" : $" + {i}")}] = arg{i};";
}
lines[9 + args.Length] = args.Length > 1 ? $" pos += {args.Length};" : " pos++;";
lines[10 + args.Length] = $" return;";
lines[11 + args.Length] = $" }}";
lines[12 + args.Length] = $"";
lines[13 + args.Length] = $" // Otherwise, resize the stack to make room and try again.";
lines[14 + args.Length] = $" WithResize(ref stack, ref pos{FormatN(", arg{0}", args.Length)});";
lines[15 + args.Length] = $"";
lines[16 + args.Length] = $" // <summary>Resize the backtracking stack array and push {args.Length} value{(args.Length == 1 ? "" : "s")} onto the stack.</summary>";
lines[17 + args.Length] = $" [MethodImpl(MethodImplOptions.NoInlining)]";
lines[18 + args.Length] = $" static void WithResize(ref int[] stack, ref int pos{FormatN(", int arg{0}", args.Length)})";
lines[19 + args.Length] = $" {{";
lines[20 + args.Length] = $" Array.Resize(ref stack, (pos + {args.Length - 1}) * 2);";
lines[21 + args.Length] = $" {methodName}(ref stack, ref pos{FormatN(", arg{0}", args.Length)});";
lines[22 + args.Length] = $" }}";
lines[23 + args.Length] = $"}}";
requiredHelpers.Add(methodName, lines);
}
writer.WriteLine($"{HelpersTypeName}.{methodName}(ref base.runstack!, ref stackpos, {string.Join(", ", args)});");
}
/// <summary>Pops values from the backtracking stack into the specified locations.</summary>
void EmitStackPop(params string[] args)
{
Debug.Assert(args.Length is >= 1);
if (args.Length == 1)
{
writer.WriteLine($"{args[0]} = {StackPop()};");
return;
}
string methodName = $"StackPop{args.Length}";
if (!requiredHelpers.ContainsKey(methodName))
{
var lines = new string[5 + args.Length];
lines[0] = $"// <summary>Pops {args.Length} value{(args.Length == 1 ? "" : "s")} from the backtracking stack.</summary>";
lines[1] = $"[MethodImpl(MethodImplOptions.AggressiveInlining)]";
lines[2] = $"internal static void {methodName}(int[] stack, ref int pos{FormatN(", out int arg{0}", args.Length)})";
lines[3] = $"{{";
for (int i = 0; i < args.Length; i++)
{
lines[4 + i] = $" arg{i} = stack[--pos];";
}
lines[4 + args.Length] = $"}}";
requiredHelpers.Add(methodName, lines);
}
writer.WriteLine($"{HelpersTypeName}.{methodName}(base.runstack, ref stackpos, out {string.Join(", out ", args)});");
}
/// <summary>Expression for popping the next item from the backtracking stack.</summary>
string StackPop() => "base.runstack![--stackpos]";
/// <summary>Concatenates the strings resulting from formatting the format string with the values [0, count).</summary>
static string FormatN(string format, int count) =>
string.Concat(from i in Enumerable.Range(0, count)
select string.Format(format, i));
}
private static bool EmitLoopTimeoutCounterIfNeeded(IndentedTextWriter writer, RegexMethod rm)
{
if (rm.MatchTimeout != Timeout.Infinite)
{
writer.WriteLine("int loopTimeoutCounter = 0;");
return true;
}
return false;
}
/// <summary>Emits a timeout check.</summary>
private static void EmitTimeoutCheck(IndentedTextWriter writer, bool hasTimeout)
{
const int LoopTimeoutCheckCount = 2048; // A conservative value to guarantee the correct timeout handling.
if (hasTimeout)
{
// Increment counter for each loop iteration.
// Emit code to check the timeout every 2048th iteration.
using (EmitBlock(writer, $"if (++loopTimeoutCounter == {LoopTimeoutCheckCount})"))
{
writer.WriteLine("loopTimeoutCounter = 0;");
writer.WriteLine("base.CheckTimeout();");
}
writer.WriteLine();
}
}
private static bool EmitInitializeCultureForTryMatchAtCurrentPositionIfNecessary(IndentedTextWriter writer, RegexMethod rm, AnalysisResults analysis)
{
if (analysis.HasIgnoreCase && ((RegexOptions)rm.Options & RegexOptions.CultureInvariant) == 0)
{
writer.WriteLine("TextInfo textInfo = CultureInfo.CurrentCulture.TextInfo;");
return true;
}
return false;
}
private static bool UseToLowerInvariant(bool hasTextInfo, RegexOptions options) => !hasTextInfo || (options & RegexOptions.CultureInvariant) != 0;
private static string ToLower(bool hasTextInfo, RegexOptions options, string expression) => UseToLowerInvariant(hasTextInfo, options) ? $"char.ToLowerInvariant({expression})" : $"textInfo.ToLower({expression})";
private static string ToLowerIfNeeded(bool hasTextInfo, RegexOptions options, string expression, bool toLower) => toLower ? ToLower(hasTextInfo, options, expression) : expression;
private static string MatchCharacterClass(bool hasTextInfo, RegexOptions options, string chExpr, string charClass, bool caseInsensitive, bool negate, HashSet<string> additionalDeclarations, Dictionary<string, string[]> requiredHelpers)
{
// We need to perform the equivalent of calling RegexRunner.CharInClass(ch, charClass),
// but that call is relatively expensive. Before we fall back to it, we try to optimize
// some common cases for which we can do much better, such as known character classes
// for which we can call a dedicated method, or a fast-path for ASCII using a lookup table.
// First, see if the char class is a built-in one for which there's a better function
// we can just call directly. Everything in this section must work correctly for both
// case-sensitive and case-insensitive modes, regardless of culture.
switch (charClass)
{
case RegexCharClass.AnyClass:
// ideally this could just be "return true;", but we need to evaluate the expression for its side effects
return $"({chExpr} {(negate ? "<" : ">=")} 0)"; // a char is unsigned and thus won't ever be negative
case RegexCharClass.DigitClass:
case RegexCharClass.NotDigitClass:
negate ^= charClass == RegexCharClass.NotDigitClass;
return $"{(negate ? "!" : "")}char.IsDigit({chExpr})";
case RegexCharClass.SpaceClass:
case RegexCharClass.NotSpaceClass:
negate ^= charClass == RegexCharClass.NotSpaceClass;
return $"{(negate ? "!" : "")}char.IsWhiteSpace({chExpr})";
case RegexCharClass.WordClass:
case RegexCharClass.NotWordClass:
AddIsWordCharHelper(requiredHelpers);
negate ^= charClass == RegexCharClass.NotWordClass;
return $"{(negate ? "!" : "")}{HelpersTypeName}.IsWordChar({chExpr})";
}
// If we're meant to be doing a case-insensitive lookup, and if we're not using the invariant culture,
// lowercase the input. If we're using the invariant culture, we may still end up calling ToLower later
// on, but we may also be able to avoid it, in particular in the case of our lookup table, where we can
// generate the lookup table already factoring in the invariant case sensitivity. There are multiple
// special-code paths between here and the lookup table, but we only take those if invariant is false;
// if it were true, they'd need to use CallToLower().
bool invariant = false;
if (caseInsensitive)
{
invariant = UseToLowerInvariant(hasTextInfo, options);
if (!invariant)
{
chExpr = ToLower(hasTextInfo, options, chExpr);
}
}
// Next, handle simple sets of one range, e.g. [A-Z], [0-9], etc. This includes some built-in classes, like ECMADigitClass.
if (!invariant && RegexCharClass.TryGetSingleRange(charClass, out char lowInclusive, out char highInclusive))
{
negate ^= RegexCharClass.IsNegated(charClass);
return lowInclusive == highInclusive ?
$"({chExpr} {(negate ? "!=" : "==")} {Literal(lowInclusive)})" :
$"(((uint){chExpr}) - {Literal(lowInclusive)} {(negate ? ">" : "<=")} (uint)({Literal(highInclusive)} - {Literal(lowInclusive)}))";
}
// Next if the character class contains nothing but a single Unicode category, we can calle char.GetUnicodeCategory and
// compare against it. It has a fast-lookup path for ASCII, so is as good or better than any lookup we'd generate (plus
// we get smaller code), and it's what we'd do for the fallback (which we get to avoid generating) as part of CharInClass.
if (!invariant && RegexCharClass.TryGetSingleUnicodeCategory(charClass, out UnicodeCategory category, out bool negated))
{
negate ^= negated;
return $"(char.GetUnicodeCategory({chExpr}) {(negate ? "!=" : "==")} UnicodeCategory.{category})";
}
// Next, if there's only 2 or 3 chars in the set (fairly common due to the sets we create for prefixes),
// it may be cheaper and smaller to compare against each than it is to use a lookup table. We can also special-case
// the very common case with case insensitivity of two characters next to each other being the upper and lowercase
// ASCII variants of each other, in which case we can use bit manipulation to avoid a comparison.
if (!invariant && !RegexCharClass.IsNegated(charClass))
{
Span<char> setChars = stackalloc char[3];
int mask;
switch (RegexCharClass.GetSetChars(charClass, setChars))
{
case 2:
if (RegexCharClass.DifferByOneBit(setChars[0], setChars[1], out mask))
{
return $"(({chExpr} | 0x{mask:X}) {(negate ? "!=" : "==")} {Literal((char)(setChars[1] | mask))})";
}
additionalDeclarations.Add("char ch;");
return negate ?
$"(((ch = {chExpr}) != {Literal(setChars[0])}) & (ch != {Literal(setChars[1])}))" :
$"(((ch = {chExpr}) == {Literal(setChars[0])}) | (ch == {Literal(setChars[1])}))";
case 3:
additionalDeclarations.Add("char ch;");
return (negate, RegexCharClass.DifferByOneBit(setChars[0], setChars[1], out mask)) switch
{
(false, false) => $"(((ch = {chExpr}) == {Literal(setChars[0])}) | (ch == {Literal(setChars[1])}) | (ch == {Literal(setChars[2])}))",
(true, false) => $"(((ch = {chExpr}) != {Literal(setChars[0])}) & (ch != {Literal(setChars[1])}) & (ch != {Literal(setChars[2])}))",
(false, true) => $"((((ch = {chExpr}) | 0x{mask:X}) == {Literal((char)(setChars[1] | mask))}) | (ch == {Literal(setChars[2])}))",
(true, true) => $"((((ch = {chExpr}) | 0x{mask:X}) != {Literal((char)(setChars[1] | mask))}) & (ch != {Literal(setChars[2])}))",
};
}
}
// All options after this point require a ch local.
additionalDeclarations.Add("char ch;");
// Analyze the character set more to determine what code to generate.
RegexCharClass.CharClassAnalysisResults analysis = RegexCharClass.Analyze(charClass);
if (!invariant) // if we're being asked to do a case insensitive, invariant comparison, use the lookup table
{
if (analysis.ContainsNoAscii)
{
// We determined that the character class contains only non-ASCII,
// for example if the class were [\p{IsGreek}\p{IsGreekExtended}], which is
// the same as [\u0370-\u03FF\u1F00-1FFF]. (In the future, we could possibly
// extend the analysis to produce a known lower-bound and compare against
// that rather than always using 128 as the pivot point.)
return negate ?
$"((ch = {chExpr}) < 128 || !RegexRunner.CharInClass((char)ch, {Literal(charClass)}))" :
$"((ch = {chExpr}) >= 128 && RegexRunner.CharInClass((char)ch, {Literal(charClass)}))";
}
if (analysis.AllAsciiContained)
{
// We determined that every ASCII character is in the class, for example
// if the class were the negated example from case 1 above:
// [^\p{IsGreek}\p{IsGreekExtended}].
return negate ?
$"((ch = {chExpr}) >= 128 && !RegexRunner.CharInClass((char)ch, {Literal(charClass)}))" :
$"((ch = {chExpr}) < 128 || RegexRunner.CharInClass((char)ch, {Literal(charClass)}))";
}
}
// Now, our big hammer is to generate a lookup table that lets us quickly index by character into a yes/no
// answer as to whether the character is in the target character class. However, we don't want to store
// a lookup table for every possible character for every character class in the regular expression; at one
// bit for each of 65K characters, that would be an 8K bitmap per character class. Instead, we handle the
// common case of ASCII input via such a lookup table, which at one bit for each of 128 characters is only
// 16 bytes per character class. We of course still need to be able to handle inputs that aren't ASCII, so
// we check the input against 128, and have a fallback if the input is >= to it. Determining the right
// fallback could itself be expensive. For example, if it's possible that a value >= 128 could match the
// character class, we output a call to RegexRunner.CharInClass, but we don't want to have to enumerate the
// entire character class evaluating every character against it, just to determine whether it's a match.
// Instead, we employ some quick heuristics that will always ensure we provide a correct answer even if
// we could have sometimes generated better code to give that answer.
// Generate the lookup table to store 128 answers as bits. We use a const string instead of a byte[] / static
// data property because it lets IL emit handle all the details for us.
string bitVectorString = StringExtensions.Create(8, (charClass, invariant), static (dest, state) => // String length is 8 chars == 16 bytes == 128 bits.
{
for (int i = 0; i < 128; i++)
{
char c = (char)i;
bool isSet = state.invariant ?
RegexCharClass.CharInClass(char.ToLowerInvariant(c), state.charClass) :
RegexCharClass.CharInClass(c, state.charClass);
if (isSet)
{
dest[i >> 4] |= (char)(1 << (i & 0xF));
}
}
});
// We determined that the character class may contain ASCII, so we
// output the lookup against the lookup table.
if (analysis.ContainsOnlyAscii)
{
// We know that all inputs that could match are ASCII, for example if the
// character class were [A-Za-z0-9], so since the ch is now known to be >= 128, we
// can just fail the comparison.
return negate ?
$"((ch = {chExpr}) >= 128 || ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) == 0)" :
$"((ch = {chExpr}) < 128 && ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) != 0)";
}
if (analysis.AllNonAsciiContained)
{
// We know that all non-ASCII inputs match, for example if the character
// class were [^\r\n], so since we just determined the ch to be >= 128, we can just
// give back success.
return negate ?
$"((ch = {chExpr}) < 128 && ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) == 0)" :
$"((ch = {chExpr}) >= 128 || ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) != 0)";
}
// We know that the whole class wasn't ASCII, and we don't know anything about the non-ASCII
// characters other than that some might be included, for example if the character class
// were [\w\d], so since ch >= 128, we need to fall back to calling CharInClass.
return (negate, invariant) switch
{
(false, false) => $"((ch = {chExpr}) < 128 ? ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, {Literal(charClass)}))",
(true, false) => $"((ch = {chExpr}) < 128 ? ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) == 0 : !RegexRunner.CharInClass((char)ch, {Literal(charClass)}))",
(false, true) => $"((ch = {chExpr}) < 128 ? ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass(char.ToLowerInvariant((char)ch), {Literal(charClass)}))",
(true, true) => $"((ch = {chExpr}) < 128 ? ({Literal(bitVectorString)}[ch >> 4] & (1 << (ch & 0xF))) == 0 : !RegexRunner.CharInClass(char.ToLowerInvariant((char)ch), {Literal(charClass)}))",
};
}
/// <summary>
/// Replaces <see cref="AdditionalDeclarationsPlaceholder"/> in <paramref name="writer"/> with
/// all of the variable declarations in <paramref name="declarations"/>.
/// </summary>
/// <param name="writer">The writer around a StringWriter to have additional declarations inserted into.</param>
/// <param name="declarations">The additional declarations to insert.</param>
/// <param name="position">The position into the writer at which to insert the additional declarations.</param>
/// <param name="indent">The indentation to use for the additional declarations.</param>
private static void ReplaceAdditionalDeclarations(IndentedTextWriter writer, HashSet<string> declarations, int position, int indent)
{
if (declarations.Count != 0)
{
var tmp = new StringBuilder();
foreach (string decl in declarations.OrderBy(s => s))
{
for (int i = 0; i < indent; i++)
{
tmp.Append(IndentedTextWriter.DefaultTabString);
}
tmp.AppendLine(decl);
}
((StringWriter)writer.InnerWriter).GetStringBuilder().Insert(position, tmp.ToString());
}
}
/// <summary>Formats the character as valid C#.</summary>
private static string Literal(char c) => SymbolDisplay.FormatLiteral(c, quote: true);
/// <summary>Formats the string as valid C#.</summary>
private static string Literal(string s) => SymbolDisplay.FormatLiteral(s, quote: true);
private static string Literal(RegexOptions options)
{
string s = options.ToString();
if (int.TryParse(s, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
{
// The options were formatted as an int, which means the runtime couldn't
// produce a textual representation. So just output casting the value as an int.
Debug.Fail("This shouldn't happen, as we should only get to the point of emitting code if RegexOptions was valid.");
return $"(RegexOptions)({(int)options})";
}
// Parse the runtime-generated "Option1, Option2" into each piece and then concat
// them back together.
string[] parts = s.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < parts.Length; i++)
{
parts[i] = "RegexOptions." + parts[i].Trim();
}
return string.Join(" | ", parts);
}
/// <summary>Gets a textual description of the node fit for rendering in a comment in source.</summary>
private static string DescribeNode(RegexNode node, AnalysisResults analysis)
{
bool rtl = (node.Options & RegexOptions.RightToLeft) != 0;
return node.Kind switch
{
RegexNodeKind.Alternate => $"Match with {node.ChildCount()} alternative expressions{(analysis.IsAtomicByAncestor(node) ? ", atomically" : "")}.",
RegexNodeKind.Atomic => $"Atomic group.",
RegexNodeKind.Beginning => "Match if at the beginning of the string.",
RegexNodeKind.Bol => "Match if at the beginning of a line.",
RegexNodeKind.Boundary => $"Match if at a word boundary.",
RegexNodeKind.Capture when node.M == -1 && node.N != -1 => $"Non-capturing balancing group. Uncaptures the {DescribeCapture(node.N, analysis)}.",
RegexNodeKind.Capture when node.N != -1 => $"Balancing group. Captures the {DescribeCapture(node.M, analysis)} and uncaptures the {DescribeCapture(node.N, analysis)}.",
RegexNodeKind.Capture when node.N == -1 => $"{DescribeCapture(node.M, analysis)}.",
RegexNodeKind.Concatenate => "Match a sequence of expressions.",
RegexNodeKind.ECMABoundary => $"Match if at a word boundary (according to ECMAScript rules).",
RegexNodeKind.Empty => $"Match an empty string.",
RegexNodeKind.End => "Match if at the end of the string.",
RegexNodeKind.EndZ => "Match if at the end of the string or if before an ending newline.",
RegexNodeKind.Eol => "Match if at the end of a line.",
RegexNodeKind.Loop or RegexNodeKind.Lazyloop => node.M == 0 && node.N == 1 ? $"Optional ({(node.Kind is RegexNodeKind.Loop ? "greedy" : "lazy")})." : $"Loop {DescribeLoop(node, analysis)}.",
RegexNodeKind.Multi => $"Match the string {Literal(node.Str!)}{(rtl ? " backwards" : "")}.",
RegexNodeKind.NonBoundary => $"Match if at anything other than a word boundary.",
RegexNodeKind.NonECMABoundary => $"Match if at anything other than a word boundary (according to ECMAScript rules).",
RegexNodeKind.Nothing => $"Fail to match.",
RegexNodeKind.Notone => $"Match any character other than {Literal(node.Ch)}{(rtl ? " backwards" : "")}.",
RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy => $"Match a character other than {Literal(node.Ch)} {DescribeLoop(node, analysis)}.",
RegexNodeKind.One => $"Match {Literal(node.Ch)}{(rtl ? " backwards" : "")}.",
RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy => $"Match {Literal(node.Ch)} {DescribeLoop(node, analysis)}.",
RegexNodeKind.NegativeLookaround => $"Zero-width negative {(rtl ? "lookbehind" : "lookahead")}.",
RegexNodeKind.Backreference => $"Match the same text as matched by the {DescribeCapture(node.M, analysis)}.",
RegexNodeKind.PositiveLookaround => $"Zero-width positive {(rtl ? "lookbehind" : "lookahead")}.",
RegexNodeKind.Set => $"Match {DescribeSet(node.Str!)}{(rtl ? " backwards" : "")}.",
RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy => $"Match {DescribeSet(node.Str!)} {DescribeLoop(node, analysis)}.",
RegexNodeKind.Start => "Match if at the start position.",
RegexNodeKind.ExpressionConditional => $"Conditionally match one of two expressions depending on whether an initial expression matches.",
RegexNodeKind.BackreferenceConditional => $"Conditionally match one of two expressions depending on whether the {DescribeCapture(node.M, analysis)} matched.",
RegexNodeKind.UpdateBumpalong => $"Advance the next matching position.",
_ => $"Unknown node type {node.Kind}",
};
}
/// <summary>Gets an identifer to describe a capture group.</summary>
private static string DescribeCapture(int capNum, AnalysisResults analysis)
{
// If we can get a capture name from the captures collection and it's not just a numerical representation of the group, use it.
string name = RegexParser.GroupNameFromNumber(analysis.RegexTree.CaptureNumberSparseMapping, analysis.RegexTree.CaptureNames, analysis.RegexTree.CaptureCount, capNum);
if (!string.IsNullOrEmpty(name) &&
(!int.TryParse(name, out int id) || id != capNum))
{
name = Literal(name);
}
else
{
// Otherwise, create a numerical description of the capture group.
int tens = capNum % 10;
name = tens is >= 1 and <= 3 && capNum % 100 is < 10 or > 20 ? // Ends in 1, 2, 3 but not 11, 12, or 13
tens switch
{
1 => $"{capNum}st",
2 => $"{capNum}nd",
_ => $"{capNum}rd",
} :
$"{capNum}th";
}
return $"{name} capture group";
}
/// <summary>Gets a textual description of what characters match a set.</summary>
private static string DescribeSet(string charClass) =>
charClass switch
{
RegexCharClass.AnyClass => "any character",
RegexCharClass.DigitClass => "a Unicode digit",
RegexCharClass.ECMADigitClass => "'0' through '9'",
RegexCharClass.ECMASpaceClass => "a whitespace character (ECMA)",
RegexCharClass.ECMAWordClass => "a word character (ECMA)",
RegexCharClass.NotDigitClass => "any character other than a Unicode digit",
RegexCharClass.NotECMADigitClass => "any character other than '0' through '9'",
RegexCharClass.NotECMASpaceClass => "any character other than a space character (ECMA)",
RegexCharClass.NotECMAWordClass => "any character other than a word character (ECMA)",
RegexCharClass.NotSpaceClass => "any character other than a space character",
RegexCharClass.NotWordClass => "any character other than a word character",
RegexCharClass.SpaceClass => "a whitespace character",
RegexCharClass.WordClass => "a word character",
_ => $"a character in the set {RegexCharClass.DescribeSet(charClass)}",
};
/// <summary>Writes a textual description of the node tree fit for rending in source.</summary>
/// <param name="writer">The writer to which the description should be written.</param>
/// <param name="node">The node being written.</param>
/// <param name="prefix">The prefix to write at the beginning of every line, including a "//" for a comment.</param>
/// <param name="analyses">Analysis of the tree</param>
/// <param name="depth">The depth of the current node.</param>
private static void DescribeExpression(TextWriter writer, RegexNode node, string prefix, AnalysisResults analysis, int depth = 0)
{
bool skip = node.Kind switch
{
// For concatenations, flatten the contents into the parent, but only if the parent isn't a form of alternation,
// where each branch is considered to be independent rather than a concatenation.
RegexNodeKind.Concatenate when node.Parent is not { Kind: RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional } => true,
// For atomic, skip the node if we'll instead render the atomic label as part of rendering the child.
RegexNodeKind.Atomic when node.Child(0).Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop or RegexNodeKind.Alternate => true,
// Don't skip anything else.
_ => false,
};
if (!skip)
{
string tag = node.Parent?.Kind switch
{
RegexNodeKind.ExpressionConditional when node.Parent.Child(0) == node => "Condition: ",
RegexNodeKind.ExpressionConditional when node.Parent.Child(1) == node => "Matched: ",
RegexNodeKind.ExpressionConditional when node.Parent.Child(2) == node => "Not Matched: ",
RegexNodeKind.BackreferenceConditional when node.Parent.Child(0) == node => "Matched: ",
RegexNodeKind.BackreferenceConditional when node.Parent.Child(1) == node => "Not Matched: ",
_ => "",
};
// Write out the line for the node.
const char BulletPoint = '\u25CB';
writer.WriteLine($"{prefix}{new string(' ', depth * 4)}{BulletPoint} {tag}{DescribeNode(node, analysis)}");
}
// Recur into each of its children.
int childCount = node.ChildCount();
for (int i = 0; i < childCount; i++)
{
int childDepth = skip ? depth : depth + 1;
DescribeExpression(writer, node.Child(i), prefix, analysis, childDepth);
}
}
/// <summary>Gets a textual description of a loop's style and bounds.</summary>
private static string DescribeLoop(RegexNode node, AnalysisResults analysis)
{
string style = node.Kind switch
{
_ when node.M == node.N => "exactly",
RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloopatomic => "atomically",
RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop => "greedily",
RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy => "lazily",
RegexNodeKind.Loop => analysis.IsAtomicByAncestor(node) ? "greedily and atomically" : "greedily",
_ /* RegexNodeKind.Lazyloop */ => analysis.IsAtomicByAncestor(node) ? "lazily and atomically" : "lazily",
};
string bounds =
node.M == node.N ? $" {node.M} times" :
(node.M, node.N) switch
{
(0, int.MaxValue) => " any number of times",
(1, int.MaxValue) => " at least once",
(2, int.MaxValue) => " at least twice",
(_, int.MaxValue) => $" at least {node.M} times",
(0, 1) => ", optionally",
(0, _) => $" at most {node.N} times",
_ => $" at least {node.M} and at most {node.N} times"
};
return style + bounds;
}
private static FinishEmitScope EmitScope(IndentedTextWriter writer, string title, bool faux = false) => EmitBlock(writer, $"// {title}", faux: faux);
private static FinishEmitScope EmitBlock(IndentedTextWriter writer, string? clause, bool faux = false)
{
if (clause is not null)
{
writer.WriteLine(clause);
}
writer.WriteLine(faux ? "//{" : "{");
writer.Indent++;
return new FinishEmitScope(writer, faux);
}
private static void EmitAdd(IndentedTextWriter writer, string variable, int value)
{
if (value == 0)
{
return;
}
writer.WriteLine(
value == 1 ? $"{variable}++;" :
value == -1 ? $"{variable}--;" :
value > 0 ? $"{variable} += {value};" :
value < 0 && value > int.MinValue ? $"{variable} -= {-value};" :
$"{variable} += {value.ToString(CultureInfo.InvariantCulture)};");
}
private readonly struct FinishEmitScope : IDisposable
{
private readonly IndentedTextWriter _writer;
private readonly bool _faux;
public FinishEmitScope(IndentedTextWriter writer, bool faux)
{
_writer = writer;
_faux = faux;
}
public void Dispose()
{
if (_writer is not null)
{
_writer.Indent--;
_writer.WriteLine(_faux ? "//}" : "}");
}
}
}
}
}
| 1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Parser.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.DotnetRuntime.Extensions;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Threading;
namespace System.Text.RegularExpressions.Generator
{
public partial class RegexGenerator
{
private const string RegexName = "System.Text.RegularExpressions.Regex";
private const string RegexGeneratorAttributeName = "System.Text.RegularExpressions.RegexGeneratorAttribute";
private static bool IsSyntaxTargetForGeneration(SyntaxNode node, CancellationToken cancellationToken) =>
// We don't have a semantic model here, so the best we can do is say whether there are any attributes.
node is MethodDeclarationSyntax { AttributeLists: { Count: > 0 } };
private static bool IsSemanticTargetForGeneration(SemanticModel semanticModel, MethodDeclarationSyntax methodDeclarationSyntax, CancellationToken cancellationToken)
{
foreach (AttributeListSyntax attributeListSyntax in methodDeclarationSyntax.AttributeLists)
{
foreach (AttributeSyntax attributeSyntax in attributeListSyntax.Attributes)
{
if (semanticModel.GetSymbolInfo(attributeSyntax, cancellationToken).Symbol is IMethodSymbol attributeSymbol &&
attributeSymbol.ContainingType.ToDisplayString() == RegexGeneratorAttributeName)
{
return true;
}
}
}
return false;
}
// Returns null if nothing to do, Diagnostic if there's an error to report, or RegexType if the type was analyzed successfully.
private static object? GetSemanticTargetForGeneration(GeneratorSyntaxContext context, CancellationToken cancellationToken)
{
var methodSyntax = (MethodDeclarationSyntax)context.Node;
SemanticModel sm = context.SemanticModel;
if (!IsSemanticTargetForGeneration(sm, methodSyntax, cancellationToken))
{
return null;
}
Compilation compilation = sm.Compilation;
INamedTypeSymbol? regexSymbol = compilation.GetBestTypeByMetadataName(RegexName);
INamedTypeSymbol? regexGeneratorAttributeSymbol = compilation.GetBestTypeByMetadataName(RegexGeneratorAttributeName);
if (regexSymbol is null || regexGeneratorAttributeSymbol is null)
{
// Required types aren't available
return null;
}
TypeDeclarationSyntax? typeDec = methodSyntax.Parent as TypeDeclarationSyntax;
if (typeDec is null)
{
return null;
}
IMethodSymbol? regexMethodSymbol = sm.GetDeclaredSymbol(methodSyntax, cancellationToken) as IMethodSymbol;
if (regexMethodSymbol is null)
{
return null;
}
ImmutableArray<AttributeData>? boundAttributes = regexMethodSymbol.GetAttributes();
if (boundAttributes is null || boundAttributes.Value.Length == 0)
{
return null;
}
bool attributeFound = false;
string? pattern = null;
int? options = null;
int? matchTimeout = null;
foreach (AttributeData attributeData in boundAttributes)
{
if (attributeData.AttributeClass?.Equals(regexGeneratorAttributeSymbol) != true)
{
continue;
}
if (attributeData.ConstructorArguments.Any(ca => ca.Kind == TypedConstantKind.Error))
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexGeneratorAttribute, methodSyntax.GetLocation());
}
if (pattern is not null)
{
return Diagnostic.Create(DiagnosticDescriptors.MultipleRegexGeneratorAttributes, methodSyntax.GetLocation());
}
ImmutableArray<TypedConstant> items = attributeData.ConstructorArguments;
if (items.Length == 0 || items.Length > 3)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexGeneratorAttribute, methodSyntax.GetLocation());
}
attributeFound = true;
pattern = items[0].Value as string;
if (items.Length >= 2)
{
options = items[1].Value as int?;
if (items.Length == 3)
{
matchTimeout = items[2].Value as int?;
}
}
}
if (!attributeFound)
{
return null;
}
if (pattern is null)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, methodSyntax.GetLocation(), "(null)");
}
if (!regexMethodSymbol.IsPartialDefinition ||
regexMethodSymbol.Parameters.Length != 0 ||
regexMethodSymbol.Arity != 0 ||
!regexMethodSymbol.ReturnType.Equals(regexSymbol))
{
return Diagnostic.Create(DiagnosticDescriptors.RegexMethodMustHaveValidSignature, methodSyntax.GetLocation());
}
if (typeDec.SyntaxTree.Options is CSharpParseOptions { LanguageVersion: <= LanguageVersion.CSharp10 })
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidLangVersion, methodSyntax.GetLocation());
}
RegexOptions regexOptions = options is not null ? (RegexOptions)options : RegexOptions.None;
// TODO: This is going to include the culture that's current at the time of compilation.
// What should we do about that? We could:
// - say not specifying CultureInvariant is invalid if anything about options or the expression will look at culture
// - fall back to not generating source if it's not specified
// - just use whatever culture is present at build time
// - devise a new way of not using the culture present at build time
// - ...
CultureInfo culture = (regexOptions & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture;
// Validate the options
const RegexOptions SupportedOptions =
RegexOptions.Compiled |
RegexOptions.CultureInvariant |
RegexOptions.ECMAScript |
RegexOptions.ExplicitCapture |
RegexOptions.IgnoreCase |
RegexOptions.IgnorePatternWhitespace |
RegexOptions.Multiline |
RegexOptions.NonBacktracking |
RegexOptions.RightToLeft |
RegexOptions.Singleline;
if ((regexOptions & ~SupportedOptions) != 0)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, methodSyntax.GetLocation(), "options");
}
// Validate the timeout
if (matchTimeout is 0 or < -1)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, methodSyntax.GetLocation(), "matchTimeout");
}
// Parse the input pattern
RegexTree tree;
try
{
tree = RegexParser.Parse(pattern, regexOptions | RegexOptions.Compiled, culture); // make sure Compiled is included to get all optimizations applied to it
}
catch (Exception e)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, methodSyntax.GetLocation(), e.Message);
}
// Determine the namespace the class is declared in, if any
string? ns = regexMethodSymbol.ContainingType?.ContainingNamespace?.ToDisplayString(
SymbolDisplayFormat.FullyQualifiedFormat.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted));
var regexMethod = new RegexMethod(
methodSyntax,
regexMethodSymbol.Name,
methodSyntax.Modifiers.ToString(),
pattern,
regexOptions,
matchTimeout ?? Timeout.Infinite,
tree);
var regexType = new RegexType(
regexMethod,
typeDec is RecordDeclarationSyntax rds ? $"{typeDec.Keyword.ValueText} {rds.ClassOrStructKeyword}" : typeDec.Keyword.ValueText,
ns ?? string.Empty,
$"{typeDec.Identifier}{typeDec.TypeParameterList}");
RegexType current = regexType;
var parent = typeDec.Parent as TypeDeclarationSyntax;
while (parent is not null && IsAllowedKind(parent.Kind()))
{
current.ParentClass = new RegexType(
null,
parent is RecordDeclarationSyntax rds2 ? $"{parent.Keyword.ValueText} {rds2.ClassOrStructKeyword}" : parent.Keyword.ValueText,
ns ?? string.Empty,
$"{parent.Identifier}{parent.TypeParameterList}");
current = current.ParentClass;
parent = parent.Parent as TypeDeclarationSyntax;
}
return regexType;
static bool IsAllowedKind(SyntaxKind kind) =>
kind == SyntaxKind.ClassDeclaration ||
kind == SyntaxKind.StructDeclaration ||
kind == SyntaxKind.RecordDeclaration ||
kind == SyntaxKind.RecordStructDeclaration ||
kind == SyntaxKind.InterfaceDeclaration;
}
/// <summary>A regex method.</summary>
internal sealed record RegexMethod(MethodDeclarationSyntax MethodSyntax, string MethodName, string Modifiers, string Pattern, RegexOptions Options, int MatchTimeout, RegexTree Tree);
/// <summary>A type holding a regex method.</summary>
internal sealed record RegexType(RegexMethod? Method, string Keyword, string Namespace, string Name)
{
public RegexType? ParentClass { get; set; }
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.DotnetRuntime.Extensions;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Threading;
namespace System.Text.RegularExpressions.Generator
{
public partial class RegexGenerator
{
private const string RegexName = "System.Text.RegularExpressions.Regex";
private const string RegexGeneratorAttributeName = "System.Text.RegularExpressions.RegexGeneratorAttribute";
private static bool IsSyntaxTargetForGeneration(SyntaxNode node, CancellationToken cancellationToken) =>
// We don't have a semantic model here, so the best we can do is say whether there are any attributes.
node is MethodDeclarationSyntax { AttributeLists: { Count: > 0 } };
private static bool IsSemanticTargetForGeneration(SemanticModel semanticModel, MethodDeclarationSyntax methodDeclarationSyntax, CancellationToken cancellationToken)
{
foreach (AttributeListSyntax attributeListSyntax in methodDeclarationSyntax.AttributeLists)
{
foreach (AttributeSyntax attributeSyntax in attributeListSyntax.Attributes)
{
if (semanticModel.GetSymbolInfo(attributeSyntax, cancellationToken).Symbol is IMethodSymbol attributeSymbol &&
attributeSymbol.ContainingType.ToDisplayString() == RegexGeneratorAttributeName)
{
return true;
}
}
}
return false;
}
// Returns null if nothing to do, Diagnostic if there's an error to report, or RegexType if the type was analyzed successfully.
private static object? GetSemanticTargetForGeneration(GeneratorSyntaxContext context, CancellationToken cancellationToken)
{
var methodSyntax = (MethodDeclarationSyntax)context.Node;
SemanticModel sm = context.SemanticModel;
if (!IsSemanticTargetForGeneration(sm, methodSyntax, cancellationToken))
{
return null;
}
Compilation compilation = sm.Compilation;
INamedTypeSymbol? regexSymbol = compilation.GetBestTypeByMetadataName(RegexName);
INamedTypeSymbol? regexGeneratorAttributeSymbol = compilation.GetBestTypeByMetadataName(RegexGeneratorAttributeName);
if (regexSymbol is null || regexGeneratorAttributeSymbol is null)
{
// Required types aren't available
return null;
}
TypeDeclarationSyntax? typeDec = methodSyntax.Parent as TypeDeclarationSyntax;
if (typeDec is null)
{
return null;
}
IMethodSymbol? regexMethodSymbol = sm.GetDeclaredSymbol(methodSyntax, cancellationToken) as IMethodSymbol;
if (regexMethodSymbol is null)
{
return null;
}
ImmutableArray<AttributeData>? boundAttributes = regexMethodSymbol.GetAttributes();
if (boundAttributes is null || boundAttributes.Value.Length == 0)
{
return null;
}
bool attributeFound = false;
string? pattern = null;
int? options = null;
int? matchTimeout = null;
foreach (AttributeData attributeData in boundAttributes)
{
if (attributeData.AttributeClass?.Equals(regexGeneratorAttributeSymbol) != true)
{
continue;
}
if (attributeData.ConstructorArguments.Any(ca => ca.Kind == TypedConstantKind.Error))
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexGeneratorAttribute, methodSyntax.GetLocation());
}
if (pattern is not null)
{
return Diagnostic.Create(DiagnosticDescriptors.MultipleRegexGeneratorAttributes, methodSyntax.GetLocation());
}
ImmutableArray<TypedConstant> items = attributeData.ConstructorArguments;
if (items.Length == 0 || items.Length > 3)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexGeneratorAttribute, methodSyntax.GetLocation());
}
attributeFound = true;
pattern = items[0].Value as string;
if (items.Length >= 2)
{
options = items[1].Value as int?;
if (items.Length == 3)
{
matchTimeout = items[2].Value as int?;
}
}
}
if (!attributeFound)
{
return null;
}
if (pattern is null)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, methodSyntax.GetLocation(), "(null)");
}
if (!regexMethodSymbol.IsPartialDefinition ||
regexMethodSymbol.Parameters.Length != 0 ||
regexMethodSymbol.Arity != 0 ||
!regexMethodSymbol.ReturnType.Equals(regexSymbol))
{
return Diagnostic.Create(DiagnosticDescriptors.RegexMethodMustHaveValidSignature, methodSyntax.GetLocation());
}
if (typeDec.SyntaxTree.Options is CSharpParseOptions { LanguageVersion: <= LanguageVersion.CSharp10 })
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidLangVersion, methodSyntax.GetLocation());
}
RegexOptions regexOptions = options is not null ? (RegexOptions)options : RegexOptions.None;
// TODO: This is going to include the culture that's current at the time of compilation.
// What should we do about that? We could:
// - say not specifying CultureInvariant is invalid if anything about options or the expression will look at culture
// - fall back to not generating source if it's not specified
// - just use whatever culture is present at build time
// - devise a new way of not using the culture present at build time
// - ...
CultureInfo culture = (regexOptions & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture;
// Validate the options
const RegexOptions SupportedOptions =
RegexOptions.Compiled |
RegexOptions.CultureInvariant |
RegexOptions.ECMAScript |
RegexOptions.ExplicitCapture |
RegexOptions.IgnoreCase |
RegexOptions.IgnorePatternWhitespace |
RegexOptions.Multiline |
RegexOptions.NonBacktracking |
RegexOptions.RightToLeft |
RegexOptions.Singleline;
if ((regexOptions & ~SupportedOptions) != 0)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, methodSyntax.GetLocation(), "options");
}
// Validate the timeout
if (matchTimeout is 0 or < -1)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, methodSyntax.GetLocation(), "matchTimeout");
}
// Parse the input pattern
RegexTree regexTree;
try
{
regexTree = RegexParser.Parse(pattern, regexOptions | RegexOptions.Compiled, culture); // make sure Compiled is included to get all optimizations applied to it
}
catch (Exception e)
{
return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, methodSyntax.GetLocation(), e.Message);
}
// Determine the namespace the class is declared in, if any
string? ns = regexMethodSymbol.ContainingType?.ContainingNamespace?.ToDisplayString(
SymbolDisplayFormat.FullyQualifiedFormat.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted));
var regexType = new RegexType(
typeDec is RecordDeclarationSyntax rds ? $"{typeDec.Keyword.ValueText} {rds.ClassOrStructKeyword}" : typeDec.Keyword.ValueText,
ns ?? string.Empty,
$"{typeDec.Identifier}{typeDec.TypeParameterList}");
var regexMethod = new RegexMethod(
regexType,
methodSyntax,
regexMethodSymbol.Name,
methodSyntax.Modifiers.ToString(),
pattern,
regexOptions,
matchTimeout ?? Timeout.Infinite,
regexTree);
RegexType current = regexType;
var parent = typeDec.Parent as TypeDeclarationSyntax;
while (parent is not null && IsAllowedKind(parent.Kind()))
{
current.Parent = new RegexType(
parent is RecordDeclarationSyntax rds2 ? $"{parent.Keyword.ValueText} {rds2.ClassOrStructKeyword}" : parent.Keyword.ValueText,
ns ?? string.Empty,
$"{parent.Identifier}{parent.TypeParameterList}");
current = current.Parent;
parent = parent.Parent as TypeDeclarationSyntax;
}
return regexMethod;
static bool IsAllowedKind(SyntaxKind kind) =>
kind == SyntaxKind.ClassDeclaration ||
kind == SyntaxKind.StructDeclaration ||
kind == SyntaxKind.RecordDeclaration ||
kind == SyntaxKind.RecordStructDeclaration ||
kind == SyntaxKind.InterfaceDeclaration;
}
/// <summary>A regex method.</summary>
internal sealed record RegexMethod(RegexType DeclaringType, MethodDeclarationSyntax MethodSyntax, string MethodName, string Modifiers, string Pattern, RegexOptions Options, int MatchTimeout, RegexTree Tree)
{
public int GeneratedId { get; set; }
public string GeneratedName => $"{MethodName}_{GeneratedId}";
}
/// <summary>A type holding a regex method.</summary>
internal sealed record RegexType(string Keyword, string Namespace, string Name)
{
public RegexType? Parent { get; set; }
}
}
}
| 1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Tracing;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
[assembly: System.Resources.NeutralResourcesLanguage("en-us")]
namespace System.Text.RegularExpressions.Generator
{
/// <summary>Generates C# source code to implement regular expressions.</summary>
[Generator(LanguageNames.CSharp)]
public partial class RegexGenerator : IIncrementalGenerator
{
public void Initialize(IncrementalGeneratorInitializationContext context)
{
// To avoid invalidating the generator's output when anything from the compilation
// changes, we will extract from it the only thing we care about: whether unsafe
// code is allowed.
IncrementalValueProvider<bool> allowUnsafeProvider =
context.CompilationProvider
.Select((x, _) => x.Options is CSharpCompilationOptions { AllowUnsafe: true });
// Contains one entry per regex method, either the generated code for that regex method,
// a diagnostic to fail with, or null if no action should be taken for that regex.
IncrementalValueProvider<ImmutableArray<object?>> codeOrDiagnostics =
context.SyntaxProvider
// Find all MethodDeclarationSyntax nodes attributed with RegexGenerator and gather the required information
.CreateSyntaxProvider(IsSyntaxTargetForGeneration, GetSemanticTargetForGeneration)
.Where(static m => m is not null)
// Pair each with whether unsafe code is allowed
.Combine(allowUnsafeProvider)
// Get the resulting code string or error Diagnostic for
// each MethodDeclarationSyntax/allow-unsafe-blocks pair
.Select((state, _) =>
{
Debug.Assert(state.Left is not null);
return state.Left is RegexType regexType ? EmitRegexType(regexType, state.Right) : state.Left;
})
.Collect();
// When there something to output, take all the generated strings and concatenate them to output,
// and raise all of the created diagnostics.
context.RegisterSourceOutput(codeOrDiagnostics, static (context, results) =>
{
var code = new List<string>(s_headers.Length + results.Length);
// Add file header and required usings
code.AddRange(s_headers);
foreach (object? result in results)
{
switch (result)
{
case Diagnostic d:
context.ReportDiagnostic(d);
break;
case ValueTuple<string, ImmutableArray<Diagnostic>> t:
code.Add(t.Item1);
foreach (Diagnostic d in t.Item2)
{
context.ReportDiagnostic(d);
}
break;
}
}
context.AddSource("RegexGenerator.g.cs", string.Join(Environment.NewLine, code));
});
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Tracing;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
[assembly: System.Resources.NeutralResourcesLanguage("en-us")]
namespace System.Text.RegularExpressions.Generator
{
/// <summary>Generates C# source code to implement regular expressions.</summary>
[Generator(LanguageNames.CSharp)]
public partial class RegexGenerator : IIncrementalGenerator
{
/// <summary>Name of the type emitted to contain helpers used by the generated code.</summary>
private const string HelpersTypeName = "Utilities";
/// <summary>Namespace containing all the generated code.</summary>
private const string GeneratedNamespace = "System.Text.RegularExpressions.Generated";
/// <summary>Code for a [GeneratedCode] attribute to put on the top-level generated members.</summary>
private static readonly string s_generatedCodeAttribute = $"GeneratedCodeAttribute(\"{typeof(RegexGenerator).Assembly.GetName().Name}\", \"{typeof(RegexGenerator).Assembly.GetName().Version}\")";
/// <summary>Header comments and usings to include at the top of every generated file.</summary>
private static readonly string[] s_headers = new string[]
{
"// <auto-generated/>",
"#nullable enable",
"#pragma warning disable CS0162 // Unreachable code",
"#pragma warning disable CS0164 // Unreferenced label",
"#pragma warning disable CS0219 // Variable assigned but never used",
};
public void Initialize(IncrementalGeneratorInitializationContext context)
{
// Produces one entry per generated regex. This may be:
// - Diagnostic in the case of a failure that should end the compilation
// - (RegexMethod regexMethod, string runnerFactoryImplementation, Dictionary<string, string[]> requiredHelpers) in the case of valid regex
// - (RegexMethod regexMethod, string reason, Diagnostic diagnostic) in the case of a limited-support regex
IncrementalValueProvider<ImmutableArray<object?>> codeOrDiagnostics =
context.SyntaxProvider
// Find all MethodDeclarationSyntax nodes attributed with RegexGenerator and gather the required information.
.CreateSyntaxProvider(IsSyntaxTargetForGeneration, GetSemanticTargetForGeneration)
.Where(static m => m is not null)
// Generate the RunnerFactory for each regex, if possible. This is where the bulk of the implementation occurs.
.Select((state, _) =>
{
if (state is not RegexMethod regexMethod)
{
Debug.Assert(state is Diagnostic);
return state;
}
// If we're unable to generate a full implementation for this regex, report a diagnostic.
// We'll still output a limited implementation that just caches a new Regex(...).
if (!regexMethod.Tree.Root.SupportsCompilation(out string? reason))
{
return (regexMethod, reason, Diagnostic.Create(DiagnosticDescriptors.LimitedSourceGeneration, regexMethod.MethodSyntax.GetLocation()));
}
// Generate the core logic for the regex.
Dictionary<string, string[]> requiredHelpers = new();
var sw = new StringWriter();
var writer = new IndentedTextWriter(sw);
writer.Indent += 3;
writer.WriteLine();
EmitRegexDerivedTypeRunnerFactory(writer, regexMethod, requiredHelpers);
writer.Indent -= 3;
return (regexMethod, sw.ToString(), requiredHelpers);
})
.Collect();
// To avoid invalidating every regex's output when anything from the compilation changes,
// we extract from it the only things we care about: whether unsafe code is allowed,
// and a name based on the assembly's name, and only that information is then fed into
// RegisterSourceOutput along with all of the cached generated data from each regex.
IncrementalValueProvider<(bool AllowUnsafe, string? AssemblyName)> compilationDataProvider =
context.CompilationProvider
.Select((x, _) => (x.Options is CSharpCompilationOptions { AllowUnsafe: true }, x.AssemblyName));
// When there something to output, take all the generated strings and concatenate them to output,
// and raise all of the created diagnostics.
context.RegisterSourceOutput(codeOrDiagnostics.Combine(compilationDataProvider), static (context, compilationDataAndResults) =>
{
ImmutableArray<object?> results = compilationDataAndResults.Left;
// Report any top-level diagnostics.
bool allFailures = true;
foreach (object? result in results)
{
if (result is Diagnostic d)
{
context.ReportDiagnostic(d);
}
else
{
allFailures = false;
}
}
if (allFailures)
{
return;
}
// At this point we'll be emitting code. Create a writer to hold it all.
var sw = new StringWriter();
IndentedTextWriter writer = new(sw);
// Add file headers and required usings.
foreach (string header in s_headers)
{
writer.WriteLine(header);
}
writer.WriteLine();
// For every generated type, we give it an incrementally increasing ID, in order to create
// unique type names even in situations where method names were the same, while also keeping
// the type names short. Note that this is why we only generate the RunnerFactory implementations
// earlier in the pipeline... we want to avoid generating code that relies on the class names
// until we're able to iterate through them linearly keeping track of a deterministic ID
// used to name them. The boilerplate code generation that happens here is minimal when compared to
// the work required to generate the actual matching code for the regex.
int id = 0;
string generatedClassName = $"__{ComputeStringHash(compilationDataAndResults.Right.AssemblyName ?? ""):x}";
// If we have any (RegexMethod regexMethod, string generatedName, string reason, Diagnostic diagnostic), these are regexes for which we have
// limited support and need to simply output boilerplate. We need to emit their diagnostics.
// If we have any (RegexMethod regexMethod, string generatedName, string runnerFactoryImplementation, Dictionary<string, string[]> requiredHelpers),
// those are generated implementations to be emitted. We need to gather up their required helpers.
Dictionary<string, string[]> requiredHelpers = new();
foreach (object? result in results)
{
RegexMethod? regexMethod = null;
if (result is ValueTuple<RegexMethod, string, Diagnostic> limitedSupportResult)
{
context.ReportDiagnostic(limitedSupportResult.Item3);
regexMethod = limitedSupportResult.Item1;
}
else if (result is ValueTuple<RegexMethod, string, Dictionary<string, string[]>> regexImpl)
{
foreach (KeyValuePair<string, string[]> helper in regexImpl.Item3)
{
if (!requiredHelpers.ContainsKey(helper.Key))
{
requiredHelpers.Add(helper.Key, helper.Value);
}
}
regexMethod = regexImpl.Item1;
}
if (regexMethod is not null)
{
regexMethod.GeneratedId = id++;
EmitRegexPartialMethod(regexMethod, writer, generatedClassName);
writer.WriteLine();
}
}
// At this point we've emitted all the partial method definitions, but we still need to emit the actual regex-derived implementations.
// These are all emitted inside of our generated class.
// TODO https://github.com/dotnet/csharplang/issues/5529:
// When C# provides a mechanism for shielding generated code from the rest of the project, it should be employed
// here for the generated class. At that point, the generated class wrapper can be removed, and all of the types
// generated inside of it (one for each regex as well as the helpers type) should be shielded.
writer.WriteLine($"namespace {GeneratedNamespace}");
writer.WriteLine($"{{");
// We emit usings here now that we're inside of a namespace block and are no longer emitting code into
// a user's partial type. We can now rely on binding rules mapping to these usings and don't need to
// use global-qualified names for the rest of the implementation.
writer.WriteLine($" using System;");
writer.WriteLine($" using System.CodeDom.Compiler;");
writer.WriteLine($" using System.Collections;");
writer.WriteLine($" using System.ComponentModel;");
writer.WriteLine($" using System.Globalization;");
writer.WriteLine($" using System.Runtime.CompilerServices;");
writer.WriteLine($" using System.Text.RegularExpressions;");
writer.WriteLine($" using System.Threading;");
writer.WriteLine($"");
if (compilationDataAndResults.Right.AllowUnsafe)
{
writer.WriteLine($" [SkipLocalsInit]");
}
writer.WriteLine($" [{s_generatedCodeAttribute}]");
writer.WriteLine($" [EditorBrowsable(EditorBrowsableState.Never)]");
writer.WriteLine($" internal static class {generatedClassName}");
writer.WriteLine($" {{");
// Emit each Regex-derived type.
writer.Indent += 2;
foreach (object? result in results)
{
if (result is ValueTuple<RegexMethod, string, Diagnostic> limitedSupportResult)
{
EmitRegexLimitedBoilerplate(writer, limitedSupportResult.Item1, limitedSupportResult.Item1.GeneratedId, limitedSupportResult.Item2);
writer.WriteLine();
}
else if (result is ValueTuple<RegexMethod, string, Dictionary<string, string[]>> regexImpl)
{
EmitRegexDerivedImplementation(writer, regexImpl.Item1, regexImpl.Item1.GeneratedId, regexImpl.Item2);
writer.WriteLine();
}
}
writer.Indent -= 2;
// If any of the Regex-derived types asked for helper methods, emit those now.
if (requiredHelpers.Count != 0)
{
writer.Indent += 2;
writer.WriteLine($"private static class {HelpersTypeName}");
writer.WriteLine($"{{");
writer.Indent++;
foreach (KeyValuePair<string, string[]> helper in requiredHelpers)
{
foreach (string value in helper.Value)
{
writer.WriteLine(value);
}
writer.WriteLine();
}
writer.Indent--;
writer.WriteLine($"}}");
writer.Indent -= 2;
}
writer.WriteLine($" }}");
writer.WriteLine($"}}");
// Save out the source
context.AddSource("RegexGenerator.g.cs", sw.ToString());
});
}
/// <summary>Computes a hash of the string.</summary>
/// <remarks>
/// Currently an FNV-1a hash function. The actual algorithm used doesn't matter; just something
/// simple to create a deterministic, pseudo-random value that's based on input text.
/// </remarks>
private static uint ComputeStringHash(string s)
{
uint hashCode = 2166136261;
foreach (char c in s)
{
hashCode = (c ^ hashCode) * 16777619;
}
return hashCode;
}
}
}
| 1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<EnableDefaultItems>true</EnableDefaultItems>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<UsingToolXliff>true</UsingToolXliff>
<CLSCompliant>false</CLSCompliant>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);CS0436;CS0649</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);REGEXGENERATOR</DefineConstants>
<IsNETCoreAppAnalyzer>true</IsNETCoreAppAnalyzer>
<AnalyzerLanguage>cs</AnalyzerLanguage>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<!-- This generator ships as part of the .NET ref pack. Since VS ingests new Roslyn versions at a different cadence than the .NET SDK, we are pinning this generator to build against Roslyn 4.0 to ensure that we don't break users who are using .NET 7 previews in VS. -->
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisVersion_4_0)" PrivateAssets="all" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!-- Common generator support -->
<Compile Include="$(CommonPath)Roslyn\GetBestTypeByMetadataName.cs" Link="Common\Roslyn\GetBestTypeByMetadataName.cs" />
<Compile Include="$(CommonPath)System\Runtime\CompilerServices\IsExternalInit.cs" Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
<!-- Code included from System.Text.RegularExpressions -->
<Compile Include="$(CommonPath)System\HexConverter.cs" Link="Production\HexConverter.cs" />
<Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs" Link="Production\ValueStringBuilder.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.cs" Link="Production\ValueListBuilder.cs" />
<Compile Include="..\src\System\Collections\Generic\ValueListBuilder.Pop.cs" Link="Production\ValueListBuilder.Pop.cs" />
<Compile Include="..\src\System\Threading\StackHelper.cs" Link="Production\StackHelper.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexCharClass.cs" Link="Production\RegexCharClass.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexCharClass.MappingTable.cs" Link="Production\RegexCharClass.MappingTable.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexFindOptimizations.cs" Link="Production\RegexFindOptimizations.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexNode.cs" Link="Production\RegexNode.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexNodeKind.cs" Link="Production\RegexNodeKind.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexOpcode.cs" Link="Production\RegexOpcode.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexOptions.cs" Link="Production\RegexOptions.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexParseError.cs" Link="Production\RegexParseError.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexParseException.cs" Link="Production\RegexParseException.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexParser.cs" Link="Production\RegexParser.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs" Link="Production\RegexPrefixAnalyzer.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexTree.cs" Link="Production\RegexTree.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs" Link="Production\RegexTreeAnalyzer.cs" />
<Compile Include="..\src\System\Collections\HashtableExtensions.cs" Link="Production\HashtableExtensions.cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<EnableDefaultItems>true</EnableDefaultItems>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<UsingToolXliff>true</UsingToolXliff>
<CLSCompliant>false</CLSCompliant>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);CS0436;CS0649</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);REGEXGENERATOR</DefineConstants>
<IsNETCoreAppAnalyzer>true</IsNETCoreAppAnalyzer>
<AnalyzerLanguage>cs</AnalyzerLanguage>
<IsPackable>false</IsPackable>
<LangVersion>Preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<!-- This generator ships as part of the .NET ref pack. Since VS ingests new Roslyn versions at a different cadence than the .NET SDK, we are pinning this generator to build against Roslyn 4.0 to ensure that we don't break users who are using .NET 7 previews in VS. -->
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisVersion_4_0)" PrivateAssets="all" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!-- Common generator support -->
<Compile Include="$(CommonPath)Roslyn\GetBestTypeByMetadataName.cs" Link="Common\Roslyn\GetBestTypeByMetadataName.cs" />
<Compile Include="$(CommonPath)System\Runtime\CompilerServices\IsExternalInit.cs" Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
<!-- Code included from System.Text.RegularExpressions -->
<Compile Include="$(CommonPath)System\HexConverter.cs" Link="Production\HexConverter.cs" />
<Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs" Link="Production\ValueStringBuilder.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\Generic\ValueListBuilder.cs" Link="Production\ValueListBuilder.cs" />
<Compile Include="..\src\System\Collections\Generic\ValueListBuilder.Pop.cs" Link="Production\ValueListBuilder.Pop.cs" />
<Compile Include="..\src\System\Threading\StackHelper.cs" Link="Production\StackHelper.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexCharClass.cs" Link="Production\RegexCharClass.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexCharClass.MappingTable.cs" Link="Production\RegexCharClass.MappingTable.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexFindOptimizations.cs" Link="Production\RegexFindOptimizations.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexNode.cs" Link="Production\RegexNode.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexNodeKind.cs" Link="Production\RegexNodeKind.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexOpcode.cs" Link="Production\RegexOpcode.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexOptions.cs" Link="Production\RegexOptions.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexParseError.cs" Link="Production\RegexParseError.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexParseException.cs" Link="Production\RegexParseException.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexParser.cs" Link="Production\RegexParser.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs" Link="Production\RegexPrefixAnalyzer.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexTree.cs" Link="Production\RegexTree.cs" />
<Compile Include="..\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs" Link="Production\RegexTreeAnalyzer.cs" />
<Compile Include="..\src\System\Collections\HashtableExtensions.cs" Link="Production\HashtableExtensions.cs" />
</ItemGroup>
</Project>
| 1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/RegexGeneratorHelper.netcoreapp.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Loader;
using System.Text.RegularExpressions.Generator;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Emit;
using Microsoft.CodeAnalysis.Text;
using Xunit;
namespace System.Text.RegularExpressions.Tests
{
public static class RegexGeneratorHelper
{
private static readonly CSharpParseOptions s_previewParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview);
private static readonly EmitOptions s_emitOptions = new EmitOptions(debugInformationFormat: DebugInformationFormat.Embedded);
private static readonly CSharpGeneratorDriver s_generatorDriver = CSharpGeneratorDriver.Create(new[] { new RegexGenerator().AsSourceGenerator() }, parseOptions: s_previewParseOptions);
private static Compilation? s_compilation;
internal static MetadataReference[] References { get; } = CreateReferences();
private static MetadataReference[] CreateReferences()
{
if (PlatformDetection.IsBrowser)
{
// These tests that use Roslyn don't work well on browser wasm today
return new MetadataReference[0];
}
// Typically we'd want to use the right reference assemblies, but as we're not persisting any
// assets and only using this for testing purposes, referencing implementation assemblies is sufficient.
string corelibPath = typeof(object).Assembly.Location;
return new[]
{
MetadataReference.CreateFromFile(typeof(object).Assembly.Location),
MetadataReference.CreateFromFile(Path.Combine(Path.GetDirectoryName(corelibPath), "System.Runtime.dll")),
MetadataReference.CreateFromFile(typeof(Unsafe).Assembly.Location),
MetadataReference.CreateFromFile(typeof(Regex).Assembly.Location),
};
}
internal static byte[] CreateAssemblyImage(string source, string assemblyName)
{
CSharpCompilation compilation = CSharpCompilation.Create(
assemblyName,
new[] { CSharpSyntaxTree.ParseText(source, CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview)) },
References,
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
var ms = new MemoryStream();
if (compilation.Emit(ms).Success)
{
return ms.ToArray();
}
throw new InvalidOperationException();
}
internal static async Task<IReadOnlyList<Diagnostic>> RunGenerator(
string code, bool compile = false, LanguageVersion langVersion = LanguageVersion.Preview, MetadataReference[]? additionalRefs = null, bool allowUnsafe = false, CancellationToken cancellationToken = default)
{
var proj = new AdhocWorkspace()
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create()))
.AddProject("RegexGeneratorTest", "RegexGeneratorTest.dll", "C#")
.WithMetadataReferences(additionalRefs is not null ? References.Concat(additionalRefs) : References)
.WithCompilationOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: allowUnsafe)
.WithNullableContextOptions(NullableContextOptions.Enable))
.WithParseOptions(new CSharpParseOptions(langVersion))
.AddDocument("RegexGenerator.g.cs", SourceText.From(code, Encoding.UTF8)).Project;
Assert.True(proj.Solution.Workspace.TryApplyChanges(proj.Solution));
Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
Debug.Assert(comp is not null);
var generator = new RegexGenerator();
CSharpGeneratorDriver cgd = CSharpGeneratorDriver.Create(new[] { generator.AsSourceGenerator() }, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(langVersion));
GeneratorDriver gd = cgd.RunGenerators(comp!, cancellationToken);
GeneratorDriverRunResult generatorResults = gd.GetRunResult();
if (!compile)
{
return generatorResults.Diagnostics;
}
comp = comp.AddSyntaxTrees(generatorResults.GeneratedTrees.ToArray());
EmitResult results = comp.Emit(Stream.Null, cancellationToken: cancellationToken);
if (!results.Success || results.Diagnostics.Length != 0 || generatorResults.Diagnostics.Length != 0)
{
throw new ArgumentException(
string.Join(Environment.NewLine, results.Diagnostics.Concat(generatorResults.Diagnostics)) + Environment.NewLine +
string.Join(Environment.NewLine, generatorResults.GeneratedTrees.Select(t => t.ToString())));
}
return generatorResults.Diagnostics.Concat(results.Diagnostics).Where(d => d.Severity != DiagnosticSeverity.Hidden).ToArray();
}
internal static async Task<Regex> SourceGenRegexAsync(
string pattern, RegexOptions? options = null, TimeSpan? matchTimeout = null, CancellationToken cancellationToken = default)
{
Regex[] results = await SourceGenRegexAsync(new[] { (pattern, options, matchTimeout) }, cancellationToken).ConfigureAwait(false);
return results[0];
}
internal static async Task<Regex[]> SourceGenRegexAsync(
(string pattern, RegexOptions? options, TimeSpan? matchTimeout)[] regexes, CancellationToken cancellationToken = default)
{
// Un-ifdef to compile each regex individually, which can be useful if one regex among thousands is causing a failure.
// We compile them all en mass for test efficiency, but it can make it harder to debug a compilation failure in one of them.
#if false
if (regexes.Length > 1)
{
var r = new List<Regex>();
foreach (var input in regexes)
{
r.AddRange(await SourceGenRegexAsync(new[] { input }, cancellationToken));
}
return r.ToArray();
}
#endif
Debug.Assert(regexes.Length > 0);
var code = new StringBuilder();
code.AppendLine("using System.Text.RegularExpressions;");
code.AppendLine("public partial class C {");
// Build up the code for all of the regexes
int count = 0;
foreach (var regex in regexes)
{
Assert.True(regex.options is not null || regex.matchTimeout is null);
code.Append($" [RegexGenerator({SymbolDisplay.FormatLiteral(regex.pattern, quote: true)}");
if (regex.options is not null)
{
code.Append($", {string.Join(" | ", regex.options.ToString().Split(',').Select(o => $"RegexOptions.{o.Trim()}"))}");
if (regex.matchTimeout is not null)
{
code.Append(string.Create(CultureInfo.InvariantCulture, $", {(int)regex.matchTimeout.Value.TotalMilliseconds}"));
}
}
code.AppendLine($")] public static partial Regex Get{count}();");
count++;
}
code.AppendLine("}");
// Use a cached compilation to save a little time. Rather than creating an entirely new workspace
// for each test, just create a single compilation, cache it, and then replace its syntax tree
// on each test.
if (s_compilation is not Compilation comp)
{
// Create the project containing the source.
var proj = new AdhocWorkspace()
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create()))
.AddProject("Test", "test.dll", "C#")
.WithMetadataReferences(References)
.WithCompilationOptions(
new CSharpCompilationOptions(
OutputKind.DynamicallyLinkedLibrary,
warningLevel: 9999, // docs recommend using "9999" to catch all warnings now and in the future
specificDiagnosticOptions: ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("SYSLIB1045", ReportDiagnostic.Hidden)) // regex with limited support
.WithNullableContextOptions(NullableContextOptions.Enable))
.WithParseOptions(new CSharpParseOptions(LanguageVersion.Preview, DocumentationMode.Diagnose))
.AddDocument("RegexGenerator.g.cs", SourceText.From("// Empty", Encoding.UTF8)).Project;
Assert.True(proj.Solution.Workspace.TryApplyChanges(proj.Solution));
s_compilation = comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
Debug.Assert(comp is not null);
}
comp = comp.ReplaceSyntaxTree(comp.SyntaxTrees.First(), CSharpSyntaxTree.ParseText(SourceText.From(code.ToString(), Encoding.UTF8), s_previewParseOptions));
// Run the generator
GeneratorDriverRunResult generatorResults = s_generatorDriver.RunGenerators(comp!, cancellationToken).GetRunResult();
ImmutableArray<Diagnostic> generatorDiagnostics = generatorResults.Diagnostics.RemoveAll(d => d.Severity <= DiagnosticSeverity.Hidden);
if (generatorDiagnostics.Length != 0)
{
throw new ArgumentException(
string.Join(Environment.NewLine, generatorResults.GeneratedTrees.Select(t => NumberLines(t.ToString()))) + Environment.NewLine +
string.Join(Environment.NewLine, generatorDiagnostics));
}
// Compile the assembly to a stream
var dll = new MemoryStream();
comp = comp.AddSyntaxTrees(generatorResults.GeneratedTrees.ToArray());
EmitResult results = comp.Emit(dll, options: s_emitOptions, cancellationToken: cancellationToken);
if (!results.Success || results.Diagnostics.Length != 0)
{
throw new ArgumentException(
string.Join(Environment.NewLine, generatorResults.GeneratedTrees.Select(t => NumberLines(t.ToString()))) + Environment.NewLine +
string.Join(Environment.NewLine, results.Diagnostics.Concat(generatorDiagnostics)));
}
dll.Position = 0;
// Load the assembly into its own AssemblyLoadContext.
var alc = new RegexLoadContext(Environment.CurrentDirectory);
Assembly a = alc.LoadFromStream(dll);
// Instantiate each regex using the newly created static Get method that was source generated.
var instances = new Regex[count];
Type c = a.GetType("C")!;
for (int i = 0; i < instances.Length; i++)
{
instances[i] = (Regex)c.GetMethod($"Get{i}")!.Invoke(null, null)!;
}
// Issue an unload on the ALC, so it'll be collected once the Regex instance is collected
alc.Unload();
return instances;
}
/// <summary>Number the lines in the source file.</summary>
private static string NumberLines(string source) =>
string.Join(Environment.NewLine, source.Split(Environment.NewLine).Select((line, lineNumber) => $"{lineNumber,6}: {line}"));
/// <summary>Simple AssemblyLoadContext used to load source generated regex assemblies so they can be unloaded.</summary>
private sealed class RegexLoadContext : AssemblyLoadContext
{
private readonly AssemblyDependencyResolver _resolver;
public RegexLoadContext(string pluginPath) : base(isCollectible: true)
{
_resolver = new AssemblyDependencyResolver(pluginPath);
}
protected override Assembly? Load(AssemblyName assemblyName)
{
string? assemblyPath = _resolver.ResolveAssemblyToPath(assemblyName);
if (assemblyPath != null)
{
return LoadFromAssemblyPath(assemblyPath);
}
return null;
}
protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
{
string? libraryPath = _resolver.ResolveUnmanagedDllToPath(unmanagedDllName);
if (libraryPath != null)
{
return LoadUnmanagedDllFromPath(libraryPath);
}
return IntPtr.Zero;
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Loader;
using System.Text.RegularExpressions.Generator;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Emit;
using Microsoft.CodeAnalysis.Text;
using Xunit;
namespace System.Text.RegularExpressions.Tests
{
public static class RegexGeneratorHelper
{
private static readonly CSharpParseOptions s_previewParseOptions = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview);
private static readonly EmitOptions s_emitOptions = new EmitOptions(debugInformationFormat: DebugInformationFormat.Embedded);
private static readonly CSharpGeneratorDriver s_generatorDriver = CSharpGeneratorDriver.Create(new[] { new RegexGenerator().AsSourceGenerator() }, parseOptions: s_previewParseOptions);
private static Compilation? s_compilation;
internal static MetadataReference[] References { get; } = CreateReferences();
private static MetadataReference[] CreateReferences()
{
if (PlatformDetection.IsBrowser)
{
// These tests that use Roslyn don't work well on browser wasm today
return new MetadataReference[0];
}
// Typically we'd want to use the right reference assemblies, but as we're not persisting any
// assets and only using this for testing purposes, referencing implementation assemblies is sufficient.
string corelibPath = typeof(object).Assembly.Location;
return new[]
{
MetadataReference.CreateFromFile(typeof(object).Assembly.Location),
MetadataReference.CreateFromFile(Path.Combine(Path.GetDirectoryName(corelibPath), "System.Runtime.dll")),
MetadataReference.CreateFromFile(typeof(Unsafe).Assembly.Location),
MetadataReference.CreateFromFile(typeof(Regex).Assembly.Location),
};
}
internal static byte[] CreateAssemblyImage(string source, string assemblyName)
{
CSharpCompilation compilation = CSharpCompilation.Create(
assemblyName,
new[] { CSharpSyntaxTree.ParseText(source, CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview)) },
References,
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
var ms = new MemoryStream();
if (compilation.Emit(ms).Success)
{
return ms.ToArray();
}
throw new InvalidOperationException();
}
internal static async Task<IReadOnlyList<Diagnostic>> RunGenerator(
string code, bool compile = false, LanguageVersion langVersion = LanguageVersion.Preview, MetadataReference[]? additionalRefs = null, bool allowUnsafe = false, CancellationToken cancellationToken = default)
{
var proj = new AdhocWorkspace()
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create()))
.AddProject("RegexGeneratorTest", "RegexGeneratorTest.dll", "C#")
.WithMetadataReferences(additionalRefs is not null ? References.Concat(additionalRefs) : References)
.WithCompilationOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: allowUnsafe)
.WithNullableContextOptions(NullableContextOptions.Enable))
.WithParseOptions(new CSharpParseOptions(langVersion))
.AddDocument("RegexGenerator.g.cs", SourceText.From(code, Encoding.UTF8)).Project;
Assert.True(proj.Solution.Workspace.TryApplyChanges(proj.Solution));
Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
Debug.Assert(comp is not null);
var generator = new RegexGenerator();
CSharpGeneratorDriver cgd = CSharpGeneratorDriver.Create(new[] { generator.AsSourceGenerator() }, parseOptions: CSharpParseOptions.Default.WithLanguageVersion(langVersion));
GeneratorDriver gd = cgd.RunGenerators(comp!, cancellationToken);
GeneratorDriverRunResult generatorResults = gd.GetRunResult();
if (!compile)
{
return generatorResults.Diagnostics;
}
comp = comp.AddSyntaxTrees(generatorResults.GeneratedTrees.ToArray());
EmitResult results = comp.Emit(Stream.Null, cancellationToken: cancellationToken);
ImmutableArray<Diagnostic> generatorDiagnostics = generatorResults.Diagnostics.RemoveAll(d => d.Severity <= DiagnosticSeverity.Hidden);
ImmutableArray<Diagnostic> resultsDiagnostics = results.Diagnostics.RemoveAll(d => d.Severity <= DiagnosticSeverity.Hidden);
if (!results.Success || resultsDiagnostics.Length != 0 || generatorDiagnostics.Length != 0)
{
throw new ArgumentException(
string.Join(Environment.NewLine, resultsDiagnostics.Concat(generatorDiagnostics)) + Environment.NewLine +
string.Join(Environment.NewLine, generatorResults.GeneratedTrees.Select(t => t.ToString())));
}
return generatorResults.Diagnostics.Concat(results.Diagnostics).Where(d => d.Severity != DiagnosticSeverity.Hidden).ToArray();
}
internal static async Task<Regex> SourceGenRegexAsync(
string pattern, RegexOptions? options = null, TimeSpan? matchTimeout = null, CancellationToken cancellationToken = default)
{
Regex[] results = await SourceGenRegexAsync(new[] { (pattern, options, matchTimeout) }, cancellationToken).ConfigureAwait(false);
return results[0];
}
internal static async Task<Regex[]> SourceGenRegexAsync(
(string pattern, RegexOptions? options, TimeSpan? matchTimeout)[] regexes, CancellationToken cancellationToken = default)
{
// Un-ifdef to compile each regex individually, which can be useful if one regex among thousands is causing a failure.
// We compile them all en mass for test efficiency, but it can make it harder to debug a compilation failure in one of them.
#if false
if (regexes.Length > 1)
{
var r = new List<Regex>();
foreach (var input in regexes)
{
r.AddRange(await SourceGenRegexAsync(new[] { input }, cancellationToken));
}
return r.ToArray();
}
#endif
Debug.Assert(regexes.Length > 0);
var code = new StringBuilder();
code.AppendLine("using System.Text.RegularExpressions;");
code.AppendLine("public partial class C {");
// Build up the code for all of the regexes
int count = 0;
foreach (var regex in regexes)
{
Assert.True(regex.options is not null || regex.matchTimeout is null);
code.Append($" [RegexGenerator({SymbolDisplay.FormatLiteral(regex.pattern, quote: true)}");
if (regex.options is not null)
{
code.Append($", {string.Join(" | ", regex.options.ToString().Split(',').Select(o => $"RegexOptions.{o.Trim()}"))}");
if (regex.matchTimeout is not null)
{
code.Append(string.Create(CultureInfo.InvariantCulture, $", {(int)regex.matchTimeout.Value.TotalMilliseconds}"));
}
}
code.AppendLine($")] public static partial Regex Get{count}();");
count++;
}
code.AppendLine("}");
// Use a cached compilation to save a little time. Rather than creating an entirely new workspace
// for each test, just create a single compilation, cache it, and then replace its syntax tree
// on each test.
if (s_compilation is not Compilation comp)
{
// Create the project containing the source.
var proj = new AdhocWorkspace()
.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId(), VersionStamp.Create()))
.AddProject("Test", "test.dll", "C#")
.WithMetadataReferences(References)
.WithCompilationOptions(
new CSharpCompilationOptions(
OutputKind.DynamicallyLinkedLibrary,
warningLevel: 9999, // docs recommend using "9999" to catch all warnings now and in the future
specificDiagnosticOptions: ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("SYSLIB1045", ReportDiagnostic.Hidden)) // regex with limited support
.WithNullableContextOptions(NullableContextOptions.Enable))
.WithParseOptions(new CSharpParseOptions(LanguageVersion.Preview, DocumentationMode.Diagnose))
.AddDocument("RegexGenerator.g.cs", SourceText.From("// Empty", Encoding.UTF8)).Project;
Assert.True(proj.Solution.Workspace.TryApplyChanges(proj.Solution));
s_compilation = comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
Debug.Assert(comp is not null);
}
comp = comp.ReplaceSyntaxTree(comp.SyntaxTrees.First(), CSharpSyntaxTree.ParseText(SourceText.From(code.ToString(), Encoding.UTF8), s_previewParseOptions));
// Run the generator
GeneratorDriverRunResult generatorResults = s_generatorDriver.RunGenerators(comp!, cancellationToken).GetRunResult();
ImmutableArray<Diagnostic> generatorDiagnostics = generatorResults.Diagnostics.RemoveAll(d => d.Severity <= DiagnosticSeverity.Hidden);
if (generatorDiagnostics.Length != 0)
{
throw new ArgumentException(
string.Join(Environment.NewLine, generatorResults.GeneratedTrees.Select(t => NumberLines(t.ToString()))) + Environment.NewLine +
string.Join(Environment.NewLine, generatorDiagnostics));
}
// Compile the assembly to a stream
var dll = new MemoryStream();
comp = comp.AddSyntaxTrees(generatorResults.GeneratedTrees.ToArray());
EmitResult results = comp.Emit(dll, options: s_emitOptions, cancellationToken: cancellationToken);
ImmutableArray<Diagnostic> resultsDiagnostics = results.Diagnostics.RemoveAll(d => d.Severity <= DiagnosticSeverity.Hidden);
if (!results.Success || resultsDiagnostics.Length != 0)
{
throw new ArgumentException(
string.Join(Environment.NewLine, generatorResults.GeneratedTrees.Select(t => NumberLines(t.ToString()))) + Environment.NewLine +
string.Join(Environment.NewLine, resultsDiagnostics.Concat(generatorDiagnostics)));
}
dll.Position = 0;
// Load the assembly into its own AssemblyLoadContext.
var alc = new RegexLoadContext(Environment.CurrentDirectory);
Assembly a = alc.LoadFromStream(dll);
// Instantiate each regex using the newly created static Get method that was source generated.
var instances = new Regex[count];
Type c = a.GetType("C")!;
for (int i = 0; i < instances.Length; i++)
{
instances[i] = (Regex)c.GetMethod($"Get{i}")!.Invoke(null, null)!;
}
// Issue an unload on the ALC, so it'll be collected once the Regex instance is collected
alc.Unload();
return instances;
}
/// <summary>Number the lines in the source file.</summary>
private static string NumberLines(string source) =>
string.Join(Environment.NewLine, source.Split(Environment.NewLine).Select((line, lineNumber) => $"{lineNumber,6}: {line}"));
/// <summary>Simple AssemblyLoadContext used to load source generated regex assemblies so they can be unloaded.</summary>
private sealed class RegexLoadContext : AssemblyLoadContext
{
private readonly AssemblyDependencyResolver _resolver;
public RegexLoadContext(string pluginPath) : base(isCollectible: true)
{
_resolver = new AssemblyDependencyResolver(pluginPath);
}
protected override Assembly? Load(AssemblyName assemblyName)
{
string? assemblyPath = _resolver.ResolveAssemblyToPath(assemblyName);
if (assemblyPath != null)
{
return LoadFromAssemblyPath(assemblyPath);
}
return null;
}
protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
{
string? libraryPath = _resolver.ResolveUnmanagedDllToPath(unmanagedDllName);
if (libraryPath != null)
{
return LoadUnmanagedDllFromPath(libraryPath);
}
return IntPtr.Zero;
}
}
}
}
| 1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/RegexGeneratorParserTests.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using System.Collections.Generic;
using System.Globalization;
using System.Threading.Tasks;
using Xunit;
namespace System.Text.RegularExpressions.Tests
{
// Tests don't actually use reflection emit, but they do generate assembly via Roslyn in-memory at run time and expect it to be JIT'd.
// The tests also use typeof(object).Assembly.Location, which returns an empty string on wasm.
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported), nameof(PlatformDetection.IsNotMobile), nameof(PlatformDetection.IsNotBrowser))]
public class RegexGeneratorParserTests
{
[Fact]
public async Task Diagnostic_MultipleAttributes()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
[RegexGenerator(""abc"")]
private static partial Regex MultipleAttributes();
}
");
Assert.Equal("SYSLIB1041", Assert.Single(diagnostics).Id);
}
public static IEnumerable<object[]> Diagnostic_MalformedCtor_MemberData()
{
const string Pre = "[RegexGenerator";
const string Post = "]";
const string Middle = "\"abc\", RegexOptions.None, -1, \"extra\"";
foreach (bool withParens in new[] { false, true })
{
string preParen = withParens ? "(" : "";
string postParen = withParens ? ")" : "";
for (int i = 0; i < Middle.Length; i++)
{
yield return new object[] { Pre + preParen + Middle.Substring(0, i) + postParen };
yield return new object[] { Pre + preParen + Middle.Substring(0, i) + postParen + Post };
}
}
}
[Theory]
[MemberData(nameof(Diagnostic_MalformedCtor_MemberData))]
public async Task Diagnostic_MalformedCtor(string attribute)
{
// Validate the generator doesn't crash with an incomplete attribute
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
{attribute}
private static partial Regex MultipleAttributes();
}}
");
if (diagnostics.Count != 0)
{
Assert.Contains(Assert.Single(diagnostics).Id, new[] { "SYSLIB1040", "SYSLIB1042" });
}
}
[Theory]
[InlineData("null")]
[InlineData("\"ab[]\"")]
public async Task Diagnostic_InvalidRegexPattern(string pattern)
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator({pattern})]
private static partial Regex InvalidPattern();
}}
");
Assert.Equal("SYSLIB1042", Assert.Single(diagnostics).Id);
}
[Theory]
[InlineData(0x800)]
public async Task Diagnostic_InvalidRegexOptions(int options)
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@$"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(""ab"", (RegexOptions){options})]
private static partial Regex InvalidPattern();
}}
");
Assert.Equal("SYSLIB1042", Assert.Single(diagnostics).Id);
}
[Theory]
[InlineData(-2)]
[InlineData(0)]
public async Task Diagnostic_InvalidRegexTimeout(int matchTimeout)
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@$"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(""ab"", RegexOptions.None, {matchTimeout.ToString(CultureInfo.InvariantCulture)})]
private static partial Regex InvalidPattern();
}}
");
Assert.Equal("SYSLIB1042", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_MethodMustReturnRegex()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial int MethodMustReturnRegex();
}
");
Assert.Equal("SYSLIB1043", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_MethodMustNotBeGeneric()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex MethodMustNotBeGeneric<T>();
}
");
Assert.Equal("SYSLIB1043", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_MethodMustBeParameterless()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex MethodMustBeParameterless(int i);
}
");
Assert.Equal("SYSLIB1043", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_MethodMustBePartial()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static Regex MethodMustBePartial() => null;
}
");
Assert.Equal("SYSLIB1043", Assert.Single(diagnostics).Id);
}
[Theory]
[InlineData(LanguageVersion.CSharp9)]
[InlineData(LanguageVersion.CSharp10)]
public async Task Diagnostic_InvalidLangVersion(LanguageVersion version)
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex InvalidLangVersion();
}
", langVersion: version);
Assert.Equal("SYSLIB1044", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_NonBacktracking_LimitedSupport()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"", RegexOptions.NonBacktracking)]
private static partial Regex RightToLeftNotSupported();
}
");
Assert.Equal("SYSLIB1045", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_CustomRegexGeneratorAttribute_ZeroArgCtor()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator]
private static partial Regex InvalidCtor();
}
namespace System.Text.RegularExpressions
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class RegexGeneratorAttribute : Attribute
{
}
}
");
Assert.Equal("SYSLIB1040", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_CustomRegexGeneratorAttribute_FourArgCtor()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""a"", RegexOptions.None, -1, ""b""]
private static partial Regex InvalidCtor();
}
namespace System.Text.RegularExpressions
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class RegexGeneratorAttribute : Attribute
{
public RegexGeneratorAttribute(string pattern, RegexOptions options, int timeout, string somethingElse) { }
}
}
");
Assert.Equal("SYSLIB1040", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Valid_ClassWithoutNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
", compile: true));
}
[Theory]
[InlineData("RegexOptions.None")]
[InlineData("RegexOptions.Compiled")]
[InlineData("RegexOptions.IgnoreCase | RegexOptions.CultureInvariant")]
public async Task Valid_PatternOptions(string options)
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(""ab"", {options})]
private static partial Regex Valid();
}}
", compile: true));
}
[Theory]
[InlineData("-1")]
[InlineData("1")]
[InlineData("1_000")]
public async Task Valid_PatternOptionsTimeout(string timeout)
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(""ab"", RegexOptions.None, {timeout})]
private static partial Regex Valid();
}}
", compile: true));
}
[Fact]
public async Task Valid_NamedArguments()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(pattern: ""ab"", options: RegexOptions.None, matchTimeoutMilliseconds: -1)]
private static partial Regex Valid();
}}
", compile: true));
}
[Fact]
public async Task Valid_ReorderedNamedArguments()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(options: RegexOptions.None, matchTimeoutMilliseconds: -1, pattern: ""ab"")]
private static partial Regex Valid1();
[RegexGenerator(matchTimeoutMilliseconds: -1, pattern: ""ab"", options: RegexOptions.None)]
private static partial Regex Valid2();
}}
", compile: true));
}
[Fact]
public async Task Valid_AdditionalAttributes()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
using System.Diagnostics.CodeAnalysis;
partial class C
{{
[SuppressMessage(""CATEGORY1"", ""SOMEID1"")]
[RegexGenerator(""abc"")]
[SuppressMessage(""CATEGORY2"", ""SOMEID2"")]
private static partial Regex AdditionalAttributes();
}}
", compile: true));
}
[Theory]
[InlineData(false)]
[InlineData(true)]
public async Task Valid_ClassWithNamespace(bool allowUnsafe)
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
", compile: true, allowUnsafe: allowUnsafe));
}
[Fact]
public async Task Valid_ClassWithFileScopedNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
", compile: true));
}
[Fact]
public async Task Valid_ClassWithNestedNamespaces()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
namespace B
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
}
", compile: true));
}
[Fact]
public async Task Valid_NestedClassWithoutNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class B
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
", compile: true));
}
[Fact]
public async Task Valid_NestedClassWithNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
partial class B
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
}
", compile: true));
}
[Fact]
public async Task Valid_NestedClassWithFileScopedNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A;
partial class B
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
", compile: true));
}
[Fact]
public async Task Valid_NestedClassesWithNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
public partial class B
{
internal partial class C
{
protected internal partial class D
{
private protected partial class E
{
private partial class F
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
}
}
}
}
", compile: true));
}
[Fact]
public async Task Valid_NullableRegex()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
#nullable enable
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex? Valid();
}
", compile: true));
}
[Fact]
public async Task Valid_ClassWithGenericConstraints()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using D;
using System.Text.RegularExpressions;
namespace A
{
public partial class B<U>
{
private partial class C<T> where T : IBlah
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
}
namespace D
{
internal interface IBlah { }
}
", compile: true));
}
public static IEnumerable<object[]> Valid_Modifiers_MemberData()
{
foreach (string type in new[] { "class", "struct", "record", "record struct", "record class", "interface" })
{
string[] typeModifiers = type switch
{
"class" => new[] { "", "public", "public sealed", "internal abstract", "internal static" },
_ => new[] { "", "public", "internal" }
};
foreach (string typeModifier in typeModifiers)
{
foreach (bool instance in typeModifier.Contains("static") ? new[] { false } : new[] { false, true })
{
string[] methodVisibilities = type switch
{
"class" when !typeModifier.Contains("sealed") && !typeModifier.Contains("static") => new[] { "public", "internal", "private protected", "protected internal", "private" },
_ => new[] { "public", "internal", "private" }
};
foreach (string methodVisibility in methodVisibilities)
{
yield return new object[] { type, typeModifier, instance, methodVisibility };
}
}
}
}
}
[Theory]
[MemberData(nameof(Valid_Modifiers_MemberData))]
public async Task Valid_Modifiers(string type, string typeModifier, bool instance, string methodVisibility)
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@$"
using System.Text.RegularExpressions;
{typeModifier} partial {type} C
{{
[RegexGenerator(""ab"")]
{methodVisibility} {(instance ? "" : "static")} partial Regex Valid();
}}
", compile: true));
}
[Fact]
public async Task Valid_MultiplRegexMethodsPerClass()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C1
{
[RegexGenerator(""a"")]
private static partial Regex A();
[RegexGenerator(""b"")]
public static partial Regex B();
[RegexGenerator(""b"")]
public static partial Regex C();
}
partial class C2
{
[RegexGenerator(""d"")]
public static partial Regex D();
[RegexGenerator(""d"")]
public static partial Regex E();
}
", compile: true));
}
[Fact]
public async Task Valid_NestedVaryingTypes()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
public partial class A
{
public partial record class B
{
public partial record struct C
{
public partial record D
{
public partial struct E
{
[RegexGenerator(""ab"")]
public static partial Regex Valid();
}
}
}
}
}
", compile: true));
}
[Fact]
public async Task MultipleTypeDefinitions_DoesntBreakGeneration()
{
byte[] referencedAssembly = RegexGeneratorHelper.CreateAssemblyImage(@"
namespace System.Text.RegularExpressions;
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
internal sealed class RegexGeneratorAttribute : Attribute
{
public RegexGeneratorAttribute(string pattern){}
}", "TestAssembly");
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""abc"")]
private static partial Regex Valid();
}", compile: true, additionalRefs: new[] { MetadataReference.CreateFromImage(referencedAssembly) }));
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using System.Collections.Generic;
using System.Globalization;
using System.Threading.Tasks;
using Xunit;
namespace System.Text.RegularExpressions.Tests
{
// Tests don't actually use reflection emit, but they do generate assembly via Roslyn in-memory at run time and expect it to be JIT'd.
// The tests also use typeof(object).Assembly.Location, which returns an empty string on wasm.
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported), nameof(PlatformDetection.IsNotMobile), nameof(PlatformDetection.IsNotBrowser))]
public class RegexGeneratorParserTests
{
[Fact]
public async Task Diagnostic_MultipleAttributes()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
[RegexGenerator(""abc"")]
private static partial Regex MultipleAttributes();
}
");
Assert.Equal("SYSLIB1041", Assert.Single(diagnostics).Id);
}
public static IEnumerable<object[]> Diagnostic_MalformedCtor_MemberData()
{
const string Pre = "[RegexGenerator";
const string Post = "]";
const string Middle = "\"abc\", RegexOptions.None, -1, \"extra\"";
foreach (bool withParens in new[] { false, true })
{
string preParen = withParens ? "(" : "";
string postParen = withParens ? ")" : "";
for (int i = 0; i < Middle.Length; i++)
{
yield return new object[] { Pre + preParen + Middle.Substring(0, i) + postParen };
yield return new object[] { Pre + preParen + Middle.Substring(0, i) + postParen + Post };
}
}
}
[Theory]
[MemberData(nameof(Diagnostic_MalformedCtor_MemberData))]
public async Task Diagnostic_MalformedCtor(string attribute)
{
// Validate the generator doesn't crash with an incomplete attribute
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
{attribute}
private static partial Regex MultipleAttributes();
}}
");
if (diagnostics.Count != 0)
{
Assert.Contains(Assert.Single(diagnostics).Id, new[] { "SYSLIB1040", "SYSLIB1042" });
}
}
[Theory]
[InlineData("null")]
[InlineData("\"ab[]\"")]
public async Task Diagnostic_InvalidRegexPattern(string pattern)
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator({pattern})]
private static partial Regex InvalidPattern();
}}
");
Assert.Equal("SYSLIB1042", Assert.Single(diagnostics).Id);
}
[Theory]
[InlineData(0x800)]
public async Task Diagnostic_InvalidRegexOptions(int options)
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@$"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(""ab"", (RegexOptions){options})]
private static partial Regex InvalidPattern();
}}
");
Assert.Equal("SYSLIB1042", Assert.Single(diagnostics).Id);
}
[Theory]
[InlineData(-2)]
[InlineData(0)]
public async Task Diagnostic_InvalidRegexTimeout(int matchTimeout)
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@$"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(""ab"", RegexOptions.None, {matchTimeout.ToString(CultureInfo.InvariantCulture)})]
private static partial Regex InvalidPattern();
}}
");
Assert.Equal("SYSLIB1042", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_MethodMustReturnRegex()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial int MethodMustReturnRegex();
}
");
Assert.Equal("SYSLIB1043", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_MethodMustNotBeGeneric()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex MethodMustNotBeGeneric<T>();
}
");
Assert.Equal("SYSLIB1043", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_MethodMustBeParameterless()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex MethodMustBeParameterless(int i);
}
");
Assert.Equal("SYSLIB1043", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_MethodMustBePartial()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static Regex MethodMustBePartial() => null;
}
");
Assert.Equal("SYSLIB1043", Assert.Single(diagnostics).Id);
}
[Theory]
[InlineData(LanguageVersion.CSharp9)]
[InlineData(LanguageVersion.CSharp10)]
public async Task Diagnostic_InvalidLangVersion(LanguageVersion version)
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex InvalidLangVersion();
}
", langVersion: version);
Assert.Equal("SYSLIB1044", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_NonBacktracking_LimitedSupport()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"", RegexOptions.NonBacktracking)]
private static partial Regex RightToLeftNotSupported();
}
");
Assert.Equal("SYSLIB1045", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_CustomRegexGeneratorAttribute_ZeroArgCtor()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator]
private static partial Regex InvalidCtor();
}
namespace System.Text.RegularExpressions
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class RegexGeneratorAttribute : Attribute
{
}
}
");
Assert.Equal("SYSLIB1040", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Diagnostic_CustomRegexGeneratorAttribute_FourArgCtor()
{
IReadOnlyList<Diagnostic> diagnostics = await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""a"", RegexOptions.None, -1, ""b""]
private static partial Regex InvalidCtor();
}
namespace System.Text.RegularExpressions
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class RegexGeneratorAttribute : Attribute
{
public RegexGeneratorAttribute(string pattern, RegexOptions options, int timeout, string somethingElse) { }
}
}
");
Assert.Equal("SYSLIB1040", Assert.Single(diagnostics).Id);
}
[Fact]
public async Task Valid_ClassWithoutNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
", compile: true));
}
[Theory]
[InlineData("RegexOptions.None")]
[InlineData("RegexOptions.Compiled")]
[InlineData("RegexOptions.IgnoreCase | RegexOptions.CultureInvariant")]
public async Task Valid_PatternOptions(string options)
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(""ab"", {options})]
private static partial Regex Valid();
}}
", compile: true));
}
[Theory]
[InlineData("-1")]
[InlineData("1")]
[InlineData("1_000")]
public async Task Valid_PatternOptionsTimeout(string timeout)
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(""ab"", RegexOptions.None, {timeout})]
private static partial Regex Valid();
}}
", compile: true));
}
[Fact]
public async Task Valid_NamedArguments()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(pattern: ""ab"", options: RegexOptions.None, matchTimeoutMilliseconds: -1)]
private static partial Regex Valid();
}}
", compile: true));
}
[Fact]
public async Task Valid_ReorderedNamedArguments()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
partial class C
{{
[RegexGenerator(options: RegexOptions.None, matchTimeoutMilliseconds: -1, pattern: ""ab"")]
private static partial Regex Valid1();
[RegexGenerator(matchTimeoutMilliseconds: -1, pattern: ""ab"", options: RegexOptions.None)]
private static partial Regex Valid2();
}}
", compile: true));
}
[Fact]
public async Task Valid_AdditionalAttributes()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator($@"
using System.Text.RegularExpressions;
using System.Diagnostics.CodeAnalysis;
partial class C
{{
[SuppressMessage(""CATEGORY1"", ""SOMEID1"")]
[RegexGenerator(""abc"")]
[SuppressMessage(""CATEGORY2"", ""SOMEID2"")]
private static partial Regex AdditionalAttributes();
}}
", compile: true));
}
[Theory]
[InlineData(false)]
[InlineData(true)]
public async Task Valid_ClassWithNamespace(bool allowUnsafe)
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
", compile: true, allowUnsafe: allowUnsafe));
}
[Fact]
public async Task Valid_ClassWithFileScopedNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
", compile: true));
}
[Fact]
public async Task Valid_ClassWithNestedNamespaces()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
namespace B
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
}
", compile: true));
}
[Fact]
public async Task Valid_NestedClassWithoutNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class B
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
", compile: true));
}
[Fact]
public async Task Valid_NestedClassWithNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
partial class B
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
}
", compile: true));
}
[Fact]
public async Task Valid_NestedClassWithFileScopedNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A;
partial class B
{
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
", compile: true));
}
[Fact]
public async Task Valid_NestedClassesWithNamespace()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
public partial class B
{
internal partial class C
{
protected internal partial class D
{
private protected partial class E
{
private partial class F
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
}
}
}
}
", compile: true));
}
[Fact]
public async Task Valid_NullableRegex()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
#nullable enable
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""ab"")]
private static partial Regex? Valid();
}
", compile: true));
}
[Fact]
public async Task Valid_ClassWithGenericConstraints()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using D;
using System.Text.RegularExpressions;
namespace A
{
public partial class B<U>
{
private partial class C<T> where T : IBlah
{
[RegexGenerator(""ab"")]
private static partial Regex Valid();
}
}
}
namespace D
{
internal interface IBlah { }
}
", compile: true));
}
[Fact]
public async Task Valid_SameMethodNameInMultipleTypes()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
namespace A
{
public partial class B<U>
{
private partial class C<T>
{
[RegexGenerator(""1"")]
public partial Regex Valid();
}
private partial class C<T1,T2>
{
[RegexGenerator(""2"")]
private static partial Regex Valid();
private partial class D
{
[RegexGenerator(""3"")]
internal partial Regex Valid();
}
}
private partial class E
{
[RegexGenerator(""4"")]
private static partial Regex Valid();
}
}
}
partial class F
{
[RegexGenerator(""5"")]
public partial Regex Valid();
[RegexGenerator(""6"")]
public partial Regex Valid2();
}
", compile: true));
}
public static IEnumerable<object[]> Valid_Modifiers_MemberData()
{
foreach (string type in new[] { "class", "struct", "record", "record struct", "record class", "interface" })
{
string[] typeModifiers = type switch
{
"class" => new[] { "", "public", "public sealed", "internal abstract", "internal static" },
_ => new[] { "", "public", "internal" }
};
foreach (string typeModifier in typeModifiers)
{
foreach (bool instance in typeModifier.Contains("static") ? new[] { false } : new[] { false, true })
{
string[] methodVisibilities = type switch
{
"class" when !typeModifier.Contains("sealed") && !typeModifier.Contains("static") => new[] { "public", "internal", "private protected", "protected internal", "private" },
_ => new[] { "public", "internal", "private" }
};
foreach (string methodVisibility in methodVisibilities)
{
yield return new object[] { type, typeModifier, instance, methodVisibility };
}
}
}
}
}
[Theory]
[MemberData(nameof(Valid_Modifiers_MemberData))]
public async Task Valid_Modifiers(string type, string typeModifier, bool instance, string methodVisibility)
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@$"
using System.Text.RegularExpressions;
{typeModifier} partial {type} C
{{
[RegexGenerator(""ab"")]
{methodVisibility} {(instance ? "" : "static")} partial Regex Valid();
}}
", compile: true));
}
[Fact]
public async Task Valid_MultiplRegexMethodsPerClass()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C1
{
[RegexGenerator(""a"")]
private static partial Regex A();
[RegexGenerator(""b"")]
public static partial Regex B();
[RegexGenerator(""b"")]
public static partial Regex C();
}
partial class C2
{
[RegexGenerator(""d"")]
public static partial Regex D();
[RegexGenerator(""d"")]
public static partial Regex E();
}
", compile: true));
}
[Fact]
public async Task Valid_NestedVaryingTypes()
{
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
public partial class A
{
public partial record class B
{
public partial record struct C
{
public partial record D
{
public partial struct E
{
[RegexGenerator(""ab"")]
public static partial Regex Valid();
}
}
}
}
}
", compile: true));
}
[Fact]
public async Task MultipleTypeDefinitions_DoesntBreakGeneration()
{
byte[] referencedAssembly = RegexGeneratorHelper.CreateAssemblyImage(@"
namespace System.Text.RegularExpressions;
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
internal sealed class RegexGeneratorAttribute : Attribute
{
public RegexGeneratorAttribute(string pattern){}
}", "TestAssembly");
Assert.Empty(await RegexGeneratorHelper.RunGenerator(@"
using System.Text.RegularExpressions;
partial class C
{
[RegexGenerator(""abc"")]
private static partial Regex Valid();
}", compile: true, additionalRefs: new[] { MetadataReference.CreateFromImage(referencedAssembly) }));
}
}
}
| 1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.IO.Ports/tests/SerialPort/ReadExisting.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.IO.PortsTests;
using System.Text;
using System.Threading;
using Legacy.Support;
using Xunit;
namespace System.IO.Ports.Tests
{
public class ReadExisting : PortsTest
{
//The number of random bytes to receive for read method testing
private const int numRndBytesToRead = 8;
//The number of random bytes to receive for large input buffer testing
private const int largeNumRndBytesToRead = 2048;
private enum ReadDataFromEnum { NonBuffered, Buffered, BufferedAndNonBuffered };
#region Test Cases
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void ASCIIEncoding()
{
VerifyRead(new ASCIIEncoding());
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void UTF8Encoding()
{
VerifyRead(new UTF8Encoding());
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void UTF32Encoding()
{
VerifyRead(new UTF32Encoding());
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void SerialPort_ReadBufferedData()
{
int numberOfBytesToRead = 32;
VerifyRead(Encoding.ASCII, numberOfBytesToRead, ReadDataFromEnum.Buffered);
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void SerialPort_IterativeReadBufferedData()
{
int numberOfBytesToRead = 32;
VerifyRead(Encoding.ASCII, numberOfBytesToRead, ReadDataFromEnum.Buffered);
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void SerialPort_ReadBufferedAndNonBufferedData()
{
int numberOfBytesToRead = 64;
VerifyRead(Encoding.ASCII, numberOfBytesToRead, ReadDataFromEnum.BufferedAndNonBuffered);
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void SerialPort_IterativeReadBufferedAndNonBufferedData()
{
int numberOfBytesToRead = 3;
VerifyRead(Encoding.ASCII, numberOfBytesToRead, ReadDataFromEnum.BufferedAndNonBuffered);
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void GreedyRead()
{
using (SerialPort com1 = TCSupport.InitFirstSerialPort())
using (SerialPort com2 = TCSupport.InitSecondSerialPort(com1))
{
char[] charXmitBuffer = TCSupport.GetRandomChars(128, true);
byte[] byteXmitBuffer = new byte[1024];
char utf32Char = TCSupport.GenerateRandomCharNonSurrogate();
byte[] utf32CharBytes = Encoding.UTF32.GetBytes(new[] { utf32Char });
int numBytes;
Debug.WriteLine("Verifying that ReadExisting() will read everything from internal buffer and drivers buffer");
//Put the first byte of the utf32 encoder char in the last byte of this buffer
//when we read this later the buffer will have to be resized
byteXmitBuffer[byteXmitBuffer.Length - 1] = utf32CharBytes[0];
com1.Open();
if (!com2.IsOpen) //This is necessary since com1 and com2 might be the same port if we are using a loopback
com2.Open();
com2.Write(byteXmitBuffer, 0, byteXmitBuffer.Length);
TCSupport.WaitForReadBufferToLoad(com1, byteXmitBuffer.Length);
//Read Every Byte except the last one. The last bye should be left in the last position of SerialPort's
//internal buffer. When we try to read this char as UTF32 the buffer should have to be resized so
//the other 3 bytes of the ut32 encoded char can be in the buffer
com1.Read(new char[1023], 0, 1023);
Assert.Equal(1, com1.BytesToRead);
com1.Encoding = Encoding.UTF32;
com2.Encoding = Encoding.UTF32;
com2.Write(utf32CharBytes, 1, 3);
com2.Write(charXmitBuffer, 0, charXmitBuffer.Length);
numBytes = Encoding.UTF32.GetByteCount(charXmitBuffer);
byte[] byteBuffer = Encoding.UTF32.GetBytes(charXmitBuffer);
var expectedChars = new char[1 + Encoding.UTF32.GetCharCount(byteBuffer)];
expectedChars[0] = utf32Char;
Encoding.UTF32.GetChars(byteBuffer, 0, byteBuffer.Length, expectedChars, 1);
TCSupport.WaitForReadBufferToLoad(com1, 4 + numBytes);
string rcvString = com1.ReadExisting();
Assert.NotNull(rcvString);
char[] actualChars = rcvString.ToCharArray();
Assert.Equal(expectedChars, actualChars);
Assert.Equal(0, com1.BytesToRead);
}
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
private void LargeInputBuffer()
{
VerifyRead(largeNumRndBytesToRead);
}
#endregion
#region Verification for Test Cases
private void VerifyRead()
{
VerifyRead(new ASCIIEncoding(), numRndBytesToRead);
}
private void VerifyRead(int numberOfBytesToRead)
{
VerifyRead(new ASCIIEncoding(), numberOfBytesToRead);
}
private void VerifyRead(Encoding encoding)
{
VerifyRead(encoding, numRndBytesToRead);
}
private void VerifyRead(Encoding encoding, int numberOfBytesToRead)
{
VerifyRead(encoding, numberOfBytesToRead, ReadDataFromEnum.NonBuffered);
}
private void VerifyRead(Encoding encoding, int numberOfBytesToRead, ReadDataFromEnum readDataFrom)
{
using (SerialPort com1 = TCSupport.InitFirstSerialPort())
using (SerialPort com2 = TCSupport.InitSecondSerialPort(com1))
{
Random rndGen = new Random(-55);
char[] charsToWrite = new char[numberOfBytesToRead];
byte[] bytesToWrite = new byte[numberOfBytesToRead];
//Genrate random chars to send
for (int i = 0; i < bytesToWrite.Length; i++)
{
char randChar = (char)rndGen.Next(0, ushort.MaxValue);
charsToWrite[i] = randChar;
}
Debug.WriteLine("Verifying read method endocing={0} with {1} random chars", encoding.EncodingName,
bytesToWrite.Length);
com1.ReadTimeout = 500;
com1.Encoding = encoding;
TCSupport.SetHighSpeed(com1, com2);
com1.Open();
if (!com2.IsOpen) //This is necessary since com1 and com2 might be the same port if we are using a loopback
com2.Open();
bytesToWrite = com1.Encoding.GetBytes(charsToWrite, 0, charsToWrite.Length);
switch (readDataFrom)
{
case ReadDataFromEnum.NonBuffered:
VerifyReadNonBuffered(com1, com2, bytesToWrite);
break;
case ReadDataFromEnum.Buffered:
VerifyReadBuffered(com1, com2, bytesToWrite);
break;
case ReadDataFromEnum.BufferedAndNonBuffered:
VerifyReadBufferedAndNonBuffered(com1, com2, bytesToWrite);
break;
default:
throw new ArgumentOutOfRangeException(nameof(readDataFrom), readDataFrom, null);
}
}
}
private void VerifyReadNonBuffered(SerialPort com1, SerialPort com2, byte[] bytesToWrite)
{
char[] expectedChars = com1.Encoding.GetChars(bytesToWrite, 0, bytesToWrite.Length);
VerifyBytesReadOnCom1FromCom2(com1, com2, bytesToWrite, expectedChars);
}
private void VerifyReadBuffered(SerialPort com1, SerialPort com2, byte[] bytesToWrite)
{
char[] expectedChars = com1.Encoding.GetChars(bytesToWrite, 0, bytesToWrite.Length);
BufferData(com1, com2, bytesToWrite);
PerformReadOnCom1FromCom2(com1, com2, expectedChars);
}
private void VerifyReadBufferedAndNonBuffered(SerialPort com1, SerialPort com2, byte[] bytesToWrite)
{
char[] expectedChars = new char[com1.Encoding.GetCharCount(bytesToWrite, 0, bytesToWrite.Length) * 2];
char[] encodedChars = com1.Encoding.GetChars(bytesToWrite, 0, bytesToWrite.Length);
Array.Copy(encodedChars, expectedChars, bytesToWrite.Length);
Array.Copy(encodedChars, 0, expectedChars, encodedChars.Length, encodedChars.Length);
BufferData(com1, com2, bytesToWrite);
VerifyBytesReadOnCom1FromCom2(com1, com2, bytesToWrite, expectedChars);
}
private void BufferData(SerialPort com1, SerialPort com2, byte[] bytesToWrite)
{
com2.Write(bytesToWrite, 0, 1); // Write one byte at the beginning because we are going to read this to buffer the rest of the data
com2.Write(bytesToWrite, 0, bytesToWrite.Length);
TCSupport.WaitForReadBufferToLoad(com1, bytesToWrite.Length);
com1.Read(new char[1], 0, 1); // This should put the rest of the bytes in SerialPorts own internal buffer
Assert.Equal(bytesToWrite.Length, com1.BytesToRead);
}
private void VerifyBytesReadOnCom1FromCom2(SerialPort com1, SerialPort com2, byte[] bytesToWrite, char[] expectedChars)
{
com2.Write(bytesToWrite, 0, bytesToWrite.Length);
com1.ReadTimeout = 500;
Thread.Sleep((int)(((bytesToWrite.Length * 10.0) / com1.BaudRate) * 1000) + 250);
PerformReadOnCom1FromCom2(com1, com2, expectedChars);
}
private void PerformReadOnCom1FromCom2(SerialPort com1, SerialPort com2, char[] expectedChars)
{
string rcvString = com1.ReadExisting();
char[] rcvBuffer = rcvString.ToCharArray();
//Compare the chars that were written with the ones we expected to read
Assert.Equal(expectedChars, rcvBuffer);
Assert.Equal(0, com1.BytesToRead);
}
#endregion
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.IO.PortsTests;
using System.Text;
using System.Threading;
using Legacy.Support;
using Xunit;
namespace System.IO.Ports.Tests
{
public class ReadExisting : PortsTest
{
//The number of random bytes to receive for read method testing
private const int numRndBytesToRead = 8;
//The number of random bytes to receive for large input buffer testing
private const int largeNumRndBytesToRead = 2048;
private enum ReadDataFromEnum { NonBuffered, Buffered, BufferedAndNonBuffered };
#region Test Cases
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void ASCIIEncoding()
{
VerifyRead(new ASCIIEncoding());
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void UTF8Encoding()
{
VerifyRead(new UTF8Encoding());
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void UTF32Encoding()
{
VerifyRead(new UTF32Encoding());
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void SerialPort_ReadBufferedData()
{
int numberOfBytesToRead = 32;
VerifyRead(Encoding.ASCII, numberOfBytesToRead, ReadDataFromEnum.Buffered);
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void SerialPort_IterativeReadBufferedData()
{
int numberOfBytesToRead = 32;
VerifyRead(Encoding.ASCII, numberOfBytesToRead, ReadDataFromEnum.Buffered);
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void SerialPort_ReadBufferedAndNonBufferedData()
{
int numberOfBytesToRead = 64;
VerifyRead(Encoding.ASCII, numberOfBytesToRead, ReadDataFromEnum.BufferedAndNonBuffered);
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void SerialPort_IterativeReadBufferedAndNonBufferedData()
{
int numberOfBytesToRead = 3;
VerifyRead(Encoding.ASCII, numberOfBytesToRead, ReadDataFromEnum.BufferedAndNonBuffered);
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
public void GreedyRead()
{
using (SerialPort com1 = TCSupport.InitFirstSerialPort())
using (SerialPort com2 = TCSupport.InitSecondSerialPort(com1))
{
char[] charXmitBuffer = TCSupport.GetRandomChars(128, true);
byte[] byteXmitBuffer = new byte[1024];
char utf32Char = TCSupport.GenerateRandomCharNonSurrogate();
byte[] utf32CharBytes = Encoding.UTF32.GetBytes(new[] { utf32Char });
int numBytes;
Debug.WriteLine("Verifying that ReadExisting() will read everything from internal buffer and drivers buffer");
//Put the first byte of the utf32 encoder char in the last byte of this buffer
//when we read this later the buffer will have to be resized
byteXmitBuffer[byteXmitBuffer.Length - 1] = utf32CharBytes[0];
com1.Open();
if (!com2.IsOpen) //This is necessary since com1 and com2 might be the same port if we are using a loopback
com2.Open();
com2.Write(byteXmitBuffer, 0, byteXmitBuffer.Length);
TCSupport.WaitForReadBufferToLoad(com1, byteXmitBuffer.Length);
//Read Every Byte except the last one. The last bye should be left in the last position of SerialPort's
//internal buffer. When we try to read this char as UTF32 the buffer should have to be resized so
//the other 3 bytes of the ut32 encoded char can be in the buffer
com1.Read(new char[1023], 0, 1023);
Assert.Equal(1, com1.BytesToRead);
com1.Encoding = Encoding.UTF32;
com2.Encoding = Encoding.UTF32;
com2.Write(utf32CharBytes, 1, 3);
com2.Write(charXmitBuffer, 0, charXmitBuffer.Length);
numBytes = Encoding.UTF32.GetByteCount(charXmitBuffer);
byte[] byteBuffer = Encoding.UTF32.GetBytes(charXmitBuffer);
var expectedChars = new char[1 + Encoding.UTF32.GetCharCount(byteBuffer)];
expectedChars[0] = utf32Char;
Encoding.UTF32.GetChars(byteBuffer, 0, byteBuffer.Length, expectedChars, 1);
TCSupport.WaitForReadBufferToLoad(com1, 4 + numBytes);
string rcvString = com1.ReadExisting();
Assert.NotNull(rcvString);
char[] actualChars = rcvString.ToCharArray();
Assert.Equal(expectedChars, actualChars);
Assert.Equal(0, com1.BytesToRead);
}
}
[ConditionalFact(nameof(HasLoopbackOrNullModem))]
private void LargeInputBuffer()
{
VerifyRead(largeNumRndBytesToRead);
}
#endregion
#region Verification for Test Cases
private void VerifyRead()
{
VerifyRead(new ASCIIEncoding(), numRndBytesToRead);
}
private void VerifyRead(int numberOfBytesToRead)
{
VerifyRead(new ASCIIEncoding(), numberOfBytesToRead);
}
private void VerifyRead(Encoding encoding)
{
VerifyRead(encoding, numRndBytesToRead);
}
private void VerifyRead(Encoding encoding, int numberOfBytesToRead)
{
VerifyRead(encoding, numberOfBytesToRead, ReadDataFromEnum.NonBuffered);
}
private void VerifyRead(Encoding encoding, int numberOfBytesToRead, ReadDataFromEnum readDataFrom)
{
using (SerialPort com1 = TCSupport.InitFirstSerialPort())
using (SerialPort com2 = TCSupport.InitSecondSerialPort(com1))
{
Random rndGen = new Random(-55);
char[] charsToWrite = new char[numberOfBytesToRead];
byte[] bytesToWrite = new byte[numberOfBytesToRead];
//Genrate random chars to send
for (int i = 0; i < bytesToWrite.Length; i++)
{
char randChar = (char)rndGen.Next(0, ushort.MaxValue);
charsToWrite[i] = randChar;
}
Debug.WriteLine("Verifying read method endocing={0} with {1} random chars", encoding.EncodingName,
bytesToWrite.Length);
com1.ReadTimeout = 500;
com1.Encoding = encoding;
TCSupport.SetHighSpeed(com1, com2);
com1.Open();
if (!com2.IsOpen) //This is necessary since com1 and com2 might be the same port if we are using a loopback
com2.Open();
bytesToWrite = com1.Encoding.GetBytes(charsToWrite, 0, charsToWrite.Length);
switch (readDataFrom)
{
case ReadDataFromEnum.NonBuffered:
VerifyReadNonBuffered(com1, com2, bytesToWrite);
break;
case ReadDataFromEnum.Buffered:
VerifyReadBuffered(com1, com2, bytesToWrite);
break;
case ReadDataFromEnum.BufferedAndNonBuffered:
VerifyReadBufferedAndNonBuffered(com1, com2, bytesToWrite);
break;
default:
throw new ArgumentOutOfRangeException(nameof(readDataFrom), readDataFrom, null);
}
}
}
private void VerifyReadNonBuffered(SerialPort com1, SerialPort com2, byte[] bytesToWrite)
{
char[] expectedChars = com1.Encoding.GetChars(bytesToWrite, 0, bytesToWrite.Length);
VerifyBytesReadOnCom1FromCom2(com1, com2, bytesToWrite, expectedChars);
}
private void VerifyReadBuffered(SerialPort com1, SerialPort com2, byte[] bytesToWrite)
{
char[] expectedChars = com1.Encoding.GetChars(bytesToWrite, 0, bytesToWrite.Length);
BufferData(com1, com2, bytesToWrite);
PerformReadOnCom1FromCom2(com1, com2, expectedChars);
}
private void VerifyReadBufferedAndNonBuffered(SerialPort com1, SerialPort com2, byte[] bytesToWrite)
{
char[] expectedChars = new char[com1.Encoding.GetCharCount(bytesToWrite, 0, bytesToWrite.Length) * 2];
char[] encodedChars = com1.Encoding.GetChars(bytesToWrite, 0, bytesToWrite.Length);
Array.Copy(encodedChars, expectedChars, bytesToWrite.Length);
Array.Copy(encodedChars, 0, expectedChars, encodedChars.Length, encodedChars.Length);
BufferData(com1, com2, bytesToWrite);
VerifyBytesReadOnCom1FromCom2(com1, com2, bytesToWrite, expectedChars);
}
private void BufferData(SerialPort com1, SerialPort com2, byte[] bytesToWrite)
{
com2.Write(bytesToWrite, 0, 1); // Write one byte at the beginning because we are going to read this to buffer the rest of the data
com2.Write(bytesToWrite, 0, bytesToWrite.Length);
TCSupport.WaitForReadBufferToLoad(com1, bytesToWrite.Length);
com1.Read(new char[1], 0, 1); // This should put the rest of the bytes in SerialPorts own internal buffer
Assert.Equal(bytesToWrite.Length, com1.BytesToRead);
}
private void VerifyBytesReadOnCom1FromCom2(SerialPort com1, SerialPort com2, byte[] bytesToWrite, char[] expectedChars)
{
com2.Write(bytesToWrite, 0, bytesToWrite.Length);
com1.ReadTimeout = 500;
Thread.Sleep((int)(((bytesToWrite.Length * 10.0) / com1.BaudRate) * 1000) + 250);
PerformReadOnCom1FromCom2(com1, com2, expectedChars);
}
private void PerformReadOnCom1FromCom2(SerialPort com1, SerialPort com2, char[] expectedChars)
{
string rcvString = com1.ReadExisting();
char[] rcvBuffer = rcvString.ToCharArray();
//Compare the chars that were written with the ones we expected to read
Assert.Equal(expectedChars, rcvBuffer);
Assert.Equal(0, com1.BytesToRead);
}
#endregion
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/HardwareIntrinsics/General/Vector64/EqualsAll.UInt32.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/******************************************************************************
* This file is auto-generated from a template file by the GenerateTests.csx *
* script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make *
* changes, please update the corresponding template and run according to the *
* directions listed in the file. *
******************************************************************************/
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
namespace JIT.HardwareIntrinsics.General
{
public static partial class Program
{
private static void EqualsAllUInt32()
{
var test = new VectorBooleanBinaryOpTest__EqualsAllUInt32();
// Validates basic functionality works, using Unsafe.Read
test.RunBasicScenario_UnsafeRead();
// Validates calling via reflection works, using Unsafe.Read
test.RunReflectionScenario_UnsafeRead();
// Validates passing a static member works
test.RunClsVarScenario();
// Validates passing a local works, using Unsafe.Read
test.RunLclVarScenario_UnsafeRead();
// Validates passing the field of a local class works
test.RunClassLclFldScenario();
// Validates passing an instance member of a class works
test.RunClassFldScenario();
// Validates passing the field of a local struct works
test.RunStructLclFldScenario();
// Validates passing an instance member of a struct works
test.RunStructFldScenario();
if (!test.Succeeded)
{
throw new Exception("One or more scenarios did not complete as expected.");
}
}
}
public sealed unsafe class VectorBooleanBinaryOpTest__EqualsAllUInt32
{
private struct DataTable
{
private byte[] inArray1;
private byte[] inArray2;
private GCHandle inHandle1;
private GCHandle inHandle2;
private ulong alignment;
public DataTable(UInt32[] inArray1, UInt32[] inArray2, int alignment)
{
int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<UInt32>();
int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<UInt32>();
if ((alignment != 32 && alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2)
{
throw new ArgumentException("Invalid value of alignment");
}
this.inArray1 = new byte[alignment * 2];
this.inArray2 = new byte[alignment * 2];
this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned);
this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned);
this.alignment = (ulong)alignment;
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray1Ptr), ref Unsafe.As<UInt32, byte>(ref inArray1[0]), (uint)sizeOfinArray1);
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray2Ptr), ref Unsafe.As<UInt32, byte>(ref inArray2[0]), (uint)sizeOfinArray2);
}
public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment);
public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment);
public void Dispose()
{
inHandle1.Free();
inHandle2.Free();
}
private static unsafe void* Align(byte* buffer, ulong expectedAlignment)
{
return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1));
}
}
private struct TestStruct
{
public Vector64<UInt32> _fld1;
public Vector64<UInt32> _fld2;
public static TestStruct Create()
{
var testStruct = new TestStruct();
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref testStruct._fld1), ref Unsafe.As<UInt32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref testStruct._fld2), ref Unsafe.As<UInt32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
return testStruct;
}
public void RunStructFldScenario(VectorBooleanBinaryOpTest__EqualsAllUInt32 testClass)
{
var result = Vector64.EqualsAll(_fld1, _fld2);
testClass.ValidateResult(_fld1, _fld2, result);
}
}
private static readonly int LargestVectorSize = 8;
private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector64<UInt32>>() / sizeof(UInt32);
private static readonly int Op2ElementCount = Unsafe.SizeOf<Vector64<UInt32>>() / sizeof(UInt32);
private static UInt32[] _data1 = new UInt32[Op1ElementCount];
private static UInt32[] _data2 = new UInt32[Op2ElementCount];
private static Vector64<UInt32> _clsVar1;
private static Vector64<UInt32> _clsVar2;
private Vector64<UInt32> _fld1;
private Vector64<UInt32> _fld2;
private DataTable _dataTable;
static VectorBooleanBinaryOpTest__EqualsAllUInt32()
{
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref _clsVar1), ref Unsafe.As<UInt32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref _clsVar2), ref Unsafe.As<UInt32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
}
public VectorBooleanBinaryOpTest__EqualsAllUInt32()
{
Succeeded = true;
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref _fld1), ref Unsafe.As<UInt32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref _fld2), ref Unsafe.As<UInt32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); }
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); }
_dataTable = new DataTable(_data1, _data2, LargestVectorSize);
}
public bool Succeeded { get; set; }
public void RunBasicScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));
var result = Vector64.EqualsAll(
Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray2Ptr)
);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
}
public void RunReflectionScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead));
var method = typeof(Vector64).GetMethod(nameof(Vector64.EqualsAll), new Type[] {
typeof(Vector64<UInt32>),
typeof(Vector64<UInt32>)
});
if (method is null)
{
method = typeof(Vector64).GetMethod(nameof(Vector64.EqualsAll), 1, new Type[] {
typeof(Vector64<>).MakeGenericType(Type.MakeGenericMethodParameter(0)),
typeof(Vector64<>).MakeGenericType(Type.MakeGenericMethodParameter(0))
});
}
if (method.IsGenericMethodDefinition)
{
method = method.MakeGenericMethod(typeof(UInt32));
}
var result = method.Invoke(null, new object[] {
Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray2Ptr)
});
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result));
}
public void RunClsVarScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario));
var result = Vector64.EqualsAll(
_clsVar1,
_clsVar2
);
ValidateResult(_clsVar1, _clsVar2, result);
}
public void RunLclVarScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));
var op1 = Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray1Ptr);
var op2 = Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray2Ptr);
var result = Vector64.EqualsAll(op1, op2);
ValidateResult(op1, op2, result);
}
public void RunClassLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));
var test = new VectorBooleanBinaryOpTest__EqualsAllUInt32();
var result = Vector64.EqualsAll(test._fld1, test._fld2);
ValidateResult(test._fld1, test._fld2, result);
}
public void RunClassFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));
var result = Vector64.EqualsAll(_fld1, _fld2);
ValidateResult(_fld1, _fld2, result);
}
public void RunStructLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));
var test = TestStruct.Create();
var result = Vector64.EqualsAll(test._fld1, test._fld2);
ValidateResult(test._fld1, test._fld2, result);
}
public void RunStructFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario));
var test = TestStruct.Create();
test.RunStructFldScenario(this);
}
private void ValidateResult(Vector64<UInt32> op1, Vector64<UInt32> op2, bool result, [CallerMemberName] string method = "")
{
UInt32[] inArray1 = new UInt32[Op1ElementCount];
UInt32[] inArray2 = new UInt32[Op2ElementCount];
Unsafe.WriteUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray1[0]), op1);
Unsafe.WriteUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray2[0]), op2);
ValidateResult(inArray1, inArray2, result, method);
}
private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "")
{
UInt32[] inArray1 = new UInt32[Op1ElementCount];
UInt32[] inArray2 = new UInt32[Op2ElementCount];
Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray1[0]), ref Unsafe.AsRef<byte>(op1), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray2[0]), ref Unsafe.AsRef<byte>(op2), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
ValidateResult(inArray1, inArray2, result, method);
}
private void ValidateResult(UInt32[] left, UInt32[] right, bool result, [CallerMemberName] string method = "")
{
bool succeeded = true;
var expectedResult = true;
for (var i = 0; i < Op1ElementCount; i++)
{
expectedResult &= (left[i] == right[i]);
}
succeeded = (expectedResult == result);
if (!succeeded)
{
TestLibrary.TestFramework.LogInformation($"{nameof(Vector64)}.{nameof(Vector64.EqualsAll)}<UInt32>(Vector64<UInt32>, Vector64<UInt32>): {method} failed:");
TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})");
TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})");
TestLibrary.TestFramework.LogInformation($" result: ({result})");
TestLibrary.TestFramework.LogInformation(string.Empty);
Succeeded = false;
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/******************************************************************************
* This file is auto-generated from a template file by the GenerateTests.csx *
* script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make *
* changes, please update the corresponding template and run according to the *
* directions listed in the file. *
******************************************************************************/
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
namespace JIT.HardwareIntrinsics.General
{
public static partial class Program
{
private static void EqualsAllUInt32()
{
var test = new VectorBooleanBinaryOpTest__EqualsAllUInt32();
// Validates basic functionality works, using Unsafe.Read
test.RunBasicScenario_UnsafeRead();
// Validates calling via reflection works, using Unsafe.Read
test.RunReflectionScenario_UnsafeRead();
// Validates passing a static member works
test.RunClsVarScenario();
// Validates passing a local works, using Unsafe.Read
test.RunLclVarScenario_UnsafeRead();
// Validates passing the field of a local class works
test.RunClassLclFldScenario();
// Validates passing an instance member of a class works
test.RunClassFldScenario();
// Validates passing the field of a local struct works
test.RunStructLclFldScenario();
// Validates passing an instance member of a struct works
test.RunStructFldScenario();
if (!test.Succeeded)
{
throw new Exception("One or more scenarios did not complete as expected.");
}
}
}
public sealed unsafe class VectorBooleanBinaryOpTest__EqualsAllUInt32
{
private struct DataTable
{
private byte[] inArray1;
private byte[] inArray2;
private GCHandle inHandle1;
private GCHandle inHandle2;
private ulong alignment;
public DataTable(UInt32[] inArray1, UInt32[] inArray2, int alignment)
{
int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<UInt32>();
int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<UInt32>();
if ((alignment != 32 && alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2)
{
throw new ArgumentException("Invalid value of alignment");
}
this.inArray1 = new byte[alignment * 2];
this.inArray2 = new byte[alignment * 2];
this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned);
this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned);
this.alignment = (ulong)alignment;
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray1Ptr), ref Unsafe.As<UInt32, byte>(ref inArray1[0]), (uint)sizeOfinArray1);
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray2Ptr), ref Unsafe.As<UInt32, byte>(ref inArray2[0]), (uint)sizeOfinArray2);
}
public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment);
public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment);
public void Dispose()
{
inHandle1.Free();
inHandle2.Free();
}
private static unsafe void* Align(byte* buffer, ulong expectedAlignment)
{
return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1));
}
}
private struct TestStruct
{
public Vector64<UInt32> _fld1;
public Vector64<UInt32> _fld2;
public static TestStruct Create()
{
var testStruct = new TestStruct();
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref testStruct._fld1), ref Unsafe.As<UInt32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref testStruct._fld2), ref Unsafe.As<UInt32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
return testStruct;
}
public void RunStructFldScenario(VectorBooleanBinaryOpTest__EqualsAllUInt32 testClass)
{
var result = Vector64.EqualsAll(_fld1, _fld2);
testClass.ValidateResult(_fld1, _fld2, result);
}
}
private static readonly int LargestVectorSize = 8;
private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector64<UInt32>>() / sizeof(UInt32);
private static readonly int Op2ElementCount = Unsafe.SizeOf<Vector64<UInt32>>() / sizeof(UInt32);
private static UInt32[] _data1 = new UInt32[Op1ElementCount];
private static UInt32[] _data2 = new UInt32[Op2ElementCount];
private static Vector64<UInt32> _clsVar1;
private static Vector64<UInt32> _clsVar2;
private Vector64<UInt32> _fld1;
private Vector64<UInt32> _fld2;
private DataTable _dataTable;
static VectorBooleanBinaryOpTest__EqualsAllUInt32()
{
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref _clsVar1), ref Unsafe.As<UInt32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref _clsVar2), ref Unsafe.As<UInt32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
}
public VectorBooleanBinaryOpTest__EqualsAllUInt32()
{
Succeeded = true;
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref _fld1), ref Unsafe.As<UInt32, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector64<UInt32>, byte>(ref _fld2), ref Unsafe.As<UInt32, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); }
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); }
_dataTable = new DataTable(_data1, _data2, LargestVectorSize);
}
public bool Succeeded { get; set; }
public void RunBasicScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));
var result = Vector64.EqualsAll(
Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray2Ptr)
);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
}
public void RunReflectionScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead));
var method = typeof(Vector64).GetMethod(nameof(Vector64.EqualsAll), new Type[] {
typeof(Vector64<UInt32>),
typeof(Vector64<UInt32>)
});
if (method is null)
{
method = typeof(Vector64).GetMethod(nameof(Vector64.EqualsAll), 1, new Type[] {
typeof(Vector64<>).MakeGenericType(Type.MakeGenericMethodParameter(0)),
typeof(Vector64<>).MakeGenericType(Type.MakeGenericMethodParameter(0))
});
}
if (method.IsGenericMethodDefinition)
{
method = method.MakeGenericMethod(typeof(UInt32));
}
var result = method.Invoke(null, new object[] {
Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray2Ptr)
});
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, (bool)(result));
}
public void RunClsVarScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario));
var result = Vector64.EqualsAll(
_clsVar1,
_clsVar2
);
ValidateResult(_clsVar1, _clsVar2, result);
}
public void RunLclVarScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));
var op1 = Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray1Ptr);
var op2 = Unsafe.Read<Vector64<UInt32>>(_dataTable.inArray2Ptr);
var result = Vector64.EqualsAll(op1, op2);
ValidateResult(op1, op2, result);
}
public void RunClassLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));
var test = new VectorBooleanBinaryOpTest__EqualsAllUInt32();
var result = Vector64.EqualsAll(test._fld1, test._fld2);
ValidateResult(test._fld1, test._fld2, result);
}
public void RunClassFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));
var result = Vector64.EqualsAll(_fld1, _fld2);
ValidateResult(_fld1, _fld2, result);
}
public void RunStructLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));
var test = TestStruct.Create();
var result = Vector64.EqualsAll(test._fld1, test._fld2);
ValidateResult(test._fld1, test._fld2, result);
}
public void RunStructFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario));
var test = TestStruct.Create();
test.RunStructFldScenario(this);
}
private void ValidateResult(Vector64<UInt32> op1, Vector64<UInt32> op2, bool result, [CallerMemberName] string method = "")
{
UInt32[] inArray1 = new UInt32[Op1ElementCount];
UInt32[] inArray2 = new UInt32[Op2ElementCount];
Unsafe.WriteUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray1[0]), op1);
Unsafe.WriteUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray2[0]), op2);
ValidateResult(inArray1, inArray2, result, method);
}
private void ValidateResult(void* op1, void* op2, bool result, [CallerMemberName] string method = "")
{
UInt32[] inArray1 = new UInt32[Op1ElementCount];
UInt32[] inArray2 = new UInt32[Op2ElementCount];
Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray1[0]), ref Unsafe.AsRef<byte>(op1), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray2[0]), ref Unsafe.AsRef<byte>(op2), (uint)Unsafe.SizeOf<Vector64<UInt32>>());
ValidateResult(inArray1, inArray2, result, method);
}
private void ValidateResult(UInt32[] left, UInt32[] right, bool result, [CallerMemberName] string method = "")
{
bool succeeded = true;
var expectedResult = true;
for (var i = 0; i < Op1ElementCount; i++)
{
expectedResult &= (left[i] == right[i]);
}
succeeded = (expectedResult == result);
if (!succeeded)
{
TestLibrary.TestFramework.LogInformation($"{nameof(Vector64)}.{nameof(Vector64.EqualsAll)}<UInt32>(Vector64<UInt32>, Vector64<UInt32>): {method} failed:");
TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})");
TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})");
TestLibrary.TestFramework.LogInformation($" result: ({result})");
TestLibrary.TestFramework.LogInformation(string.Empty);
Succeeded = false;
}
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterManager.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace System.Diagnostics
{
public sealed class PerformanceCounterManager : ICollectData
{
[ObsoleteAttribute("PerformanceCounterManager has been deprecated. Use the PerformanceCounters through the System.Diagnostics.PerformanceCounter class instead.")]
public PerformanceCounterManager()
{
}
[ObsoleteAttribute("PerformanceCounterManager has been deprecated. Use the PerformanceCounters through the System.Diagnostics.PerformanceCounter class instead.")]
void ICollectData.CollectData(int callIdx, IntPtr valueNamePtr, IntPtr dataPtr, int totalBytes, out IntPtr res)
{
res = (IntPtr)(-1);
}
[ObsoleteAttribute("PerformanceCounterManager has been deprecated. Use the PerformanceCounters through the System.Diagnostics.PerformanceCounter class instead.")]
void ICollectData.CloseData()
{
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace System.Diagnostics
{
public sealed class PerformanceCounterManager : ICollectData
{
[ObsoleteAttribute("PerformanceCounterManager has been deprecated. Use the PerformanceCounters through the System.Diagnostics.PerformanceCounter class instead.")]
public PerformanceCounterManager()
{
}
[ObsoleteAttribute("PerformanceCounterManager has been deprecated. Use the PerformanceCounters through the System.Diagnostics.PerformanceCounter class instead.")]
void ICollectData.CollectData(int callIdx, IntPtr valueNamePtr, IntPtr dataPtr, int totalBytes, out IntPtr res)
{
res = (IntPtr)(-1);
}
[ObsoleteAttribute("PerformanceCounterManager has been deprecated. Use the PerformanceCounters through the System.Diagnostics.PerformanceCounter class instead.")]
void ICollectData.CloseData()
{
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/TempConfig.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
namespace System.Configuration
{
public class TempConfig : IDisposable
{
private readonly TempDirectory _directory;
public TempConfig(string contents)
{
_directory = new TempDirectory();
ExePath = Path.Combine(_directory.Path, Path.GetRandomFileName() + ".exe");
File.WriteAllText(ExePath, "dummy exe");
ConfigPath = ExePath + ".config";
File.WriteAllText(ConfigPath, contents);
}
public string ConfigPath { get; }
public string ExePath { get; }
public void Dispose()
{
_directory?.Dispose();
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
namespace System.Configuration
{
public class TempConfig : IDisposable
{
private readonly TempDirectory _directory;
public TempConfig(string contents)
{
_directory = new TempDirectory();
ExePath = Path.Combine(_directory.Path, Path.GetRandomFileName() + ".exe");
File.WriteAllText(ExePath, "dummy exe");
ConfigPath = ExePath + ".config";
File.WriteAllText(ConfigPath, contents);
}
public string ConfigPath { get; }
public string ExePath { get; }
public void Dispose()
{
_directory?.Dispose();
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/baseservices/threading/generics/syncdelegate/thread25.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Threading;
class Gen<T>
{
public static void Target()
{
Interlocked.Increment(ref Test_thread25.Xcounter);
}
public static void DelegateTest()
{
ThreadStart d = new ThreadStart(Gen<T>.Target);
d();
Test_thread25.Eval(Test_thread25.Xcounter==1);
Test_thread25.Xcounter = 0;
}
}
public class Test_thread25
{
public static int nThreads = 50;
public static int counter = 0;
public static int Xcounter = 0;
public static bool result = true;
public static void Eval(bool exp)
{
counter++;
if (!exp)
{
result = exp;
Console.WriteLine("Test Failed at location: " + counter);
}
}
public static int Main()
{
Gen<int>.DelegateTest();
Gen<double>.DelegateTest();
Gen<string>.DelegateTest();
Gen<object>.DelegateTest();
Gen<Guid>.DelegateTest();
Gen<int[]>.DelegateTest();
Gen<double[,]>.DelegateTest();
Gen<string[][][]>.DelegateTest();
Gen<object[,,,]>.DelegateTest();
Gen<Guid[][,,,][]>.DelegateTest();
if (result)
{
Console.WriteLine("Test Passed");
return 100;
}
else
{
Console.WriteLine("Test Failed");
return 1;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Threading;
class Gen<T>
{
public static void Target()
{
Interlocked.Increment(ref Test_thread25.Xcounter);
}
public static void DelegateTest()
{
ThreadStart d = new ThreadStart(Gen<T>.Target);
d();
Test_thread25.Eval(Test_thread25.Xcounter==1);
Test_thread25.Xcounter = 0;
}
}
public class Test_thread25
{
public static int nThreads = 50;
public static int counter = 0;
public static int Xcounter = 0;
public static bool result = true;
public static void Eval(bool exp)
{
counter++;
if (!exp)
{
result = exp;
Console.WriteLine("Test Failed at location: " + counter);
}
}
public static int Main()
{
Gen<int>.DelegateTest();
Gen<double>.DelegateTest();
Gen<string>.DelegateTest();
Gen<object>.DelegateTest();
Gen<Guid>.DelegateTest();
Gen<int[]>.DelegateTest();
Gen<double[,]>.DelegateTest();
Gen<string[][][]>.DelegateTest();
Gen<object[,,,]>.DelegateTest();
Gen<Guid[][,,,][]>.DelegateTest();
if (result)
{
Console.WriteLine("Test Passed");
return 100;
}
else
{
Console.WriteLine("Test Failed");
return 1;
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Windows.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Authentication;
using System.Security.Authentication.ExtendedProtection;
using System.Security.Cryptography.X509Certificates;
using System.Security.Principal;
using System.Text;
using Microsoft.Win32.SafeHandles;
namespace System.Net.Security
{
internal static class SslStreamPal
{
private static readonly bool UseNewCryptoApi =
// On newer Windows version we use new API to get TLS1.3.
// API is supported since Windows 10 1809 (17763) but there is no reason to use at the moment.
Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 18836;
private const string SecurityPackage = "Microsoft Unified Security Protocol Provider";
private const Interop.SspiCli.ContextFlags RequiredFlags =
Interop.SspiCli.ContextFlags.ReplayDetect |
Interop.SspiCli.ContextFlags.SequenceDetect |
Interop.SspiCli.ContextFlags.Confidentiality |
Interop.SspiCli.ContextFlags.AllocateMemory;
private const Interop.SspiCli.ContextFlags ServerRequiredFlags =
RequiredFlags | Interop.SspiCli.ContextFlags.AcceptStream | Interop.SspiCli.ContextFlags.AcceptExtendedError;
public static Exception GetException(SecurityStatusPal status)
{
int win32Code = (int)SecurityStatusAdapterPal.GetInteropFromSecurityStatusPal(status);
return new Win32Exception(win32Code);
}
internal const bool StartMutualAuthAsAnonymous = true;
internal const bool CanEncryptEmptyMessage = true;
public static void VerifyPackageInfo()
{
SSPIWrapper.GetVerifyPackageInfo(GlobalSSPI.SSPISecureChannel, SecurityPackage, true);
}
public static byte[] ConvertAlpnProtocolListToByteArray(List<SslApplicationProtocol> protocols)
{
return Interop.Sec_Application_Protocols.ToByteArray(protocols);
}
public static SecurityStatusPal AcceptSecurityContext(
SecureChannel secureChannel,
ref SafeFreeCredentials? credentialsHandle,
ref SafeDeleteSslContext? context,
ReadOnlySpan<byte> inputBuffer,
ref byte[]? outputBuffer,
SslAuthenticationOptions sslAuthenticationOptions)
{
Interop.SspiCli.ContextFlags unusedAttributes = default;
InputSecurityBuffers inputBuffers = default;
inputBuffers.SetNextBuffer(new InputSecurityBuffer(inputBuffer, SecurityBufferType.SECBUFFER_TOKEN));
inputBuffers.SetNextBuffer(new InputSecurityBuffer(default, SecurityBufferType.SECBUFFER_EMPTY));
if (sslAuthenticationOptions.ApplicationProtocols != null && sslAuthenticationOptions.ApplicationProtocols.Count != 0)
{
byte[] alpnBytes = ConvertAlpnProtocolListToByteArray(sslAuthenticationOptions.ApplicationProtocols);
inputBuffers.SetNextBuffer(new InputSecurityBuffer(new ReadOnlySpan<byte>(alpnBytes), SecurityBufferType.SECBUFFER_APPLICATION_PROTOCOLS));
}
var resultBuffer = new SecurityBuffer(outputBuffer, SecurityBufferType.SECBUFFER_TOKEN);
int errorCode = SSPIWrapper.AcceptSecurityContext(
GlobalSSPI.SSPISecureChannel,
credentialsHandle,
ref context,
ServerRequiredFlags | (sslAuthenticationOptions.RemoteCertRequired ? Interop.SspiCli.ContextFlags.MutualAuth : Interop.SspiCli.ContextFlags.Zero),
Interop.SspiCli.Endianness.SECURITY_NATIVE_DREP,
inputBuffers,
ref resultBuffer,
ref unusedAttributes);
outputBuffer = resultBuffer.token;
return SecurityStatusAdapterPal.GetSecurityStatusPalFromNativeInt(errorCode);
}
public static SecurityStatusPal InitializeSecurityContext(
SecureChannel secureChannel,
ref SafeFreeCredentials? credentialsHandle,
ref SafeDeleteSslContext? context,
string? targetName,
ReadOnlySpan<byte> inputBuffer,
ref byte[]? outputBuffer,
SslAuthenticationOptions sslAuthenticationOptions)
{
Interop.SspiCli.ContextFlags unusedAttributes = default;
InputSecurityBuffers inputBuffers = default;
inputBuffers.SetNextBuffer(new InputSecurityBuffer(inputBuffer, SecurityBufferType.SECBUFFER_TOKEN));
inputBuffers.SetNextBuffer(new InputSecurityBuffer(default, SecurityBufferType.SECBUFFER_EMPTY));
if (sslAuthenticationOptions.ApplicationProtocols != null && sslAuthenticationOptions.ApplicationProtocols.Count != 0)
{
byte[] alpnBytes = ConvertAlpnProtocolListToByteArray(sslAuthenticationOptions.ApplicationProtocols);
inputBuffers.SetNextBuffer(new InputSecurityBuffer(new ReadOnlySpan<byte>(alpnBytes), SecurityBufferType.SECBUFFER_APPLICATION_PROTOCOLS));
}
var resultBuffer = new SecurityBuffer(outputBuffer, SecurityBufferType.SECBUFFER_TOKEN);
int errorCode = SSPIWrapper.InitializeSecurityContext(
GlobalSSPI.SSPISecureChannel,
ref credentialsHandle,
ref context,
targetName,
RequiredFlags | Interop.SspiCli.ContextFlags.InitManualCredValidation,
Interop.SspiCli.Endianness.SECURITY_NATIVE_DREP,
inputBuffers,
ref resultBuffer,
ref unusedAttributes);
outputBuffer = resultBuffer.token;
return SecurityStatusAdapterPal.GetSecurityStatusPalFromNativeInt(errorCode);
}
public static SecurityStatusPal Renegotiate(
SecureChannel secureChannel,
ref SafeFreeCredentials? credentialsHandle,
ref SafeDeleteSslContext? context,
SslAuthenticationOptions sslAuthenticationOptions,
out byte[]? outputBuffer )
{
byte[]? output = Array.Empty<byte>();
SecurityStatusPal status = AcceptSecurityContext(secureChannel, ref credentialsHandle, ref context, Span<byte>.Empty, ref output, sslAuthenticationOptions);
outputBuffer = output;
return status;
}
public static SafeFreeCredentials AcquireCredentialsHandle(SslStreamCertificateContext? certificateContext, SslProtocols protocols, EncryptionPolicy policy, bool isServer)
{
try
{
// New crypto API supports TLS1.3 but it does not allow to force NULL encryption.
#pragma warning disable SYSLIB0040 // NoEncryption and AllowNoEncryption are obsolete
SafeFreeCredentials cred = !UseNewCryptoApi || policy == EncryptionPolicy.NoEncryption ?
AcquireCredentialsHandleSchannelCred(certificateContext, protocols, policy, isServer) :
AcquireCredentialsHandleSchCredentials(certificateContext, protocols, policy, isServer);
#pragma warning restore SYSLIB0040
if (certificateContext != null && certificateContext.Trust != null && certificateContext.Trust._sendTrustInHandshake)
{
AttachCertificateStore(cred, certificateContext.Trust._store!);
}
return cred;
}
catch (Win32Exception e)
{
throw new AuthenticationException(SR.net_auth_SSPI, e);
}
}
private static unsafe void AttachCertificateStore(SafeFreeCredentials cred, X509Store store)
{
Interop.SspiCli.SecPkgCred_ClientCertPolicy clientCertPolicy = default;
fixed (char* ptr = store.Name)
{
clientCertPolicy.pwszSslCtlStoreName = ptr;
Interop.SECURITY_STATUS errorCode = Interop.SspiCli.SetCredentialsAttributesW(
cred._handle,
(long)Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CLIENT_CERT_POLICY,
clientCertPolicy,
sizeof(Interop.SspiCli.SecPkgCred_ClientCertPolicy));
if (errorCode != Interop.SECURITY_STATUS.OK)
{
throw new Win32Exception((int)errorCode);
}
}
return;
}
// This is legacy crypto API used on .NET Framework and older Windows versions.
// It only supports TLS up to 1.2
public static unsafe SafeFreeCredentials AcquireCredentialsHandleSchannelCred(SslStreamCertificateContext? certificateContext, SslProtocols protocols, EncryptionPolicy policy, bool isServer)
{
X509Certificate2? certificate = certificateContext?.Certificate;
int protocolFlags = GetProtocolFlagsFromSslProtocols(protocols, isServer);
Interop.SspiCli.SCHANNEL_CRED.Flags flags;
Interop.SspiCli.CredentialUse direction;
if (!isServer)
{
direction = Interop.SspiCli.CredentialUse.SECPKG_CRED_OUTBOUND;
flags =
Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_CRED_MANUAL_CRED_VALIDATION |
Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_CRED_NO_DEFAULT_CREDS |
Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_SEND_AUX_RECORD;
#pragma warning disable SYSLIB0040 // NoEncryption and AllowNoEncryption are obsolete
// Always opt-in SCH_USE_STRONG_CRYPTO for TLS.
if (((protocolFlags == 0) ||
(protocolFlags & ~(Interop.SChannel.SP_PROT_SSL2 | Interop.SChannel.SP_PROT_SSL3)) != 0)
&& (policy != EncryptionPolicy.AllowNoEncryption) && (policy != EncryptionPolicy.NoEncryption))
{
flags |= Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_USE_STRONG_CRYPTO;
}
#pragma warning restore SYSLIB0040
}
else
{
direction = Interop.SspiCli.CredentialUse.SECPKG_CRED_INBOUND;
flags = Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_SEND_AUX_RECORD;
if (certificateContext?.Trust?._sendTrustInHandshake == true)
{
flags |= Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_CRED_NO_SYSTEM_MAPPER;
}
}
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info($"flags=({flags}), ProtocolFlags=({protocolFlags}), EncryptionPolicy={policy}");
Interop.SspiCli.SCHANNEL_CRED secureCredential = CreateSecureCredential(
flags,
protocolFlags,
policy);
if (certificate != null)
{
secureCredential.cCreds = 1;
Interop.Crypt32.CERT_CONTEXT* certificateHandle = (Interop.Crypt32.CERT_CONTEXT*)certificate.Handle;
secureCredential.paCred = &certificateHandle;
}
return AcquireCredentialsHandle(direction, &secureCredential);
}
// This function uses new crypto API to support TLS 1.3 and beyond.
public static unsafe SafeFreeCredentials AcquireCredentialsHandleSchCredentials(SslStreamCertificateContext? certificateContext, SslProtocols protocols, EncryptionPolicy policy, bool isServer)
{
X509Certificate2? certificate = certificateContext?.Certificate;
int protocolFlags = GetProtocolFlagsFromSslProtocols(protocols, isServer);
Interop.SspiCli.SCH_CREDENTIALS.Flags flags;
Interop.SspiCli.CredentialUse direction;
if (isServer)
{
direction = Interop.SspiCli.CredentialUse.SECPKG_CRED_INBOUND;
flags = Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_SEND_AUX_RECORD;
if (certificateContext?.Trust?._sendTrustInHandshake == true)
{
flags |= Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_CRED_NO_SYSTEM_MAPPER;
}
}
else
{
direction = Interop.SspiCli.CredentialUse.SECPKG_CRED_OUTBOUND;
flags =
Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_CRED_MANUAL_CRED_VALIDATION |
Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_CRED_NO_DEFAULT_CREDS |
Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_SEND_AUX_RECORD;
}
if (policy == EncryptionPolicy.RequireEncryption)
{
// Always opt-in SCH_USE_STRONG_CRYPTO for TLS.
if (!isServer && ((protocolFlags & Interop.SChannel.SP_PROT_SSL3) == 0))
{
flags |= Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_USE_STRONG_CRYPTO;
}
}
#pragma warning disable SYSLIB0040 // NoEncryption and AllowNoEncryption are obsolete
else if (policy == EncryptionPolicy.AllowNoEncryption)
{
// Allow null encryption cipher in addition to other ciphers.
flags |= Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_ALLOW_NULL_ENCRYPTION;
}
#pragma warning restore SYSLIB0040
else
{
throw new ArgumentException(SR.Format(SR.net_invalid_enum, "EncryptionPolicy"), nameof(policy));
}
Interop.SspiCli.SCH_CREDENTIALS credential = default;
credential.dwVersion = Interop.SspiCli.SCH_CREDENTIALS.CurrentVersion;
credential.dwFlags = flags;
if (certificate != null)
{
credential.cCreds = 1;
Interop.Crypt32.CERT_CONTEXT* certificateHandle = (Interop.Crypt32.CERT_CONTEXT*)certificate.Handle;
credential.paCred = &certificateHandle;
}
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info($"flags=({flags}), ProtocolFlags=({protocolFlags}), EncryptionPolicy={policy}");
if (protocolFlags != 0)
{
// If we were asked to do specific protocol we need to fill TLS_PARAMETERS.
Interop.SspiCli.TLS_PARAMETERS tlsParameters = default;
tlsParameters.grbitDisabledProtocols = (uint)protocolFlags ^ uint.MaxValue;
credential.cTlsParameters = 1;
credential.pTlsParameters = &tlsParameters;
}
return AcquireCredentialsHandle(direction, &credential);
}
internal static byte[]? GetNegotiatedApplicationProtocol(SafeDeleteContext context)
{
Interop.SecPkgContext_ApplicationProtocol alpnContext = default;
bool success = SSPIWrapper.QueryBlittableContextAttributes(GlobalSSPI.SSPISecureChannel, context, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_APPLICATION_PROTOCOL, ref alpnContext);
// Check if the context returned is alpn data, with successful negotiation.
if (success &&
alpnContext.ProtoNegoExt == Interop.ApplicationProtocolNegotiationExt.ALPN &&
alpnContext.ProtoNegoStatus == Interop.ApplicationProtocolNegotiationStatus.Success)
{
return alpnContext.Protocol;
}
return null;
}
public static unsafe SecurityStatusPal EncryptMessage(SafeDeleteSslContext securityContext, ReadOnlyMemory<byte> input, int headerSize, int trailerSize, ref byte[] output, out int resultSize)
{
// Ensure that there is sufficient space for the message output.
int bufferSizeNeeded = checked(input.Length + headerSize + trailerSize);
if (output == null || output.Length < bufferSizeNeeded)
{
output = new byte[bufferSizeNeeded];
}
// Copy the input into the output buffer to prepare for SCHANNEL's expectations
input.Span.CopyTo(new Span<byte>(output, headerSize, input.Length));
const int NumSecBuffers = 4; // header + data + trailer + empty
Interop.SspiCli.SecBuffer* unmanagedBuffer = stackalloc Interop.SspiCli.SecBuffer[NumSecBuffers];
Interop.SspiCli.SecBufferDesc sdcInOut = new Interop.SspiCli.SecBufferDesc(NumSecBuffers)
{
pBuffers = unmanagedBuffer
};
fixed (byte* outputPtr = output)
{
Interop.SspiCli.SecBuffer* headerSecBuffer = &unmanagedBuffer[0];
headerSecBuffer->BufferType = SecurityBufferType.SECBUFFER_STREAM_HEADER;
headerSecBuffer->pvBuffer = (IntPtr)outputPtr;
headerSecBuffer->cbBuffer = headerSize;
Interop.SspiCli.SecBuffer* dataSecBuffer = &unmanagedBuffer[1];
dataSecBuffer->BufferType = SecurityBufferType.SECBUFFER_DATA;
dataSecBuffer->pvBuffer = (IntPtr)(outputPtr + headerSize);
dataSecBuffer->cbBuffer = input.Length;
Interop.SspiCli.SecBuffer* trailerSecBuffer = &unmanagedBuffer[2];
trailerSecBuffer->BufferType = SecurityBufferType.SECBUFFER_STREAM_TRAILER;
trailerSecBuffer->pvBuffer = (IntPtr)(outputPtr + headerSize + input.Length);
trailerSecBuffer->cbBuffer = trailerSize;
Interop.SspiCli.SecBuffer* emptySecBuffer = &unmanagedBuffer[3];
emptySecBuffer->BufferType = SecurityBufferType.SECBUFFER_EMPTY;
emptySecBuffer->cbBuffer = 0;
emptySecBuffer->pvBuffer = IntPtr.Zero;
int errorCode = GlobalSSPI.SSPISecureChannel.EncryptMessage(securityContext, ref sdcInOut, 0);
if (errorCode != 0)
{
if (NetEventSource.Log.IsEnabled())
NetEventSource.Info(securityContext, $"Encrypt ERROR {errorCode:X}");
resultSize = 0;
return SecurityStatusAdapterPal.GetSecurityStatusPalFromNativeInt(errorCode);
}
Debug.Assert(headerSecBuffer->cbBuffer >= 0 && dataSecBuffer->cbBuffer >= 0 && trailerSecBuffer->cbBuffer >= 0);
Debug.Assert(checked(headerSecBuffer->cbBuffer + dataSecBuffer->cbBuffer + trailerSecBuffer->cbBuffer) <= output.Length);
resultSize = checked(headerSecBuffer->cbBuffer + dataSecBuffer->cbBuffer + trailerSecBuffer->cbBuffer);
return new SecurityStatusPal(SecurityStatusPalErrorCode.OK);
}
}
public static unsafe SecurityStatusPal DecryptMessage(SafeDeleteSslContext? securityContext, Span<byte> buffer, out int offset, out int count)
{
const int NumSecBuffers = 4; // data + empty + empty + empty
fixed (byte* bufferPtr = buffer)
{
Interop.SspiCli.SecBuffer* unmanagedBuffer = stackalloc Interop.SspiCli.SecBuffer[NumSecBuffers];
Interop.SspiCli.SecBuffer* dataBuffer = &unmanagedBuffer[0];
dataBuffer->BufferType = SecurityBufferType.SECBUFFER_DATA;
dataBuffer->pvBuffer = (IntPtr)bufferPtr;
dataBuffer->cbBuffer = buffer.Length;
for (int i = 1; i < NumSecBuffers; i++)
{
Interop.SspiCli.SecBuffer* emptyBuffer = &unmanagedBuffer[i];
emptyBuffer->BufferType = SecurityBufferType.SECBUFFER_EMPTY;
emptyBuffer->pvBuffer = IntPtr.Zero;
emptyBuffer->cbBuffer = 0;
}
Interop.SspiCli.SecBufferDesc sdcInOut = new Interop.SspiCli.SecBufferDesc(NumSecBuffers)
{
pBuffers = unmanagedBuffer
};
Interop.SECURITY_STATUS errorCode = (Interop.SECURITY_STATUS)GlobalSSPI.SSPISecureChannel.DecryptMessage(securityContext!, ref sdcInOut, 0);
// Decrypt may repopulate the sec buffers, likely with header + data + trailer + empty.
// We need to find the data.
count = 0;
offset = 0;
for (int i = 0; i < NumSecBuffers; i++)
{
// Successfully decoded data and placed it at the following position in the buffer,
if ((errorCode == Interop.SECURITY_STATUS.OK && unmanagedBuffer[i].BufferType == SecurityBufferType.SECBUFFER_DATA)
// or we failed to decode the data, here is the encoded data.
|| (errorCode != Interop.SECURITY_STATUS.OK && unmanagedBuffer[i].BufferType == SecurityBufferType.SECBUFFER_EXTRA))
{
offset = (int)((byte*)unmanagedBuffer[i].pvBuffer - bufferPtr);
count = unmanagedBuffer[i].cbBuffer;
// output is ignored on Windows. We always decrypt in place and we set outputOffset to indicate where the data start.
Debug.Assert(offset >= 0 && count >= 0, $"Expected offset and count greater than 0, got {offset} and {count}");
Debug.Assert(checked(offset + count) <= buffer.Length, $"Expected offset+count <= buffer.Length, got {offset}+{count}>={buffer.Length}");
break;
}
}
return SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(errorCode);
}
}
public static SecurityStatusPal ApplyAlertToken(ref SafeFreeCredentials? credentialsHandle, SafeDeleteContext? securityContext, TlsAlertType alertType, TlsAlertMessage alertMessage)
{
var alertToken = new Interop.SChannel.SCHANNEL_ALERT_TOKEN
{
dwTokenType = Interop.SChannel.SCHANNEL_ALERT,
dwAlertType = (uint)alertType,
dwAlertNumber = (uint)alertMessage
};
byte[] buffer = MemoryMarshal.AsBytes(MemoryMarshal.CreateReadOnlySpan(ref alertToken, 1)).ToArray();
var securityBuffer = new SecurityBuffer(buffer, SecurityBufferType.SECBUFFER_TOKEN);
var errorCode = (Interop.SECURITY_STATUS)SSPIWrapper.ApplyControlToken(
GlobalSSPI.SSPISecureChannel,
ref securityContext,
in securityBuffer);
return SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(errorCode, attachException: true);
}
private static readonly byte[] s_schannelShutdownBytes = BitConverter.GetBytes(Interop.SChannel.SCHANNEL_SHUTDOWN);
public static SecurityStatusPal ApplyShutdownToken(ref SafeFreeCredentials? credentialsHandle, SafeDeleteContext? securityContext)
{
var securityBuffer = new SecurityBuffer(s_schannelShutdownBytes, SecurityBufferType.SECBUFFER_TOKEN);
var errorCode = (Interop.SECURITY_STATUS)SSPIWrapper.ApplyControlToken(
GlobalSSPI.SSPISecureChannel,
ref securityContext,
in securityBuffer);
return SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(errorCode, attachException: true);
}
public static SafeFreeContextBufferChannelBinding? QueryContextChannelBinding(SafeDeleteContext securityContext, ChannelBindingKind attribute)
{
return SSPIWrapper.QueryContextChannelBinding(GlobalSSPI.SSPISecureChannel, securityContext, (Interop.SspiCli.ContextAttribute)attribute);
}
public static void QueryContextStreamSizes(SafeDeleteContext securityContext, out StreamSizes streamSizes)
{
SecPkgContext_StreamSizes interopStreamSizes = default;
bool success = SSPIWrapper.QueryBlittableContextAttributes(GlobalSSPI.SSPISecureChannel, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_STREAM_SIZES, ref interopStreamSizes);
Debug.Assert(success);
streamSizes = new StreamSizes(interopStreamSizes);
}
public static void QueryContextConnectionInfo(SafeDeleteContext securityContext, out SslConnectionInfo connectionInfo)
{
SecPkgContext_ConnectionInfo interopConnectionInfo = default;
bool success = SSPIWrapper.QueryBlittableContextAttributes(
GlobalSSPI.SSPISecureChannel,
securityContext,
Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CONNECTION_INFO,
ref interopConnectionInfo);
Debug.Assert(success);
TlsCipherSuite cipherSuite = default;
SecPkgContext_CipherInfo cipherInfo = default;
success = SSPIWrapper.QueryBlittableContextAttributes(GlobalSSPI.SSPISecureChannel, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CIPHER_INFO, ref cipherInfo);
if (success)
{
cipherSuite = (TlsCipherSuite)cipherInfo.dwCipherSuite;
}
connectionInfo = new SslConnectionInfo(interopConnectionInfo, cipherSuite);
}
private static int GetProtocolFlagsFromSslProtocols(SslProtocols protocols, bool isServer)
{
int protocolFlags = (int)protocols;
if (isServer)
{
protocolFlags &= Interop.SChannel.ServerProtocolMask;
}
else
{
protocolFlags &= Interop.SChannel.ClientProtocolMask;
}
return protocolFlags;
}
private static Interop.SspiCli.SCHANNEL_CRED CreateSecureCredential(
Interop.SspiCli.SCHANNEL_CRED.Flags flags,
int protocols, EncryptionPolicy policy)
{
var credential = new Interop.SspiCli.SCHANNEL_CRED()
{
hRootStore = IntPtr.Zero,
aphMappers = IntPtr.Zero,
palgSupportedAlgs = IntPtr.Zero,
paCred = null,
cCreds = 0,
cMappers = 0,
cSupportedAlgs = 0,
dwSessionLifespan = 0,
reserved = 0,
dwVersion = Interop.SspiCli.SCHANNEL_CRED.CurrentVersion
};
if (policy == EncryptionPolicy.RequireEncryption)
{
// Prohibit null encryption cipher.
credential.dwMinimumCipherStrength = 0;
credential.dwMaximumCipherStrength = 0;
}
#pragma warning disable SYSLIB0040 // NoEncryption and AllowNoEncryption are obsolete
else if (policy == EncryptionPolicy.AllowNoEncryption)
{
// Allow null encryption cipher in addition to other ciphers.
credential.dwMinimumCipherStrength = -1;
credential.dwMaximumCipherStrength = 0;
}
else if (policy == EncryptionPolicy.NoEncryption)
{
// Suppress all encryption and require null encryption cipher only
credential.dwMinimumCipherStrength = -1;
credential.dwMaximumCipherStrength = -1;
}
#pragma warning restore SYSLIB0040
else
{
throw new ArgumentException(SR.Format(SR.net_invalid_enum, "EncryptionPolicy"), nameof(policy));
}
credential.dwFlags = flags;
credential.grbitEnabledProtocols = protocols;
return credential;
}
//
// Security: we temporarily reset thread token to open the handle under process account.
//
private static unsafe SafeFreeCredentials AcquireCredentialsHandle(Interop.SspiCli.CredentialUse credUsage, Interop.SspiCli.SCHANNEL_CRED* secureCredential)
{
// First try without impersonation, if it fails, then try the process account.
// I.E. We don't know which account the certificate context was created under.
try
{
//
// For app-compat we want to ensure the credential are accessed under >>process<< account.
//
return WindowsIdentity.RunImpersonated<SafeFreeCredentials>(SafeAccessTokenHandle.InvalidHandle, () =>
{
return SSPIWrapper.AcquireCredentialsHandle(GlobalSSPI.SSPISecureChannel, SecurityPackage, credUsage, secureCredential);
});
}
catch
{
return SSPIWrapper.AcquireCredentialsHandle(GlobalSSPI.SSPISecureChannel, SecurityPackage, credUsage, secureCredential);
}
}
private static unsafe SafeFreeCredentials AcquireCredentialsHandle(Interop.SspiCli.CredentialUse credUsage, Interop.SspiCli.SCH_CREDENTIALS* secureCredential)
{
// First try without impersonation, if it fails, then try the process account.
// I.E. We don't know which account the certificate context was created under.
try
{
//
// For app-compat we want to ensure the credential are accessed under >>process<< account.
//
return WindowsIdentity.RunImpersonated<SafeFreeCredentials>(SafeAccessTokenHandle.InvalidHandle, () =>
{
return SSPIWrapper.AcquireCredentialsHandle(GlobalSSPI.SSPISecureChannel, SecurityPackage, credUsage, secureCredential);
});
}
catch
{
return SSPIWrapper.AcquireCredentialsHandle(GlobalSSPI.SSPISecureChannel, SecurityPackage, credUsage, secureCredential);
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Authentication;
using System.Security.Authentication.ExtendedProtection;
using System.Security.Cryptography.X509Certificates;
using System.Security.Principal;
using System.Text;
using Microsoft.Win32.SafeHandles;
namespace System.Net.Security
{
internal static class SslStreamPal
{
private static readonly bool UseNewCryptoApi =
// On newer Windows version we use new API to get TLS1.3.
// API is supported since Windows 10 1809 (17763) but there is no reason to use at the moment.
Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 18836;
private const string SecurityPackage = "Microsoft Unified Security Protocol Provider";
private const Interop.SspiCli.ContextFlags RequiredFlags =
Interop.SspiCli.ContextFlags.ReplayDetect |
Interop.SspiCli.ContextFlags.SequenceDetect |
Interop.SspiCli.ContextFlags.Confidentiality |
Interop.SspiCli.ContextFlags.AllocateMemory;
private const Interop.SspiCli.ContextFlags ServerRequiredFlags =
RequiredFlags | Interop.SspiCli.ContextFlags.AcceptStream | Interop.SspiCli.ContextFlags.AcceptExtendedError;
public static Exception GetException(SecurityStatusPal status)
{
int win32Code = (int)SecurityStatusAdapterPal.GetInteropFromSecurityStatusPal(status);
return new Win32Exception(win32Code);
}
internal const bool StartMutualAuthAsAnonymous = true;
internal const bool CanEncryptEmptyMessage = true;
public static void VerifyPackageInfo()
{
SSPIWrapper.GetVerifyPackageInfo(GlobalSSPI.SSPISecureChannel, SecurityPackage, true);
}
public static byte[] ConvertAlpnProtocolListToByteArray(List<SslApplicationProtocol> protocols)
{
return Interop.Sec_Application_Protocols.ToByteArray(protocols);
}
public static SecurityStatusPal AcceptSecurityContext(
SecureChannel secureChannel,
ref SafeFreeCredentials? credentialsHandle,
ref SafeDeleteSslContext? context,
ReadOnlySpan<byte> inputBuffer,
ref byte[]? outputBuffer,
SslAuthenticationOptions sslAuthenticationOptions)
{
Interop.SspiCli.ContextFlags unusedAttributes = default;
InputSecurityBuffers inputBuffers = default;
inputBuffers.SetNextBuffer(new InputSecurityBuffer(inputBuffer, SecurityBufferType.SECBUFFER_TOKEN));
inputBuffers.SetNextBuffer(new InputSecurityBuffer(default, SecurityBufferType.SECBUFFER_EMPTY));
if (sslAuthenticationOptions.ApplicationProtocols != null && sslAuthenticationOptions.ApplicationProtocols.Count != 0)
{
byte[] alpnBytes = ConvertAlpnProtocolListToByteArray(sslAuthenticationOptions.ApplicationProtocols);
inputBuffers.SetNextBuffer(new InputSecurityBuffer(new ReadOnlySpan<byte>(alpnBytes), SecurityBufferType.SECBUFFER_APPLICATION_PROTOCOLS));
}
var resultBuffer = new SecurityBuffer(outputBuffer, SecurityBufferType.SECBUFFER_TOKEN);
int errorCode = SSPIWrapper.AcceptSecurityContext(
GlobalSSPI.SSPISecureChannel,
credentialsHandle,
ref context,
ServerRequiredFlags | (sslAuthenticationOptions.RemoteCertRequired ? Interop.SspiCli.ContextFlags.MutualAuth : Interop.SspiCli.ContextFlags.Zero),
Interop.SspiCli.Endianness.SECURITY_NATIVE_DREP,
inputBuffers,
ref resultBuffer,
ref unusedAttributes);
outputBuffer = resultBuffer.token;
return SecurityStatusAdapterPal.GetSecurityStatusPalFromNativeInt(errorCode);
}
public static SecurityStatusPal InitializeSecurityContext(
SecureChannel secureChannel,
ref SafeFreeCredentials? credentialsHandle,
ref SafeDeleteSslContext? context,
string? targetName,
ReadOnlySpan<byte> inputBuffer,
ref byte[]? outputBuffer,
SslAuthenticationOptions sslAuthenticationOptions)
{
Interop.SspiCli.ContextFlags unusedAttributes = default;
InputSecurityBuffers inputBuffers = default;
inputBuffers.SetNextBuffer(new InputSecurityBuffer(inputBuffer, SecurityBufferType.SECBUFFER_TOKEN));
inputBuffers.SetNextBuffer(new InputSecurityBuffer(default, SecurityBufferType.SECBUFFER_EMPTY));
if (sslAuthenticationOptions.ApplicationProtocols != null && sslAuthenticationOptions.ApplicationProtocols.Count != 0)
{
byte[] alpnBytes = ConvertAlpnProtocolListToByteArray(sslAuthenticationOptions.ApplicationProtocols);
inputBuffers.SetNextBuffer(new InputSecurityBuffer(new ReadOnlySpan<byte>(alpnBytes), SecurityBufferType.SECBUFFER_APPLICATION_PROTOCOLS));
}
var resultBuffer = new SecurityBuffer(outputBuffer, SecurityBufferType.SECBUFFER_TOKEN);
int errorCode = SSPIWrapper.InitializeSecurityContext(
GlobalSSPI.SSPISecureChannel,
ref credentialsHandle,
ref context,
targetName,
RequiredFlags | Interop.SspiCli.ContextFlags.InitManualCredValidation,
Interop.SspiCli.Endianness.SECURITY_NATIVE_DREP,
inputBuffers,
ref resultBuffer,
ref unusedAttributes);
outputBuffer = resultBuffer.token;
return SecurityStatusAdapterPal.GetSecurityStatusPalFromNativeInt(errorCode);
}
public static SecurityStatusPal Renegotiate(
SecureChannel secureChannel,
ref SafeFreeCredentials? credentialsHandle,
ref SafeDeleteSslContext? context,
SslAuthenticationOptions sslAuthenticationOptions,
out byte[]? outputBuffer )
{
byte[]? output = Array.Empty<byte>();
SecurityStatusPal status = AcceptSecurityContext(secureChannel, ref credentialsHandle, ref context, Span<byte>.Empty, ref output, sslAuthenticationOptions);
outputBuffer = output;
return status;
}
public static SafeFreeCredentials AcquireCredentialsHandle(SslStreamCertificateContext? certificateContext, SslProtocols protocols, EncryptionPolicy policy, bool isServer)
{
try
{
// New crypto API supports TLS1.3 but it does not allow to force NULL encryption.
#pragma warning disable SYSLIB0040 // NoEncryption and AllowNoEncryption are obsolete
SafeFreeCredentials cred = !UseNewCryptoApi || policy == EncryptionPolicy.NoEncryption ?
AcquireCredentialsHandleSchannelCred(certificateContext, protocols, policy, isServer) :
AcquireCredentialsHandleSchCredentials(certificateContext, protocols, policy, isServer);
#pragma warning restore SYSLIB0040
if (certificateContext != null && certificateContext.Trust != null && certificateContext.Trust._sendTrustInHandshake)
{
AttachCertificateStore(cred, certificateContext.Trust._store!);
}
return cred;
}
catch (Win32Exception e)
{
throw new AuthenticationException(SR.net_auth_SSPI, e);
}
}
private static unsafe void AttachCertificateStore(SafeFreeCredentials cred, X509Store store)
{
Interop.SspiCli.SecPkgCred_ClientCertPolicy clientCertPolicy = default;
fixed (char* ptr = store.Name)
{
clientCertPolicy.pwszSslCtlStoreName = ptr;
Interop.SECURITY_STATUS errorCode = Interop.SspiCli.SetCredentialsAttributesW(
cred._handle,
(long)Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CLIENT_CERT_POLICY,
clientCertPolicy,
sizeof(Interop.SspiCli.SecPkgCred_ClientCertPolicy));
if (errorCode != Interop.SECURITY_STATUS.OK)
{
throw new Win32Exception((int)errorCode);
}
}
return;
}
// This is legacy crypto API used on .NET Framework and older Windows versions.
// It only supports TLS up to 1.2
public static unsafe SafeFreeCredentials AcquireCredentialsHandleSchannelCred(SslStreamCertificateContext? certificateContext, SslProtocols protocols, EncryptionPolicy policy, bool isServer)
{
X509Certificate2? certificate = certificateContext?.Certificate;
int protocolFlags = GetProtocolFlagsFromSslProtocols(protocols, isServer);
Interop.SspiCli.SCHANNEL_CRED.Flags flags;
Interop.SspiCli.CredentialUse direction;
if (!isServer)
{
direction = Interop.SspiCli.CredentialUse.SECPKG_CRED_OUTBOUND;
flags =
Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_CRED_MANUAL_CRED_VALIDATION |
Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_CRED_NO_DEFAULT_CREDS |
Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_SEND_AUX_RECORD;
#pragma warning disable SYSLIB0040 // NoEncryption and AllowNoEncryption are obsolete
// Always opt-in SCH_USE_STRONG_CRYPTO for TLS.
if (((protocolFlags == 0) ||
(protocolFlags & ~(Interop.SChannel.SP_PROT_SSL2 | Interop.SChannel.SP_PROT_SSL3)) != 0)
&& (policy != EncryptionPolicy.AllowNoEncryption) && (policy != EncryptionPolicy.NoEncryption))
{
flags |= Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_USE_STRONG_CRYPTO;
}
#pragma warning restore SYSLIB0040
}
else
{
direction = Interop.SspiCli.CredentialUse.SECPKG_CRED_INBOUND;
flags = Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_SEND_AUX_RECORD;
if (certificateContext?.Trust?._sendTrustInHandshake == true)
{
flags |= Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_CRED_NO_SYSTEM_MAPPER;
}
}
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info($"flags=({flags}), ProtocolFlags=({protocolFlags}), EncryptionPolicy={policy}");
Interop.SspiCli.SCHANNEL_CRED secureCredential = CreateSecureCredential(
flags,
protocolFlags,
policy);
if (certificate != null)
{
secureCredential.cCreds = 1;
Interop.Crypt32.CERT_CONTEXT* certificateHandle = (Interop.Crypt32.CERT_CONTEXT*)certificate.Handle;
secureCredential.paCred = &certificateHandle;
}
return AcquireCredentialsHandle(direction, &secureCredential);
}
// This function uses new crypto API to support TLS 1.3 and beyond.
public static unsafe SafeFreeCredentials AcquireCredentialsHandleSchCredentials(SslStreamCertificateContext? certificateContext, SslProtocols protocols, EncryptionPolicy policy, bool isServer)
{
X509Certificate2? certificate = certificateContext?.Certificate;
int protocolFlags = GetProtocolFlagsFromSslProtocols(protocols, isServer);
Interop.SspiCli.SCH_CREDENTIALS.Flags flags;
Interop.SspiCli.CredentialUse direction;
if (isServer)
{
direction = Interop.SspiCli.CredentialUse.SECPKG_CRED_INBOUND;
flags = Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_SEND_AUX_RECORD;
if (certificateContext?.Trust?._sendTrustInHandshake == true)
{
flags |= Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_CRED_NO_SYSTEM_MAPPER;
}
}
else
{
direction = Interop.SspiCli.CredentialUse.SECPKG_CRED_OUTBOUND;
flags =
Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_CRED_MANUAL_CRED_VALIDATION |
Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_CRED_NO_DEFAULT_CREDS |
Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_SEND_AUX_RECORD;
}
if (policy == EncryptionPolicy.RequireEncryption)
{
// Always opt-in SCH_USE_STRONG_CRYPTO for TLS.
if (!isServer && ((protocolFlags & Interop.SChannel.SP_PROT_SSL3) == 0))
{
flags |= Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_USE_STRONG_CRYPTO;
}
}
#pragma warning disable SYSLIB0040 // NoEncryption and AllowNoEncryption are obsolete
else if (policy == EncryptionPolicy.AllowNoEncryption)
{
// Allow null encryption cipher in addition to other ciphers.
flags |= Interop.SspiCli.SCH_CREDENTIALS.Flags.SCH_ALLOW_NULL_ENCRYPTION;
}
#pragma warning restore SYSLIB0040
else
{
throw new ArgumentException(SR.Format(SR.net_invalid_enum, "EncryptionPolicy"), nameof(policy));
}
Interop.SspiCli.SCH_CREDENTIALS credential = default;
credential.dwVersion = Interop.SspiCli.SCH_CREDENTIALS.CurrentVersion;
credential.dwFlags = flags;
if (certificate != null)
{
credential.cCreds = 1;
Interop.Crypt32.CERT_CONTEXT* certificateHandle = (Interop.Crypt32.CERT_CONTEXT*)certificate.Handle;
credential.paCred = &certificateHandle;
}
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info($"flags=({flags}), ProtocolFlags=({protocolFlags}), EncryptionPolicy={policy}");
if (protocolFlags != 0)
{
// If we were asked to do specific protocol we need to fill TLS_PARAMETERS.
Interop.SspiCli.TLS_PARAMETERS tlsParameters = default;
tlsParameters.grbitDisabledProtocols = (uint)protocolFlags ^ uint.MaxValue;
credential.cTlsParameters = 1;
credential.pTlsParameters = &tlsParameters;
}
return AcquireCredentialsHandle(direction, &credential);
}
internal static byte[]? GetNegotiatedApplicationProtocol(SafeDeleteContext context)
{
Interop.SecPkgContext_ApplicationProtocol alpnContext = default;
bool success = SSPIWrapper.QueryBlittableContextAttributes(GlobalSSPI.SSPISecureChannel, context, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_APPLICATION_PROTOCOL, ref alpnContext);
// Check if the context returned is alpn data, with successful negotiation.
if (success &&
alpnContext.ProtoNegoExt == Interop.ApplicationProtocolNegotiationExt.ALPN &&
alpnContext.ProtoNegoStatus == Interop.ApplicationProtocolNegotiationStatus.Success)
{
return alpnContext.Protocol;
}
return null;
}
public static unsafe SecurityStatusPal EncryptMessage(SafeDeleteSslContext securityContext, ReadOnlyMemory<byte> input, int headerSize, int trailerSize, ref byte[] output, out int resultSize)
{
// Ensure that there is sufficient space for the message output.
int bufferSizeNeeded = checked(input.Length + headerSize + trailerSize);
if (output == null || output.Length < bufferSizeNeeded)
{
output = new byte[bufferSizeNeeded];
}
// Copy the input into the output buffer to prepare for SCHANNEL's expectations
input.Span.CopyTo(new Span<byte>(output, headerSize, input.Length));
const int NumSecBuffers = 4; // header + data + trailer + empty
Interop.SspiCli.SecBuffer* unmanagedBuffer = stackalloc Interop.SspiCli.SecBuffer[NumSecBuffers];
Interop.SspiCli.SecBufferDesc sdcInOut = new Interop.SspiCli.SecBufferDesc(NumSecBuffers)
{
pBuffers = unmanagedBuffer
};
fixed (byte* outputPtr = output)
{
Interop.SspiCli.SecBuffer* headerSecBuffer = &unmanagedBuffer[0];
headerSecBuffer->BufferType = SecurityBufferType.SECBUFFER_STREAM_HEADER;
headerSecBuffer->pvBuffer = (IntPtr)outputPtr;
headerSecBuffer->cbBuffer = headerSize;
Interop.SspiCli.SecBuffer* dataSecBuffer = &unmanagedBuffer[1];
dataSecBuffer->BufferType = SecurityBufferType.SECBUFFER_DATA;
dataSecBuffer->pvBuffer = (IntPtr)(outputPtr + headerSize);
dataSecBuffer->cbBuffer = input.Length;
Interop.SspiCli.SecBuffer* trailerSecBuffer = &unmanagedBuffer[2];
trailerSecBuffer->BufferType = SecurityBufferType.SECBUFFER_STREAM_TRAILER;
trailerSecBuffer->pvBuffer = (IntPtr)(outputPtr + headerSize + input.Length);
trailerSecBuffer->cbBuffer = trailerSize;
Interop.SspiCli.SecBuffer* emptySecBuffer = &unmanagedBuffer[3];
emptySecBuffer->BufferType = SecurityBufferType.SECBUFFER_EMPTY;
emptySecBuffer->cbBuffer = 0;
emptySecBuffer->pvBuffer = IntPtr.Zero;
int errorCode = GlobalSSPI.SSPISecureChannel.EncryptMessage(securityContext, ref sdcInOut, 0);
if (errorCode != 0)
{
if (NetEventSource.Log.IsEnabled())
NetEventSource.Info(securityContext, $"Encrypt ERROR {errorCode:X}");
resultSize = 0;
return SecurityStatusAdapterPal.GetSecurityStatusPalFromNativeInt(errorCode);
}
Debug.Assert(headerSecBuffer->cbBuffer >= 0 && dataSecBuffer->cbBuffer >= 0 && trailerSecBuffer->cbBuffer >= 0);
Debug.Assert(checked(headerSecBuffer->cbBuffer + dataSecBuffer->cbBuffer + trailerSecBuffer->cbBuffer) <= output.Length);
resultSize = checked(headerSecBuffer->cbBuffer + dataSecBuffer->cbBuffer + trailerSecBuffer->cbBuffer);
return new SecurityStatusPal(SecurityStatusPalErrorCode.OK);
}
}
public static unsafe SecurityStatusPal DecryptMessage(SafeDeleteSslContext? securityContext, Span<byte> buffer, out int offset, out int count)
{
const int NumSecBuffers = 4; // data + empty + empty + empty
fixed (byte* bufferPtr = buffer)
{
Interop.SspiCli.SecBuffer* unmanagedBuffer = stackalloc Interop.SspiCli.SecBuffer[NumSecBuffers];
Interop.SspiCli.SecBuffer* dataBuffer = &unmanagedBuffer[0];
dataBuffer->BufferType = SecurityBufferType.SECBUFFER_DATA;
dataBuffer->pvBuffer = (IntPtr)bufferPtr;
dataBuffer->cbBuffer = buffer.Length;
for (int i = 1; i < NumSecBuffers; i++)
{
Interop.SspiCli.SecBuffer* emptyBuffer = &unmanagedBuffer[i];
emptyBuffer->BufferType = SecurityBufferType.SECBUFFER_EMPTY;
emptyBuffer->pvBuffer = IntPtr.Zero;
emptyBuffer->cbBuffer = 0;
}
Interop.SspiCli.SecBufferDesc sdcInOut = new Interop.SspiCli.SecBufferDesc(NumSecBuffers)
{
pBuffers = unmanagedBuffer
};
Interop.SECURITY_STATUS errorCode = (Interop.SECURITY_STATUS)GlobalSSPI.SSPISecureChannel.DecryptMessage(securityContext!, ref sdcInOut, 0);
// Decrypt may repopulate the sec buffers, likely with header + data + trailer + empty.
// We need to find the data.
count = 0;
offset = 0;
for (int i = 0; i < NumSecBuffers; i++)
{
// Successfully decoded data and placed it at the following position in the buffer,
if ((errorCode == Interop.SECURITY_STATUS.OK && unmanagedBuffer[i].BufferType == SecurityBufferType.SECBUFFER_DATA)
// or we failed to decode the data, here is the encoded data.
|| (errorCode != Interop.SECURITY_STATUS.OK && unmanagedBuffer[i].BufferType == SecurityBufferType.SECBUFFER_EXTRA))
{
offset = (int)((byte*)unmanagedBuffer[i].pvBuffer - bufferPtr);
count = unmanagedBuffer[i].cbBuffer;
// output is ignored on Windows. We always decrypt in place and we set outputOffset to indicate where the data start.
Debug.Assert(offset >= 0 && count >= 0, $"Expected offset and count greater than 0, got {offset} and {count}");
Debug.Assert(checked(offset + count) <= buffer.Length, $"Expected offset+count <= buffer.Length, got {offset}+{count}>={buffer.Length}");
break;
}
}
return SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(errorCode);
}
}
public static SecurityStatusPal ApplyAlertToken(ref SafeFreeCredentials? credentialsHandle, SafeDeleteContext? securityContext, TlsAlertType alertType, TlsAlertMessage alertMessage)
{
var alertToken = new Interop.SChannel.SCHANNEL_ALERT_TOKEN
{
dwTokenType = Interop.SChannel.SCHANNEL_ALERT,
dwAlertType = (uint)alertType,
dwAlertNumber = (uint)alertMessage
};
byte[] buffer = MemoryMarshal.AsBytes(MemoryMarshal.CreateReadOnlySpan(ref alertToken, 1)).ToArray();
var securityBuffer = new SecurityBuffer(buffer, SecurityBufferType.SECBUFFER_TOKEN);
var errorCode = (Interop.SECURITY_STATUS)SSPIWrapper.ApplyControlToken(
GlobalSSPI.SSPISecureChannel,
ref securityContext,
in securityBuffer);
return SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(errorCode, attachException: true);
}
private static readonly byte[] s_schannelShutdownBytes = BitConverter.GetBytes(Interop.SChannel.SCHANNEL_SHUTDOWN);
public static SecurityStatusPal ApplyShutdownToken(ref SafeFreeCredentials? credentialsHandle, SafeDeleteContext? securityContext)
{
var securityBuffer = new SecurityBuffer(s_schannelShutdownBytes, SecurityBufferType.SECBUFFER_TOKEN);
var errorCode = (Interop.SECURITY_STATUS)SSPIWrapper.ApplyControlToken(
GlobalSSPI.SSPISecureChannel,
ref securityContext,
in securityBuffer);
return SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(errorCode, attachException: true);
}
public static SafeFreeContextBufferChannelBinding? QueryContextChannelBinding(SafeDeleteContext securityContext, ChannelBindingKind attribute)
{
return SSPIWrapper.QueryContextChannelBinding(GlobalSSPI.SSPISecureChannel, securityContext, (Interop.SspiCli.ContextAttribute)attribute);
}
public static void QueryContextStreamSizes(SafeDeleteContext securityContext, out StreamSizes streamSizes)
{
SecPkgContext_StreamSizes interopStreamSizes = default;
bool success = SSPIWrapper.QueryBlittableContextAttributes(GlobalSSPI.SSPISecureChannel, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_STREAM_SIZES, ref interopStreamSizes);
Debug.Assert(success);
streamSizes = new StreamSizes(interopStreamSizes);
}
public static void QueryContextConnectionInfo(SafeDeleteContext securityContext, out SslConnectionInfo connectionInfo)
{
SecPkgContext_ConnectionInfo interopConnectionInfo = default;
bool success = SSPIWrapper.QueryBlittableContextAttributes(
GlobalSSPI.SSPISecureChannel,
securityContext,
Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CONNECTION_INFO,
ref interopConnectionInfo);
Debug.Assert(success);
TlsCipherSuite cipherSuite = default;
SecPkgContext_CipherInfo cipherInfo = default;
success = SSPIWrapper.QueryBlittableContextAttributes(GlobalSSPI.SSPISecureChannel, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CIPHER_INFO, ref cipherInfo);
if (success)
{
cipherSuite = (TlsCipherSuite)cipherInfo.dwCipherSuite;
}
connectionInfo = new SslConnectionInfo(interopConnectionInfo, cipherSuite);
}
private static int GetProtocolFlagsFromSslProtocols(SslProtocols protocols, bool isServer)
{
int protocolFlags = (int)protocols;
if (isServer)
{
protocolFlags &= Interop.SChannel.ServerProtocolMask;
}
else
{
protocolFlags &= Interop.SChannel.ClientProtocolMask;
}
return protocolFlags;
}
private static Interop.SspiCli.SCHANNEL_CRED CreateSecureCredential(
Interop.SspiCli.SCHANNEL_CRED.Flags flags,
int protocols, EncryptionPolicy policy)
{
var credential = new Interop.SspiCli.SCHANNEL_CRED()
{
hRootStore = IntPtr.Zero,
aphMappers = IntPtr.Zero,
palgSupportedAlgs = IntPtr.Zero,
paCred = null,
cCreds = 0,
cMappers = 0,
cSupportedAlgs = 0,
dwSessionLifespan = 0,
reserved = 0,
dwVersion = Interop.SspiCli.SCHANNEL_CRED.CurrentVersion
};
if (policy == EncryptionPolicy.RequireEncryption)
{
// Prohibit null encryption cipher.
credential.dwMinimumCipherStrength = 0;
credential.dwMaximumCipherStrength = 0;
}
#pragma warning disable SYSLIB0040 // NoEncryption and AllowNoEncryption are obsolete
else if (policy == EncryptionPolicy.AllowNoEncryption)
{
// Allow null encryption cipher in addition to other ciphers.
credential.dwMinimumCipherStrength = -1;
credential.dwMaximumCipherStrength = 0;
}
else if (policy == EncryptionPolicy.NoEncryption)
{
// Suppress all encryption and require null encryption cipher only
credential.dwMinimumCipherStrength = -1;
credential.dwMaximumCipherStrength = -1;
}
#pragma warning restore SYSLIB0040
else
{
throw new ArgumentException(SR.Format(SR.net_invalid_enum, "EncryptionPolicy"), nameof(policy));
}
credential.dwFlags = flags;
credential.grbitEnabledProtocols = protocols;
return credential;
}
//
// Security: we temporarily reset thread token to open the handle under process account.
//
private static unsafe SafeFreeCredentials AcquireCredentialsHandle(Interop.SspiCli.CredentialUse credUsage, Interop.SspiCli.SCHANNEL_CRED* secureCredential)
{
// First try without impersonation, if it fails, then try the process account.
// I.E. We don't know which account the certificate context was created under.
try
{
//
// For app-compat we want to ensure the credential are accessed under >>process<< account.
//
return WindowsIdentity.RunImpersonated<SafeFreeCredentials>(SafeAccessTokenHandle.InvalidHandle, () =>
{
return SSPIWrapper.AcquireCredentialsHandle(GlobalSSPI.SSPISecureChannel, SecurityPackage, credUsage, secureCredential);
});
}
catch
{
return SSPIWrapper.AcquireCredentialsHandle(GlobalSSPI.SSPISecureChannel, SecurityPackage, credUsage, secureCredential);
}
}
private static unsafe SafeFreeCredentials AcquireCredentialsHandle(Interop.SspiCli.CredentialUse credUsage, Interop.SspiCli.SCH_CREDENTIALS* secureCredential)
{
// First try without impersonation, if it fails, then try the process account.
// I.E. We don't know which account the certificate context was created under.
try
{
//
// For app-compat we want to ensure the credential are accessed under >>process<< account.
//
return WindowsIdentity.RunImpersonated<SafeFreeCredentials>(SafeAccessTokenHandle.InvalidHandle, () =>
{
return SSPIWrapper.AcquireCredentialsHandle(GlobalSSPI.SSPISecureChannel, SecurityPackage, credUsage, secureCredential);
});
}
catch
{
return SSPIWrapper.AcquireCredentialsHandle(GlobalSSPI.SSPISecureChannel, SecurityPackage, credUsage, secureCredential);
}
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/SIMD/AbsGeneric.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Numerics;
namespace VectorMathTests
{
class Program
{
const float EPS = Single.Epsilon * 5;
static short[] GenerateArray(int size, short value)
{
short[] arr = new short[size];
for (int i = 0; i < size; ++i)
{
arr[i] = value;
}
return arr;
}
static int Main(string[] args)
{
short[] arr = GenerateArray(60, 5);
var a = new System.Numerics.Vector<short>(arr);
a = System.Numerics.Vector.Abs(a);
if (a[0] != 5)
{
return 0;
}
var b = System.Numerics.Vector<int>.One;
b = System.Numerics.Vector.Abs(b);
if (b[3] != 1)
{
return 0;
}
var c = new System.Numerics.Vector<long>(-11);
c = System.Numerics.Vector.Abs(c);
if (c[1] != 11)
{
return 0;
}
var d = new System.Numerics.Vector<double>(-100.0);
d = System.Numerics.Vector.Abs(d);
if (d[0] != 100)
{
return 0;
}
var e = new System.Numerics.Vector<float>(-22);
e = System.Numerics.Vector.Abs(e);
if (e[3] != 22)
{
return 0;
}
var f = new System.Numerics.Vector<ushort>(21);
f = System.Numerics.Vector.Abs(f);
if (f[7] != 21)
{
return 0;
}
var g = new System.Numerics.Vector<ulong>(21);
g = System.Numerics.Vector.Abs(g);
if (g[1] != 21)
{
return 0;
}
return 100;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Numerics;
namespace VectorMathTests
{
class Program
{
const float EPS = Single.Epsilon * 5;
static short[] GenerateArray(int size, short value)
{
short[] arr = new short[size];
for (int i = 0; i < size; ++i)
{
arr[i] = value;
}
return arr;
}
static int Main(string[] args)
{
short[] arr = GenerateArray(60, 5);
var a = new System.Numerics.Vector<short>(arr);
a = System.Numerics.Vector.Abs(a);
if (a[0] != 5)
{
return 0;
}
var b = System.Numerics.Vector<int>.One;
b = System.Numerics.Vector.Abs(b);
if (b[3] != 1)
{
return 0;
}
var c = new System.Numerics.Vector<long>(-11);
c = System.Numerics.Vector.Abs(c);
if (c[1] != 11)
{
return 0;
}
var d = new System.Numerics.Vector<double>(-100.0);
d = System.Numerics.Vector.Abs(d);
if (d[0] != 100)
{
return 0;
}
var e = new System.Numerics.Vector<float>(-22);
e = System.Numerics.Vector.Abs(e);
if (e[3] != 22)
{
return 0;
}
var f = new System.Numerics.Vector<ushort>(21);
f = System.Numerics.Vector.Abs(f);
if (f[7] != 21)
{
return 0;
}
var g = new System.Numerics.Vector<ulong>(21);
g = System.Numerics.Vector.Abs(g);
if (g[1] != 21)
{
return 0;
}
return 100;
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/Generics/Fields/static_passing_class01.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
public struct ValX0 { }
public struct ValY0 { }
public struct ValX1<T> { }
public struct ValY1<T> { }
public struct ValX2<T, U> { }
public struct ValY2<T, U> { }
public struct ValX3<T, U, V> { }
public struct ValY3<T, U, V> { }
public class RefX0 { }
public class RefY0 { }
public class RefX1<T> { }
public class RefY1<T> { }
public class RefX2<T, U> { }
public class RefY2<T, U> { }
public class RefX3<T, U, V> { }
public class RefY3<T, U, V> { }
public class Gen<T>
{
public static T Fld1;
public static T Fld2;
public T PassAsIn(T t)
{
return t;
}
public T PassAsRef(ref T t)
{
T temp = t;
t = Fld2;
return temp;
}
public void PassAsOut(out T t)
{
t = Fld2;
}
public void PassAsParameter(T t1, T t2)
{
Fld1 = t1;
Fld2 = t2;
T temp = t1;
Test_static_passing_class01.Eval(Fld1.Equals(PassAsIn(temp)));
Test_static_passing_class01.Eval(Fld1.Equals(PassAsRef(ref temp)));
Test_static_passing_class01.Eval(Fld2.Equals(temp));
temp = t1;
PassAsOut(out temp);
Test_static_passing_class01.Eval(Fld2.Equals(temp));
}
}
public class Test_static_passing_class01
{
public static int counter = 0;
public static bool result = true;
public static void Eval(bool exp)
{
counter++;
if (!exp)
{
result = exp;
Console.WriteLine("Test Failed at location: " + counter);
}
}
public static int Main()
{
int _int1 = 1;
int _int2 = -1;
new Gen<int>().PassAsParameter(_int1, _int2);
double _double1 = 1;
double _double2 = -1;
new Gen<double>().PassAsParameter(_double1, _double2);
string _string1 = "string1";
string _string2 = "string2";
new Gen<string>().PassAsParameter(_string1, _string2);
object _object1 = (object)_string1;
object _object2 = (object)_string2;
new Gen<object>().PassAsParameter(_object1, _object2);
Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
new Gen<Guid>().PassAsParameter(_Guid1, _Guid2);
if (result)
{
Console.WriteLine("Test Passed");
return 100;
}
else
{
Console.WriteLine("Test Failed");
return 1;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
public struct ValX0 { }
public struct ValY0 { }
public struct ValX1<T> { }
public struct ValY1<T> { }
public struct ValX2<T, U> { }
public struct ValY2<T, U> { }
public struct ValX3<T, U, V> { }
public struct ValY3<T, U, V> { }
public class RefX0 { }
public class RefY0 { }
public class RefX1<T> { }
public class RefY1<T> { }
public class RefX2<T, U> { }
public class RefY2<T, U> { }
public class RefX3<T, U, V> { }
public class RefY3<T, U, V> { }
public class Gen<T>
{
public static T Fld1;
public static T Fld2;
public T PassAsIn(T t)
{
return t;
}
public T PassAsRef(ref T t)
{
T temp = t;
t = Fld2;
return temp;
}
public void PassAsOut(out T t)
{
t = Fld2;
}
public void PassAsParameter(T t1, T t2)
{
Fld1 = t1;
Fld2 = t2;
T temp = t1;
Test_static_passing_class01.Eval(Fld1.Equals(PassAsIn(temp)));
Test_static_passing_class01.Eval(Fld1.Equals(PassAsRef(ref temp)));
Test_static_passing_class01.Eval(Fld2.Equals(temp));
temp = t1;
PassAsOut(out temp);
Test_static_passing_class01.Eval(Fld2.Equals(temp));
}
}
public class Test_static_passing_class01
{
public static int counter = 0;
public static bool result = true;
public static void Eval(bool exp)
{
counter++;
if (!exp)
{
result = exp;
Console.WriteLine("Test Failed at location: " + counter);
}
}
public static int Main()
{
int _int1 = 1;
int _int2 = -1;
new Gen<int>().PassAsParameter(_int1, _int2);
double _double1 = 1;
double _double2 = -1;
new Gen<double>().PassAsParameter(_double1, _double2);
string _string1 = "string1";
string _string2 = "string2";
new Gen<string>().PassAsParameter(_string1, _string2);
object _object1 = (object)_string1;
object _object2 = (object)_string2;
new Gen<object>().PassAsParameter(_object1, _object2);
Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
new Gen<Guid>().PassAsParameter(_Guid1, _Guid2);
if (result)
{
Console.WriteLine("Test Passed");
return 100;
}
else
{
Console.WriteLine("Test Failed");
return 1;
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/mono/tools/jitdiff/jitdiff.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
</PropertyGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
</PropertyGroup>
</Project>
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SERVICE_STATUS.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.InteropServices;
internal static partial class Interop
{
internal static partial class Advapi32
{
[StructLayout(LayoutKind.Sequential)]
internal struct SERVICE_STATUS
{
public int serviceType;
public int currentState;
public int controlsAccepted;
public int win32ExitCode;
public int serviceSpecificExitCode;
public int checkPoint;
public int waitHint;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.InteropServices;
internal static partial class Interop
{
internal static partial class Advapi32
{
[StructLayout(LayoutKind.Sequential)]
internal struct SERVICE_STATUS
{
public int serviceType;
public int currentState;
public int controlsAccepted;
public int win32ExitCode;
public int serviceSpecificExitCode;
public int checkPoint;
public int waitHint;
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/SIMD/VectorArray.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
using System.Numerics;
using System.Runtime.Intrinsics.Arm;
using System.Runtime.Intrinsics.X86;
internal partial class VectorTest
{
private const int Pass = 100;
private const int Fail = -1;
private class VectorArrayTest<T> where T : struct, IComparable<T>, IEquatable<T>
{
private static void Move(Vector<T>[] pos, ref Vector<T> delta)
{
for (int i = 0; i < pos.Length; ++i)
pos[i] += delta;
}
static public int VectorArray(T deltaValue)
{
const int Pass = 100;
const int Fail = -1;
Vector<T>[] v = new Vector<T>[3];
for (int i = 0; i < v.Length; ++i)
v[i] = new Vector<T>(GetValueFromInt<T>(i + 1));
Vector<T> delta = new Vector<T>(GetValueFromInt<T>(1));
Move(v, ref delta);
for (int i = 0; i < v.Length; i++)
{
T checkValue = GetValueFromInt<T>(i + 2);
for (int j = 0; j < Vector<T>.Count; j++)
{
if (!(CheckValue<T>(v[i][j], checkValue))) return Fail;
}
}
return Pass;
}
}
private class Vector4Test
{
private static void Move(Vector4[] pos, ref Vector4 delta)
{
for (int i = 0; i < pos.Length; ++i)
pos[i] += delta;
}
static public int VectorArray(float deltaValue)
{
const int Pass = 100;
const int Fail = -1;
Vector4[] v = new Vector4[3];
for (int i = 0; i < 3; ++i)
v[i] = new Vector4(i + 1);
Vector4 delta = new Vector4(1);
Move(v, ref delta);
for (int i = 0; i < v.Length; i++)
{
float checkValue = (float)(i + 2);
if (!(CheckValue<float>(v[i].X, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Y, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Z, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].W, checkValue))) return Fail;
}
return Pass;
}
}
private class Vector3Test
{
private static void Move(Vector3[] pos, ref Vector3 delta)
{
for (int i = 0; i < pos.Length; ++i)
pos[i] += delta;
}
static public int VectorArray(float deltaValue)
{
const int Pass = 100;
const int Fail = -1;
Vector3[] v = new Vector3[3];
for (int i = 0; i < 3; ++i)
v[i] = new Vector3(i + 1);
Vector3 delta = new Vector3(1);
Move(v, ref delta);
for (int i = 0; i < v.Length; i++)
{
float checkValue = (float)(i + 2);
if (!(CheckValue<float>(v[i].X, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Y, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Z, checkValue))) return Fail;
}
return Pass;
}
}
private class Vector2Test
{
private static void Move(Vector2[] pos, ref Vector2 delta)
{
for (int i = 0; i < pos.Length; ++i)
pos[i] += delta;
}
static public int VectorArray(float deltaValue)
{
const int Pass = 100;
const int Fail = -1;
Vector2[] v = new Vector2[3];
for (int i = 0; i < 3; ++i)
v[i] = new Vector2(i + 1);
Vector2 delta = new Vector2(1);
Move(v, ref delta);
for (int i = 0; i < v.Length; i++)
{
float checkValue = (float)(i + 2);
if (!(CheckValue<float>(v[i].X, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Y, checkValue))) return Fail;
}
return Pass;
}
}
private static int Main()
{
int returnVal = Pass;
try
{
if (VectorArrayTest<float>.VectorArray(1f) != Pass) returnVal = Fail;
if (VectorArrayTest<double>.VectorArray(1d) != Pass) returnVal = Fail;
if (VectorArrayTest<int>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<long>.VectorArray(1L) != Pass) returnVal = Fail;
if (Vector4Test.VectorArray(1f) != Pass) returnVal = Fail;
if (Vector3Test.VectorArray(1f) != Pass) returnVal = Fail;
if (Vector2Test.VectorArray(1f) != Pass) returnVal = Fail;
if (VectorArrayTest<ushort>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<byte>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<short>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<sbyte>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<uint>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<ulong>.VectorArray(1ul) != Pass) returnVal = Fail;
if (VectorArrayTest<nint>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<nuint>.VectorArray(1) != Pass) returnVal = Fail;
if (Sse41.IsSupported || AdvSimd.IsSupported)
{
JitLog jitLog = new JitLog();
if (!jitLog.Check("get_Item", "Single")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[Single][System.Single]:.ctor(float)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Double")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[Double][System.Double]:.ctor(double)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Int32")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[Int32][System.Int32]:.ctor(int)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Int64")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[Int64][System.Int64]:.ctor(long)")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector4:.ctor(float)")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector3:.ctor(float)")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector2:.ctor(float)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "UInt16")) returnVal = Fail;
// We are not currently recognizing the Vector<UInt16> constructor.
if (!Vector.IsHardwareAccelerated)
if (!jitLog.Check("System.Numerics.Vector`1[UInt16][System.UInt16]:.ctor(char)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Byte")) returnVal = Fail;
// We are not currently recognizing the Vector<Byte> constructor.
if (!Vector.IsHardwareAccelerated)
if (!jitLog.Check("System.Numerics.Vector`1[Byte][System.Byte]:.ctor(ubyte)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Int16")) returnVal = Fail;
// We are not currently recognizing the Vector<Int16> constructor.
if (!Vector.IsHardwareAccelerated)
if (!jitLog.Check("System.Numerics.Vector`1[Int16][System.Int16]:.ctor(short)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "SByte")) returnVal = Fail;
// We are not currently recognizing the Vector<SByte> constructor.
if (!Vector.IsHardwareAccelerated)
if (!jitLog.Check("System.Numerics.Vector`1[SByte][System.SByte]:.ctor(byte)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "UInt32")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[UInt32][System.UInt32]:.ctor(int)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "UInt64")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[UInt64][System.UInt64]:.ctor(long)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "IntPtr")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[IntPtr][System.UIntPtr]:.ctor(nuint)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "UIntPtr")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[UIntPtr][System.IntPtr]:.ctor(nint)")) returnVal = Fail;
jitLog.Dispose();
}
}
catch (ArgumentException ex)
{
Console.WriteLine("Argument Exception was raised");
Console.WriteLine(ex.StackTrace);
return Fail;
}
return returnVal;
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
using System.Numerics;
using System.Runtime.Intrinsics.Arm;
using System.Runtime.Intrinsics.X86;
internal partial class VectorTest
{
private const int Pass = 100;
private const int Fail = -1;
private class VectorArrayTest<T> where T : struct, IComparable<T>, IEquatable<T>
{
private static void Move(Vector<T>[] pos, ref Vector<T> delta)
{
for (int i = 0; i < pos.Length; ++i)
pos[i] += delta;
}
static public int VectorArray(T deltaValue)
{
const int Pass = 100;
const int Fail = -1;
Vector<T>[] v = new Vector<T>[3];
for (int i = 0; i < v.Length; ++i)
v[i] = new Vector<T>(GetValueFromInt<T>(i + 1));
Vector<T> delta = new Vector<T>(GetValueFromInt<T>(1));
Move(v, ref delta);
for (int i = 0; i < v.Length; i++)
{
T checkValue = GetValueFromInt<T>(i + 2);
for (int j = 0; j < Vector<T>.Count; j++)
{
if (!(CheckValue<T>(v[i][j], checkValue))) return Fail;
}
}
return Pass;
}
}
private class Vector4Test
{
private static void Move(Vector4[] pos, ref Vector4 delta)
{
for (int i = 0; i < pos.Length; ++i)
pos[i] += delta;
}
static public int VectorArray(float deltaValue)
{
const int Pass = 100;
const int Fail = -1;
Vector4[] v = new Vector4[3];
for (int i = 0; i < 3; ++i)
v[i] = new Vector4(i + 1);
Vector4 delta = new Vector4(1);
Move(v, ref delta);
for (int i = 0; i < v.Length; i++)
{
float checkValue = (float)(i + 2);
if (!(CheckValue<float>(v[i].X, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Y, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Z, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].W, checkValue))) return Fail;
}
return Pass;
}
}
private class Vector3Test
{
private static void Move(Vector3[] pos, ref Vector3 delta)
{
for (int i = 0; i < pos.Length; ++i)
pos[i] += delta;
}
static public int VectorArray(float deltaValue)
{
const int Pass = 100;
const int Fail = -1;
Vector3[] v = new Vector3[3];
for (int i = 0; i < 3; ++i)
v[i] = new Vector3(i + 1);
Vector3 delta = new Vector3(1);
Move(v, ref delta);
for (int i = 0; i < v.Length; i++)
{
float checkValue = (float)(i + 2);
if (!(CheckValue<float>(v[i].X, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Y, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Z, checkValue))) return Fail;
}
return Pass;
}
}
private class Vector2Test
{
private static void Move(Vector2[] pos, ref Vector2 delta)
{
for (int i = 0; i < pos.Length; ++i)
pos[i] += delta;
}
static public int VectorArray(float deltaValue)
{
const int Pass = 100;
const int Fail = -1;
Vector2[] v = new Vector2[3];
for (int i = 0; i < 3; ++i)
v[i] = new Vector2(i + 1);
Vector2 delta = new Vector2(1);
Move(v, ref delta);
for (int i = 0; i < v.Length; i++)
{
float checkValue = (float)(i + 2);
if (!(CheckValue<float>(v[i].X, checkValue))) return Fail;
if (!(CheckValue<float>(v[i].Y, checkValue))) return Fail;
}
return Pass;
}
}
private static int Main()
{
int returnVal = Pass;
try
{
if (VectorArrayTest<float>.VectorArray(1f) != Pass) returnVal = Fail;
if (VectorArrayTest<double>.VectorArray(1d) != Pass) returnVal = Fail;
if (VectorArrayTest<int>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<long>.VectorArray(1L) != Pass) returnVal = Fail;
if (Vector4Test.VectorArray(1f) != Pass) returnVal = Fail;
if (Vector3Test.VectorArray(1f) != Pass) returnVal = Fail;
if (Vector2Test.VectorArray(1f) != Pass) returnVal = Fail;
if (VectorArrayTest<ushort>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<byte>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<short>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<sbyte>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<uint>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<ulong>.VectorArray(1ul) != Pass) returnVal = Fail;
if (VectorArrayTest<nint>.VectorArray(1) != Pass) returnVal = Fail;
if (VectorArrayTest<nuint>.VectorArray(1) != Pass) returnVal = Fail;
if (Sse41.IsSupported || AdvSimd.IsSupported)
{
JitLog jitLog = new JitLog();
if (!jitLog.Check("get_Item", "Single")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[Single][System.Single]:.ctor(float)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Double")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[Double][System.Double]:.ctor(double)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Int32")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[Int32][System.Int32]:.ctor(int)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Int64")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[Int64][System.Int64]:.ctor(long)")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector4:.ctor(float)")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector3:.ctor(float)")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector2:.ctor(float)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "UInt16")) returnVal = Fail;
// We are not currently recognizing the Vector<UInt16> constructor.
if (!Vector.IsHardwareAccelerated)
if (!jitLog.Check("System.Numerics.Vector`1[UInt16][System.UInt16]:.ctor(char)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Byte")) returnVal = Fail;
// We are not currently recognizing the Vector<Byte> constructor.
if (!Vector.IsHardwareAccelerated)
if (!jitLog.Check("System.Numerics.Vector`1[Byte][System.Byte]:.ctor(ubyte)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "Int16")) returnVal = Fail;
// We are not currently recognizing the Vector<Int16> constructor.
if (!Vector.IsHardwareAccelerated)
if (!jitLog.Check("System.Numerics.Vector`1[Int16][System.Int16]:.ctor(short)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "SByte")) returnVal = Fail;
// We are not currently recognizing the Vector<SByte> constructor.
if (!Vector.IsHardwareAccelerated)
if (!jitLog.Check("System.Numerics.Vector`1[SByte][System.SByte]:.ctor(byte)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "UInt32")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[UInt32][System.UInt32]:.ctor(int)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "UInt64")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[UInt64][System.UInt64]:.ctor(long)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "IntPtr")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[IntPtr][System.UIntPtr]:.ctor(nuint)")) returnVal = Fail;
if (!jitLog.Check("get_Item", "UIntPtr")) returnVal = Fail;
if (!jitLog.Check("System.Numerics.Vector`1[UIntPtr][System.IntPtr]:.ctor(nint)")) returnVal = Fail;
jitLog.Dispose();
}
}
catch (ArgumentException ex)
{
Console.WriteLine("Argument Exception was raised");
Console.WriteLine(ex.StackTrace);
return Fail;
}
return returnVal;
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/DateTimeConverter.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.ComponentModel.Design.Serialization;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Reflection;
namespace System.ComponentModel
{
/// <summary>
/// Provides a type converter to convert <see cref='System.DateTime'/>
/// objects to and from various other representations.
/// </summary>
public class DateTimeConverter : TypeConverter
{
/// <summary>
/// Gets a value indicating whether this converter can convert an
/// object in the given source type to a <see cref='System.DateTime'/>
/// object using the specified context.
/// </summary>
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
/// <summary>
/// Gets a value indicating whether this converter can convert an object
/// to the given destination type using the context.
/// </summary>
public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType)
{
return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType);
}
/// <summary>
/// Converts the given value object to a <see cref='System.DateTime'/> object.
/// </summary>
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
{
if (value is string text)
{
text = text.Trim();
if (text.Length == 0)
{
return DateTime.MinValue;
}
try
{
// See if we have a culture info to parse with. If so, then use it.
DateTimeFormatInfo? formatInfo = null;
if (culture != null)
{
formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo));
}
if (formatInfo != null)
{
return DateTime.Parse(text, formatInfo);
}
else
{
return DateTime.Parse(text, culture);
}
}
catch (FormatException e)
{
throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateTime)), e);
}
}
return base.ConvertFrom(context, culture, value);
}
/// <summary>
/// Converts the given value object to a <see cref='System.DateTime'/>
/// object using the arguments.
/// </summary>
public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
{
if (destinationType == typeof(string) && value is DateTime)
{
DateTime dt = (DateTime)value;
if (dt == DateTime.MinValue)
{
return string.Empty;
}
if (culture == null)
{
culture = CultureInfo.CurrentCulture;
}
DateTimeFormatInfo? formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo));
if (culture == CultureInfo.InvariantCulture)
{
if (dt.TimeOfDay.TotalSeconds == 0)
{
return dt.ToString("yyyy-MM-dd", culture);
}
else
{
return dt.ToString(culture);
}
}
string format;
if (dt.TimeOfDay.TotalSeconds == 0)
{
format = formatInfo!.ShortDatePattern;
}
else
{
format = formatInfo!.ShortDatePattern + " " + formatInfo.ShortTimePattern;
}
return dt.ToString(format, CultureInfo.CurrentCulture);
}
if (destinationType == typeof(InstanceDescriptor) && value is DateTime)
{
DateTime dt = (DateTime)value;
if (dt.Ticks == 0)
{
return new InstanceDescriptor(
typeof(DateTime).GetConstructor(new Type[] { typeof(long) }),
new object[] { dt.Ticks }
);
}
return new InstanceDescriptor(
typeof(DateTime).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int) }),
new object[] { dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second, dt.Millisecond }
);
}
return base.ConvertTo(context, culture, value, destinationType);
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.ComponentModel.Design.Serialization;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Reflection;
namespace System.ComponentModel
{
/// <summary>
/// Provides a type converter to convert <see cref='System.DateTime'/>
/// objects to and from various other representations.
/// </summary>
public class DateTimeConverter : TypeConverter
{
/// <summary>
/// Gets a value indicating whether this converter can convert an
/// object in the given source type to a <see cref='System.DateTime'/>
/// object using the specified context.
/// </summary>
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
/// <summary>
/// Gets a value indicating whether this converter can convert an object
/// to the given destination type using the context.
/// </summary>
public override bool CanConvertTo(ITypeDescriptorContext? context, [NotNullWhen(true)] Type? destinationType)
{
return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType);
}
/// <summary>
/// Converts the given value object to a <see cref='System.DateTime'/> object.
/// </summary>
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
{
if (value is string text)
{
text = text.Trim();
if (text.Length == 0)
{
return DateTime.MinValue;
}
try
{
// See if we have a culture info to parse with. If so, then use it.
DateTimeFormatInfo? formatInfo = null;
if (culture != null)
{
formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo));
}
if (formatInfo != null)
{
return DateTime.Parse(text, formatInfo);
}
else
{
return DateTime.Parse(text, culture);
}
}
catch (FormatException e)
{
throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateTime)), e);
}
}
return base.ConvertFrom(context, culture, value);
}
/// <summary>
/// Converts the given value object to a <see cref='System.DateTime'/>
/// object using the arguments.
/// </summary>
public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
{
if (destinationType == typeof(string) && value is DateTime)
{
DateTime dt = (DateTime)value;
if (dt == DateTime.MinValue)
{
return string.Empty;
}
if (culture == null)
{
culture = CultureInfo.CurrentCulture;
}
DateTimeFormatInfo? formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo));
if (culture == CultureInfo.InvariantCulture)
{
if (dt.TimeOfDay.TotalSeconds == 0)
{
return dt.ToString("yyyy-MM-dd", culture);
}
else
{
return dt.ToString(culture);
}
}
string format;
if (dt.TimeOfDay.TotalSeconds == 0)
{
format = formatInfo!.ShortDatePattern;
}
else
{
format = formatInfo!.ShortDatePattern + " " + formatInfo.ShortTimePattern;
}
return dt.ToString(format, CultureInfo.CurrentCulture);
}
if (destinationType == typeof(InstanceDescriptor) && value is DateTime)
{
DateTime dt = (DateTime)value;
if (dt.Ticks == 0)
{
return new InstanceDescriptor(
typeof(DateTime).GetConstructor(new Type[] { typeof(long) }),
new object[] { dt.Ticks }
);
}
return new InstanceDescriptor(
typeof(DateTime).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int) }),
new object[] { dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second, dt.Millisecond }
);
}
return base.ConvertTo(context, culture, value, destinationType);
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/Performance/CodeQuality/SIMD/RayTracer/Scene.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System.Collections.Generic;
internal class Scene
{
public SceneObject[] Things;
public Light[] Lights;
public Camera Camera;
public Scene(SceneObject[] things, Light[] lights, Camera camera) { Things = things; Lights = lights; Camera = camera; }
public IEnumerable<ISect> Intersect(Ray r)
{
foreach (SceneObject obj in Things)
{
yield return obj.Intersect(r);
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System.Collections.Generic;
internal class Scene
{
public SceneObject[] Things;
public Light[] Lights;
public Camera Camera;
public Scene(SceneObject[] things, Light[] lights, Camera camera) { Things = things; Lights = lights; Camera = camera; }
public IEnumerable<ISect> Intersect(Ray r)
{
foreach (SceneObject obj in Things)
{
yield return obj.Intersect(r);
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSATestData.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Text;
using Test.Cryptography;
namespace System.Security.Cryptography.Dsa.Tests
{
// Note to contributors:
// Keys contained in this file should be randomly generated for the purpose of inclusion here,
// or obtained from some fixed set of test data. (Please) DO NOT use any key that has ever been
// used for any real purpose.
//
// Note to readers:
// The keys contained in this file should all be treated as compromised. That means that you
// absolutely SHOULD NOT use these keys on anything that you actually want to be protected.
internal class DSATestData
{
public static readonly byte[] HelloBytes = new ASCIIEncoding().GetBytes("Hello");
internal static DSAParameters Dsa512Parameters = new DSAParameters
{
P = (
"D6A8B7F1CAF7A6964D07663FC691D22F6ABCD55C37AEF58D20746740D82FE14E" +
"146363627D91925142DCDEE384BE0A1E04ED5BF5F471486F4D986D42A2E7DF95").HexToByteArray(),
Q = "FAB5F625D5D5E16430A1EF630EBE33897CC224F9".HexToByteArray(),
G = (
"0844C490E52EF58E05902C636D64D1D5EB2C6082A0D4F3BFD1CE078E87B43A7E" +
"F7BBECE19A4EFE2A6D9C229D360083CEA9F721F39B05BAF97052DEFC67A58A2B").HexToByteArray(),
X = "2E3D7A84C85B66785E1F6FE796982B22B0CB98BC".HexToByteArray(),
Y = (
"C300E0E67D877E6CED39FEEAAAC1F2C2BD568E6A32467227E12B6AE45A8D9478" +
"541A480AC80038AAC863827D6E3984061A25905C18BD2499A839663C3CA45605").HexToByteArray(),
};
internal static DSAParameters Dsa576Parameters = new DSAParameters
{
P = (
"E2167306BFFD86BB62F4327B778BBFA07BA42323EC567B106B9563882BDDD6D7" +
"F2EE7360F299888DE9F40A61C78D0BD8442EFA9C322B868AD367B3941D72B7A3" +
"32C954EB1629132B").HexToByteArray(),
Q = "CCDCECCF5F0B2C8FE238E2F06F22137F17FAEB1B".HexToByteArray(),
G = (
"AF17D4061302079E33034A77A058DDB4B832ACB114B7B8D2D3AE4451DFF85EB8" +
"DD75D4474218369D485B2206506406044AB4E6407FDAA5A29E95D4964CA559E8" +
"1C6F7CFCDA872665").HexToByteArray(),
X = "AC32693E1CD72AD63E1A0B6E8157EBBCA671D3DB".HexToByteArray(),
Y = (
"815A549B6FD0CEDAF044B00B7CFE1351902D7727D6D7FB736003A4E1C4CD8DFB" +
"F431E4FF4733F3FA92C765F0CFF944E3ED56A85B75953EB16901248985BB5F89" +
"1398EAB5E39645E7").HexToByteArray(),
};
internal static DSAParameters GetDSA1024Params()
{
DSAParameters p = new DSAParameters();
p.G = (
"6BC366B66355545E098F1FE90E5469B567E09FA79D817F2B367B45DECD4301A59C81D6911F7691D370E15AC692C04BC11872" +
"C171A7FE654E963D7DDA575A9E98CE026FB7D3934A258608134A8EC5ED69A2AEDC89401B67ADDE427F17EDAEB72D7AF45D9A" +
"B1D59E1B13D4EFBD17C764330267DDE352C20E05B80DB3C109FE8B9C").HexToByteArray();
p.P = (
"C16D26C74D6C1627799C0918548E553FE58C7881DA484629CAF64311F4B27CFEF6BDB0F21206B0FFC4999A2FED53B43B9EE2" +
"910C68DA2C436A8018F4938F6472369F5647D005BCC96E22590CC15E3CD4EA0D132F5DA5AF6AAA0807B0CC4EF3404AF542F4" +
"546B37BDD6A47E641130837DB99397C845635D7DC36D0537E4A84B31").HexToByteArray();
p.Q = "D83C0ECB73551E2FE30D51FCF4236C651883ADD7".HexToByteArray();
p.X = "C02678007779E52E360682214BD47F8FAF42BC2D".HexToByteArray();
p.Y = (
"690BB37A9145E05D6E7B47C457898AAEDD72501C9D16E79B1AD75A872CF017AA90BBFB90F1B3B7F5C03C87E46E8725665526" +
"FD34157B26F596A1F0997F59F3E65EFC615A552D5E7569C5FFC4593D5A0299110E71C97E1221A5A03FE9A6935AEDD88EF0B3" +
"B2F79D3A99ED75F7B871E6EAF2680D96D574A5F4C13BACE3B4B44DE1").HexToByteArray();
return p;
}
internal static DSAParameters GetDSA2048Params()
{
DSAParameters p = new DSAParameters();
p.G = (
"44A7D22DEBA29CE19D678D2DC11F118BAA10E3BEA94DE29C3EC36C10AB4D688004A1B7F4387FC1CC9613E6851FEDBBD54531" +
"9EDE544B94E4FAE9C1069E7734F9E6AFC8A0B840696CDFFE286E1AF1AD6E39629D0C8C6016AC625F100BACF5FF74B2325C9D" +
"99A6D8B0310B268F63E35F5D1C8DA663F94ABA90244CECCF9A8CE5DB5479B006F9131E5EA78222A32E2A103C1FEF16929B15" +
"6E3230C954295CDA3E5F91F71B567FA3B774B842F128CD0D343D5468DB90734A678035E65E6A21CC7301F4F53E6B66718A83" +
"FF285A6FDE89CA5AE1D1B9633A25A34A926F9D2808F9BF795D936787FF4C7286BC7FC4A82AFA9B06C9125109A923BAF3E377" +
"55F1574BAFB5").HexToByteArray();
p.P = (
"AF8FB9B2B147C96F392360639BDAA6544FF2CD086B604A3324F485595F02CEAF32D2D49F2DD3AD9F5384DD09D03182DB8F0A" +
"A06CE0A0FCA2366A5B031BD0E2FAD797BADC874A0C6781529C01E0D69704B43DF371AE4A9B3DD81EB03F5DAE283780112568" +
"66337B73A824F7E8ACA61981A7C67649363D2D7D12CC2305308D084BEC68CC3B1B3EF577053A5E23449FBA3C3EB6F8CD8EA6" +
"9F116B3748BD237F97F4F7E911C41C394D6F7D2D53B767618F0DED48E7BD7F30C6568948264A54C00D358A76E9826ED791C6" +
"B6CBF8C29C245173B1D8D219438E59373CE7554EF49C7840A8C55CE2E5E2C33C10AAD8D90F28C7CB2EF14AD5ED8C4E6992B4" +
"1ECEC65288F5").HexToByteArray();
p.Q = "C93AB229237282997F23541A399BBF75CECD30BE0BE9592C07043ED30221EACB".HexToByteArray();
p.X = "B8BFF7B3328E6B6DBC8325A275A1193EF81C975ECF88B340C468B770FB5E2658".HexToByteArray();
p.Y = (
"011BD85986A2C41315FF01C554A45E5A9C45B38EBDCC2660B6D17889604E800A6FDE8E017CED3793F4A6FBAFBB7613FEB7BA" +
"87841ABD59935D18858939C00A6E4619B6562475955D6D72B2134BECF5AB34118F60D84B1FF268753F188E861255132D84CA" +
"0AAB681B8551873394F18E0DAEF6B5F9577EC7CA2AA63281B539AF5894283E3FB6DCC5537D92C8BFE7C0723AC212EEF3B771" +
"8D35C3FDD99F7AE0912CC7C47521A56FA511BE31712D979AE67F17A7BCC4E5810EA9CA138DEED3D78239EEEF239A772942D2" +
"3C2810C2972219525646127F9C4B81612C12AEDC2DC91E81153B0A207C1FBC00795B3EB8E86796CED29AC1247FF7122A1EAF" +
"081025751572").HexToByteArray();
return p;
}
internal static DSAParameters Dsa2048DeficientXParameters =
new DSAParameters
{
P = (
"94D3E4B39F17273E8F27B32692F7C34D35618BD279548B4736939C2BA4E72911" +
"6CAEAC6001E95705C27D7CF0C308BCA702BB4712D4BB448A1078B631150EAB45" +
"5C91678A61C51C2D371E02BBAC70E9C2C6DA757B57820EC8FD096E105EC36C07" +
"8A4FD7DD8724D275D3007F94F12FF96167293C667B467707F1DC9A7C0B34BC4F" +
"C475B15D51240A789A53A56B64D69C1E02B7CA3AD341B3B6F6C986F1E065BFE6" +
"80D87DEE6D9591D8E38E57C37AC2983B2794BEAFFE2C7B5B6CA49B9812487332" +
"5C61DE6F820411018BE9723FE2BDA8332C13088AA32A086D14D6F00201013F51" +
"678643F32ACC00525DB22F0020D92F9C2F4088B8D35A1E764DCD8B70C0B3D2EB").HexToByteArray(),
G = (
"3CF0F144B70ABBD44260D92C4E032ADF0A598E68323E254AFF8710C9E8EA9BE1" +
"9D0D2AF939AA0DEC76D207B6EACEF7824E366575356301CA5F985EF8FF7AF551" +
"8B8DF0885A6AC570FE2E5C5956170E71F2740194018C8A0A4A7B0F9CF96AFD7E" +
"25026FA80B9F9726B6C4DFCBC4105EB98687CA697F797940C1335B144311D47F" +
"F21E4D5C43C00584786BC1AAE4AD858AC063351EE4423470BE5115528694EFCF" +
"312D9E58D4DDD1C01E283833F4F149E5F9BD4549304431B61BE0DAD717B538C5" +
"CD52FDE1A8E66193E89D09C1E07968E6F707EF5614E83E61126F6A5F3939E076" +
"7374544BE3225CC4F8F3C501D5A2526F7BB64D656A7BBDFE7E72CB16D71E8A38").HexToByteArray(),
Q = "DB70A03A158E9CCB9D93DBF76796CBEBCA45A8703E82A45801588EE4B6985AB3".HexToByteArray(),
Y = (
"7072CEE0A830F2150302F8B0CF0F07147B6C6B132CE64DF4F6E13B9E87F0F2DC" +
"5E05744119B6958095351A7742A9E45C72E23EE8BF0098C82FD2D0787F219747" +
"0BFB0CBC21462AD3893DEF7C1A0DF34FD52957FF01C69F76C564C268EBCD43DE" +
"C376DF538A8874AF34ED007B4E46D0660068137931AA59A32E875B29429DB556" +
"35DEB6DC8CBF867D4494CAD5EDEE7E7F205EE8E8B2C8A052B4528F47C92B1F8C" +
"FEC9ED053C21E3A731BFF269AD099C413D5FC8785351165E79AA7A143A0C7E55" +
"61EF03BCE3CF0DED9CED8316802F99DDAD032DE8C19270F3BAF5A8260888917F" +
"CD73E4B1D56FAD1563C71DBC92F6725692DDD6A39141844D11FDA230B7BE6BAC").HexToByteArray(),
X = "00C871B7E389685DB97D934DD7011FAB076FF27EC4282FB00C0D646D29D5E4E5".HexToByteArray(),
};
// The parameters and signature come from FIPS 186-2 APPENDIX 5. EXAMPLE OF THE DSA
internal static void GetDSA1024_186_2(out DSAParameters parameters, out byte[] signature, out byte[] data)
{
parameters = new DSAParameters()
{
P = (
"8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8324f0d7882e5d0762fc5b7210eafc2e9adac32ab7aac" +
"49693dfbf83724c2ec0736ee31c80291").HexToByteArray(),
Q = ("c773218c737ec8ee993b4f2ded30f48edace915f").HexToByteArray(),
G = (
"626d027839ea0a13413163a55b4cb500299d5522956cefcb3bff10f399ce2c2e71cb9de5fa24babf58e5b79521925c9c" +
"c42e9f6f464b088cc572af53e6d78802").HexToByteArray(),
X = ("2070b3223dba372fde1c0ffc7b2e3b498b260614").HexToByteArray(),
Y = (
"19131871d75b1612a819f29d78d1b0d7346f7aa77bb62a859bfd6c5675da9d212d3a36ef1672ef660b8c7c255cc0ec74" +
"858fba33f44c06699630a76b030ee333").HexToByteArray()
};
signature = (
// r
"8bac1ab66410435cb7181f95b16ab97c92b341c0" +
// s
"41e2345f1f56df2458f426d155b4ba2db6dcd8c8"
).HexToByteArray();
data = Encoding.ASCII.GetBytes("abc");
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Text;
using Test.Cryptography;
namespace System.Security.Cryptography.Dsa.Tests
{
// Note to contributors:
// Keys contained in this file should be randomly generated for the purpose of inclusion here,
// or obtained from some fixed set of test data. (Please) DO NOT use any key that has ever been
// used for any real purpose.
//
// Note to readers:
// The keys contained in this file should all be treated as compromised. That means that you
// absolutely SHOULD NOT use these keys on anything that you actually want to be protected.
internal class DSATestData
{
public static readonly byte[] HelloBytes = new ASCIIEncoding().GetBytes("Hello");
internal static DSAParameters Dsa512Parameters = new DSAParameters
{
P = (
"D6A8B7F1CAF7A6964D07663FC691D22F6ABCD55C37AEF58D20746740D82FE14E" +
"146363627D91925142DCDEE384BE0A1E04ED5BF5F471486F4D986D42A2E7DF95").HexToByteArray(),
Q = "FAB5F625D5D5E16430A1EF630EBE33897CC224F9".HexToByteArray(),
G = (
"0844C490E52EF58E05902C636D64D1D5EB2C6082A0D4F3BFD1CE078E87B43A7E" +
"F7BBECE19A4EFE2A6D9C229D360083CEA9F721F39B05BAF97052DEFC67A58A2B").HexToByteArray(),
X = "2E3D7A84C85B66785E1F6FE796982B22B0CB98BC".HexToByteArray(),
Y = (
"C300E0E67D877E6CED39FEEAAAC1F2C2BD568E6A32467227E12B6AE45A8D9478" +
"541A480AC80038AAC863827D6E3984061A25905C18BD2499A839663C3CA45605").HexToByteArray(),
};
internal static DSAParameters Dsa576Parameters = new DSAParameters
{
P = (
"E2167306BFFD86BB62F4327B778BBFA07BA42323EC567B106B9563882BDDD6D7" +
"F2EE7360F299888DE9F40A61C78D0BD8442EFA9C322B868AD367B3941D72B7A3" +
"32C954EB1629132B").HexToByteArray(),
Q = "CCDCECCF5F0B2C8FE238E2F06F22137F17FAEB1B".HexToByteArray(),
G = (
"AF17D4061302079E33034A77A058DDB4B832ACB114B7B8D2D3AE4451DFF85EB8" +
"DD75D4474218369D485B2206506406044AB4E6407FDAA5A29E95D4964CA559E8" +
"1C6F7CFCDA872665").HexToByteArray(),
X = "AC32693E1CD72AD63E1A0B6E8157EBBCA671D3DB".HexToByteArray(),
Y = (
"815A549B6FD0CEDAF044B00B7CFE1351902D7727D6D7FB736003A4E1C4CD8DFB" +
"F431E4FF4733F3FA92C765F0CFF944E3ED56A85B75953EB16901248985BB5F89" +
"1398EAB5E39645E7").HexToByteArray(),
};
internal static DSAParameters GetDSA1024Params()
{
DSAParameters p = new DSAParameters();
p.G = (
"6BC366B66355545E098F1FE90E5469B567E09FA79D817F2B367B45DECD4301A59C81D6911F7691D370E15AC692C04BC11872" +
"C171A7FE654E963D7DDA575A9E98CE026FB7D3934A258608134A8EC5ED69A2AEDC89401B67ADDE427F17EDAEB72D7AF45D9A" +
"B1D59E1B13D4EFBD17C764330267DDE352C20E05B80DB3C109FE8B9C").HexToByteArray();
p.P = (
"C16D26C74D6C1627799C0918548E553FE58C7881DA484629CAF64311F4B27CFEF6BDB0F21206B0FFC4999A2FED53B43B9EE2" +
"910C68DA2C436A8018F4938F6472369F5647D005BCC96E22590CC15E3CD4EA0D132F5DA5AF6AAA0807B0CC4EF3404AF542F4" +
"546B37BDD6A47E641130837DB99397C845635D7DC36D0537E4A84B31").HexToByteArray();
p.Q = "D83C0ECB73551E2FE30D51FCF4236C651883ADD7".HexToByteArray();
p.X = "C02678007779E52E360682214BD47F8FAF42BC2D".HexToByteArray();
p.Y = (
"690BB37A9145E05D6E7B47C457898AAEDD72501C9D16E79B1AD75A872CF017AA90BBFB90F1B3B7F5C03C87E46E8725665526" +
"FD34157B26F596A1F0997F59F3E65EFC615A552D5E7569C5FFC4593D5A0299110E71C97E1221A5A03FE9A6935AEDD88EF0B3" +
"B2F79D3A99ED75F7B871E6EAF2680D96D574A5F4C13BACE3B4B44DE1").HexToByteArray();
return p;
}
internal static DSAParameters GetDSA2048Params()
{
DSAParameters p = new DSAParameters();
p.G = (
"44A7D22DEBA29CE19D678D2DC11F118BAA10E3BEA94DE29C3EC36C10AB4D688004A1B7F4387FC1CC9613E6851FEDBBD54531" +
"9EDE544B94E4FAE9C1069E7734F9E6AFC8A0B840696CDFFE286E1AF1AD6E39629D0C8C6016AC625F100BACF5FF74B2325C9D" +
"99A6D8B0310B268F63E35F5D1C8DA663F94ABA90244CECCF9A8CE5DB5479B006F9131E5EA78222A32E2A103C1FEF16929B15" +
"6E3230C954295CDA3E5F91F71B567FA3B774B842F128CD0D343D5468DB90734A678035E65E6A21CC7301F4F53E6B66718A83" +
"FF285A6FDE89CA5AE1D1B9633A25A34A926F9D2808F9BF795D936787FF4C7286BC7FC4A82AFA9B06C9125109A923BAF3E377" +
"55F1574BAFB5").HexToByteArray();
p.P = (
"AF8FB9B2B147C96F392360639BDAA6544FF2CD086B604A3324F485595F02CEAF32D2D49F2DD3AD9F5384DD09D03182DB8F0A" +
"A06CE0A0FCA2366A5B031BD0E2FAD797BADC874A0C6781529C01E0D69704B43DF371AE4A9B3DD81EB03F5DAE283780112568" +
"66337B73A824F7E8ACA61981A7C67649363D2D7D12CC2305308D084BEC68CC3B1B3EF577053A5E23449FBA3C3EB6F8CD8EA6" +
"9F116B3748BD237F97F4F7E911C41C394D6F7D2D53B767618F0DED48E7BD7F30C6568948264A54C00D358A76E9826ED791C6" +
"B6CBF8C29C245173B1D8D219438E59373CE7554EF49C7840A8C55CE2E5E2C33C10AAD8D90F28C7CB2EF14AD5ED8C4E6992B4" +
"1ECEC65288F5").HexToByteArray();
p.Q = "C93AB229237282997F23541A399BBF75CECD30BE0BE9592C07043ED30221EACB".HexToByteArray();
p.X = "B8BFF7B3328E6B6DBC8325A275A1193EF81C975ECF88B340C468B770FB5E2658".HexToByteArray();
p.Y = (
"011BD85986A2C41315FF01C554A45E5A9C45B38EBDCC2660B6D17889604E800A6FDE8E017CED3793F4A6FBAFBB7613FEB7BA" +
"87841ABD59935D18858939C00A6E4619B6562475955D6D72B2134BECF5AB34118F60D84B1FF268753F188E861255132D84CA" +
"0AAB681B8551873394F18E0DAEF6B5F9577EC7CA2AA63281B539AF5894283E3FB6DCC5537D92C8BFE7C0723AC212EEF3B771" +
"8D35C3FDD99F7AE0912CC7C47521A56FA511BE31712D979AE67F17A7BCC4E5810EA9CA138DEED3D78239EEEF239A772942D2" +
"3C2810C2972219525646127F9C4B81612C12AEDC2DC91E81153B0A207C1FBC00795B3EB8E86796CED29AC1247FF7122A1EAF" +
"081025751572").HexToByteArray();
return p;
}
internal static DSAParameters Dsa2048DeficientXParameters =
new DSAParameters
{
P = (
"94D3E4B39F17273E8F27B32692F7C34D35618BD279548B4736939C2BA4E72911" +
"6CAEAC6001E95705C27D7CF0C308BCA702BB4712D4BB448A1078B631150EAB45" +
"5C91678A61C51C2D371E02BBAC70E9C2C6DA757B57820EC8FD096E105EC36C07" +
"8A4FD7DD8724D275D3007F94F12FF96167293C667B467707F1DC9A7C0B34BC4F" +
"C475B15D51240A789A53A56B64D69C1E02B7CA3AD341B3B6F6C986F1E065BFE6" +
"80D87DEE6D9591D8E38E57C37AC2983B2794BEAFFE2C7B5B6CA49B9812487332" +
"5C61DE6F820411018BE9723FE2BDA8332C13088AA32A086D14D6F00201013F51" +
"678643F32ACC00525DB22F0020D92F9C2F4088B8D35A1E764DCD8B70C0B3D2EB").HexToByteArray(),
G = (
"3CF0F144B70ABBD44260D92C4E032ADF0A598E68323E254AFF8710C9E8EA9BE1" +
"9D0D2AF939AA0DEC76D207B6EACEF7824E366575356301CA5F985EF8FF7AF551" +
"8B8DF0885A6AC570FE2E5C5956170E71F2740194018C8A0A4A7B0F9CF96AFD7E" +
"25026FA80B9F9726B6C4DFCBC4105EB98687CA697F797940C1335B144311D47F" +
"F21E4D5C43C00584786BC1AAE4AD858AC063351EE4423470BE5115528694EFCF" +
"312D9E58D4DDD1C01E283833F4F149E5F9BD4549304431B61BE0DAD717B538C5" +
"CD52FDE1A8E66193E89D09C1E07968E6F707EF5614E83E61126F6A5F3939E076" +
"7374544BE3225CC4F8F3C501D5A2526F7BB64D656A7BBDFE7E72CB16D71E8A38").HexToByteArray(),
Q = "DB70A03A158E9CCB9D93DBF76796CBEBCA45A8703E82A45801588EE4B6985AB3".HexToByteArray(),
Y = (
"7072CEE0A830F2150302F8B0CF0F07147B6C6B132CE64DF4F6E13B9E87F0F2DC" +
"5E05744119B6958095351A7742A9E45C72E23EE8BF0098C82FD2D0787F219747" +
"0BFB0CBC21462AD3893DEF7C1A0DF34FD52957FF01C69F76C564C268EBCD43DE" +
"C376DF538A8874AF34ED007B4E46D0660068137931AA59A32E875B29429DB556" +
"35DEB6DC8CBF867D4494CAD5EDEE7E7F205EE8E8B2C8A052B4528F47C92B1F8C" +
"FEC9ED053C21E3A731BFF269AD099C413D5FC8785351165E79AA7A143A0C7E55" +
"61EF03BCE3CF0DED9CED8316802F99DDAD032DE8C19270F3BAF5A8260888917F" +
"CD73E4B1D56FAD1563C71DBC92F6725692DDD6A39141844D11FDA230B7BE6BAC").HexToByteArray(),
X = "00C871B7E389685DB97D934DD7011FAB076FF27EC4282FB00C0D646D29D5E4E5".HexToByteArray(),
};
// The parameters and signature come from FIPS 186-2 APPENDIX 5. EXAMPLE OF THE DSA
internal static void GetDSA1024_186_2(out DSAParameters parameters, out byte[] signature, out byte[] data)
{
parameters = new DSAParameters()
{
P = (
"8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8324f0d7882e5d0762fc5b7210eafc2e9adac32ab7aac" +
"49693dfbf83724c2ec0736ee31c80291").HexToByteArray(),
Q = ("c773218c737ec8ee993b4f2ded30f48edace915f").HexToByteArray(),
G = (
"626d027839ea0a13413163a55b4cb500299d5522956cefcb3bff10f399ce2c2e71cb9de5fa24babf58e5b79521925c9c" +
"c42e9f6f464b088cc572af53e6d78802").HexToByteArray(),
X = ("2070b3223dba372fde1c0ffc7b2e3b498b260614").HexToByteArray(),
Y = (
"19131871d75b1612a819f29d78d1b0d7346f7aa77bb62a859bfd6c5675da9d212d3a36ef1672ef660b8c7c255cc0ec74" +
"858fba33f44c06699630a76b030ee333").HexToByteArray()
};
signature = (
// r
"8bac1ab66410435cb7181f95b16ab97c92b341c0" +
// s
"41e2345f1f56df2458f426d155b4ba2db6dcd8c8"
).HexToByteArray();
data = Encoding.ASCII.GetBytes("abc");
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Private.Xml/tests/Readers/ReaderSettings/TCDtdProcessingCoreReader.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using OLEDB.Test.ModuleCore;
namespace System.Xml.Tests
{
public partial class TCDtdProcessingCoreReader : TCXMLReaderBaseGeneral
{
// Type is System.Xml.Tests.TCDtdProcessingCoreReader
// Test Case
public override void AddChildren()
{
// for function v0
{
this.AddChild(new CVariation(v0) { Attribute = new Variation("Read xml without DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v0) { Attribute = new Variation("Read xml without DTD.Ignore") { Param = 1 } });
}
// for function v1a
{
this.AddChild(new CVariation(v1a) { Attribute = new Variation("Wrap with Prohibit, xml w/o DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v1a) { Attribute = new Variation("Wrap with Prohibit, xml w/o DTD.Ignore") { Param = 1 } });
}
// for function v1b
{
this.AddChild(new CVariation(v1b) { Attribute = new Variation("Wrap with Ignore, xml w/o DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v1b) { Attribute = new Variation("Wrap with Ignore, xml w/o DTD.Ignore") { Param = 1 } });
}
// for function v1d
{
this.AddChild(new CVariation(v1d) { Attribute = new Variation("Wrap with Prohibit, change RS, xml w/o DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(v1d) { Attribute = new Variation("Wrap with Prohibit, change RS, xml w/o DTD.Prohibit") { Param = 0 } });
}
// for function v1e
{
this.AddChild(new CVariation(v1e) { Attribute = new Variation("Wrap with Ignore, change RS, xml w/o DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v1e) { Attribute = new Variation("Wrap with Ignore, change RS, xml w/o DTD.Ignore") { Param = 1 } });
}
// for function v2a
{
this.AddChild(new CVariation(v2a) { Attribute = new Variation("Wrap with Prohibit, xml with DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v2a) { Attribute = new Variation("Wrap with Prohibit, xml with DTD.Ignore") { Param = 1 } });
}
// for function v2b
{
this.AddChild(new CVariation(v2b) { Attribute = new Variation("Wrap with Ignore, xml with DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(v2b) { Attribute = new Variation("Wrap with Ignore, xml with DTD.Prohibit") { Param = 0 } });
}
// for function V3
{
this.AddChild(new CVariation(V3) { Attribute = new Variation("Testing default values.") });
}
// for function V4
{
this.AddChild(new CVariation(V4) { Attribute = new Variation("Parse a file with inline DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V4) { Attribute = new Variation("Parse a file with inline DTD.Prohibit") { Param = 0 } });
}
// for function V4c
{
this.AddChild(new CVariation(V4c) { Attribute = new Variation("Parse a xml with inline inv.DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V4c) { Attribute = new Variation("Parse a xml with inline inv.DTD.Prohibit") { Param = 0 } });
}
// for function V4i
{
this.AddChild(new CVariation(V4i) { Attribute = new Variation("Read xml with invalid content.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V4i) { Attribute = new Variation("Read xml with invalid content.Ignore") { Param = 1 } });
}
// for function V7a
{
this.AddChild(new CVariation(V7a) { Attribute = new Variation("Changing DtdProcessing to Prohibit,Ignore.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V7a) { Attribute = new Variation("Changing DtdProcessing to Prohibit,Ignore.Ignore") { Param = 1 } });
}
// for function V8
{
this.AddChild(new CVariation(V8) { Attribute = new Variation("Parse a file with external DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V8) { Attribute = new Variation("Parse a file with external DTD.Ignore") { Param = 1 } });
}
// for function V9
{
this.AddChild(new CVariation(V9) { Attribute = new Variation("Parse a file with invalid inline DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V9) { Attribute = new Variation("Parse a file with invalid inline DTD.Ignore") { Param = 1 } });
}
// for function V11
{
this.AddChild(new CVariation(V11) { Attribute = new Variation("Parse a valid xml with predefined entities with no DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V11) { Attribute = new Variation("Parse a valid xml with predefined entities with no DTD.Ignore") { Param = 1 } });
}
// for function V11a
{
this.AddChild(new CVariation(V11a) { Attribute = new Variation("Parse a valid xml with entity and DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V11a) { Attribute = new Variation("Parse a valid xml with entity and DTD.Prohibit") { Param = 0 } });
}
// for function V11b
{
this.AddChild(new CVariation(V11b) { Attribute = new Variation("Parse a valid xml with entity in attribute and DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V11b) { Attribute = new Variation("Parse a valid xml with entity in attribute and DTD.Prohibit") { Param = 0 } });
}
// for function V11c
{
this.AddChild(new CVariation(V11c) { Attribute = new Variation("Parse a invalid xml with entity in attribute and DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V11c) { Attribute = new Variation("Parse a invalid xml with entity in attribute and DTD.Prohibit") { Param = 0 } });
}
// for function v12
{
this.AddChild(new CVariation(v12) { Attribute = new Variation("Set value to Reader.Settings.DtdProcessing.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v12) { Attribute = new Variation("Set value to Reader.Settings.DtdProcessing.Ignore") { Param = 1 } });
}
// for function V14
{
this.AddChild(new CVariation(V14) { Attribute = new Variation("DtdProcessing - ArgumentOutOfRangeException") });
}
// for function V15
{
this.AddChild(new CVariation(V15) { Attribute = new Variation("DtdProcessing - ArgumentOutOfRangeException.Ignore") { Param = 1 } });
//this.AddChild(new CVariation(V15){ Attribute = new Variation("DtdProcessing - ArgumentOutOfRangeException.Parse"){ Param = 2}});
this.AddChild(new CVariation(V15) { Attribute = new Variation("DtdProcessing - ArgumentOutOfRangeException.Prohibit") { Param = 0 } });
}
// for function V16
{
this.AddChild(new CVariation(V16) { Attribute = new Variation("Parse a valid xml DTD and check NodeType.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V16) { Attribute = new Variation("Parse a valid xml DTD and check NodeType.Ignore") { Param = 1 } });
//this.AddChild(new CVariation(V16){ Attribute = new Variation("Parse a valid xml DTD and check NodeType.Parse"){ Param = 2}});
}
// for function V18
{
this.AddChild(new CVariation(V18) { Attribute = new Variation("Parse a invalid xml DTD SYSTEM PUBLIC.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V18) { Attribute = new Variation("Parse a invalid xml DTD SYSTEM PUBLIC.Prohibit") { Param = 0 } });
//this.AddChild(new CVariation(V18){ Attribute = new Variation("Parse a invalid xml DTD SYSTEM PUBLIC.Parse"){ Param = 2}});
}
// for function V19
{
this.AddChild(new CVariation(V19) { Attribute = new Variation("6.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 6 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("8.PParsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 8 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("9.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 9 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("9.Parsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 9 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("10.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 10 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("10.Parsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 10 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("11.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 11 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("11.Parsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 11 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("12.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 12 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("12.Parsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 12 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("1.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 1 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("1.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 1 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("2.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 2 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("7.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 7 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("7.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 7 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("8.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 8 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("2.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 2 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("3.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 3 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("3.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 3 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("4.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 4 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("4.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 4 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("5.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 5 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("5.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 5 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("6.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 6 } } });
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using OLEDB.Test.ModuleCore;
namespace System.Xml.Tests
{
public partial class TCDtdProcessingCoreReader : TCXMLReaderBaseGeneral
{
// Type is System.Xml.Tests.TCDtdProcessingCoreReader
// Test Case
public override void AddChildren()
{
// for function v0
{
this.AddChild(new CVariation(v0) { Attribute = new Variation("Read xml without DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v0) { Attribute = new Variation("Read xml without DTD.Ignore") { Param = 1 } });
}
// for function v1a
{
this.AddChild(new CVariation(v1a) { Attribute = new Variation("Wrap with Prohibit, xml w/o DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v1a) { Attribute = new Variation("Wrap with Prohibit, xml w/o DTD.Ignore") { Param = 1 } });
}
// for function v1b
{
this.AddChild(new CVariation(v1b) { Attribute = new Variation("Wrap with Ignore, xml w/o DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v1b) { Attribute = new Variation("Wrap with Ignore, xml w/o DTD.Ignore") { Param = 1 } });
}
// for function v1d
{
this.AddChild(new CVariation(v1d) { Attribute = new Variation("Wrap with Prohibit, change RS, xml w/o DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(v1d) { Attribute = new Variation("Wrap with Prohibit, change RS, xml w/o DTD.Prohibit") { Param = 0 } });
}
// for function v1e
{
this.AddChild(new CVariation(v1e) { Attribute = new Variation("Wrap with Ignore, change RS, xml w/o DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v1e) { Attribute = new Variation("Wrap with Ignore, change RS, xml w/o DTD.Ignore") { Param = 1 } });
}
// for function v2a
{
this.AddChild(new CVariation(v2a) { Attribute = new Variation("Wrap with Prohibit, xml with DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v2a) { Attribute = new Variation("Wrap with Prohibit, xml with DTD.Ignore") { Param = 1 } });
}
// for function v2b
{
this.AddChild(new CVariation(v2b) { Attribute = new Variation("Wrap with Ignore, xml with DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(v2b) { Attribute = new Variation("Wrap with Ignore, xml with DTD.Prohibit") { Param = 0 } });
}
// for function V3
{
this.AddChild(new CVariation(V3) { Attribute = new Variation("Testing default values.") });
}
// for function V4
{
this.AddChild(new CVariation(V4) { Attribute = new Variation("Parse a file with inline DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V4) { Attribute = new Variation("Parse a file with inline DTD.Prohibit") { Param = 0 } });
}
// for function V4c
{
this.AddChild(new CVariation(V4c) { Attribute = new Variation("Parse a xml with inline inv.DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V4c) { Attribute = new Variation("Parse a xml with inline inv.DTD.Prohibit") { Param = 0 } });
}
// for function V4i
{
this.AddChild(new CVariation(V4i) { Attribute = new Variation("Read xml with invalid content.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V4i) { Attribute = new Variation("Read xml with invalid content.Ignore") { Param = 1 } });
}
// for function V7a
{
this.AddChild(new CVariation(V7a) { Attribute = new Variation("Changing DtdProcessing to Prohibit,Ignore.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V7a) { Attribute = new Variation("Changing DtdProcessing to Prohibit,Ignore.Ignore") { Param = 1 } });
}
// for function V8
{
this.AddChild(new CVariation(V8) { Attribute = new Variation("Parse a file with external DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V8) { Attribute = new Variation("Parse a file with external DTD.Ignore") { Param = 1 } });
}
// for function V9
{
this.AddChild(new CVariation(V9) { Attribute = new Variation("Parse a file with invalid inline DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V9) { Attribute = new Variation("Parse a file with invalid inline DTD.Ignore") { Param = 1 } });
}
// for function V11
{
this.AddChild(new CVariation(V11) { Attribute = new Variation("Parse a valid xml with predefined entities with no DTD.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V11) { Attribute = new Variation("Parse a valid xml with predefined entities with no DTD.Ignore") { Param = 1 } });
}
// for function V11a
{
this.AddChild(new CVariation(V11a) { Attribute = new Variation("Parse a valid xml with entity and DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V11a) { Attribute = new Variation("Parse a valid xml with entity and DTD.Prohibit") { Param = 0 } });
}
// for function V11b
{
this.AddChild(new CVariation(V11b) { Attribute = new Variation("Parse a valid xml with entity in attribute and DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V11b) { Attribute = new Variation("Parse a valid xml with entity in attribute and DTD.Prohibit") { Param = 0 } });
}
// for function V11c
{
this.AddChild(new CVariation(V11c) { Attribute = new Variation("Parse a invalid xml with entity in attribute and DTD.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V11c) { Attribute = new Variation("Parse a invalid xml with entity in attribute and DTD.Prohibit") { Param = 0 } });
}
// for function v12
{
this.AddChild(new CVariation(v12) { Attribute = new Variation("Set value to Reader.Settings.DtdProcessing.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(v12) { Attribute = new Variation("Set value to Reader.Settings.DtdProcessing.Ignore") { Param = 1 } });
}
// for function V14
{
this.AddChild(new CVariation(V14) { Attribute = new Variation("DtdProcessing - ArgumentOutOfRangeException") });
}
// for function V15
{
this.AddChild(new CVariation(V15) { Attribute = new Variation("DtdProcessing - ArgumentOutOfRangeException.Ignore") { Param = 1 } });
//this.AddChild(new CVariation(V15){ Attribute = new Variation("DtdProcessing - ArgumentOutOfRangeException.Parse"){ Param = 2}});
this.AddChild(new CVariation(V15) { Attribute = new Variation("DtdProcessing - ArgumentOutOfRangeException.Prohibit") { Param = 0 } });
}
// for function V16
{
this.AddChild(new CVariation(V16) { Attribute = new Variation("Parse a valid xml DTD and check NodeType.Prohibit") { Param = 0 } });
this.AddChild(new CVariation(V16) { Attribute = new Variation("Parse a valid xml DTD and check NodeType.Ignore") { Param = 1 } });
//this.AddChild(new CVariation(V16){ Attribute = new Variation("Parse a valid xml DTD and check NodeType.Parse"){ Param = 2}});
}
// for function V18
{
this.AddChild(new CVariation(V18) { Attribute = new Variation("Parse a invalid xml DTD SYSTEM PUBLIC.Ignore") { Param = 1 } });
this.AddChild(new CVariation(V18) { Attribute = new Variation("Parse a invalid xml DTD SYSTEM PUBLIC.Prohibit") { Param = 0 } });
//this.AddChild(new CVariation(V18){ Attribute = new Variation("Parse a invalid xml DTD SYSTEM PUBLIC.Parse"){ Param = 2}});
}
// for function V19
{
this.AddChild(new CVariation(V19) { Attribute = new Variation("6.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 6 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("8.PParsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 8 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("9.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 9 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("9.Parsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 9 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("10.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 10 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("10.Parsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 10 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("11.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 11 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("11.Parsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 11 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("12.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 12 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("12.Parsing invalid xml version.Ignore") { Params = new object[] { DtdProcessing.Ignore, 12 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("1.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 1 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("1.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 1 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("2.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 2 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("7.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 7 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("7.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 7 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("8.Parsing invalid xml version.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 8 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("2.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 2 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("3.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 3 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("3.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 3 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("4.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 4 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("4.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 4 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("5.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 5 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("5.Parsing invalid DOCTYPE.Ignore") { Params = new object[] { DtdProcessing.Ignore, 5 } } });
this.AddChild(new CVariation(V19) { Attribute = new Variation("6.Parsing invalid DOCTYPE.Prohibit") { Params = new object[] { DtdProcessing.Prohibit, 6 } } });
}
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MetadataPropertyDescriptorWrapper.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.ComponentModel.DataAnnotations
{
internal sealed class MetadataPropertyDescriptorWrapper : PropertyDescriptor
{
private readonly PropertyDescriptor _descriptor;
private readonly bool _isReadOnly;
public MetadataPropertyDescriptorWrapper(PropertyDescriptor descriptor, Attribute[] newAttributes)
: base(descriptor, newAttributes)
{
_descriptor = descriptor;
foreach (Attribute attribute in newAttributes)
{
if (attribute is ReadOnlyAttribute readOnlyAttribute)
{
_isReadOnly = readOnlyAttribute.IsReadOnly;
break;
}
}
}
public override void AddValueChanged(object component, EventHandler handler) { _descriptor.AddValueChanged(component, handler); }
public override bool CanResetValue(object component) { return _descriptor.CanResetValue(component); }
public override Type ComponentType { get { return _descriptor.ComponentType; } }
public override object? GetValue(object? component) { return _descriptor.GetValue(component); }
public override bool IsReadOnly
{
get
{
// Dev10 Bug 594083
// It's not enough to call the wrapped _descriptor because it does not know anything about
// new attributes passed into the constructor of this class.
return _isReadOnly || _descriptor.IsReadOnly;
}
}
public override Type PropertyType { get { return _descriptor.PropertyType; } }
public override void RemoveValueChanged(object component, EventHandler handler) { _descriptor.RemoveValueChanged(component, handler); }
public override void ResetValue(object component) { _descriptor.ResetValue(component); }
public override void SetValue(object? component, object? value) { _descriptor.SetValue(component, value); }
public override bool ShouldSerializeValue(object component) { return _descriptor.ShouldSerializeValue(component); }
public override bool SupportsChangeEvents { get { return _descriptor.SupportsChangeEvents; } }
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.ComponentModel.DataAnnotations
{
internal sealed class MetadataPropertyDescriptorWrapper : PropertyDescriptor
{
private readonly PropertyDescriptor _descriptor;
private readonly bool _isReadOnly;
public MetadataPropertyDescriptorWrapper(PropertyDescriptor descriptor, Attribute[] newAttributes)
: base(descriptor, newAttributes)
{
_descriptor = descriptor;
foreach (Attribute attribute in newAttributes)
{
if (attribute is ReadOnlyAttribute readOnlyAttribute)
{
_isReadOnly = readOnlyAttribute.IsReadOnly;
break;
}
}
}
public override void AddValueChanged(object component, EventHandler handler) { _descriptor.AddValueChanged(component, handler); }
public override bool CanResetValue(object component) { return _descriptor.CanResetValue(component); }
public override Type ComponentType { get { return _descriptor.ComponentType; } }
public override object? GetValue(object? component) { return _descriptor.GetValue(component); }
public override bool IsReadOnly
{
get
{
// Dev10 Bug 594083
// It's not enough to call the wrapped _descriptor because it does not know anything about
// new attributes passed into the constructor of this class.
return _isReadOnly || _descriptor.IsReadOnly;
}
}
public override Type PropertyType { get { return _descriptor.PropertyType; } }
public override void RemoveValueChanged(object component, EventHandler handler) { _descriptor.RemoveValueChanged(component, handler); }
public override void ResetValue(object component) { _descriptor.ResetValue(component); }
public override void SetValue(object? component, object? value) { _descriptor.SetValue(component, value); }
public override bool ShouldSerializeValue(object component) { return _descriptor.ShouldSerializeValue(component); }
public override bool SupportsChangeEvents { get { return _descriptor.SupportsChangeEvents; } }
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueContentsMarshalKindValidator.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.Interop
{
/// <summary>
/// An <see cref="IMarshallingGeneratorFactory"/> implementation that wraps an inner <see cref="IMarshallingGeneratorFactory"/> instance and validates that the <see cref="TypePositionInfo.ByValueContentsMarshalKind"/> on the provided <see cref="TypePositionInfo"/> is valid in the current marshalling scenario.
/// </summary>
public class ByValueContentsMarshalKindValidator : IMarshallingGeneratorFactory
{
private readonly IMarshallingGeneratorFactory _inner;
public ByValueContentsMarshalKindValidator(IMarshallingGeneratorFactory inner)
{
_inner = inner;
}
public IMarshallingGenerator Create(TypePositionInfo info, StubCodeContext context)
{
return ValidateByValueMarshalKind(info, context, _inner.Create(info, context));
}
private static IMarshallingGenerator ValidateByValueMarshalKind(TypePositionInfo info, StubCodeContext context, IMarshallingGenerator generator)
{
if (generator is Forwarder)
{
// Forwarder allows everything since it just forwards to a P/Invoke.
return generator;
}
if (info.IsByRef && info.ByValueContentsMarshalKind != ByValueContentsMarshalKind.Default)
{
throw new MarshallingNotSupportedException(info, context)
{
NotSupportedDetails = Resources.InOutAttributeByRefNotSupported
};
}
else if (info.ByValueContentsMarshalKind == ByValueContentsMarshalKind.In)
{
throw new MarshallingNotSupportedException(info, context)
{
NotSupportedDetails = Resources.InAttributeNotSupportedWithoutOut
};
}
else if (info.ByValueContentsMarshalKind != ByValueContentsMarshalKind.Default
&& !generator.SupportsByValueMarshalKind(info.ByValueContentsMarshalKind, context))
{
throw new MarshallingNotSupportedException(info, context)
{
NotSupportedDetails = Resources.InOutAttributeMarshalerNotSupported
};
}
return generator;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.Interop
{
/// <summary>
/// An <see cref="IMarshallingGeneratorFactory"/> implementation that wraps an inner <see cref="IMarshallingGeneratorFactory"/> instance and validates that the <see cref="TypePositionInfo.ByValueContentsMarshalKind"/> on the provided <see cref="TypePositionInfo"/> is valid in the current marshalling scenario.
/// </summary>
public class ByValueContentsMarshalKindValidator : IMarshallingGeneratorFactory
{
private readonly IMarshallingGeneratorFactory _inner;
public ByValueContentsMarshalKindValidator(IMarshallingGeneratorFactory inner)
{
_inner = inner;
}
public IMarshallingGenerator Create(TypePositionInfo info, StubCodeContext context)
{
return ValidateByValueMarshalKind(info, context, _inner.Create(info, context));
}
private static IMarshallingGenerator ValidateByValueMarshalKind(TypePositionInfo info, StubCodeContext context, IMarshallingGenerator generator)
{
if (generator is Forwarder)
{
// Forwarder allows everything since it just forwards to a P/Invoke.
return generator;
}
if (info.IsByRef && info.ByValueContentsMarshalKind != ByValueContentsMarshalKind.Default)
{
throw new MarshallingNotSupportedException(info, context)
{
NotSupportedDetails = Resources.InOutAttributeByRefNotSupported
};
}
else if (info.ByValueContentsMarshalKind == ByValueContentsMarshalKind.In)
{
throw new MarshallingNotSupportedException(info, context)
{
NotSupportedDetails = Resources.InAttributeNotSupportedWithoutOut
};
}
else if (info.ByValueContentsMarshalKind != ByValueContentsMarshalKind.Default
&& !generator.SupportsByValueMarshalKind(info.ByValueContentsMarshalKind, context))
{
throw new MarshallingNotSupportedException(info, context)
{
NotSupportedDetails = Resources.InOutAttributeMarshalerNotSupported
};
}
return generator;
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/Regression/JitBlue/GitHub_6318/GitHub_6318.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.CompilerServices;
using System.Numerics;
namespace N
{
public static class C
{
public static int Main(string[] args)
{
// Regression test for an issue with assertion prop leading
// to the wrong exception being thrown from Vector<T>.CopyTo
try
{
Foo(Vector<int>.Zero);
}
catch (System.ArgumentOutOfRangeException)
{
// Caught the right exception
return 100;
}
catch
{
// Caught the wrong exception
return -1;
}
// Caught no exception
return -2;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static int Foo(Vector<int> vec)
{
int[] a = new int[5];
// The index [5] is outside the bounds of array 'a',
// so this should throw ArgumentOutOfRangeException.
// There's a subsequent check for whether the destination
// has enough space to receive the vector, which would
// raise an ArgumentException; the bug was that assertion
// prop was using the later exception check to prove the
// prior one "redundant" because the commas confused the
// ordering.
vec.CopyTo(a, 5);
return a[0];
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.CompilerServices;
using System.Numerics;
namespace N
{
public static class C
{
public static int Main(string[] args)
{
// Regression test for an issue with assertion prop leading
// to the wrong exception being thrown from Vector<T>.CopyTo
try
{
Foo(Vector<int>.Zero);
}
catch (System.ArgumentOutOfRangeException)
{
// Caught the right exception
return 100;
}
catch
{
// Caught the wrong exception
return -1;
}
// Caught no exception
return -2;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static int Foo(Vector<int> vec)
{
int[] a = new int[5];
// The index [5] is outside the bounds of array 'a',
// so this should throw ArgumentOutOfRangeException.
// There's a subsequent check for whether the destination
// has enough space to receive the vector, which would
// raise an ArgumentException; the bug was that assertion
// prop was using the later exception check to prove the
// prior one "redundant" because the commas confused the
// ordering.
vec.CopyTo(a, 5);
return a[0];
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/Regression/JitBlue/GitHub_22556/GitHub_22556.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Net.Sockets
{
public enum IOControlCode : long
{
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
EnableCircularQueuing = (long)671088642,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
Flush = (long)671088644,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AddressListChange = (long)671088663,
DataToRead = (long)1074030207,
OobDataRead = (long)1074033415,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
GetBroadcastAddress = (long)1207959557,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AddressListQuery = (long)1207959574,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
QueryTargetPnpHandle = (long)1207959576,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AsyncIO = (long)2147772029,
NonBlockingIO = (long)2147772030,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AssociateHandle = (long)2281701377,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
MultipointLoopback = (long)2281701385,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
MulticastScope = (long)2281701386,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
SetQos = (long)2281701387,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
SetGroupQos = (long)2281701388,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
RoutingInterfaceChange = (long)2281701397,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
NamespaceChange = (long)2281701401,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
ReceiveAll = (long)2550136833,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
ReceiveAllMulticast = (long)2550136834,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
ReceiveAllIgmpMulticast = (long)2550136835,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
KeepAliveValues = (long)2550136836,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AbsorbRouterAlert = (long)2550136837,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
UnicastInterface = (long)2550136838,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
LimitBroadcasts = (long)2550136839,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
BindToInterface = (long)2550136840,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
MulticastInterface = (long)2550136841,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AddMulticastGroupOnInterface = (long)2550136842,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
DeleteMulticastGroupFromInterface = (long)2550136843,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
GetExtensionFunctionPointer = (long)3355443206,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
GetQos = (long)3355443207,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
GetGroupQos = (long)3355443208,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
TranslateHandle = (long)3355443213,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
RoutingInterfaceQuery = (long)3355443220,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AddressListSort = (long)3355443225,
}
public partial struct IPPacketInformation : System.IEquatable<System.Net.Sockets.IPPacketInformation>
{
private object _dummy;
private int _dummyPrimitive;
public System.Net.IPAddress Address { get { throw null; } }
public int Interface { get { throw null; } }
public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object? comparand) { throw null; }
public bool Equals(System.Net.Sockets.IPPacketInformation other) { throw null; }
public override int GetHashCode() { throw null; }
public static bool operator ==(System.Net.Sockets.IPPacketInformation packetInformation1, System.Net.Sockets.IPPacketInformation packetInformation2) { throw null; }
public static bool operator !=(System.Net.Sockets.IPPacketInformation packetInformation1, System.Net.Sockets.IPPacketInformation packetInformation2) { throw null; }
}
public enum IPProtectionLevel
{
Unspecified = -1,
Unrestricted = 10,
EdgeRestricted = 20,
Restricted = 30,
}
public partial class IPv6MulticastOption
{
public IPv6MulticastOption(System.Net.IPAddress group) { }
public IPv6MulticastOption(System.Net.IPAddress group, long ifindex) { }
public System.Net.IPAddress Group { get { throw null; } set { } }
public long InterfaceIndex { get { throw null; } set { } }
}
public partial class LingerOption
{
public LingerOption(bool enable, int seconds) { }
public bool Enabled { get { throw null; } set { } }
public int LingerTime { get { throw null; } set { } }
}
public partial class MulticastOption
{
public MulticastOption(System.Net.IPAddress group) { }
public MulticastOption(System.Net.IPAddress group, int interfaceIndex) { }
public MulticastOption(System.Net.IPAddress group, System.Net.IPAddress mcint) { }
public System.Net.IPAddress Group { get { throw null; } set { } }
public int InterfaceIndex { get { throw null; } set { } }
public System.Net.IPAddress? LocalAddress { get { throw null; } set { } }
}
public partial class NetworkStream : System.IO.Stream
{
public NetworkStream(System.Net.Sockets.Socket socket) { }
public NetworkStream(System.Net.Sockets.Socket socket, bool ownsSocket) { }
public NetworkStream(System.Net.Sockets.Socket socket, System.IO.FileAccess access) { }
public NetworkStream(System.Net.Sockets.Socket socket, System.IO.FileAccess access, bool ownsSocket) { }
public override bool CanRead { get { throw null; } }
public override bool CanSeek { get { throw null; } }
public override bool CanTimeout { get { throw null; } }
public override bool CanWrite { get { throw null; } }
public virtual bool DataAvailable { get { throw null; } }
public override long Length { get { throw null; } }
public override long Position { get { throw null; } set { } }
protected bool Readable { get { throw null; } set { } }
public override int ReadTimeout { get { throw null; } set { } }
public System.Net.Sockets.Socket Socket { get { throw null; } }
protected bool Writeable { get { throw null; } set { } }
public override int WriteTimeout { get { throw null; } set { } }
public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback? callback, object? state) { throw null; }
public override System.IAsyncResult BeginWrite(byte[] buffer, int offset, int count, System.AsyncCallback? callback, object? state) { throw null; }
public void Close(int timeout) { }
protected override void Dispose(bool disposing) { }
public override int EndRead(System.IAsyncResult asyncResult) { throw null; }
public override void EndWrite(System.IAsyncResult asyncResult) { }
~NetworkStream() { }
public override void Flush() { }
public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public override int Read(byte[] buffer, int offset, int count) { throw null; }
public override int Read(System.Span<byte> buffer) { throw null; }
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public override int ReadByte() { throw null; }
public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; }
public override void SetLength(long value) { }
public override void Write(byte[] buffer, int offset, int count) { }
public override void Write(System.ReadOnlySpan<byte> buffer) { }
public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public override void WriteByte(byte value) { }
}
public enum ProtocolFamily
{
Unknown = -1,
Unspecified = 0,
Unix = 1,
InterNetwork = 2,
ImpLink = 3,
Pup = 4,
Chaos = 5,
Ipx = 6,
NS = 6,
Iso = 7,
Osi = 7,
Ecma = 8,
DataKit = 9,
Ccitt = 10,
Sna = 11,
DecNet = 12,
DataLink = 13,
Lat = 14,
HyperChannel = 15,
AppleTalk = 16,
NetBios = 17,
VoiceView = 18,
FireFox = 19,
Banyan = 21,
Atm = 22,
InterNetworkV6 = 23,
Cluster = 24,
Ieee12844 = 25,
Irda = 26,
NetworkDesigners = 28,
Max = 29,
Packet = 65536,
ControllerAreaNetwork = 65537,
}
public enum ProtocolType
{
Unknown = -1,
IP = 0,
IPv6HopByHopOptions = 0,
Unspecified = 0,
Icmp = 1,
Igmp = 2,
Ggp = 3,
IPv4 = 4,
Tcp = 6,
Pup = 12,
Udp = 17,
Idp = 22,
IPv6 = 41,
IPv6RoutingHeader = 43,
IPv6FragmentHeader = 44,
IPSecEncapsulatingSecurityPayload = 50,
IPSecAuthenticationHeader = 51,
IcmpV6 = 58,
IPv6NoNextHeader = 59,
IPv6DestinationOptions = 60,
ND = 77,
Raw = 255,
Ipx = 1000,
Spx = 1256,
SpxII = 1257,
}
public sealed partial class SafeSocketHandle : Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid
{
public SafeSocketHandle() : base (default(bool)) { }
public SafeSocketHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base (default(bool)) { }
protected override bool ReleaseHandle() { throw null; }
}
public enum SelectMode
{
SelectRead = 0,
SelectWrite = 1,
SelectError = 2,
}
public partial class SendPacketsElement
{
public SendPacketsElement(byte[] buffer) { }
public SendPacketsElement(byte[] buffer, int offset, int count) { }
public SendPacketsElement(byte[] buffer, int offset, int count, bool endOfPacket) { }
public SendPacketsElement(ReadOnlyMemory<byte> buffer) { }
public SendPacketsElement(ReadOnlyMemory<byte> buffer, bool endOfPacket) { }
public SendPacketsElement(System.IO.FileStream fileStream) { }
public SendPacketsElement(System.IO.FileStream fileStream, long offset, int count) { }
public SendPacketsElement(System.IO.FileStream fileStream, long offset, int count, bool endOfPacket) { }
public SendPacketsElement(string filepath) { }
public SendPacketsElement(string filepath, int offset, int count) { }
public SendPacketsElement(string filepath, int offset, int count, bool endOfPacket) { }
public SendPacketsElement(string filepath, long offset, int count) { }
public SendPacketsElement(string filepath, long offset, int count, bool endOfPacket) { }
public byte[]? Buffer { get { throw null; } }
public int Count { get { throw null; } }
public bool EndOfPacket { get { throw null; } }
public string? FilePath { get { throw null; } }
public System.IO.FileStream? FileStream { get { throw null; } }
public ReadOnlyMemory<byte>? MemoryBuffer { get { throw null; } }
public int Offset { get { throw null; } }
public long OffsetLong { get { throw null; } }
}
public partial class Socket : System.IDisposable
{
public Socket(System.Net.Sockets.SafeSocketHandle handle) { }
public Socket(System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public Socket(System.Net.Sockets.SocketInformation socketInformation) { }
public Socket(System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) { }
public System.Net.Sockets.AddressFamily AddressFamily { get { throw null; } }
public int Available { get { throw null; } }
public bool Blocking { get { throw null; } set { } }
public bool Connected { get { throw null; } }
public bool DontFragment { get { throw null; } set { } }
public bool DualMode { get { throw null; } set { } }
public bool EnableBroadcast { get { throw null; } set { } }
public bool ExclusiveAddressUse { get { throw null; } set { } }
public System.IntPtr Handle { get { throw null; } }
public bool IsBound { get { throw null; } }
[System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
public System.Net.Sockets.LingerOption? LingerState { get { throw null; } set { } }
public System.Net.EndPoint? LocalEndPoint { get { throw null; } }
public bool MulticastLoopback { get { throw null; } set { } }
public bool NoDelay { get { throw null; } set { } }
public static bool OSSupportsIPv4 { get { throw null; } }
public static bool OSSupportsIPv6 { get { throw null; } }
public static bool OSSupportsUnixDomainSockets { get { throw null; } }
public System.Net.Sockets.ProtocolType ProtocolType { get { throw null; } }
public int ReceiveBufferSize { get { throw null; } set { } }
public int ReceiveTimeout { get { throw null; } set { } }
public System.Net.EndPoint? RemoteEndPoint { get { throw null; } }
public System.Net.Sockets.SafeSocketHandle SafeHandle { get { throw null; } }
public int SendBufferSize { get { throw null; } set { } }
public int SendTimeout { get { throw null; } set { } }
public System.Net.Sockets.SocketType SocketType { get { throw null; } }
[System.ObsoleteAttribute("SupportsIPv4 has been deprecated. Use OSSupportsIPv4 instead.")]
public static bool SupportsIPv4 { get { throw null; } }
[System.ObsoleteAttribute("SupportsIPv6 has been deprecated. Use OSSupportsIPv6 instead.")]
public static bool SupportsIPv6 { get { throw null; } }
public short Ttl { get { throw null; } set { } }
[System.ObsoleteAttribute("UseOnlyOverlappedIO has been deprecated and is not supported.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public bool UseOnlyOverlappedIO { get { throw null; } set { } }
public System.Net.Sockets.Socket Accept() { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptAsync() { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.Socket> AcceptAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptAsync(System.Net.Sockets.Socket? acceptSocket) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.Socket> AcceptAsync(System.Net.Sockets.Socket? acceptSocket, System.Threading.CancellationToken cancellationToken) { throw null; }
public bool AcceptAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public System.IAsyncResult BeginAccept(System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginAccept(int receiveSize, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginAccept(System.Net.Sockets.Socket? acceptSocket, int receiveSize, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(System.Net.EndPoint remoteEP, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(System.Net.IPAddress address, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(System.Net.IPAddress[] addresses, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(string host, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginDisconnect(bool reuseSocket, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginReceive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult? BeginReceive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginReceive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult? BeginReceive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginReceiveFrom(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginReceiveMessageFrom(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSend(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult? BeginSend(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSend(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult? BeginSend(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSendFile(string? fileName, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSendFile(string? fileName, byte[]? preBuffer, byte[]? postBuffer, System.Net.Sockets.TransmitFileOptions flags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP, System.AsyncCallback? callback, object? state) { throw null; }
public void Bind(System.Net.EndPoint localEP) { }
public static void CancelConnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) { }
public void Close() { }
public void Close(int timeout) { }
public void Connect(System.Net.EndPoint remoteEP) { }
public void Connect(System.Net.IPAddress address, int port) { }
public void Connect(System.Net.IPAddress[] addresses, int port) { }
public void Connect(string host, int port) { }
public System.Threading.Tasks.Task ConnectAsync(System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress address, int port) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress address, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress[] addresses, int port) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress[] addresses, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(string host, int port) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(string host, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public bool ConnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public static bool ConnectAsync(System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType, System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public void Disconnect(bool reuseSocket) { }
public bool DisconnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public System.Threading.Tasks.ValueTask DisconnectAsync(bool reuseSocket, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public System.Net.Sockets.SocketInformation DuplicateAndClose(int targetProcessId) { throw null; }
public System.Net.Sockets.Socket EndAccept(out byte[] buffer, System.IAsyncResult asyncResult) { throw null; }
public System.Net.Sockets.Socket EndAccept(out byte[] buffer, out int bytesTransferred, System.IAsyncResult asyncResult) { throw null; }
public System.Net.Sockets.Socket EndAccept(System.IAsyncResult asyncResult) { throw null; }
public void EndConnect(System.IAsyncResult asyncResult) { }
public void EndDisconnect(System.IAsyncResult asyncResult) { }
public int EndReceive(System.IAsyncResult asyncResult) { throw null; }
public int EndReceive(System.IAsyncResult asyncResult, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int EndReceiveFrom(System.IAsyncResult asyncResult, ref System.Net.EndPoint endPoint) { throw null; }
public int EndReceiveMessageFrom(System.IAsyncResult asyncResult, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint endPoint, out System.Net.Sockets.IPPacketInformation ipPacketInformation) { throw null; }
public int EndSend(System.IAsyncResult asyncResult) { throw null; }
public int EndSend(System.IAsyncResult asyncResult, out System.Net.Sockets.SocketError errorCode) { throw null; }
public void EndSendFile(System.IAsyncResult asyncResult) { }
public int EndSendTo(System.IAsyncResult asyncResult) { throw null; }
~Socket() { }
public int GetRawSocketOption(int optionLevel, int optionName, System.Span<byte> optionValue) { throw null; }
public object? GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName) { throw null; }
public void GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, byte[] optionValue) { }
public byte[] GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, int optionLength) { throw null; }
public int IOControl(int ioControlCode, byte[]? optionInValue, byte[]? optionOutValue) { throw null; }
public int IOControl(System.Net.Sockets.IOControlCode ioControlCode, byte[]? optionInValue, byte[]? optionOutValue) { throw null; }
public void Listen() { }
public void Listen(int backlog) { }
public bool Poll(int microSeconds, System.Net.Sockets.SelectMode mode) { throw null; }
public int Receive(byte[] buffer) { throw null; }
public int Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int Receive(byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(byte[] buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw null; }
public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int Receive(System.Span<byte> buffer) { throw null; }
public int Receive(System.Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(System.Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public System.Threading.Tasks.Task<int> ReceiveAsync(System.ArraySegment<byte> buffer) { throw null; }
public System.Threading.Tasks.Task<int> ReceiveAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public System.Threading.Tasks.Task<int> ReceiveAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw null; }
public System.Threading.Tasks.Task<int> ReceiveAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public System.Threading.Tasks.ValueTask<int> ReceiveAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask<int> ReceiveAsync(System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool ReceiveAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public int ReceiveFrom(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(byte[] buffer, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(byte[] buffer, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(System.Span<byte> buffer, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(System.Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEndPoint) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.Memory<byte> buffer, System.Net.EndPoint remoteEndPoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool ReceiveFromAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public int ReceiveMessageFrom(byte[] buffer, int offset, int size, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, out System.Net.Sockets.IPPacketInformation ipPacketInformation) { throw null; }
public int ReceiveMessageFrom(System.Span<byte> buffer, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, out System.Net.Sockets.IPPacketInformation ipPacketInformation) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEndPoint) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.Memory<byte> buffer, System.Net.EndPoint remoteEndPoint, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public bool ReceiveMessageFromAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public static void Select(System.Collections.IList? checkRead, System.Collections.IList? checkWrite, System.Collections.IList? checkError, int microSeconds) { }
public int Send(byte[] buffer) { throw null; }
public int Send(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int Send(byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(byte[] buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw null; }
public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int Send(System.ReadOnlySpan<byte> buffer) { throw null; }
public int Send(System.ReadOnlySpan<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(System.ReadOnlySpan<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(System.ArraySegment<byte> buffer) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool SendAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public void SendFile(string? fileName) { }
public void SendFile(string? fileName, byte[]? preBuffer, byte[]? postBuffer, System.Net.Sockets.TransmitFileOptions flags) { }
public void SendFile(string? fileName, System.ReadOnlySpan<byte> preBuffer, System.ReadOnlySpan<byte> postBuffer, System.Net.Sockets.TransmitFileOptions flags) { }
public System.Threading.Tasks.ValueTask SendFileAsync(string? fileName, System.ReadOnlyMemory<byte> preBuffer, System.ReadOnlyMemory<byte> postBuffer, System.Net.Sockets.TransmitFileOptions flags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask SendFileAsync(string? fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool SendPacketsAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public int SendTo(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(byte[] buffer, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(byte[] buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(System.ReadOnlySpan<byte> buffer, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(System.ReadOnlySpan<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.Task<int> SendToAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.Task<int> SendToAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendToAsync(System.ReadOnlyMemory<byte> buffer, System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendToAsync(System.ReadOnlyMemory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool SendToAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public void SetIPProtectionLevel(System.Net.Sockets.IPProtectionLevel level) { }
public void SetRawSocketOption(int optionLevel, int optionName, System.ReadOnlySpan<byte> optionValue) { }
public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, bool optionValue) { }
public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, byte[] optionValue) { }
public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, int optionValue) { }
public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, object optionValue) { }
public void Shutdown(System.Net.Sockets.SocketShutdown how) { }
}
public partial class SocketAsyncEventArgs : System.EventArgs, System.IDisposable
{
public SocketAsyncEventArgs() { }
public SocketAsyncEventArgs(bool unsafeSuppressExecutionContextFlow) { }
public System.Net.Sockets.Socket? AcceptSocket { get { throw null; } set { } }
public byte[]? Buffer { get { throw null; } }
public System.Collections.Generic.IList<System.ArraySegment<byte>>? BufferList { get { throw null; } set { } }
public int BytesTransferred { get { throw null; } }
public System.Exception? ConnectByNameError { get { throw null; } }
public System.Net.Sockets.Socket? ConnectSocket { get { throw null; } }
public int Count { get { throw null; } }
public bool DisconnectReuseSocket { get { throw null; } set { } }
public System.Net.Sockets.SocketAsyncOperation LastOperation { get { throw null; } }
public System.Memory<byte> MemoryBuffer { get { throw null; } }
public int Offset { get { throw null; } }
public System.Net.Sockets.IPPacketInformation ReceiveMessageFromPacketInfo { get { throw null; } }
public System.Net.EndPoint? RemoteEndPoint { get { throw null; } set { } }
public System.Net.Sockets.SendPacketsElement[]? SendPacketsElements { get { throw null; } set { } }
public System.Net.Sockets.TransmitFileOptions SendPacketsFlags { get { throw null; } set { } }
public int SendPacketsSendSize { get { throw null; } set { } }
public System.Net.Sockets.SocketError SocketError { get { throw null; } set { } }
public System.Net.Sockets.SocketFlags SocketFlags { get { throw null; } set { } }
public object? UserToken { get { throw null; } set { } }
public event System.EventHandler<System.Net.Sockets.SocketAsyncEventArgs>? Completed { add { } remove { } }
public void Dispose() { }
~SocketAsyncEventArgs() { }
protected virtual void OnCompleted(System.Net.Sockets.SocketAsyncEventArgs e) { }
public void SetBuffer(byte[]? buffer, int offset, int count) { }
public void SetBuffer(int offset, int count) { }
public void SetBuffer(System.Memory<byte> buffer) { }
}
public enum SocketAsyncOperation
{
None = 0,
Accept = 1,
Connect = 2,
Disconnect = 3,
Receive = 4,
ReceiveFrom = 5,
ReceiveMessageFrom = 6,
Send = 7,
SendPackets = 8,
SendTo = 9,
}
[System.FlagsAttribute]
public enum SocketFlags
{
None = 0,
OutOfBand = 1,
Peek = 2,
DontRoute = 4,
Truncated = 256,
ControlDataTruncated = 512,
Broadcast = 1024,
Multicast = 2048,
Partial = 32768,
}
public partial struct SocketInformation
{
private object _dummy;
private int _dummyPrimitive;
public System.Net.Sockets.SocketInformationOptions Options { readonly get { throw null; } set { } }
public byte[] ProtocolInformation { readonly get { throw null; } set { } }
}
[System.FlagsAttribute]
public enum SocketInformationOptions
{
NonBlocking = 1,
Connected = 2,
Listening = 4,
[System.ObsoleteAttribute("SocketInformationOptions.UseOnlyOverlappedIO has been deprecated and is not supported.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
UseOnlyOverlappedIO = 8,
}
public enum SocketOptionLevel
{
IP = 0,
Tcp = 6,
Udp = 17,
IPv6 = 41,
Socket = 65535,
}
public enum SocketOptionName
{
DontLinger = -129,
ExclusiveAddressUse = -5,
Debug = 1,
IPOptions = 1,
NoChecksum = 1,
NoDelay = 1,
AcceptConnection = 2,
BsdUrgent = 2,
Expedited = 2,
HeaderIncluded = 2,
TcpKeepAliveTime = 3,
TypeOfService = 3,
IpTimeToLive = 4,
ReuseAddress = 4,
KeepAlive = 8,
MulticastInterface = 9,
MulticastTimeToLive = 10,
MulticastLoopback = 11,
AddMembership = 12,
DropMembership = 13,
DontFragment = 14,
AddSourceMembership = 15,
DontRoute = 16,
DropSourceMembership = 16,
TcpKeepAliveRetryCount = 16,
BlockSource = 17,
TcpKeepAliveInterval = 17,
UnblockSource = 18,
PacketInformation = 19,
ChecksumCoverage = 20,
HopLimit = 21,
IPProtectionLevel = 23,
IPv6Only = 27,
Broadcast = 32,
UseLoopback = 64,
Linger = 128,
OutOfBandInline = 256,
SendBuffer = 4097,
ReceiveBuffer = 4098,
SendLowWater = 4099,
ReceiveLowWater = 4100,
SendTimeout = 4101,
ReceiveTimeout = 4102,
Error = 4103,
Type = 4104,
ReuseUnicastPort = 12295,
UpdateAcceptContext = 28683,
UpdateConnectContext = 28688,
MaxConnections = 2147483647,
}
public partial struct SocketReceiveFromResult
{
public int ReceivedBytes;
public System.Net.EndPoint RemoteEndPoint;
}
public partial struct SocketReceiveMessageFromResult
{
public System.Net.Sockets.IPPacketInformation PacketInformation;
public int ReceivedBytes;
public System.Net.EndPoint RemoteEndPoint;
public System.Net.Sockets.SocketFlags SocketFlags;
}
public enum SocketShutdown
{
Receive = 0,
Send = 1,
Both = 2,
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static partial class SocketTaskExtensions
{
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptAsync(this System.Net.Sockets.Socket socket) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptAsync(this System.Net.Sockets.Socket socket, System.Net.Sockets.Socket? acceptSocket) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.EndPoint remoteEP) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress address, int port) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress address, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress[] addresses, int port) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress[] addresses, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, string host, int port) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, string host, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> SendAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> SendAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask<int> SendAsync(this System.Net.Sockets.Socket socket, System.ReadOnlyMemory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> SendToAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
}
public enum SocketType
{
Unknown = -1,
Stream = 1,
Dgram = 2,
Raw = 3,
Rdm = 4,
Seqpacket = 5,
}
public partial class TcpClient : System.IDisposable
{
public TcpClient() { }
public TcpClient(System.Net.IPEndPoint localEP) { }
public TcpClient(System.Net.Sockets.AddressFamily family) { }
public TcpClient(string hostname, int port) { }
protected bool Active { get { throw null; } set { } }
public int Available { get { throw null; } }
public System.Net.Sockets.Socket Client { get { throw null; } set { } }
public bool Connected { get { throw null; } }
public bool ExclusiveAddressUse { get { throw null; } set { } }
[System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
public System.Net.Sockets.LingerOption? LingerState { get { throw null; } set { } }
public bool NoDelay { get { throw null; } set { } }
public int ReceiveBufferSize { get { throw null; } set { } }
public int ReceiveTimeout { get { throw null; } set { } }
public int SendBufferSize { get { throw null; } set { } }
public int SendTimeout { get { throw null; } set { } }
public System.IAsyncResult BeginConnect(System.Net.IPAddress address, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(System.Net.IPAddress[] addresses, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(string host, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public void Close() { }
public void Connect(System.Net.IPAddress address, int port) { }
public void Connect(System.Net.IPAddress[] ipAddresses, int port) { }
public void Connect(System.Net.IPEndPoint remoteEP) { }
public void Connect(string hostname, int port) { }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress address, int port) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress[] addresses, int port) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(string host, int port) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPEndPoint remoteEP) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress address, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress[] addresses, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(string host, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPEndPoint remoteEP, System.Threading.CancellationToken cancellationToken) { throw null; }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
public void EndConnect(System.IAsyncResult asyncResult) { }
~TcpClient() { }
public System.Net.Sockets.NetworkStream GetStream() { throw null; }
}
public partial class TcpListener
{
[System.ObsoleteAttribute("This constructor has been deprecated. Use TcpListener(IPAddress localaddr, int port) instead.")]
public TcpListener(int port) { }
public TcpListener(System.Net.IPAddress localaddr, int port) { }
public TcpListener(System.Net.IPEndPoint localEP) { }
protected bool Active { get { throw null; } }
public bool ExclusiveAddressUse { get { throw null; } set { } }
public System.Net.EndPoint LocalEndpoint { get { throw null; } }
public System.Net.Sockets.Socket Server { get { throw null; } }
public System.Net.Sockets.Socket AcceptSocket() { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptSocketAsync() { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.Socket> AcceptSocketAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Net.Sockets.TcpClient AcceptTcpClient() { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.TcpClient> AcceptTcpClientAsync() { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.TcpClient> AcceptTcpClientAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public void AllowNatTraversal(bool allowed) { }
public System.IAsyncResult BeginAcceptSocket(System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginAcceptTcpClient(System.AsyncCallback? callback, object? state) { throw null; }
public static System.Net.Sockets.TcpListener Create(int port) { throw null; }
public System.Net.Sockets.Socket EndAcceptSocket(System.IAsyncResult asyncResult) { throw null; }
public System.Net.Sockets.TcpClient EndAcceptTcpClient(System.IAsyncResult asyncResult) { throw null; }
public bool Pending() { throw null; }
public void Start() { }
public void Start(int backlog) { }
public void Stop() { }
}
[System.FlagsAttribute]
public enum TransmitFileOptions
{
UseDefaultWorkerThread = 0,
Disconnect = 1,
ReuseSocket = 2,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
WriteBehind = 4,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
UseSystemThread = 16,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
UseKernelApc = 32,
}
public partial class UdpClient : System.IDisposable
{
public UdpClient() { }
public UdpClient(int port) { }
public UdpClient(int port, System.Net.Sockets.AddressFamily family) { }
public UdpClient(System.Net.IPEndPoint localEP) { }
public UdpClient(System.Net.Sockets.AddressFamily family) { }
public UdpClient(string hostname, int port) { }
protected bool Active { get { throw null; } set { } }
public int Available { get { throw null; } }
public System.Net.Sockets.Socket Client { get { throw null; } set { } }
public bool DontFragment { get { throw null; } set { } }
public bool EnableBroadcast { get { throw null; } set { } }
public bool ExclusiveAddressUse { get { throw null; } set { } }
public bool MulticastLoopback { get { throw null; } set { } }
public short Ttl { get { throw null; } set { } }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public void AllowNatTraversal(bool allowed) { }
public System.IAsyncResult BeginReceive(System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginSend(byte[] datagram, int bytes, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginSend(byte[] datagram, int bytes, System.Net.IPEndPoint? endPoint, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginSend(byte[] datagram, int bytes, string? hostname, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public void Close() { }
public void Connect(System.Net.IPAddress addr, int port) { }
public void Connect(System.Net.IPEndPoint endPoint) { }
public void Connect(string hostname, int port) { }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
public void DropMulticastGroup(System.Net.IPAddress multicastAddr) { }
public void DropMulticastGroup(System.Net.IPAddress multicastAddr, int ifindex) { }
public byte[] EndReceive(System.IAsyncResult asyncResult, ref System.Net.IPEndPoint? remoteEP) { throw null; }
public int EndSend(System.IAsyncResult asyncResult) { throw null; }
public void JoinMulticastGroup(int ifindex, System.Net.IPAddress multicastAddr) { }
public void JoinMulticastGroup(System.Net.IPAddress multicastAddr) { }
public void JoinMulticastGroup(System.Net.IPAddress multicastAddr, int timeToLive) { }
public void JoinMulticastGroup(System.Net.IPAddress multicastAddr, System.Net.IPAddress localAddress) { }
public byte[] Receive([System.Diagnostics.CodeAnalysis.NotNullAttribute] ref System.Net.IPEndPoint? remoteEP) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.UdpReceiveResult> ReceiveAsync() { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.UdpReceiveResult> ReceiveAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public int Send(byte[] dgram, int bytes) { throw null; }
public int Send(System.ReadOnlySpan<byte> datagram) {throw null; }
public int Send(byte[] dgram, int bytes, System.Net.IPEndPoint? endPoint) { throw null; }
public int Send(System.ReadOnlySpan<byte> datagram, System.Net.IPEndPoint? endPoint) { throw null; }
public int Send(byte[] dgram, int bytes, string? hostname, int port) { throw null; }
public int Send(System.ReadOnlySpan<byte> datagram, string? hostname, int port) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(byte[] datagram, int bytes) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> datagram, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(byte[] datagram, int bytes, System.Net.IPEndPoint? endPoint) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> datagram, System.Net.IPEndPoint? endPoint, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(byte[] datagram, int bytes, string? hostname, int port) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> datagram, string? hostname, int port, System.Threading.CancellationToken cancellationToken = default) { throw null; }
}
public partial struct UdpReceiveResult : System.IEquatable<System.Net.Sockets.UdpReceiveResult>
{
private object _dummy;
private int _dummyPrimitive;
public UdpReceiveResult(byte[] buffer, System.Net.IPEndPoint remoteEndPoint) { throw null; }
public byte[] Buffer { get { throw null; } }
public System.Net.IPEndPoint RemoteEndPoint { get { throw null; } }
public bool Equals(System.Net.Sockets.UdpReceiveResult other) { throw null; }
public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object? obj) { throw null; }
public override int GetHashCode() { throw null; }
public static bool operator ==(System.Net.Sockets.UdpReceiveResult left, System.Net.Sockets.UdpReceiveResult right) { throw null; }
public static bool operator !=(System.Net.Sockets.UdpReceiveResult left, System.Net.Sockets.UdpReceiveResult right) { throw null; }
}
public sealed partial class UnixDomainSocketEndPoint : System.Net.EndPoint
{
public UnixDomainSocketEndPoint(string path) { }
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Net.Sockets
{
public enum IOControlCode : long
{
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
EnableCircularQueuing = (long)671088642,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
Flush = (long)671088644,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AddressListChange = (long)671088663,
DataToRead = (long)1074030207,
OobDataRead = (long)1074033415,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
GetBroadcastAddress = (long)1207959557,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AddressListQuery = (long)1207959574,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
QueryTargetPnpHandle = (long)1207959576,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AsyncIO = (long)2147772029,
NonBlockingIO = (long)2147772030,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AssociateHandle = (long)2281701377,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
MultipointLoopback = (long)2281701385,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
MulticastScope = (long)2281701386,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
SetQos = (long)2281701387,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
SetGroupQos = (long)2281701388,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
RoutingInterfaceChange = (long)2281701397,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
NamespaceChange = (long)2281701401,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
ReceiveAll = (long)2550136833,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
ReceiveAllMulticast = (long)2550136834,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
ReceiveAllIgmpMulticast = (long)2550136835,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
KeepAliveValues = (long)2550136836,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AbsorbRouterAlert = (long)2550136837,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
UnicastInterface = (long)2550136838,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
LimitBroadcasts = (long)2550136839,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
BindToInterface = (long)2550136840,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
MulticastInterface = (long)2550136841,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AddMulticastGroupOnInterface = (long)2550136842,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
DeleteMulticastGroupFromInterface = (long)2550136843,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
GetExtensionFunctionPointer = (long)3355443206,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
GetQos = (long)3355443207,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
GetGroupQos = (long)3355443208,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
TranslateHandle = (long)3355443213,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
RoutingInterfaceQuery = (long)3355443220,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
AddressListSort = (long)3355443225,
}
public partial struct IPPacketInformation : System.IEquatable<System.Net.Sockets.IPPacketInformation>
{
private object _dummy;
private int _dummyPrimitive;
public System.Net.IPAddress Address { get { throw null; } }
public int Interface { get { throw null; } }
public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object? comparand) { throw null; }
public bool Equals(System.Net.Sockets.IPPacketInformation other) { throw null; }
public override int GetHashCode() { throw null; }
public static bool operator ==(System.Net.Sockets.IPPacketInformation packetInformation1, System.Net.Sockets.IPPacketInformation packetInformation2) { throw null; }
public static bool operator !=(System.Net.Sockets.IPPacketInformation packetInformation1, System.Net.Sockets.IPPacketInformation packetInformation2) { throw null; }
}
public enum IPProtectionLevel
{
Unspecified = -1,
Unrestricted = 10,
EdgeRestricted = 20,
Restricted = 30,
}
public partial class IPv6MulticastOption
{
public IPv6MulticastOption(System.Net.IPAddress group) { }
public IPv6MulticastOption(System.Net.IPAddress group, long ifindex) { }
public System.Net.IPAddress Group { get { throw null; } set { } }
public long InterfaceIndex { get { throw null; } set { } }
}
public partial class LingerOption
{
public LingerOption(bool enable, int seconds) { }
public bool Enabled { get { throw null; } set { } }
public int LingerTime { get { throw null; } set { } }
}
public partial class MulticastOption
{
public MulticastOption(System.Net.IPAddress group) { }
public MulticastOption(System.Net.IPAddress group, int interfaceIndex) { }
public MulticastOption(System.Net.IPAddress group, System.Net.IPAddress mcint) { }
public System.Net.IPAddress Group { get { throw null; } set { } }
public int InterfaceIndex { get { throw null; } set { } }
public System.Net.IPAddress? LocalAddress { get { throw null; } set { } }
}
public partial class NetworkStream : System.IO.Stream
{
public NetworkStream(System.Net.Sockets.Socket socket) { }
public NetworkStream(System.Net.Sockets.Socket socket, bool ownsSocket) { }
public NetworkStream(System.Net.Sockets.Socket socket, System.IO.FileAccess access) { }
public NetworkStream(System.Net.Sockets.Socket socket, System.IO.FileAccess access, bool ownsSocket) { }
public override bool CanRead { get { throw null; } }
public override bool CanSeek { get { throw null; } }
public override bool CanTimeout { get { throw null; } }
public override bool CanWrite { get { throw null; } }
public virtual bool DataAvailable { get { throw null; } }
public override long Length { get { throw null; } }
public override long Position { get { throw null; } set { } }
protected bool Readable { get { throw null; } set { } }
public override int ReadTimeout { get { throw null; } set { } }
public System.Net.Sockets.Socket Socket { get { throw null; } }
protected bool Writeable { get { throw null; } set { } }
public override int WriteTimeout { get { throw null; } set { } }
public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback? callback, object? state) { throw null; }
public override System.IAsyncResult BeginWrite(byte[] buffer, int offset, int count, System.AsyncCallback? callback, object? state) { throw null; }
public void Close(int timeout) { }
protected override void Dispose(bool disposing) { }
public override int EndRead(System.IAsyncResult asyncResult) { throw null; }
public override void EndWrite(System.IAsyncResult asyncResult) { }
~NetworkStream() { }
public override void Flush() { }
public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public override int Read(byte[] buffer, int offset, int count) { throw null; }
public override int Read(System.Span<byte> buffer) { throw null; }
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public override int ReadByte() { throw null; }
public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; }
public override void SetLength(long value) { }
public override void Write(byte[] buffer, int offset, int count) { }
public override void Write(System.ReadOnlySpan<byte> buffer) { }
public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public override void WriteByte(byte value) { }
}
public enum ProtocolFamily
{
Unknown = -1,
Unspecified = 0,
Unix = 1,
InterNetwork = 2,
ImpLink = 3,
Pup = 4,
Chaos = 5,
Ipx = 6,
NS = 6,
Iso = 7,
Osi = 7,
Ecma = 8,
DataKit = 9,
Ccitt = 10,
Sna = 11,
DecNet = 12,
DataLink = 13,
Lat = 14,
HyperChannel = 15,
AppleTalk = 16,
NetBios = 17,
VoiceView = 18,
FireFox = 19,
Banyan = 21,
Atm = 22,
InterNetworkV6 = 23,
Cluster = 24,
Ieee12844 = 25,
Irda = 26,
NetworkDesigners = 28,
Max = 29,
Packet = 65536,
ControllerAreaNetwork = 65537,
}
public enum ProtocolType
{
Unknown = -1,
IP = 0,
IPv6HopByHopOptions = 0,
Unspecified = 0,
Icmp = 1,
Igmp = 2,
Ggp = 3,
IPv4 = 4,
Tcp = 6,
Pup = 12,
Udp = 17,
Idp = 22,
IPv6 = 41,
IPv6RoutingHeader = 43,
IPv6FragmentHeader = 44,
IPSecEncapsulatingSecurityPayload = 50,
IPSecAuthenticationHeader = 51,
IcmpV6 = 58,
IPv6NoNextHeader = 59,
IPv6DestinationOptions = 60,
ND = 77,
Raw = 255,
Ipx = 1000,
Spx = 1256,
SpxII = 1257,
}
public sealed partial class SafeSocketHandle : Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid
{
public SafeSocketHandle() : base (default(bool)) { }
public SafeSocketHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base (default(bool)) { }
protected override bool ReleaseHandle() { throw null; }
}
public enum SelectMode
{
SelectRead = 0,
SelectWrite = 1,
SelectError = 2,
}
public partial class SendPacketsElement
{
public SendPacketsElement(byte[] buffer) { }
public SendPacketsElement(byte[] buffer, int offset, int count) { }
public SendPacketsElement(byte[] buffer, int offset, int count, bool endOfPacket) { }
public SendPacketsElement(ReadOnlyMemory<byte> buffer) { }
public SendPacketsElement(ReadOnlyMemory<byte> buffer, bool endOfPacket) { }
public SendPacketsElement(System.IO.FileStream fileStream) { }
public SendPacketsElement(System.IO.FileStream fileStream, long offset, int count) { }
public SendPacketsElement(System.IO.FileStream fileStream, long offset, int count, bool endOfPacket) { }
public SendPacketsElement(string filepath) { }
public SendPacketsElement(string filepath, int offset, int count) { }
public SendPacketsElement(string filepath, int offset, int count, bool endOfPacket) { }
public SendPacketsElement(string filepath, long offset, int count) { }
public SendPacketsElement(string filepath, long offset, int count, bool endOfPacket) { }
public byte[]? Buffer { get { throw null; } }
public int Count { get { throw null; } }
public bool EndOfPacket { get { throw null; } }
public string? FilePath { get { throw null; } }
public System.IO.FileStream? FileStream { get { throw null; } }
public ReadOnlyMemory<byte>? MemoryBuffer { get { throw null; } }
public int Offset { get { throw null; } }
public long OffsetLong { get { throw null; } }
}
public partial class Socket : System.IDisposable
{
public Socket(System.Net.Sockets.SafeSocketHandle handle) { }
public Socket(System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public Socket(System.Net.Sockets.SocketInformation socketInformation) { }
public Socket(System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) { }
public System.Net.Sockets.AddressFamily AddressFamily { get { throw null; } }
public int Available { get { throw null; } }
public bool Blocking { get { throw null; } set { } }
public bool Connected { get { throw null; } }
public bool DontFragment { get { throw null; } set { } }
public bool DualMode { get { throw null; } set { } }
public bool EnableBroadcast { get { throw null; } set { } }
public bool ExclusiveAddressUse { get { throw null; } set { } }
public System.IntPtr Handle { get { throw null; } }
public bool IsBound { get { throw null; } }
[System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
public System.Net.Sockets.LingerOption? LingerState { get { throw null; } set { } }
public System.Net.EndPoint? LocalEndPoint { get { throw null; } }
public bool MulticastLoopback { get { throw null; } set { } }
public bool NoDelay { get { throw null; } set { } }
public static bool OSSupportsIPv4 { get { throw null; } }
public static bool OSSupportsIPv6 { get { throw null; } }
public static bool OSSupportsUnixDomainSockets { get { throw null; } }
public System.Net.Sockets.ProtocolType ProtocolType { get { throw null; } }
public int ReceiveBufferSize { get { throw null; } set { } }
public int ReceiveTimeout { get { throw null; } set { } }
public System.Net.EndPoint? RemoteEndPoint { get { throw null; } }
public System.Net.Sockets.SafeSocketHandle SafeHandle { get { throw null; } }
public int SendBufferSize { get { throw null; } set { } }
public int SendTimeout { get { throw null; } set { } }
public System.Net.Sockets.SocketType SocketType { get { throw null; } }
[System.ObsoleteAttribute("SupportsIPv4 has been deprecated. Use OSSupportsIPv4 instead.")]
public static bool SupportsIPv4 { get { throw null; } }
[System.ObsoleteAttribute("SupportsIPv6 has been deprecated. Use OSSupportsIPv6 instead.")]
public static bool SupportsIPv6 { get { throw null; } }
public short Ttl { get { throw null; } set { } }
[System.ObsoleteAttribute("UseOnlyOverlappedIO has been deprecated and is not supported.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public bool UseOnlyOverlappedIO { get { throw null; } set { } }
public System.Net.Sockets.Socket Accept() { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptAsync() { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.Socket> AcceptAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptAsync(System.Net.Sockets.Socket? acceptSocket) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.Socket> AcceptAsync(System.Net.Sockets.Socket? acceptSocket, System.Threading.CancellationToken cancellationToken) { throw null; }
public bool AcceptAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public System.IAsyncResult BeginAccept(System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginAccept(int receiveSize, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginAccept(System.Net.Sockets.Socket? acceptSocket, int receiveSize, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(System.Net.EndPoint remoteEP, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(System.Net.IPAddress address, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(System.Net.IPAddress[] addresses, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(string host, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginDisconnect(bool reuseSocket, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginReceive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult? BeginReceive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginReceive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult? BeginReceive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginReceiveFrom(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginReceiveMessageFrom(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSend(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult? BeginSend(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSend(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult? BeginSend(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSendFile(string? fileName, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSendFile(string? fileName, byte[]? preBuffer, byte[]? postBuffer, System.Net.Sockets.TransmitFileOptions flags, System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP, System.AsyncCallback? callback, object? state) { throw null; }
public void Bind(System.Net.EndPoint localEP) { }
public static void CancelConnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) { }
public void Close() { }
public void Close(int timeout) { }
public void Connect(System.Net.EndPoint remoteEP) { }
public void Connect(System.Net.IPAddress address, int port) { }
public void Connect(System.Net.IPAddress[] addresses, int port) { }
public void Connect(string host, int port) { }
public System.Threading.Tasks.Task ConnectAsync(System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress address, int port) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress address, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress[] addresses, int port) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress[] addresses, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(string host, int port) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(string host, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public bool ConnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public static bool ConnectAsync(System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType, System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public void Disconnect(bool reuseSocket) { }
public bool DisconnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public System.Threading.Tasks.ValueTask DisconnectAsync(bool reuseSocket, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public System.Net.Sockets.SocketInformation DuplicateAndClose(int targetProcessId) { throw null; }
public System.Net.Sockets.Socket EndAccept(out byte[] buffer, System.IAsyncResult asyncResult) { throw null; }
public System.Net.Sockets.Socket EndAccept(out byte[] buffer, out int bytesTransferred, System.IAsyncResult asyncResult) { throw null; }
public System.Net.Sockets.Socket EndAccept(System.IAsyncResult asyncResult) { throw null; }
public void EndConnect(System.IAsyncResult asyncResult) { }
public void EndDisconnect(System.IAsyncResult asyncResult) { }
public int EndReceive(System.IAsyncResult asyncResult) { throw null; }
public int EndReceive(System.IAsyncResult asyncResult, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int EndReceiveFrom(System.IAsyncResult asyncResult, ref System.Net.EndPoint endPoint) { throw null; }
public int EndReceiveMessageFrom(System.IAsyncResult asyncResult, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint endPoint, out System.Net.Sockets.IPPacketInformation ipPacketInformation) { throw null; }
public int EndSend(System.IAsyncResult asyncResult) { throw null; }
public int EndSend(System.IAsyncResult asyncResult, out System.Net.Sockets.SocketError errorCode) { throw null; }
public void EndSendFile(System.IAsyncResult asyncResult) { }
public int EndSendTo(System.IAsyncResult asyncResult) { throw null; }
~Socket() { }
public int GetRawSocketOption(int optionLevel, int optionName, System.Span<byte> optionValue) { throw null; }
public object? GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName) { throw null; }
public void GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, byte[] optionValue) { }
public byte[] GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, int optionLength) { throw null; }
public int IOControl(int ioControlCode, byte[]? optionInValue, byte[]? optionOutValue) { throw null; }
public int IOControl(System.Net.Sockets.IOControlCode ioControlCode, byte[]? optionInValue, byte[]? optionOutValue) { throw null; }
public void Listen() { }
public void Listen(int backlog) { }
public bool Poll(int microSeconds, System.Net.Sockets.SelectMode mode) { throw null; }
public int Receive(byte[] buffer) { throw null; }
public int Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int Receive(byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(byte[] buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw null; }
public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int Receive(System.Span<byte> buffer) { throw null; }
public int Receive(System.Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Receive(System.Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public System.Threading.Tasks.Task<int> ReceiveAsync(System.ArraySegment<byte> buffer) { throw null; }
public System.Threading.Tasks.Task<int> ReceiveAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public System.Threading.Tasks.Task<int> ReceiveAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw null; }
public System.Threading.Tasks.Task<int> ReceiveAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public System.Threading.Tasks.ValueTask<int> ReceiveAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask<int> ReceiveAsync(System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool ReceiveAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public int ReceiveFrom(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(byte[] buffer, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(byte[] buffer, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(System.Span<byte> buffer, ref System.Net.EndPoint remoteEP) { throw null; }
public int ReceiveFrom(System.Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEndPoint) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.Memory<byte> buffer, System.Net.EndPoint remoteEndPoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool ReceiveFromAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public int ReceiveMessageFrom(byte[] buffer, int offset, int size, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, out System.Net.Sockets.IPPacketInformation ipPacketInformation) { throw null; }
public int ReceiveMessageFrom(System.Span<byte> buffer, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, out System.Net.Sockets.IPPacketInformation ipPacketInformation) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEndPoint) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.Memory<byte> buffer, System.Net.EndPoint remoteEndPoint, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public bool ReceiveMessageFromAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public static void Select(System.Collections.IList? checkRead, System.Collections.IList? checkWrite, System.Collections.IList? checkError, int microSeconds) { }
public int Send(byte[] buffer) { throw null; }
public int Send(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int Send(byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(byte[] buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw null; }
public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public int Send(System.ReadOnlySpan<byte> buffer) { throw null; }
public int Send(System.ReadOnlySpan<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public int Send(System.ReadOnlySpan<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(System.ArraySegment<byte> buffer) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool SendAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public void SendFile(string? fileName) { }
public void SendFile(string? fileName, byte[]? preBuffer, byte[]? postBuffer, System.Net.Sockets.TransmitFileOptions flags) { }
public void SendFile(string? fileName, System.ReadOnlySpan<byte> preBuffer, System.ReadOnlySpan<byte> postBuffer, System.Net.Sockets.TransmitFileOptions flags) { }
public System.Threading.Tasks.ValueTask SendFileAsync(string? fileName, System.ReadOnlyMemory<byte> preBuffer, System.ReadOnlyMemory<byte> postBuffer, System.Net.Sockets.TransmitFileOptions flags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask SendFileAsync(string? fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool SendPacketsAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
public int SendTo(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(byte[] buffer, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(byte[] buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(System.ReadOnlySpan<byte> buffer, System.Net.EndPoint remoteEP) { throw null; }
public int SendTo(System.ReadOnlySpan<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.Task<int> SendToAsync(System.ArraySegment<byte> buffer, System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.Task<int> SendToAsync(System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendToAsync(System.ReadOnlyMemory<byte> buffer, System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendToAsync(System.ReadOnlyMemory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public bool SendToAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public void SetIPProtectionLevel(System.Net.Sockets.IPProtectionLevel level) { }
public void SetRawSocketOption(int optionLevel, int optionName, System.ReadOnlySpan<byte> optionValue) { }
public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, bool optionValue) { }
public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, byte[] optionValue) { }
public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, int optionValue) { }
public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, object optionValue) { }
public void Shutdown(System.Net.Sockets.SocketShutdown how) { }
}
public partial class SocketAsyncEventArgs : System.EventArgs, System.IDisposable
{
public SocketAsyncEventArgs() { }
public SocketAsyncEventArgs(bool unsafeSuppressExecutionContextFlow) { }
public System.Net.Sockets.Socket? AcceptSocket { get { throw null; } set { } }
public byte[]? Buffer { get { throw null; } }
public System.Collections.Generic.IList<System.ArraySegment<byte>>? BufferList { get { throw null; } set { } }
public int BytesTransferred { get { throw null; } }
public System.Exception? ConnectByNameError { get { throw null; } }
public System.Net.Sockets.Socket? ConnectSocket { get { throw null; } }
public int Count { get { throw null; } }
public bool DisconnectReuseSocket { get { throw null; } set { } }
public System.Net.Sockets.SocketAsyncOperation LastOperation { get { throw null; } }
public System.Memory<byte> MemoryBuffer { get { throw null; } }
public int Offset { get { throw null; } }
public System.Net.Sockets.IPPacketInformation ReceiveMessageFromPacketInfo { get { throw null; } }
public System.Net.EndPoint? RemoteEndPoint { get { throw null; } set { } }
public System.Net.Sockets.SendPacketsElement[]? SendPacketsElements { get { throw null; } set { } }
public System.Net.Sockets.TransmitFileOptions SendPacketsFlags { get { throw null; } set { } }
public int SendPacketsSendSize { get { throw null; } set { } }
public System.Net.Sockets.SocketError SocketError { get { throw null; } set { } }
public System.Net.Sockets.SocketFlags SocketFlags { get { throw null; } set { } }
public object? UserToken { get { throw null; } set { } }
public event System.EventHandler<System.Net.Sockets.SocketAsyncEventArgs>? Completed { add { } remove { } }
public void Dispose() { }
~SocketAsyncEventArgs() { }
protected virtual void OnCompleted(System.Net.Sockets.SocketAsyncEventArgs e) { }
public void SetBuffer(byte[]? buffer, int offset, int count) { }
public void SetBuffer(int offset, int count) { }
public void SetBuffer(System.Memory<byte> buffer) { }
}
public enum SocketAsyncOperation
{
None = 0,
Accept = 1,
Connect = 2,
Disconnect = 3,
Receive = 4,
ReceiveFrom = 5,
ReceiveMessageFrom = 6,
Send = 7,
SendPackets = 8,
SendTo = 9,
}
[System.FlagsAttribute]
public enum SocketFlags
{
None = 0,
OutOfBand = 1,
Peek = 2,
DontRoute = 4,
Truncated = 256,
ControlDataTruncated = 512,
Broadcast = 1024,
Multicast = 2048,
Partial = 32768,
}
public partial struct SocketInformation
{
private object _dummy;
private int _dummyPrimitive;
public System.Net.Sockets.SocketInformationOptions Options { readonly get { throw null; } set { } }
public byte[] ProtocolInformation { readonly get { throw null; } set { } }
}
[System.FlagsAttribute]
public enum SocketInformationOptions
{
NonBlocking = 1,
Connected = 2,
Listening = 4,
[System.ObsoleteAttribute("SocketInformationOptions.UseOnlyOverlappedIO has been deprecated and is not supported.")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
UseOnlyOverlappedIO = 8,
}
public enum SocketOptionLevel
{
IP = 0,
Tcp = 6,
Udp = 17,
IPv6 = 41,
Socket = 65535,
}
public enum SocketOptionName
{
DontLinger = -129,
ExclusiveAddressUse = -5,
Debug = 1,
IPOptions = 1,
NoChecksum = 1,
NoDelay = 1,
AcceptConnection = 2,
BsdUrgent = 2,
Expedited = 2,
HeaderIncluded = 2,
TcpKeepAliveTime = 3,
TypeOfService = 3,
IpTimeToLive = 4,
ReuseAddress = 4,
KeepAlive = 8,
MulticastInterface = 9,
MulticastTimeToLive = 10,
MulticastLoopback = 11,
AddMembership = 12,
DropMembership = 13,
DontFragment = 14,
AddSourceMembership = 15,
DontRoute = 16,
DropSourceMembership = 16,
TcpKeepAliveRetryCount = 16,
BlockSource = 17,
TcpKeepAliveInterval = 17,
UnblockSource = 18,
PacketInformation = 19,
ChecksumCoverage = 20,
HopLimit = 21,
IPProtectionLevel = 23,
IPv6Only = 27,
Broadcast = 32,
UseLoopback = 64,
Linger = 128,
OutOfBandInline = 256,
SendBuffer = 4097,
ReceiveBuffer = 4098,
SendLowWater = 4099,
ReceiveLowWater = 4100,
SendTimeout = 4101,
ReceiveTimeout = 4102,
Error = 4103,
Type = 4104,
ReuseUnicastPort = 12295,
UpdateAcceptContext = 28683,
UpdateConnectContext = 28688,
MaxConnections = 2147483647,
}
public partial struct SocketReceiveFromResult
{
public int ReceivedBytes;
public System.Net.EndPoint RemoteEndPoint;
}
public partial struct SocketReceiveMessageFromResult
{
public System.Net.Sockets.IPPacketInformation PacketInformation;
public int ReceivedBytes;
public System.Net.EndPoint RemoteEndPoint;
public System.Net.Sockets.SocketFlags SocketFlags;
}
public enum SocketShutdown
{
Receive = 0,
Send = 1,
Both = 2,
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static partial class SocketTaskExtensions
{
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptAsync(this System.Net.Sockets.Socket socket) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptAsync(this System.Net.Sockets.Socket socket, System.Net.Sockets.Socket? acceptSocket) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.EndPoint remoteEP) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress address, int port) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress address, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress[] addresses, int port) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress[] addresses, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, string host, int port) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, string host, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> SendAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> SendAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.ValueTask<int> SendAsync(this System.Net.Sockets.Socket socket, System.ReadOnlyMemory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Threading.Tasks.Task<int> SendToAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
}
public enum SocketType
{
Unknown = -1,
Stream = 1,
Dgram = 2,
Raw = 3,
Rdm = 4,
Seqpacket = 5,
}
public partial class TcpClient : System.IDisposable
{
public TcpClient() { }
public TcpClient(System.Net.IPEndPoint localEP) { }
public TcpClient(System.Net.Sockets.AddressFamily family) { }
public TcpClient(string hostname, int port) { }
protected bool Active { get { throw null; } set { } }
public int Available { get { throw null; } }
public System.Net.Sockets.Socket Client { get { throw null; } set { } }
public bool Connected { get { throw null; } }
public bool ExclusiveAddressUse { get { throw null; } set { } }
[System.Diagnostics.CodeAnalysis.DisallowNullAttribute]
public System.Net.Sockets.LingerOption? LingerState { get { throw null; } set { } }
public bool NoDelay { get { throw null; } set { } }
public int ReceiveBufferSize { get { throw null; } set { } }
public int ReceiveTimeout { get { throw null; } set { } }
public int SendBufferSize { get { throw null; } set { } }
public int SendTimeout { get { throw null; } set { } }
public System.IAsyncResult BeginConnect(System.Net.IPAddress address, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(System.Net.IPAddress[] addresses, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginConnect(string host, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public void Close() { }
public void Connect(System.Net.IPAddress address, int port) { }
public void Connect(System.Net.IPAddress[] ipAddresses, int port) { }
public void Connect(System.Net.IPEndPoint remoteEP) { }
public void Connect(string hostname, int port) { }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress address, int port) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress[] addresses, int port) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(string host, int port) { throw null; }
public System.Threading.Tasks.Task ConnectAsync(System.Net.IPEndPoint remoteEP) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress address, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress[] addresses, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(string host, int port, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPEndPoint remoteEP, System.Threading.CancellationToken cancellationToken) { throw null; }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
public void EndConnect(System.IAsyncResult asyncResult) { }
~TcpClient() { }
public System.Net.Sockets.NetworkStream GetStream() { throw null; }
}
public partial class TcpListener
{
[System.ObsoleteAttribute("This constructor has been deprecated. Use TcpListener(IPAddress localaddr, int port) instead.")]
public TcpListener(int port) { }
public TcpListener(System.Net.IPAddress localaddr, int port) { }
public TcpListener(System.Net.IPEndPoint localEP) { }
protected bool Active { get { throw null; } }
public bool ExclusiveAddressUse { get { throw null; } set { } }
public System.Net.EndPoint LocalEndpoint { get { throw null; } }
public System.Net.Sockets.Socket Server { get { throw null; } }
public System.Net.Sockets.Socket AcceptSocket() { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.Socket> AcceptSocketAsync() { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.Socket> AcceptSocketAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Net.Sockets.TcpClient AcceptTcpClient() { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.TcpClient> AcceptTcpClientAsync() { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.TcpClient> AcceptTcpClientAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public void AllowNatTraversal(bool allowed) { }
public System.IAsyncResult BeginAcceptSocket(System.AsyncCallback? callback, object? state) { throw null; }
public System.IAsyncResult BeginAcceptTcpClient(System.AsyncCallback? callback, object? state) { throw null; }
public static System.Net.Sockets.TcpListener Create(int port) { throw null; }
public System.Net.Sockets.Socket EndAcceptSocket(System.IAsyncResult asyncResult) { throw null; }
public System.Net.Sockets.TcpClient EndAcceptTcpClient(System.IAsyncResult asyncResult) { throw null; }
public bool Pending() { throw null; }
public void Start() { }
public void Start(int backlog) { }
public void Stop() { }
}
[System.FlagsAttribute]
public enum TransmitFileOptions
{
UseDefaultWorkerThread = 0,
Disconnect = 1,
ReuseSocket = 2,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
WriteBehind = 4,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
UseSystemThread = 16,
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
UseKernelApc = 32,
}
public partial class UdpClient : System.IDisposable
{
public UdpClient() { }
public UdpClient(int port) { }
public UdpClient(int port, System.Net.Sockets.AddressFamily family) { }
public UdpClient(System.Net.IPEndPoint localEP) { }
public UdpClient(System.Net.Sockets.AddressFamily family) { }
public UdpClient(string hostname, int port) { }
protected bool Active { get { throw null; } set { } }
public int Available { get { throw null; } }
public System.Net.Sockets.Socket Client { get { throw null; } set { } }
public bool DontFragment { get { throw null; } set { } }
public bool EnableBroadcast { get { throw null; } set { } }
public bool ExclusiveAddressUse { get { throw null; } set { } }
public bool MulticastLoopback { get { throw null; } set { } }
public short Ttl { get { throw null; } set { } }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public void AllowNatTraversal(bool allowed) { }
public System.IAsyncResult BeginReceive(System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginSend(byte[] datagram, int bytes, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginSend(byte[] datagram, int bytes, System.Net.IPEndPoint? endPoint, System.AsyncCallback? requestCallback, object? state) { throw null; }
public System.IAsyncResult BeginSend(byte[] datagram, int bytes, string? hostname, int port, System.AsyncCallback? requestCallback, object? state) { throw null; }
public void Close() { }
public void Connect(System.Net.IPAddress addr, int port) { }
public void Connect(System.Net.IPEndPoint endPoint) { }
public void Connect(string hostname, int port) { }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
public void DropMulticastGroup(System.Net.IPAddress multicastAddr) { }
public void DropMulticastGroup(System.Net.IPAddress multicastAddr, int ifindex) { }
public byte[] EndReceive(System.IAsyncResult asyncResult, ref System.Net.IPEndPoint? remoteEP) { throw null; }
public int EndSend(System.IAsyncResult asyncResult) { throw null; }
public void JoinMulticastGroup(int ifindex, System.Net.IPAddress multicastAddr) { }
public void JoinMulticastGroup(System.Net.IPAddress multicastAddr) { }
public void JoinMulticastGroup(System.Net.IPAddress multicastAddr, int timeToLive) { }
public void JoinMulticastGroup(System.Net.IPAddress multicastAddr, System.Net.IPAddress localAddress) { }
public byte[] Receive([System.Diagnostics.CodeAnalysis.NotNullAttribute] ref System.Net.IPEndPoint? remoteEP) { throw null; }
public System.Threading.Tasks.Task<System.Net.Sockets.UdpReceiveResult> ReceiveAsync() { throw null; }
public System.Threading.Tasks.ValueTask<System.Net.Sockets.UdpReceiveResult> ReceiveAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public int Send(byte[] dgram, int bytes) { throw null; }
public int Send(System.ReadOnlySpan<byte> datagram) {throw null; }
public int Send(byte[] dgram, int bytes, System.Net.IPEndPoint? endPoint) { throw null; }
public int Send(System.ReadOnlySpan<byte> datagram, System.Net.IPEndPoint? endPoint) { throw null; }
public int Send(byte[] dgram, int bytes, string? hostname, int port) { throw null; }
public int Send(System.ReadOnlySpan<byte> datagram, string? hostname, int port) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(byte[] datagram, int bytes) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> datagram, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(byte[] datagram, int bytes, System.Net.IPEndPoint? endPoint) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> datagram, System.Net.IPEndPoint? endPoint, System.Threading.CancellationToken cancellationToken = default) { throw null; }
public System.Threading.Tasks.Task<int> SendAsync(byte[] datagram, int bytes, string? hostname, int port) { throw null; }
public System.Threading.Tasks.ValueTask<int> SendAsync(System.ReadOnlyMemory<byte> datagram, string? hostname, int port, System.Threading.CancellationToken cancellationToken = default) { throw null; }
}
public partial struct UdpReceiveResult : System.IEquatable<System.Net.Sockets.UdpReceiveResult>
{
private object _dummy;
private int _dummyPrimitive;
public UdpReceiveResult(byte[] buffer, System.Net.IPEndPoint remoteEndPoint) { throw null; }
public byte[] Buffer { get { throw null; } }
public System.Net.IPEndPoint RemoteEndPoint { get { throw null; } }
public bool Equals(System.Net.Sockets.UdpReceiveResult other) { throw null; }
public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhen(true)] object? obj) { throw null; }
public override int GetHashCode() { throw null; }
public static bool operator ==(System.Net.Sockets.UdpReceiveResult left, System.Net.Sockets.UdpReceiveResult right) { throw null; }
public static bool operator !=(System.Net.Sockets.UdpReceiveResult left, System.Net.Sockets.UdpReceiveResult right) { throw null; }
}
public sealed partial class UnixDomainSocketEndPoint : System.Net.EndPoint
{
public UnixDomainSocketEndPoint(string path) { }
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/jit64/valuetypes/nullable/box-unbox/box-unbox/box-unbox012.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="box-unbox012.cs" />
<Compile Include="..\structdef.cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Include="box-unbox012.cs" />
<Compile Include="..\structdef.cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/installer/managed/Microsoft.NET.HostModel/ComHost/InvalidTypeLibraryException.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Microsoft.NET.HostModel.ComHost
{
/// <summary>
/// The provided type library file is an invalid format.
/// </summary>
public class InvalidTypeLibraryException : Exception
{
public InvalidTypeLibraryException(string path)
{
Path = path;
}
public InvalidTypeLibraryException(string path, Exception innerException)
:base($"Invalid type library at '{path}'.", innerException)
{
Path = path;
}
public string Path { get; }
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Microsoft.NET.HostModel.ComHost
{
/// <summary>
/// The provided type library file is an invalid format.
/// </summary>
public class InvalidTypeLibraryException : Exception
{
public InvalidTypeLibraryException(string path)
{
Path = path;
}
public InvalidTypeLibraryException(string path, Exception innerException)
:base($"Invalid type library at '{path}'.", innerException)
{
Path = path;
}
public string Path { get; }
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/CheckoutException.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System.ComponentModel.Design
{
/// <summary>
/// The exception thrown when an attempt is made to edit a file that is checked into
/// a source control program.
/// </summary>
[Serializable]
[TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class CheckoutException : ExternalException
{
private const int E_ABORT = unchecked((int)0x80004004);
/// <summary>
/// Initializes a <see cref='System.ComponentModel.Design.CheckoutException'/> that specifies that the checkout
/// was canceled. This field is read-only.
/// </summary>
public static readonly CheckoutException Canceled = new CheckoutException(SR.CHECKOUTCanceled, E_ABORT);
/// <summary>
/// Initializes a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/> class with
/// no associated message or error code.
/// </summary>
public CheckoutException()
{
}
/// <summary>
/// Initializes a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/>
/// class with the specified message.
/// </summary>
public CheckoutException(string? message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/>
/// class with the specified message and error code.
/// </summary>
public CheckoutException(string? message, int errorCode) : base(message, errorCode)
{
}
/// <summary>
/// Need this constructor since Exception implements ISerializable. We don't have any fields,
/// so just forward this to base.
/// </summary>
protected CheckoutException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
/// <summary>
/// Initializes a new instance of the Exception class with a specified error message and a
/// reference to the inner exception that is the cause of this exception.
/// FxCop CA1032: Multiple constructors are required to correctly implement a custom exception.
/// </summary>
public CheckoutException(string? message, Exception? innerException) : base(message, innerException)
{
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System.ComponentModel.Design
{
/// <summary>
/// The exception thrown when an attempt is made to edit a file that is checked into
/// a source control program.
/// </summary>
[Serializable]
[TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class CheckoutException : ExternalException
{
private const int E_ABORT = unchecked((int)0x80004004);
/// <summary>
/// Initializes a <see cref='System.ComponentModel.Design.CheckoutException'/> that specifies that the checkout
/// was canceled. This field is read-only.
/// </summary>
public static readonly CheckoutException Canceled = new CheckoutException(SR.CHECKOUTCanceled, E_ABORT);
/// <summary>
/// Initializes a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/> class with
/// no associated message or error code.
/// </summary>
public CheckoutException()
{
}
/// <summary>
/// Initializes a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/>
/// class with the specified message.
/// </summary>
public CheckoutException(string? message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/>
/// class with the specified message and error code.
/// </summary>
public CheckoutException(string? message, int errorCode) : base(message, errorCode)
{
}
/// <summary>
/// Need this constructor since Exception implements ISerializable. We don't have any fields,
/// so just forward this to base.
/// </summary>
protected CheckoutException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
/// <summary>
/// Initializes a new instance of the Exception class with a specified error message and a
/// reference to the inner exception that is the cause of this exception.
/// FxCop CA1032: Multiple constructors are required to correctly implement a custom exception.
/// </summary>
public CheckoutException(string? message, Exception? innerException) : base(message, innerException)
{
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/LogicArray/LogicArray.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
using System.Runtime.CompilerServices;
namespace Benchstone.BenchI
{
public static class LogicArray
{
#if DEBUG
public const int Iterations = 1;
#else
public const int Iterations = 3000;
#endif
struct Workarea
{
public int X;
public int[][] A;
}
static T[][] AllocArray<T>(int n1, int n2) {
T[][] a = new T[n1][];
for (int i = 0; i < n1; ++i) {
a[i] = new T[n2];
}
return a;
}
static bool Inner(ref Workarea cmn) {
int i, j, k;
cmn.X = 0;
for (i = 1; i <= 50; i++) {
for (j = 1; j <= 50; j++) {
cmn.A[i][j] = 1;
}
}
for (k = 1; k <= 50; k++) {
for (j = 1; j <= 50; j++) {
i = 1;
do {
cmn.X = cmn.X | cmn.A[i][j] & cmn.A[i + 1][k];
i = i + 2;
} while (i <= 50);
}
}
if (cmn.X != 1) {
return false;
}
else {
return true;
}
}
[MethodImpl(MethodImplOptions.NoInlining)]
static bool Bench() {
Workarea cmn = new Workarea();
cmn.X = 0;
cmn.A = AllocArray<int>(51, 51);
for (int n = 1; n <= Iterations; n++) {
bool result = Inner(ref cmn);
if (!result) {
return false;
}
}
return true;
}
static bool TestBase() {
bool result = Bench();
return result;
}
public static int Main() {
bool result = TestBase();
return (result ? 100 : -1);
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
using System.Runtime.CompilerServices;
namespace Benchstone.BenchI
{
public static class LogicArray
{
#if DEBUG
public const int Iterations = 1;
#else
public const int Iterations = 3000;
#endif
struct Workarea
{
public int X;
public int[][] A;
}
static T[][] AllocArray<T>(int n1, int n2) {
T[][] a = new T[n1][];
for (int i = 0; i < n1; ++i) {
a[i] = new T[n2];
}
return a;
}
static bool Inner(ref Workarea cmn) {
int i, j, k;
cmn.X = 0;
for (i = 1; i <= 50; i++) {
for (j = 1; j <= 50; j++) {
cmn.A[i][j] = 1;
}
}
for (k = 1; k <= 50; k++) {
for (j = 1; j <= 50; j++) {
i = 1;
do {
cmn.X = cmn.X | cmn.A[i][j] & cmn.A[i + 1][k];
i = i + 2;
} while (i <= 50);
}
}
if (cmn.X != 1) {
return false;
}
else {
return true;
}
}
[MethodImpl(MethodImplOptions.NoInlining)]
static bool Bench() {
Workarea cmn = new Workarea();
cmn.X = 0;
cmn.A = AllocArray<int>(51, 51);
for (int n = 1; n <= Iterations; n++) {
bool result = Inner(ref cmn);
if (!result) {
return false;
}
}
return true;
}
static bool TestBase() {
bool result = Bench();
return result;
}
public static int Main() {
bool result = TestBase();
return (result ? 100 : -1);
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/opt/Inline/tests/mthdimpl.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Runtime.CompilerServices;
internal class MthdImpl
{
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static int f(int a)
{
return a + 3;
}
public static int Main()
{
int retval = f(97);
return retval;
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Runtime.CompilerServices;
internal class MthdImpl
{
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static int f(int a)
{
return a + 3;
}
public static int Main()
{
int retval = f(97);
return retval;
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocksException.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
namespace System.Net.Http
{
internal class SocksException : IOException
{
public SocksException(string message) : base(message) { }
public SocksException(string message, Exception innerException) : base(message, innerException) { }
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
namespace System.Net.Http
{
internal class SocksException : IOException
{
public SocksException(string message) : base(message) { }
public SocksException(string message, Exception innerException) : base(message, innerException) { }
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Single.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/******************************************************************************
* This file is auto-generated from a template file by the GenerateTests.csx *
* script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make *
* changes, please update the corresponding template and run according to the *
* directions listed in the file. *
******************************************************************************/
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
namespace JIT.HardwareIntrinsics.X86
{
public static partial class Program
{
private static void MultiplyAddNegatedScalarSingle()
{
var test = new SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle();
if (test.IsSupported)
{
// Validates basic functionality works, using Unsafe.Read
test.RunBasicScenario_UnsafeRead();
if (Sse.IsSupported)
{
// Validates basic functionality works, using Load
test.RunBasicScenario_Load();
// Validates basic functionality works, using LoadAligned
test.RunBasicScenario_LoadAligned();
}
// Validates calling via reflection works, using Unsafe.Read
test.RunReflectionScenario_UnsafeRead();
if (Sse.IsSupported)
{
// Validates calling via reflection works, using Load
test.RunReflectionScenario_Load();
// Validates calling via reflection works, using LoadAligned
test.RunReflectionScenario_LoadAligned();
}
// Validates passing a static member works
test.RunClsVarScenario();
if (Sse.IsSupported)
{
// Validates passing a static member works, using pinning and Load
test.RunClsVarScenario_Load();
}
// Validates passing a local works, using Unsafe.Read
test.RunLclVarScenario_UnsafeRead();
if (Sse.IsSupported)
{
// Validates passing a local works, using Load
test.RunLclVarScenario_Load();
// Validates passing a local works, using LoadAligned
test.RunLclVarScenario_LoadAligned();
}
// Validates passing the field of a local class works
test.RunClassLclFldScenario();
if (Sse.IsSupported)
{
// Validates passing the field of a local class works, using pinning and Load
test.RunClassLclFldScenario_Load();
}
// Validates passing an instance member of a class works
test.RunClassFldScenario();
if (Sse.IsSupported)
{
// Validates passing an instance member of a class works, using pinning and Load
test.RunClassFldScenario_Load();
}
// Validates passing the field of a local struct works
test.RunStructLclFldScenario();
if (Sse.IsSupported)
{
// Validates passing the field of a local struct works, using pinning and Load
test.RunStructLclFldScenario_Load();
}
// Validates passing an instance member of a struct works
test.RunStructFldScenario();
if (Sse.IsSupported)
{
// Validates passing an instance member of a struct works, using pinning and Load
test.RunStructFldScenario_Load();
}
}
else
{
// Validates we throw on unsupported hardware
test.RunUnsupportedScenario();
}
if (!test.Succeeded)
{
throw new Exception("One or more scenarios did not complete as expected.");
}
}
}
public sealed unsafe class SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle
{
private struct DataTable
{
private byte[] inArray1;
private byte[] inArray2;
private byte[] inArray3;
private byte[] outArray;
private GCHandle inHandle1;
private GCHandle inHandle2;
private GCHandle inHandle3;
private GCHandle outHandle;
private ulong alignment;
public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment)
{
int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<Single>();
int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<Single>();
int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf<Single>();
int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<Single>();
if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray)
{
throw new ArgumentException("Invalid value of alignment");
}
this.inArray1 = new byte[alignment * 2];
this.inArray2 = new byte[alignment * 2];
this.inArray3 = new byte[alignment * 2];
this.outArray = new byte[alignment * 2];
this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned);
this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned);
this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned);
this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned);
this.alignment = (ulong)alignment;
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray1Ptr), ref Unsafe.As<Single, byte>(ref inArray1[0]), (uint)sizeOfinArray1);
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray2Ptr), ref Unsafe.As<Single, byte>(ref inArray2[0]), (uint)sizeOfinArray2);
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray3Ptr), ref Unsafe.As<Single, byte>(ref inArray3[0]), (uint)sizeOfinArray3);
}
public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment);
public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment);
public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment);
public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment);
public void Dispose()
{
inHandle1.Free();
inHandle2.Free();
inHandle3.Free();
outHandle.Free();
}
private static unsafe void* Align(byte* buffer, ulong expectedAlignment)
{
return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1));
}
}
private struct TestStruct
{
public Vector128<Single> _fld1;
public Vector128<Single> _fld2;
public Vector128<Single> _fld3;
public static TestStruct Create()
{
var testStruct = new TestStruct();
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref testStruct._fld1), ref Unsafe.As<Single, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref testStruct._fld2), ref Unsafe.As<Single, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref testStruct._fld3), ref Unsafe.As<Single, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
return testStruct;
}
public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle testClass)
{
var result = Fma.MultiplyAddNegatedScalar(_fld1, _fld2, _fld3);
Unsafe.Write(testClass._dataTable.outArrayPtr, result);
testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr);
}
public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle testClass)
{
fixed (Vector128<Single>* pFld1 = &_fld1)
fixed (Vector128<Single>* pFld2 = &_fld2)
fixed (Vector128<Single>* pFld3 = &_fld3)
{
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(pFld1)),
Sse.LoadVector128((Single*)(pFld2)),
Sse.LoadVector128((Single*)(pFld3))
);
Unsafe.Write(testClass._dataTable.outArrayPtr, result);
testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr);
}
}
}
private static readonly int LargestVectorSize = 16;
private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
private static readonly int Op2ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
private static readonly int Op3ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
private static Single[] _data1 = new Single[Op1ElementCount];
private static Single[] _data2 = new Single[Op2ElementCount];
private static Single[] _data3 = new Single[Op3ElementCount];
private static Vector128<Single> _clsVar1;
private static Vector128<Single> _clsVar2;
private static Vector128<Single> _clsVar3;
private Vector128<Single> _fld1;
private Vector128<Single> _fld2;
private Vector128<Single> _fld3;
private DataTable _dataTable;
static SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle()
{
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar1), ref Unsafe.As<Single, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar2), ref Unsafe.As<Single, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar3), ref Unsafe.As<Single, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
}
public SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle()
{
Succeeded = true;
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld1), ref Unsafe.As<Single, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld2), ref Unsafe.As<Single, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld3), ref Unsafe.As<Single, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); }
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); }
for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); }
_dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize);
}
public bool IsSupported => Fma.IsSupported;
public bool Succeeded { get; set; }
public void RunBasicScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));
var result = Fma.MultiplyAddNegatedScalar(
Unsafe.Read<Vector128<Single>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector128<Single>>(_dataTable.inArray2Ptr),
Unsafe.Read<Vector128<Single>>(_dataTable.inArray3Ptr)
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunBasicScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load));
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)),
Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)),
Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunBasicScenario_LoadAligned()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned));
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)),
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)),
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead));
var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegatedScalar), new Type[] { typeof(Vector128<Single>), typeof(Vector128<Single>), typeof(Vector128<Single>) })
.Invoke(null, new object[] {
Unsafe.Read<Vector128<Single>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector128<Single>>(_dataTable.inArray2Ptr),
Unsafe.Read<Vector128<Single>>(_dataTable.inArray3Ptr)
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load));
var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegatedScalar), new Type[] { typeof(Vector128<Single>), typeof(Vector128<Single>), typeof(Vector128<Single>) })
.Invoke(null, new object[] {
Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)),
Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)),
Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr))
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_LoadAligned()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned));
var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegatedScalar), new Type[] { typeof(Vector128<Single>), typeof(Vector128<Single>), typeof(Vector128<Single>) })
.Invoke(null, new object[] {
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)),
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)),
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr))
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunClsVarScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario));
var result = Fma.MultiplyAddNegatedScalar(
_clsVar1,
_clsVar2,
_clsVar3
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr);
}
public void RunClsVarScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load));
fixed (Vector128<Single>* pClsVar1 = &_clsVar1)
fixed (Vector128<Single>* pClsVar2 = &_clsVar2)
fixed (Vector128<Single>* pClsVar3 = &_clsVar3)
{
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(pClsVar1)),
Sse.LoadVector128((Single*)(pClsVar2)),
Sse.LoadVector128((Single*)(pClsVar3))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr);
}
}
public void RunLclVarScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));
var op1 = Unsafe.Read<Vector128<Single>>(_dataTable.inArray1Ptr);
var op2 = Unsafe.Read<Vector128<Single>>(_dataTable.inArray2Ptr);
var op3 = Unsafe.Read<Vector128<Single>>(_dataTable.inArray3Ptr);
var result = Fma.MultiplyAddNegatedScalar(op1, op2, op3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, op3, _dataTable.outArrayPtr);
}
public void RunLclVarScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load));
var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr));
var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr));
var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr));
var result = Fma.MultiplyAddNegatedScalar(op1, op2, op3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, op3, _dataTable.outArrayPtr);
}
public void RunLclVarScenario_LoadAligned()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned));
var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr));
var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr));
var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr));
var result = Fma.MultiplyAddNegatedScalar(op1, op2, op3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, op3, _dataTable.outArrayPtr);
}
public void RunClassLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));
var test = new SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle();
var result = Fma.MultiplyAddNegatedScalar(test._fld1, test._fld2, test._fld3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr);
}
public void RunClassLclFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load));
var test = new SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle();
fixed (Vector128<Single>* pFld1 = &test._fld1)
fixed (Vector128<Single>* pFld2 = &test._fld2)
fixed (Vector128<Single>* pFld3 = &test._fld3)
{
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(pFld1)),
Sse.LoadVector128((Single*)(pFld2)),
Sse.LoadVector128((Single*)(pFld3))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr);
}
}
public void RunClassFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));
var result = Fma.MultiplyAddNegatedScalar(_fld1, _fld2, _fld3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr);
}
public void RunClassFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load));
fixed (Vector128<Single>* pFld1 = &_fld1)
fixed (Vector128<Single>* pFld2 = &_fld2)
fixed (Vector128<Single>* pFld3 = &_fld3)
{
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(pFld1)),
Sse.LoadVector128((Single*)(pFld2)),
Sse.LoadVector128((Single*)(pFld3))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr);
}
}
public void RunStructLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));
var test = TestStruct.Create();
var result = Fma.MultiplyAddNegatedScalar(test._fld1, test._fld2, test._fld3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr);
}
public void RunStructLclFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load));
var test = TestStruct.Create();
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(&test._fld1)),
Sse.LoadVector128((Single*)(&test._fld2)),
Sse.LoadVector128((Single*)(&test._fld3))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr);
}
public void RunStructFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario));
var test = TestStruct.Create();
test.RunStructFldScenario(this);
}
public void RunStructFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load));
var test = TestStruct.Create();
test.RunStructFldScenario_Load(this);
}
public void RunUnsupportedScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario));
bool succeeded = false;
try
{
RunBasicScenario_UnsafeRead();
}
catch (PlatformNotSupportedException)
{
succeeded = true;
}
if (!succeeded)
{
Succeeded = false;
}
}
private void ValidateResult(Vector128<Single> op1, Vector128<Single> op2, Vector128<Single> op3, void* result, [CallerMemberName] string method = "")
{
Single[] inArray1 = new Single[Op1ElementCount];
Single[] inArray2 = new Single[Op2ElementCount];
Single[] inArray3 = new Single[Op3ElementCount];
Single[] outArray = new Single[RetElementCount];
Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray1[0]), op1);
Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray2[0]), op2);
Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray3[0]), op3);
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
ValidateResult(inArray1, inArray2, inArray3, outArray, method);
}
private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "")
{
Single[] inArray1 = new Single[Op1ElementCount];
Single[] inArray2 = new Single[Op2ElementCount];
Single[] inArray3 = new Single[Op3ElementCount];
Single[] outArray = new Single[RetElementCount];
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray1[0]), ref Unsafe.AsRef<byte>(op1), (uint)Unsafe.SizeOf<Vector128<Single>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray2[0]), ref Unsafe.AsRef<byte>(op2), (uint)Unsafe.SizeOf<Vector128<Single>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray3[0]), ref Unsafe.AsRef<byte>(op3), (uint)Unsafe.SizeOf<Vector128<Single>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
ValidateResult(inArray1, inArray2, inArray3, outArray, method);
}
private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "")
{
bool succeeded = true;
if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3)))
{
succeeded = false;
}
else
{
for (var i = 1; i < RetElementCount; i++)
{
if (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i]))
{
succeeded = false;
break;
}
}
}
if (!succeeded)
{
TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddNegatedScalar)}<Single>(Vector128<Single>, Vector128<Single>, Vector128<Single>): {method} failed:");
TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})");
TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})");
TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})");
TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})");
TestLibrary.TestFramework.LogInformation(string.Empty);
Succeeded = false;
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/******************************************************************************
* This file is auto-generated from a template file by the GenerateTests.csx *
* script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make *
* changes, please update the corresponding template and run according to the *
* directions listed in the file. *
******************************************************************************/
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
namespace JIT.HardwareIntrinsics.X86
{
public static partial class Program
{
private static void MultiplyAddNegatedScalarSingle()
{
var test = new SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle();
if (test.IsSupported)
{
// Validates basic functionality works, using Unsafe.Read
test.RunBasicScenario_UnsafeRead();
if (Sse.IsSupported)
{
// Validates basic functionality works, using Load
test.RunBasicScenario_Load();
// Validates basic functionality works, using LoadAligned
test.RunBasicScenario_LoadAligned();
}
// Validates calling via reflection works, using Unsafe.Read
test.RunReflectionScenario_UnsafeRead();
if (Sse.IsSupported)
{
// Validates calling via reflection works, using Load
test.RunReflectionScenario_Load();
// Validates calling via reflection works, using LoadAligned
test.RunReflectionScenario_LoadAligned();
}
// Validates passing a static member works
test.RunClsVarScenario();
if (Sse.IsSupported)
{
// Validates passing a static member works, using pinning and Load
test.RunClsVarScenario_Load();
}
// Validates passing a local works, using Unsafe.Read
test.RunLclVarScenario_UnsafeRead();
if (Sse.IsSupported)
{
// Validates passing a local works, using Load
test.RunLclVarScenario_Load();
// Validates passing a local works, using LoadAligned
test.RunLclVarScenario_LoadAligned();
}
// Validates passing the field of a local class works
test.RunClassLclFldScenario();
if (Sse.IsSupported)
{
// Validates passing the field of a local class works, using pinning and Load
test.RunClassLclFldScenario_Load();
}
// Validates passing an instance member of a class works
test.RunClassFldScenario();
if (Sse.IsSupported)
{
// Validates passing an instance member of a class works, using pinning and Load
test.RunClassFldScenario_Load();
}
// Validates passing the field of a local struct works
test.RunStructLclFldScenario();
if (Sse.IsSupported)
{
// Validates passing the field of a local struct works, using pinning and Load
test.RunStructLclFldScenario_Load();
}
// Validates passing an instance member of a struct works
test.RunStructFldScenario();
if (Sse.IsSupported)
{
// Validates passing an instance member of a struct works, using pinning and Load
test.RunStructFldScenario_Load();
}
}
else
{
// Validates we throw on unsupported hardware
test.RunUnsupportedScenario();
}
if (!test.Succeeded)
{
throw new Exception("One or more scenarios did not complete as expected.");
}
}
}
public sealed unsafe class SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle
{
private struct DataTable
{
private byte[] inArray1;
private byte[] inArray2;
private byte[] inArray3;
private byte[] outArray;
private GCHandle inHandle1;
private GCHandle inHandle2;
private GCHandle inHandle3;
private GCHandle outHandle;
private ulong alignment;
public DataTable(Single[] inArray1, Single[] inArray2, Single[] inArray3, Single[] outArray, int alignment)
{
int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<Single>();
int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<Single>();
int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf<Single>();
int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<Single>();
if ((alignment != 32 && alignment != 16) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfinArray3 || (alignment * 2) < sizeOfoutArray)
{
throw new ArgumentException("Invalid value of alignment");
}
this.inArray1 = new byte[alignment * 2];
this.inArray2 = new byte[alignment * 2];
this.inArray3 = new byte[alignment * 2];
this.outArray = new byte[alignment * 2];
this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned);
this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned);
this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned);
this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned);
this.alignment = (ulong)alignment;
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray1Ptr), ref Unsafe.As<Single, byte>(ref inArray1[0]), (uint)sizeOfinArray1);
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray2Ptr), ref Unsafe.As<Single, byte>(ref inArray2[0]), (uint)sizeOfinArray2);
Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef<byte>(inArray3Ptr), ref Unsafe.As<Single, byte>(ref inArray3[0]), (uint)sizeOfinArray3);
}
public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment);
public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment);
public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment);
public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment);
public void Dispose()
{
inHandle1.Free();
inHandle2.Free();
inHandle3.Free();
outHandle.Free();
}
private static unsafe void* Align(byte* buffer, ulong expectedAlignment)
{
return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1));
}
}
private struct TestStruct
{
public Vector128<Single> _fld1;
public Vector128<Single> _fld2;
public Vector128<Single> _fld3;
public static TestStruct Create()
{
var testStruct = new TestStruct();
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref testStruct._fld1), ref Unsafe.As<Single, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref testStruct._fld2), ref Unsafe.As<Single, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref testStruct._fld3), ref Unsafe.As<Single, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
return testStruct;
}
public void RunStructFldScenario(SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle testClass)
{
var result = Fma.MultiplyAddNegatedScalar(_fld1, _fld2, _fld3);
Unsafe.Write(testClass._dataTable.outArrayPtr, result);
testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr);
}
public void RunStructFldScenario_Load(SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle testClass)
{
fixed (Vector128<Single>* pFld1 = &_fld1)
fixed (Vector128<Single>* pFld2 = &_fld2)
fixed (Vector128<Single>* pFld3 = &_fld3)
{
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(pFld1)),
Sse.LoadVector128((Single*)(pFld2)),
Sse.LoadVector128((Single*)(pFld3))
);
Unsafe.Write(testClass._dataTable.outArrayPtr, result);
testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr);
}
}
}
private static readonly int LargestVectorSize = 16;
private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
private static readonly int Op2ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
private static readonly int Op3ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
private static Single[] _data1 = new Single[Op1ElementCount];
private static Single[] _data2 = new Single[Op2ElementCount];
private static Single[] _data3 = new Single[Op3ElementCount];
private static Vector128<Single> _clsVar1;
private static Vector128<Single> _clsVar2;
private static Vector128<Single> _clsVar3;
private Vector128<Single> _fld1;
private Vector128<Single> _fld2;
private Vector128<Single> _fld3;
private DataTable _dataTable;
static SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle()
{
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar1), ref Unsafe.As<Single, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar2), ref Unsafe.As<Single, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar3), ref Unsafe.As<Single, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
}
public SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle()
{
Succeeded = true;
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld1), ref Unsafe.As<Single, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld2), ref Unsafe.As<Single, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld3), ref Unsafe.As<Single, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); }
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); }
for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = TestLibrary.Generator.GetSingle(); }
_dataTable = new DataTable(_data1, _data2, _data3, new Single[RetElementCount], LargestVectorSize);
}
public bool IsSupported => Fma.IsSupported;
public bool Succeeded { get; set; }
public void RunBasicScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));
var result = Fma.MultiplyAddNegatedScalar(
Unsafe.Read<Vector128<Single>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector128<Single>>(_dataTable.inArray2Ptr),
Unsafe.Read<Vector128<Single>>(_dataTable.inArray3Ptr)
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunBasicScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load));
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)),
Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)),
Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunBasicScenario_LoadAligned()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned));
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)),
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)),
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead));
var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegatedScalar), new Type[] { typeof(Vector128<Single>), typeof(Vector128<Single>), typeof(Vector128<Single>) })
.Invoke(null, new object[] {
Unsafe.Read<Vector128<Single>>(_dataTable.inArray1Ptr),
Unsafe.Read<Vector128<Single>>(_dataTable.inArray2Ptr),
Unsafe.Read<Vector128<Single>>(_dataTable.inArray3Ptr)
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load));
var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegatedScalar), new Type[] { typeof(Vector128<Single>), typeof(Vector128<Single>), typeof(Vector128<Single>) })
.Invoke(null, new object[] {
Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr)),
Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr)),
Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr))
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunReflectionScenario_LoadAligned()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned));
var result = typeof(Fma).GetMethod(nameof(Fma.MultiplyAddNegatedScalar), new Type[] { typeof(Vector128<Single>), typeof(Vector128<Single>), typeof(Vector128<Single>) })
.Invoke(null, new object[] {
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr)),
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr)),
Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr))
});
Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr);
}
public void RunClsVarScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario));
var result = Fma.MultiplyAddNegatedScalar(
_clsVar1,
_clsVar2,
_clsVar3
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr);
}
public void RunClsVarScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario_Load));
fixed (Vector128<Single>* pClsVar1 = &_clsVar1)
fixed (Vector128<Single>* pClsVar2 = &_clsVar2)
fixed (Vector128<Single>* pClsVar3 = &_clsVar3)
{
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(pClsVar1)),
Sse.LoadVector128((Single*)(pClsVar2)),
Sse.LoadVector128((Single*)(pClsVar3))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_clsVar1, _clsVar2, _clsVar3, _dataTable.outArrayPtr);
}
}
public void RunLclVarScenario_UnsafeRead()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));
var op1 = Unsafe.Read<Vector128<Single>>(_dataTable.inArray1Ptr);
var op2 = Unsafe.Read<Vector128<Single>>(_dataTable.inArray2Ptr);
var op3 = Unsafe.Read<Vector128<Single>>(_dataTable.inArray3Ptr);
var result = Fma.MultiplyAddNegatedScalar(op1, op2, op3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, op3, _dataTable.outArrayPtr);
}
public void RunLclVarScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load));
var op1 = Sse.LoadVector128((Single*)(_dataTable.inArray1Ptr));
var op2 = Sse.LoadVector128((Single*)(_dataTable.inArray2Ptr));
var op3 = Sse.LoadVector128((Single*)(_dataTable.inArray3Ptr));
var result = Fma.MultiplyAddNegatedScalar(op1, op2, op3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, op3, _dataTable.outArrayPtr);
}
public void RunLclVarScenario_LoadAligned()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned));
var op1 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray1Ptr));
var op2 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray2Ptr));
var op3 = Sse.LoadAlignedVector128((Single*)(_dataTable.inArray3Ptr));
var result = Fma.MultiplyAddNegatedScalar(op1, op2, op3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(op1, op2, op3, _dataTable.outArrayPtr);
}
public void RunClassLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));
var test = new SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle();
var result = Fma.MultiplyAddNegatedScalar(test._fld1, test._fld2, test._fld3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr);
}
public void RunClassLclFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario_Load));
var test = new SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle();
fixed (Vector128<Single>* pFld1 = &test._fld1)
fixed (Vector128<Single>* pFld2 = &test._fld2)
fixed (Vector128<Single>* pFld3 = &test._fld3)
{
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(pFld1)),
Sse.LoadVector128((Single*)(pFld2)),
Sse.LoadVector128((Single*)(pFld3))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr);
}
}
public void RunClassFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));
var result = Fma.MultiplyAddNegatedScalar(_fld1, _fld2, _fld3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr);
}
public void RunClassFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load));
fixed (Vector128<Single>* pFld1 = &_fld1)
fixed (Vector128<Single>* pFld2 = &_fld2)
fixed (Vector128<Single>* pFld3 = &_fld3)
{
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(pFld1)),
Sse.LoadVector128((Single*)(pFld2)),
Sse.LoadVector128((Single*)(pFld3))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr);
}
}
public void RunStructLclFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));
var test = TestStruct.Create();
var result = Fma.MultiplyAddNegatedScalar(test._fld1, test._fld2, test._fld3);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr);
}
public void RunStructLclFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario_Load));
var test = TestStruct.Create();
var result = Fma.MultiplyAddNegatedScalar(
Sse.LoadVector128((Single*)(&test._fld1)),
Sse.LoadVector128((Single*)(&test._fld2)),
Sse.LoadVector128((Single*)(&test._fld3))
);
Unsafe.Write(_dataTable.outArrayPtr, result);
ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr);
}
public void RunStructFldScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario));
var test = TestStruct.Create();
test.RunStructFldScenario(this);
}
public void RunStructFldScenario_Load()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario_Load));
var test = TestStruct.Create();
test.RunStructFldScenario_Load(this);
}
public void RunUnsupportedScenario()
{
TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario));
bool succeeded = false;
try
{
RunBasicScenario_UnsafeRead();
}
catch (PlatformNotSupportedException)
{
succeeded = true;
}
if (!succeeded)
{
Succeeded = false;
}
}
private void ValidateResult(Vector128<Single> op1, Vector128<Single> op2, Vector128<Single> op3, void* result, [CallerMemberName] string method = "")
{
Single[] inArray1 = new Single[Op1ElementCount];
Single[] inArray2 = new Single[Op2ElementCount];
Single[] inArray3 = new Single[Op3ElementCount];
Single[] outArray = new Single[RetElementCount];
Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray1[0]), op1);
Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray2[0]), op2);
Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray3[0]), op3);
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
ValidateResult(inArray1, inArray2, inArray3, outArray, method);
}
private void ValidateResult(void* op1, void* op2, void* op3, void* result, [CallerMemberName] string method = "")
{
Single[] inArray1 = new Single[Op1ElementCount];
Single[] inArray2 = new Single[Op2ElementCount];
Single[] inArray3 = new Single[Op3ElementCount];
Single[] outArray = new Single[RetElementCount];
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray1[0]), ref Unsafe.AsRef<byte>(op1), (uint)Unsafe.SizeOf<Vector128<Single>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray2[0]), ref Unsafe.AsRef<byte>(op2), (uint)Unsafe.SizeOf<Vector128<Single>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray3[0]), ref Unsafe.AsRef<byte>(op3), (uint)Unsafe.SizeOf<Vector128<Single>>());
Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
ValidateResult(inArray1, inArray2, inArray3, outArray, method);
}
private void ValidateResult(Single[] firstOp, Single[] secondOp, Single[] thirdOp, Single[] result, [CallerMemberName] string method = "")
{
bool succeeded = true;
if (BitConverter.SingleToInt32Bits(MathF.Round(-(firstOp[0] * secondOp[0]) + thirdOp[0], 3)) != BitConverter.SingleToInt32Bits(MathF.Round(result[0], 3)))
{
succeeded = false;
}
else
{
for (var i = 1; i < RetElementCount; i++)
{
if (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i]))
{
succeeded = false;
break;
}
}
}
if (!succeeded)
{
TestLibrary.TestFramework.LogInformation($"{nameof(Fma)}.{nameof(Fma.MultiplyAddNegatedScalar)}<Single>(Vector128<Single>, Vector128<Single>, Vector128<Single>): {method} failed:");
TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})");
TestLibrary.TestFramework.LogInformation($"secondOp: ({string.Join(", ", secondOp)})");
TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})");
TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})");
TestLibrary.TestFramework.LogInformation(string.Empty);
Succeeded = false;
}
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/Regression/JitBlue/GitHub_23791/GitHub_23791.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.iOS.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Versioning;
namespace System.Diagnostics
{
public partial class Process : IDisposable
{
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
public void Kill(bool entireProcessTree)
{
throw new PlatformNotSupportedException();
}
/// <summary>
/// Creates an array of <see cref="Process"/> components that are associated with process resources on a
/// remote computer. These process resources share the specified process name.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
public static Process[] GetProcessesByName(string? processName, string machineName)
{
throw new PlatformNotSupportedException();
}
/// <summary>Gets the amount of time the process has spent running code inside the operating system core.</summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan PrivilegedProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}
/// <summary>Gets the time the associated process was started.</summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
internal DateTime StartTimeCore
{
get { throw new PlatformNotSupportedException(); }
}
/// <summary>
/// Gets the amount of time the associated process has spent utilizing the CPU.
/// It is the sum of the <see cref='System.Diagnostics.Process.UserProcessorTime'/> and
/// <see cref='System.Diagnostics.Process.PrivilegedProcessorTime'/>.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan TotalProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}
/// <summary>
/// Gets the amount of time the associated process has spent running code
/// inside the application portion of the process (not the operating system core).
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan UserProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}
/// <summary>
/// Returns all immediate child processes.
/// </summary>
private IReadOnlyList<Process> GetChildProcesses(Process[]? processes = null)
{
throw new PlatformNotSupportedException();
}
/// <summary>Gets parent process ID</summary>
private int GetParentProcessId =>
throw new PlatformNotSupportedException();
/// <summary>
/// Gets or sets which processors the threads in this process can be scheduled to run on.
/// </summary>
private IntPtr ProcessorAffinityCore
{
get { throw new PlatformNotSupportedException(); }
set { throw new PlatformNotSupportedException(); }
}
/// <summary>
/// Make sure we have obtained the min and max working set limits.
/// </summary>
private void GetWorkingSetLimits(out IntPtr minWorkingSet, out IntPtr maxWorkingSet)
{
throw new PlatformNotSupportedException();
}
/// <summary>Sets one or both of the minimum and maximum working set limits.</summary>
/// <param name="newMin">The new minimum working set limit, or null not to change it.</param>
/// <param name="newMax">The new maximum working set limit, or null not to change it.</param>
/// <param name="resultingMin">The resulting minimum working set limit after any changes applied.</param>
/// <param name="resultingMax">The resulting maximum working set limit after any changes applied.</param>
private void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr resultingMin, out IntPtr resultingMax)
{
throw new PlatformNotSupportedException();
}
/// <summary>Gets execution path</summary>
private string GetPathToOpenFile()
{
throw new PlatformNotSupportedException();
}
private int ParentProcessId => throw new PlatformNotSupportedException();
private static bool IsProcessInvalidException(Exception e) =>
// InvalidOperationException signifies conditions such as the process already being dead.
// Win32Exception signifies issues such as insufficient permissions to get details on the process.
// In either case, the predicate couldn't be applied so return the fallback result.
e is InvalidOperationException || e is Win32Exception;
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Versioning;
namespace System.Diagnostics
{
public partial class Process : IDisposable
{
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
public void Kill(bool entireProcessTree)
{
throw new PlatformNotSupportedException();
}
/// <summary>
/// Creates an array of <see cref="Process"/> components that are associated with process resources on a
/// remote computer. These process resources share the specified process name.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
public static Process[] GetProcessesByName(string? processName, string machineName)
{
throw new PlatformNotSupportedException();
}
/// <summary>Gets the amount of time the process has spent running code inside the operating system core.</summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan PrivilegedProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}
/// <summary>Gets the time the associated process was started.</summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
internal DateTime StartTimeCore
{
get { throw new PlatformNotSupportedException(); }
}
/// <summary>
/// Gets the amount of time the associated process has spent utilizing the CPU.
/// It is the sum of the <see cref='System.Diagnostics.Process.UserProcessorTime'/> and
/// <see cref='System.Diagnostics.Process.PrivilegedProcessorTime'/>.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan TotalProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}
/// <summary>
/// Gets the amount of time the associated process has spent running code
/// inside the application portion of the process (not the operating system core).
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan UserProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}
/// <summary>
/// Returns all immediate child processes.
/// </summary>
private IReadOnlyList<Process> GetChildProcesses(Process[]? processes = null)
{
throw new PlatformNotSupportedException();
}
/// <summary>Gets parent process ID</summary>
private int GetParentProcessId =>
throw new PlatformNotSupportedException();
/// <summary>
/// Gets or sets which processors the threads in this process can be scheduled to run on.
/// </summary>
private IntPtr ProcessorAffinityCore
{
get { throw new PlatformNotSupportedException(); }
set { throw new PlatformNotSupportedException(); }
}
/// <summary>
/// Make sure we have obtained the min and max working set limits.
/// </summary>
private void GetWorkingSetLimits(out IntPtr minWorkingSet, out IntPtr maxWorkingSet)
{
throw new PlatformNotSupportedException();
}
/// <summary>Sets one or both of the minimum and maximum working set limits.</summary>
/// <param name="newMin">The new minimum working set limit, or null not to change it.</param>
/// <param name="newMax">The new maximum working set limit, or null not to change it.</param>
/// <param name="resultingMin">The resulting minimum working set limit after any changes applied.</param>
/// <param name="resultingMax">The resulting maximum working set limit after any changes applied.</param>
private void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr resultingMin, out IntPtr resultingMax)
{
throw new PlatformNotSupportedException();
}
/// <summary>Gets execution path</summary>
private string GetPathToOpenFile()
{
throw new PlatformNotSupportedException();
}
private int ParentProcessId => throw new PlatformNotSupportedException();
private static bool IsProcessInvalidException(Exception e) =>
// InvalidOperationException signifies conditions such as the process already being dead.
// Win32Exception signifies issues such as insufficient permissions to get details on the process.
// In either case, the predicate couldn't be applied so return the fallback result.
e is InvalidOperationException || e is Win32Exception;
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Memory/tests/Span/IndexOfAny.AlgorithmicComplexity.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Buffers;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Xunit;
namespace System.SpanTests
{
public static partial class SpanTests
{
[Fact]
public static void IndexOfAny_LastIndexOfAny_AlgComplexity_Bytes()
=> RunIndexOfAnyLastIndexOfAnyAlgComplexityTest<byte>();
[Fact]
public static void IndexOfAny_LastIndexOfAny_AlgComplexity_Chars()
=> RunIndexOfAnyLastIndexOfAnyAlgComplexityTest<char>();
[Fact]
public static void IndexOfAny_LastIndexOfAny_AlgComplexity_Ints()
=> RunIndexOfAnyLastIndexOfAnyAlgComplexityTest<int>();
[Fact]
public static void IndexOfAny_LastIndexOfAny_AlgComplexity_RefType()
{
// Similar to RunIndexOfAnyAlgComplexityTest (see comments there), but we can't use
// BoundedMemory because we're dealing with ref types. Instead, we'll trap the call to
// Equals and use that to fail the test.
Span<CustomEquatableType<int>> haystack = new CustomEquatableType<int>[8192];
haystack[1024] = new CustomEquatableType<int>(default, isPoison: true); // fail the test if we iterate this far
haystack[^1024] = new CustomEquatableType<int>(default, isPoison: true);
Span<CustomEquatableType<int>> needle = Enumerable.Range(100, 20).Select(val => new CustomEquatableType<int>(val)).ToArray();
for (int i = 0; i < needle.Length; i++)
{
haystack[4096] = needle[i];
Assert.Equal(2048, MemoryExtensions.IndexOfAny(haystack[2048..], needle));
Assert.Equal(2048, MemoryExtensions.IndexOfAny((ReadOnlySpan<CustomEquatableType<int>>)haystack[2048..], needle));
Assert.Equal(4096, MemoryExtensions.LastIndexOfAny(haystack[..^2048], needle));
Assert.Equal(4096, MemoryExtensions.LastIndexOfAny((ReadOnlySpan<CustomEquatableType<int>>)haystack[..^2048], needle));
}
}
private static void RunIndexOfAnyLastIndexOfAnyAlgComplexityTest<T>() where T : unmanaged, IEquatable<T>
{
T[] needles = GetIndexOfAnyNeedlesForAlgComplexityTest<T>().ToArray();
RunIndexOfAnyAlgComplexityTest<T>(needles);
RunLastIndexOfAnyAlgComplexityTest<T>(needles);
}
private static void RunIndexOfAnyAlgComplexityTest<T>(T[] needle) where T : unmanaged, IEquatable<T>
{
// For the following paragraphs, let:
// n := length of haystack
// i := index of first occurrence of any needle within haystack
// l := length of needle array
//
// This test ensures that the complexity of IndexOfAny is O(i * l) rather than O(n * l),
// or just O(n * l) if no needle is found. The reason for this is that it's common for
// callers to invoke IndexOfAny immediately before slicing, and when this is called in
// a loop, we want the entire loop to be bounded by O(n * l) rather than O(n^2 * l).
//
// We test this by utilizing the BoundedMemory infrastructure to allocate a poison page
// after the scratch buffer, then we intentionally use MemoryMarshal to manipulate the
// scratch buffer so that it extends into the poison page. If the runtime skips past the
// first occurrence of the needle and attempts to read all the way to the end of the span,
// this will manifest as an AV within this unit test.
using BoundedMemory<T> boundedMem = BoundedMemory.Allocate<T>(4096, PoisonPagePlacement.After);
Span<T> span = boundedMem.Span;
span.Clear();
span = MemoryMarshal.CreateSpan(ref MemoryMarshal.GetReference(span), span.Length + 4096);
for (int i = 0; i < needle.Length; i++)
{
span[1024] = needle[i];
Assert.Equal(1024, MemoryExtensions.IndexOfAny(span, needle));
Assert.Equal(1024, MemoryExtensions.IndexOfAny((ReadOnlySpan<T>)span, needle));
}
}
private static void RunLastIndexOfAnyAlgComplexityTest<T>(T[] needle) where T : unmanaged, IEquatable<T>
{
// Similar to RunIndexOfAnyAlgComplexityTest (see comments there), but we run backward
// since we're testing LastIndexOfAny.
using BoundedMemory<T> boundedMem = BoundedMemory.Allocate<T>(4096, PoisonPagePlacement.Before);
Span<T> span = boundedMem.Span;
span.Clear();
span = MemoryMarshal.CreateSpan(ref Unsafe.Subtract(ref MemoryMarshal.GetReference(span), 4096), span.Length + 4096);
for (int i = 0; i < needle.Length; i++)
{
span[^1024] = needle[i];
Assert.Equal(span.Length - 1024, MemoryExtensions.LastIndexOfAny(span, needle));
Assert.Equal(span.Length - 1024, MemoryExtensions.LastIndexOfAny((ReadOnlySpan<T>)span, needle));
}
}
// returns [ 'a', 'b', 'c', ... ], or the equivalent in bytes, ints, etc.
private static IEnumerable<T> GetIndexOfAnyNeedlesForAlgComplexityTest<T>() where T : unmanaged
{
for (int i = 0; i < 26; i++)
{
yield return (T)Convert.ChangeType('a' + i, typeof(T), CultureInfo.InvariantCulture);
}
}
#pragma warning disable CS0659 // Type overrides Object.Equals(object o) but does not override Object.GetHashCode()
private sealed class CustomEquatableType<T> : IEquatable<CustomEquatableType<T>> where T : IEquatable<T>
#pragma warning restore CS0659 // Type overrides Object.Equals(object o) but does not override Object.GetHashCode()
{
private readonly T _value;
private readonly bool _isPoison;
public CustomEquatableType(T value, bool isPoison = false)
{
_value = value;
_isPoison = isPoison;
}
public override bool Equals(object obj) => Equals(obj as CustomEquatableType<T>);
public bool Equals(CustomEquatableType<T> other)
{
if (_isPoison)
{
throw new InvalidOperationException("This object is poisoned and its Equals method should not be called.");
}
if (other is null) { return false; }
if (other._isPoison)
{
throw new InvalidOperationException("The 'other' object is poisoned and should not be passed to Equals.");
}
return _value.Equals(other._value);
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Buffers;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Xunit;
namespace System.SpanTests
{
public static partial class SpanTests
{
[Fact]
public static void IndexOfAny_LastIndexOfAny_AlgComplexity_Bytes()
=> RunIndexOfAnyLastIndexOfAnyAlgComplexityTest<byte>();
[Fact]
public static void IndexOfAny_LastIndexOfAny_AlgComplexity_Chars()
=> RunIndexOfAnyLastIndexOfAnyAlgComplexityTest<char>();
[Fact]
public static void IndexOfAny_LastIndexOfAny_AlgComplexity_Ints()
=> RunIndexOfAnyLastIndexOfAnyAlgComplexityTest<int>();
[Fact]
public static void IndexOfAny_LastIndexOfAny_AlgComplexity_RefType()
{
// Similar to RunIndexOfAnyAlgComplexityTest (see comments there), but we can't use
// BoundedMemory because we're dealing with ref types. Instead, we'll trap the call to
// Equals and use that to fail the test.
Span<CustomEquatableType<int>> haystack = new CustomEquatableType<int>[8192];
haystack[1024] = new CustomEquatableType<int>(default, isPoison: true); // fail the test if we iterate this far
haystack[^1024] = new CustomEquatableType<int>(default, isPoison: true);
Span<CustomEquatableType<int>> needle = Enumerable.Range(100, 20).Select(val => new CustomEquatableType<int>(val)).ToArray();
for (int i = 0; i < needle.Length; i++)
{
haystack[4096] = needle[i];
Assert.Equal(2048, MemoryExtensions.IndexOfAny(haystack[2048..], needle));
Assert.Equal(2048, MemoryExtensions.IndexOfAny((ReadOnlySpan<CustomEquatableType<int>>)haystack[2048..], needle));
Assert.Equal(4096, MemoryExtensions.LastIndexOfAny(haystack[..^2048], needle));
Assert.Equal(4096, MemoryExtensions.LastIndexOfAny((ReadOnlySpan<CustomEquatableType<int>>)haystack[..^2048], needle));
}
}
private static void RunIndexOfAnyLastIndexOfAnyAlgComplexityTest<T>() where T : unmanaged, IEquatable<T>
{
T[] needles = GetIndexOfAnyNeedlesForAlgComplexityTest<T>().ToArray();
RunIndexOfAnyAlgComplexityTest<T>(needles);
RunLastIndexOfAnyAlgComplexityTest<T>(needles);
}
private static void RunIndexOfAnyAlgComplexityTest<T>(T[] needle) where T : unmanaged, IEquatable<T>
{
// For the following paragraphs, let:
// n := length of haystack
// i := index of first occurrence of any needle within haystack
// l := length of needle array
//
// This test ensures that the complexity of IndexOfAny is O(i * l) rather than O(n * l),
// or just O(n * l) if no needle is found. The reason for this is that it's common for
// callers to invoke IndexOfAny immediately before slicing, and when this is called in
// a loop, we want the entire loop to be bounded by O(n * l) rather than O(n^2 * l).
//
// We test this by utilizing the BoundedMemory infrastructure to allocate a poison page
// after the scratch buffer, then we intentionally use MemoryMarshal to manipulate the
// scratch buffer so that it extends into the poison page. If the runtime skips past the
// first occurrence of the needle and attempts to read all the way to the end of the span,
// this will manifest as an AV within this unit test.
using BoundedMemory<T> boundedMem = BoundedMemory.Allocate<T>(4096, PoisonPagePlacement.After);
Span<T> span = boundedMem.Span;
span.Clear();
span = MemoryMarshal.CreateSpan(ref MemoryMarshal.GetReference(span), span.Length + 4096);
for (int i = 0; i < needle.Length; i++)
{
span[1024] = needle[i];
Assert.Equal(1024, MemoryExtensions.IndexOfAny(span, needle));
Assert.Equal(1024, MemoryExtensions.IndexOfAny((ReadOnlySpan<T>)span, needle));
}
}
private static void RunLastIndexOfAnyAlgComplexityTest<T>(T[] needle) where T : unmanaged, IEquatable<T>
{
// Similar to RunIndexOfAnyAlgComplexityTest (see comments there), but we run backward
// since we're testing LastIndexOfAny.
using BoundedMemory<T> boundedMem = BoundedMemory.Allocate<T>(4096, PoisonPagePlacement.Before);
Span<T> span = boundedMem.Span;
span.Clear();
span = MemoryMarshal.CreateSpan(ref Unsafe.Subtract(ref MemoryMarshal.GetReference(span), 4096), span.Length + 4096);
for (int i = 0; i < needle.Length; i++)
{
span[^1024] = needle[i];
Assert.Equal(span.Length - 1024, MemoryExtensions.LastIndexOfAny(span, needle));
Assert.Equal(span.Length - 1024, MemoryExtensions.LastIndexOfAny((ReadOnlySpan<T>)span, needle));
}
}
// returns [ 'a', 'b', 'c', ... ], or the equivalent in bytes, ints, etc.
private static IEnumerable<T> GetIndexOfAnyNeedlesForAlgComplexityTest<T>() where T : unmanaged
{
for (int i = 0; i < 26; i++)
{
yield return (T)Convert.ChangeType('a' + i, typeof(T), CultureInfo.InvariantCulture);
}
}
#pragma warning disable CS0659 // Type overrides Object.Equals(object o) but does not override Object.GetHashCode()
private sealed class CustomEquatableType<T> : IEquatable<CustomEquatableType<T>> where T : IEquatable<T>
#pragma warning restore CS0659 // Type overrides Object.Equals(object o) but does not override Object.GetHashCode()
{
private readonly T _value;
private readonly bool _isPoison;
public CustomEquatableType(T value, bool isPoison = false)
{
_value = value;
_isPoison = isPoison;
}
public override bool Equals(object obj) => Equals(obj as CustomEquatableType<T>);
public bool Equals(CustomEquatableType<T> other)
{
if (_isPoison)
{
throw new InvalidOperationException("This object is poisoned and its Equals method should not be called.");
}
if (other is null) { return false; }
if (other._isPoison)
{
throw new InvalidOperationException("The 'other' object is poisoned and should not be passed to Equals.");
}
return _value.Equals(other._value);
}
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Analyzers/ConvertToLibraryImportAnalyzer.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Runtime.InteropServices;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using static Microsoft.Interop.Analyzers.AnalyzerDiagnostics;
namespace Microsoft.Interop.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ConvertToLibraryImportAnalyzer : DiagnosticAnalyzer
{
private const string Category = "Interoperability";
private static readonly string[] s_unsupportedTypeNames = new string[]
{
"System.Runtime.InteropServices.CriticalHandle",
"System.Runtime.InteropServices.HandleRef",
"System.Text.StringBuilder"
};
public static readonly DiagnosticDescriptor ConvertToLibraryImport =
new DiagnosticDescriptor(
Ids.ConvertToLibraryImport,
GetResourceString(nameof(Resources.ConvertToLibraryImportTitle)),
GetResourceString(nameof(Resources.ConvertToLibraryImportMessage)),
Category,
DiagnosticSeverity.Info,
isEnabledByDefault: false,
description: GetResourceString(nameof(Resources.ConvertToLibraryImportDescription)));
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ConvertToLibraryImport);
public const string CharSet = nameof(CharSet);
public const string ExactSpelling = nameof(ExactSpelling);
public override void Initialize(AnalysisContext context)
{
// Don't analyze generated code
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
context.EnableConcurrentExecution();
context.RegisterCompilationStartAction(
compilationContext =>
{
// Nothing to do if the LibraryImportAttribute is not in the compilation
INamedTypeSymbol? libraryImportAttrType = compilationContext.Compilation.GetTypeByMetadataName(TypeNames.LibraryImportAttribute);
if (libraryImportAttrType == null)
return;
INamedTypeSymbol? marshalAsAttrType = compilationContext.Compilation.GetTypeByMetadataName(TypeNames.System_Runtime_InteropServices_MarshalAsAttribute);
var knownUnsupportedTypes = new List<ITypeSymbol>(s_unsupportedTypeNames.Length);
foreach (string typeName in s_unsupportedTypeNames)
{
INamedTypeSymbol? unsupportedType = compilationContext.Compilation.GetTypeByMetadataName(typeName);
if (unsupportedType != null)
{
knownUnsupportedTypes.Add(unsupportedType);
}
}
compilationContext.RegisterSymbolAction(symbolContext => AnalyzeSymbol(symbolContext, knownUnsupportedTypes, marshalAsAttrType), SymbolKind.Method);
});
}
private static void AnalyzeSymbol(SymbolAnalysisContext context, List<ITypeSymbol> knownUnsupportedTypes, INamedTypeSymbol? marshalAsAttrType)
{
var method = (IMethodSymbol)context.Symbol;
// Check if method is a DllImport
DllImportData? dllImportData = method.GetDllImportData();
if (dllImportData == null)
return;
// Ignore methods already marked LibraryImport
// This can be the case when the generator creates an extern partial function for blittable signatures.
foreach (AttributeData attr in method.GetAttributes())
{
if (attr.AttributeClass?.ToDisplayString() == TypeNames.LibraryImportAttribute)
{
return;
}
}
// Ignore methods with unsupported parameters
foreach (IParameterSymbol parameter in method.Parameters)
{
if (knownUnsupportedTypes.Contains(parameter.Type)
|| HasUnsupportedUnmanagedTypeValue(parameter.GetAttributes(), marshalAsAttrType))
{
return;
}
}
// Ignore methods with unsupported returns
if (method.ReturnsByRef || method.ReturnsByRefReadonly)
return;
if (knownUnsupportedTypes.Contains(method.ReturnType) || HasUnsupportedUnmanagedTypeValue(method.GetReturnTypeAttributes(), marshalAsAttrType))
return;
ImmutableDictionary<string, string>.Builder properties = ImmutableDictionary.CreateBuilder<string, string>();
properties.Add(CharSet, dllImportData.CharacterSet.ToString());
properties.Add(ExactSpelling, dllImportData.ExactSpelling.ToString());
context.ReportDiagnostic(method.CreateDiagnostic(ConvertToLibraryImport, properties.ToImmutable(), method.Name));
}
private static bool HasUnsupportedUnmanagedTypeValue(ImmutableArray<AttributeData> attributes, INamedTypeSymbol? marshalAsAttrType)
{
if (marshalAsAttrType == null)
return false;
AttributeData? marshalAsAttr = null;
foreach (AttributeData attr in attributes)
{
if (SymbolEqualityComparer.Default.Equals(attr.AttributeClass, marshalAsAttrType))
{
marshalAsAttr = attr;
break;
}
}
if (marshalAsAttr == null || marshalAsAttr.ConstructorArguments.IsEmpty)
return false;
object unmanagedTypeObj = marshalAsAttr.ConstructorArguments[0].Value!;
UnmanagedType unmanagedType = unmanagedTypeObj is short unmanagedTypeAsShort
? (UnmanagedType)unmanagedTypeAsShort
: (UnmanagedType)unmanagedTypeObj;
return !System.Enum.IsDefined(typeof(UnmanagedType), unmanagedType)
|| unmanagedType == UnmanagedType.CustomMarshaler
|| unmanagedType == UnmanagedType.Interface
|| unmanagedType == UnmanagedType.IDispatch
|| unmanagedType == UnmanagedType.IInspectable
|| unmanagedType == UnmanagedType.IUnknown
|| unmanagedType == UnmanagedType.SafeArray;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Runtime.InteropServices;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using static Microsoft.Interop.Analyzers.AnalyzerDiagnostics;
namespace Microsoft.Interop.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ConvertToLibraryImportAnalyzer : DiagnosticAnalyzer
{
private const string Category = "Interoperability";
private static readonly string[] s_unsupportedTypeNames = new string[]
{
"System.Runtime.InteropServices.CriticalHandle",
"System.Runtime.InteropServices.HandleRef",
"System.Text.StringBuilder"
};
public static readonly DiagnosticDescriptor ConvertToLibraryImport =
new DiagnosticDescriptor(
Ids.ConvertToLibraryImport,
GetResourceString(nameof(Resources.ConvertToLibraryImportTitle)),
GetResourceString(nameof(Resources.ConvertToLibraryImportMessage)),
Category,
DiagnosticSeverity.Info,
isEnabledByDefault: false,
description: GetResourceString(nameof(Resources.ConvertToLibraryImportDescription)));
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ConvertToLibraryImport);
public const string CharSet = nameof(CharSet);
public const string ExactSpelling = nameof(ExactSpelling);
public override void Initialize(AnalysisContext context)
{
// Don't analyze generated code
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
context.EnableConcurrentExecution();
context.RegisterCompilationStartAction(
compilationContext =>
{
// Nothing to do if the LibraryImportAttribute is not in the compilation
INamedTypeSymbol? libraryImportAttrType = compilationContext.Compilation.GetTypeByMetadataName(TypeNames.LibraryImportAttribute);
if (libraryImportAttrType == null)
return;
INamedTypeSymbol? marshalAsAttrType = compilationContext.Compilation.GetTypeByMetadataName(TypeNames.System_Runtime_InteropServices_MarshalAsAttribute);
var knownUnsupportedTypes = new List<ITypeSymbol>(s_unsupportedTypeNames.Length);
foreach (string typeName in s_unsupportedTypeNames)
{
INamedTypeSymbol? unsupportedType = compilationContext.Compilation.GetTypeByMetadataName(typeName);
if (unsupportedType != null)
{
knownUnsupportedTypes.Add(unsupportedType);
}
}
compilationContext.RegisterSymbolAction(symbolContext => AnalyzeSymbol(symbolContext, knownUnsupportedTypes, marshalAsAttrType), SymbolKind.Method);
});
}
private static void AnalyzeSymbol(SymbolAnalysisContext context, List<ITypeSymbol> knownUnsupportedTypes, INamedTypeSymbol? marshalAsAttrType)
{
var method = (IMethodSymbol)context.Symbol;
// Check if method is a DllImport
DllImportData? dllImportData = method.GetDllImportData();
if (dllImportData == null)
return;
// Ignore methods already marked LibraryImport
// This can be the case when the generator creates an extern partial function for blittable signatures.
foreach (AttributeData attr in method.GetAttributes())
{
if (attr.AttributeClass?.ToDisplayString() == TypeNames.LibraryImportAttribute)
{
return;
}
}
// Ignore methods with unsupported parameters
foreach (IParameterSymbol parameter in method.Parameters)
{
if (knownUnsupportedTypes.Contains(parameter.Type)
|| HasUnsupportedUnmanagedTypeValue(parameter.GetAttributes(), marshalAsAttrType))
{
return;
}
}
// Ignore methods with unsupported returns
if (method.ReturnsByRef || method.ReturnsByRefReadonly)
return;
if (knownUnsupportedTypes.Contains(method.ReturnType) || HasUnsupportedUnmanagedTypeValue(method.GetReturnTypeAttributes(), marshalAsAttrType))
return;
ImmutableDictionary<string, string>.Builder properties = ImmutableDictionary.CreateBuilder<string, string>();
properties.Add(CharSet, dllImportData.CharacterSet.ToString());
properties.Add(ExactSpelling, dllImportData.ExactSpelling.ToString());
context.ReportDiagnostic(method.CreateDiagnostic(ConvertToLibraryImport, properties.ToImmutable(), method.Name));
}
private static bool HasUnsupportedUnmanagedTypeValue(ImmutableArray<AttributeData> attributes, INamedTypeSymbol? marshalAsAttrType)
{
if (marshalAsAttrType == null)
return false;
AttributeData? marshalAsAttr = null;
foreach (AttributeData attr in attributes)
{
if (SymbolEqualityComparer.Default.Equals(attr.AttributeClass, marshalAsAttrType))
{
marshalAsAttr = attr;
break;
}
}
if (marshalAsAttr == null || marshalAsAttr.ConstructorArguments.IsEmpty)
return false;
object unmanagedTypeObj = marshalAsAttr.ConstructorArguments[0].Value!;
UnmanagedType unmanagedType = unmanagedTypeObj is short unmanagedTypeAsShort
? (UnmanagedType)unmanagedTypeAsShort
: (UnmanagedType)unmanagedTypeObj;
return !System.Enum.IsDefined(typeof(UnmanagedType), unmanagedType)
|| unmanagedType == UnmanagedType.CustomMarshaler
|| unmanagedType == UnmanagedType.Interface
|| unmanagedType == UnmanagedType.IDispatch
|| unmanagedType == UnmanagedType.IInspectable
|| unmanagedType == UnmanagedType.IUnknown
|| unmanagedType == UnmanagedType.SafeArray;
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DynamicInvokeTemplateNode.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Collections.Generic;
using Internal.TypeSystem;
using ILCompiler.DependencyAnalysisFramework;
namespace ILCompiler.DependencyAnalysis
{
/// <summary>
/// Models dependencies of the dynamic invoke methods that aid in reflection invoking methods.
/// Dynamic invoke methods are shared method bodies that perform calling convention conversion
/// from object[] to the expected signature of the called method.
/// </summary>
internal class DynamicInvokeTemplateNode : DependencyNodeCore<NodeFactory>
{
public MethodDesc Method { get; }
public DynamicInvokeTemplateNode(MethodDesc method)
{
Debug.Assert(method.IsSharedByGenericInstantiations);
Method = method;
}
public override IEnumerable<DependencyListEntry> GetStaticDependencies(NodeFactory factory)
{
return DynamicInvokeTemplateDataNode.GetDependenciesDueToInvokeTemplatePresence(factory, Method);
}
protected override string GetName(NodeFactory factory)
{
return "DynamicInvokeTemplate: " + factory.NameMangler.GetMangledMethodName(Method);
}
public override bool InterestingForDynamicDependencyAnalysis => false;
public override bool HasDynamicDependencies => false;
public override bool HasConditionalStaticDependencies => false;
public override bool StaticDependenciesAreComputed => true;
public override IEnumerable<CombinedDependencyListEntry> GetConditionalStaticDependencies(NodeFactory context) => null;
public override IEnumerable<CombinedDependencyListEntry> SearchDynamicDependencies(List<DependencyNodeCore<NodeFactory>> markedNodes, int firstNode, NodeFactory context) => null;
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Collections.Generic;
using Internal.TypeSystem;
using ILCompiler.DependencyAnalysisFramework;
namespace ILCompiler.DependencyAnalysis
{
/// <summary>
/// Models dependencies of the dynamic invoke methods that aid in reflection invoking methods.
/// Dynamic invoke methods are shared method bodies that perform calling convention conversion
/// from object[] to the expected signature of the called method.
/// </summary>
internal class DynamicInvokeTemplateNode : DependencyNodeCore<NodeFactory>
{
public MethodDesc Method { get; }
public DynamicInvokeTemplateNode(MethodDesc method)
{
Debug.Assert(method.IsSharedByGenericInstantiations);
Method = method;
}
public override IEnumerable<DependencyListEntry> GetStaticDependencies(NodeFactory factory)
{
return DynamicInvokeTemplateDataNode.GetDependenciesDueToInvokeTemplatePresence(factory, Method);
}
protected override string GetName(NodeFactory factory)
{
return "DynamicInvokeTemplate: " + factory.NameMangler.GetMangledMethodName(Method);
}
public override bool InterestingForDynamicDependencyAnalysis => false;
public override bool HasDynamicDependencies => false;
public override bool HasConditionalStaticDependencies => false;
public override bool StaticDependenciesAreComputed => true;
public override IEnumerable<CombinedDependencyListEntry> GetConditionalStaticDependencies(NodeFactory context) => null;
public override IEnumerable<CombinedDependencyListEntry> SearchDynamicDependencies(List<DependencyNodeCore<NodeFactory>> markedNodes, int firstNode, NodeFactory context) => null;
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Console/src/System/IO/SyncTextReader.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
namespace System.IO
{
/* SyncTextReader intentionally locks on itself rather than a private lock object.
* This is done to synchronize different console readers (https://github.com/dotnet/corefx/pull/2855).
*/
internal sealed partial class SyncTextReader : TextReader
{
internal readonly TextReader _in;
public static SyncTextReader GetSynchronizedTextReader(TextReader reader)
{
Debug.Assert(reader != null);
return reader as SyncTextReader ??
new SyncTextReader(reader);
}
internal SyncTextReader(TextReader t)
{
_in = t;
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
lock (this)
{
_in.Dispose();
}
}
}
public override int Peek()
{
lock (this)
{
return _in.Peek();
}
}
public override int Read()
{
lock (this)
{
return _in.Read();
}
}
public override int Read(char[] buffer, int index, int count)
{
lock (this)
{
return _in.Read(buffer, index, count);
}
}
public override int ReadBlock(char[] buffer, int index, int count)
{
lock (this)
{
return _in.ReadBlock(buffer, index, count);
}
}
public override string? ReadLine()
{
lock (this)
{
return _in.ReadLine();
}
}
public override string ReadToEnd()
{
lock (this)
{
return _in.ReadToEnd();
}
}
//
// On SyncTextReader all APIs should run synchronously, even the async ones.
// No explicit locking is needed, as they all just delegate
//
public override Task<string?> ReadLineAsync()
{
return Task.FromResult(ReadLine());
}
public override ValueTask<string?> ReadLineAsync(CancellationToken cancellationToken)
{
return cancellationToken.IsCancellationRequested ?
ValueTask.FromCanceled<string?>(cancellationToken) :
new ValueTask<string?>(ReadLine());
}
public override Task<string> ReadToEndAsync()
{
return Task.FromResult(ReadToEnd());
}
public override Task<string> ReadToEndAsync(CancellationToken cancellationToken)
{
return cancellationToken.IsCancellationRequested ?
Task.FromCanceled<string>(cancellationToken) :
Task.FromResult(ReadToEnd());
}
public override Task<int> ReadBlockAsync(char[] buffer!!, int index, int count)
{
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
if (buffer.Length - index < count)
throw new ArgumentException(SR.Argument_InvalidOffLen);
return Task.FromResult(ReadBlock(buffer, index, count));
}
public override Task<int> ReadAsync(char[] buffer!!, int index, int count)
{
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
if (buffer.Length - index < count)
throw new ArgumentException(SR.Argument_InvalidOffLen);
return Task.FromResult(Read(buffer, index, count));
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
namespace System.IO
{
/* SyncTextReader intentionally locks on itself rather than a private lock object.
* This is done to synchronize different console readers (https://github.com/dotnet/corefx/pull/2855).
*/
internal sealed partial class SyncTextReader : TextReader
{
internal readonly TextReader _in;
public static SyncTextReader GetSynchronizedTextReader(TextReader reader)
{
Debug.Assert(reader != null);
return reader as SyncTextReader ??
new SyncTextReader(reader);
}
internal SyncTextReader(TextReader t)
{
_in = t;
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
lock (this)
{
_in.Dispose();
}
}
}
public override int Peek()
{
lock (this)
{
return _in.Peek();
}
}
public override int Read()
{
lock (this)
{
return _in.Read();
}
}
public override int Read(char[] buffer, int index, int count)
{
lock (this)
{
return _in.Read(buffer, index, count);
}
}
public override int ReadBlock(char[] buffer, int index, int count)
{
lock (this)
{
return _in.ReadBlock(buffer, index, count);
}
}
public override string? ReadLine()
{
lock (this)
{
return _in.ReadLine();
}
}
public override string ReadToEnd()
{
lock (this)
{
return _in.ReadToEnd();
}
}
//
// On SyncTextReader all APIs should run synchronously, even the async ones.
// No explicit locking is needed, as they all just delegate
//
public override Task<string?> ReadLineAsync()
{
return Task.FromResult(ReadLine());
}
public override ValueTask<string?> ReadLineAsync(CancellationToken cancellationToken)
{
return cancellationToken.IsCancellationRequested ?
ValueTask.FromCanceled<string?>(cancellationToken) :
new ValueTask<string?>(ReadLine());
}
public override Task<string> ReadToEndAsync()
{
return Task.FromResult(ReadToEnd());
}
public override Task<string> ReadToEndAsync(CancellationToken cancellationToken)
{
return cancellationToken.IsCancellationRequested ?
Task.FromCanceled<string>(cancellationToken) :
Task.FromResult(ReadToEnd());
}
public override Task<int> ReadBlockAsync(char[] buffer!!, int index, int count)
{
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
if (buffer.Length - index < count)
throw new ArgumentException(SR.Argument_InvalidOffLen);
return Task.FromResult(ReadBlock(buffer, index, count));
}
public override Task<int> ReadAsync(char[] buffer!!, int index, int count)
{
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
if (buffer.Length - index < count)
throw new ArgumentException(SR.Argument_InvalidOffLen);
return Task.FromResult(Read(buffer, index, count));
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexNode.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Threading;
namespace System.Text.RegularExpressions
{
/// <summary>Represents a regex subexpression.</summary>
internal sealed class RegexNode
{
/// <summary>empty bit from the node's options to store data on whether a node contains captures</summary>
internal const RegexOptions HasCapturesFlag = (RegexOptions)(1 << 31);
/// <summary>Arbitrary number of repetitions of the same character when we'd prefer to represent that as a repeater of that character rather than a string.</summary>
internal const int MultiVsRepeaterLimit = 64;
/// <summary>The node's children.</summary>
/// <remarks>null if no children, a <see cref="RegexNode"/> if one child, or a <see cref="List{RegexNode}"/> if multiple children.</remarks>
private object? Children;
/// <summary>The kind of expression represented by this node.</summary>
public RegexNodeKind Kind { get; private set; }
/// <summary>A string associated with the node.</summary>
/// <remarks>For a <see cref="RegexNodeKind.Multi"/>, this is the string from the expression. For an <see cref="IsSetFamily"/> node, this is the character class string from <see cref="RegexCharClass"/>.</remarks>
public string? Str { get; private set; }
/// <summary>The character associated with the node.</summary>
/// <remarks>For a <see cref="IsOneFamily"/> or <see cref="IsNotoneFamily"/> node, the character from the expression.</remarks>
public char Ch { get; private set; }
/// <summary>The minimum number of iterations for a loop, or the capture group number for a capture or backreference.</summary>
/// <remarks>No minimum is represented by 0. No capture group is represented by -1.</remarks>
public int M { get; private set; }
/// <summary>The maximum number of iterations for a loop, or the uncapture group number for a balancing group.</summary>
/// <remarks>No upper bound is represented by <see cref="int.MaxValue"/>. No capture group is represented by -1.</remarks>
public int N { get; private set; }
/// <summary>The options associated with the node.</summary>
public RegexOptions Options;
/// <summary>The node's parent node in the tree.</summary>
/// <remarks>
/// During parsing, top-level nodes are also stacked onto a parse stack (a stack of trees) using <see cref="Parent"/>.
/// After parsing, <see cref="Parent"/> is the node in the tree that has this node as or in <see cref="Children"/>.
/// </remarks>
public RegexNode? Parent;
public RegexNode(RegexNodeKind kind, RegexOptions options)
{
Kind = kind;
Options = options;
}
public RegexNode(RegexNodeKind kind, RegexOptions options, char ch)
{
Kind = kind;
Options = options;
Ch = ch;
}
public RegexNode(RegexNodeKind kind, RegexOptions options, string str)
{
Kind = kind;
Options = options;
Str = str;
}
public RegexNode(RegexNodeKind kind, RegexOptions options, int m)
{
Kind = kind;
Options = options;
M = m;
}
public RegexNode(RegexNodeKind kind, RegexOptions options, int m, int n)
{
Kind = kind;
Options = options;
M = m;
N = n;
}
/// <summary>Creates a RegexNode representing a single character.</summary>
/// <param name="ch">The character.</param>
/// <param name="options">The node's options.</param>
/// <param name="culture">The culture to use to perform any required transformations.</param>
/// <returns>The created RegexNode. This might be a RegexNode.One or a RegexNode.Set.</returns>
public static RegexNode CreateOneWithCaseConversion(char ch, RegexOptions options, CultureInfo? culture)
{
// If the options specify case-insensitivity, we try to create a node that fully encapsulates that.
if ((options & RegexOptions.IgnoreCase) != 0)
{
Debug.Assert(culture is not null);
// If the character is part of a Unicode category that doesn't participate in case conversion,
// we can simply strip out the IgnoreCase option and make the node case-sensitive.
if (!RegexCharClass.ParticipatesInCaseConversion(ch))
{
return new RegexNode(RegexNodeKind.One, options & ~RegexOptions.IgnoreCase, ch);
}
// Create a set for the character, trying to include all case-insensitive equivalent characters.
// If it's successful in doing so, resultIsCaseInsensitive will be false and we can strip
// out RegexOptions.IgnoreCase as part of creating the set.
string stringSet = RegexCharClass.OneToStringClass(ch, culture, out bool resultIsCaseInsensitive);
if (!resultIsCaseInsensitive)
{
return new RegexNode(RegexNodeKind.Set, options & ~RegexOptions.IgnoreCase, stringSet);
}
// Otherwise, until we can get rid of ToLower usage at match time entirely (https://github.com/dotnet/runtime/issues/61048),
// lowercase the character and proceed to create an IgnoreCase One node.
ch = culture.TextInfo.ToLower(ch);
}
// Create a One node for the character.
return new RegexNode(RegexNodeKind.One, options, ch);
}
/// <summary>Reverses all children of a concatenation when in RightToLeft mode.</summary>
public RegexNode ReverseConcatenationIfRightToLeft()
{
if ((Options & RegexOptions.RightToLeft) != 0 &&
Kind == RegexNodeKind.Concatenate &&
ChildCount() > 1)
{
((List<RegexNode>)Children!).Reverse();
}
return this;
}
/// <summary>
/// Pass type as OneLazy or OneLoop
/// </summary>
private void MakeRep(RegexNodeKind kind, int min, int max)
{
Kind += kind - RegexNodeKind.One;
M = min;
N = max;
}
private void MakeLoopAtomic()
{
switch (Kind)
{
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop:
// For loops, we simply change the Type to the atomic variant.
// Atomic greedy loops should consume as many values as they can.
Kind += RegexNodeKind.Oneloopatomic - RegexNodeKind.Oneloop;
break;
case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy:
// For lazy, we not only change the Type, we also lower the max number of iterations
// to the minimum number of iterations, creating a repeater, as they should end up
// matching as little as possible.
Kind += RegexNodeKind.Oneloopatomic - RegexNodeKind.Onelazy;
N = M;
if (N == 0)
{
// If moving the max to be the same as the min dropped it to 0, there's no
// work to be done for this node, and we can make it Empty.
Kind = RegexNodeKind.Empty;
Str = null;
Ch = '\0';
}
else if (Kind == RegexNodeKind.Oneloopatomic && N is >= 2 and <= MultiVsRepeaterLimit)
{
// If this is now a One repeater with a small enough length,
// make it a Multi instead, as they're better optimized down the line.
Kind = RegexNodeKind.Multi;
Str = new string(Ch, N);
Ch = '\0';
M = N = 0;
}
break;
default:
Debug.Fail($"Unexpected type: {Kind}");
break;
}
}
#if DEBUG
/// <summary>Validate invariants the rest of the implementation relies on for processing fully-built trees.</summary>
[Conditional("DEBUG")]
private void ValidateFinalTreeInvariants()
{
Debug.Assert(Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
var toExamine = new Stack<RegexNode>();
toExamine.Push(this);
while (toExamine.Count > 0)
{
RegexNode node = toExamine.Pop();
// Add all children to be examined
int childCount = node.ChildCount();
for (int i = 0; i < childCount; i++)
{
RegexNode child = node.Child(i);
Debug.Assert(child.Parent == node, $"{child.Describe()} missing reference to parent {node.Describe()}");
toExamine.Push(child);
}
// Validate that we never see certain node types.
Debug.Assert(Kind != RegexNodeKind.Group, "All Group nodes should have been removed.");
// Validate node types and expected child counts.
switch (node.Kind)
{
case RegexNodeKind.Group:
Debug.Fail("All Group nodes should have been removed.");
break;
case RegexNodeKind.Beginning:
case RegexNodeKind.Bol:
case RegexNodeKind.Boundary:
case RegexNodeKind.ECMABoundary:
case RegexNodeKind.Empty:
case RegexNodeKind.End:
case RegexNodeKind.EndZ:
case RegexNodeKind.Eol:
case RegexNodeKind.Multi:
case RegexNodeKind.NonBoundary:
case RegexNodeKind.NonECMABoundary:
case RegexNodeKind.Nothing:
case RegexNodeKind.Notone:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.One:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Backreference:
case RegexNodeKind.Set:
case RegexNodeKind.Setlazy:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
case RegexNodeKind.Start:
case RegexNodeKind.UpdateBumpalong:
Debug.Assert(childCount == 0, $"Expected zero children for {node.Kind}, got {childCount}.");
break;
case RegexNodeKind.Atomic:
case RegexNodeKind.Capture:
case RegexNodeKind.Lazyloop:
case RegexNodeKind.Loop:
case RegexNodeKind.NegativeLookaround:
case RegexNodeKind.PositiveLookaround:
Debug.Assert(childCount == 1, $"Expected one and only one child for {node.Kind}, got {childCount}.");
break;
case RegexNodeKind.BackreferenceConditional:
Debug.Assert(childCount == 2, $"Expected two children for {node.Kind}, got {childCount}");
break;
case RegexNodeKind.ExpressionConditional:
Debug.Assert(childCount == 3, $"Expected three children for {node.Kind}, got {childCount}");
break;
case RegexNodeKind.Concatenate:
case RegexNodeKind.Alternate:
Debug.Assert(childCount >= 2, $"Expected at least two children for {node.Kind}, got {childCount}.");
break;
default:
Debug.Fail($"Unexpected node type: {node.Kind}");
break;
}
// Validate node configuration.
switch (node.Kind)
{
case RegexNodeKind.Multi:
Debug.Assert(node.Str is not null, "Expect non-null multi string");
Debug.Assert(node.Str.Length >= 2, $"Expected {node.Str} to be at least two characters");
break;
case RegexNodeKind.Set:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
case RegexNodeKind.Setlazy:
Debug.Assert(!string.IsNullOrEmpty(node.Str), $"Expected non-null, non-empty string for {node.Kind}.");
break;
default:
Debug.Assert(node.Str is null, $"Expected null string for {node.Kind}, got \"{node.Str}\".");
break;
}
}
}
#endif
/// <summary>Performs additional optimizations on an entire tree prior to being used.</summary>
/// <remarks>
/// Some optimizations are performed by the parser while parsing, and others are performed
/// as nodes are being added to the tree. The optimizations here expect the tree to be fully
/// formed, as they inspect relationships between nodes that may not have been in place as
/// individual nodes were being processed/added to the tree.
/// </remarks>
internal RegexNode FinalOptimize()
{
RegexNode rootNode = this;
Debug.Assert(rootNode.Kind == RegexNodeKind.Capture);
Debug.Assert(rootNode.Parent is null);
Debug.Assert(rootNode.ChildCount() == 1);
// Only apply optimization when LTR to avoid needing additional code for the much rarer RTL case.
// Also only apply these optimizations when not using NonBacktracking, as these optimizations are
// all about avoiding things that are impactful for the backtracking engines but nops for non-backtracking.
if ((Options & (RegexOptions.RightToLeft | RegexOptions.NonBacktracking)) == 0)
{
// Optimization: eliminate backtracking for loops.
// For any single-character loop (Oneloop, Notoneloop, Setloop), see if we can automatically convert
// that into its atomic counterpart (Oneloopatomic, Notoneloopatomic, Setloopatomic) based on what
// comes after it in the expression tree.
rootNode.FindAndMakeLoopsAtomic();
// Optimization: backtracking removal at expression end.
// If we find backtracking construct at the end of the regex, we can instead make it non-backtracking,
// since nothing would ever backtrack into it anyway. Doing this then makes the construct available
// to implementations that don't support backtracking.
rootNode.EliminateEndingBacktracking();
// Optimization: unnecessary re-processing of starting loops.
// If an expression is guaranteed to begin with a single-character unbounded loop that isn't part of an alternation (in which case it
// wouldn't be guaranteed to be at the beginning) or a capture (in which case a back reference could be influenced by its length), then we
// can update the tree with a temporary node to indicate that the implementation should use that node's ending position in the input text
// as the next starting position at which to start the next match. This avoids redoing matches we've already performed, e.g. matching
// "\[email protected]" against "is this a valid [email protected]", the \w+ will initially match the "is" and then will fail to match the "@".
// Rather than bumping the scan loop by 1 and trying again to match at the "s", we can instead start at the " ". For functional correctness
// we can only consider unbounded loops, as to be able to start at the end of the loop we need the loop to have consumed all possible matches;
// otherwise, you could end up with a pattern like "a{1,3}b" matching against "aaaabc", which should match, but if we pre-emptively stop consuming
// after the first three a's and re-start from that position, we'll end up failing the match even though it should have succeeded. We can also
// apply this optimization to non-atomic loops: even though backtracking could be necessary, such backtracking would be handled within the processing
// of a single starting position. Lazy loops similarly benefit, as a failed match will result in exploring the exact same search space as with
// a greedy loop, just in the opposite order (and a successful match will overwrite the bumpalong position); we need to avoid atomic lazy loops,
// however, as they will only end up as a repeater for the minimum length and thus will effectively end up with a non-infinite upper bound, which
// we've already outlined is problematic.
{
RegexNode node = rootNode.Child(0); // skip implicit root capture node
bool atomicByAncestry = true; // the root is implicitly atomic because nothing comes after it (same for the implicit root capture)
while (true)
{
switch (node.Kind)
{
case RegexNodeKind.Atomic:
node = node.Child(0);
continue;
case RegexNodeKind.Concatenate:
atomicByAncestry = false;
node = node.Child(0);
continue;
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when node.N == int.MaxValue:
case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when node.N == int.MaxValue && !atomicByAncestry:
if (node.Parent is { Kind: RegexNodeKind.Concatenate } parent)
{
parent.InsertChild(1, new RegexNode(RegexNodeKind.UpdateBumpalong, node.Options));
}
break;
}
break;
}
}
}
// Done optimizing. Return the final tree.
#if DEBUG
rootNode.ValidateFinalTreeInvariants();
#endif
return rootNode;
}
/// <summary>Converts nodes at the end of the node tree to be atomic.</summary>
/// <remarks>
/// The correctness of this optimization depends on nothing being able to backtrack into
/// the provided node. That means it must be at the root of the overall expression, or
/// it must be an Atomic node that nothing will backtrack into by the very nature of Atomic.
/// </remarks>
private void EliminateEndingBacktracking()
{
if (!StackHelper.TryEnsureSufficientExecutionStack() ||
(Options & (RegexOptions.RightToLeft | RegexOptions.NonBacktracking)) != 0)
{
// If we can't recur further, just stop optimizing.
// We haven't done the work to validate this is correct for RTL.
// And NonBacktracking doesn't support atomic groups and doesn't have backtracking to be eliminated.
return;
}
// Walk the tree starting from the current node.
RegexNode node = this;
while (true)
{
switch (node.Kind)
{
// {One/Notone/Set}loops can be upgraded to {One/Notone/Set}loopatomic nodes, e.g. [abc]* => (?>[abc]*).
// And {One/Notone/Set}lazys can similarly be upgraded to be atomic, which really makes them into repeaters
// or even empty nodes.
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop:
case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy:
node.MakeLoopAtomic();
break;
// Just because a particular node is atomic doesn't mean all its descendants are.
// Process them as well. Lookarounds are implicitly atomic.
case RegexNodeKind.Atomic:
case RegexNodeKind.PositiveLookaround:
case RegexNodeKind.NegativeLookaround:
node = node.Child(0);
continue;
// For Capture and Concatenate, we just recur into their last child (only child in the case
// of Capture). However, if the child is an alternation or loop, we can also make the
// node itself atomic by wrapping it in an Atomic node. Since we later check to see whether a
// node is atomic based on its parent or grandparent, we don't bother wrapping such a node in
// an Atomic one if its grandparent is already Atomic.
// e.g. [xyz](?:abc|def) => [xyz](?>abc|def)
case RegexNodeKind.Capture:
case RegexNodeKind.Concatenate:
RegexNode existingChild = node.Child(node.ChildCount() - 1);
if ((existingChild.Kind is RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional or RegexNodeKind.Loop or RegexNodeKind.Lazyloop) &&
(node.Parent is null || node.Parent.Kind != RegexNodeKind.Atomic)) // validate grandparent isn't atomic
{
var atomic = new RegexNode(RegexNodeKind.Atomic, existingChild.Options);
atomic.AddChild(existingChild);
node.ReplaceChild(node.ChildCount() - 1, atomic);
}
node = existingChild;
continue;
// For alternate, we can recur into each branch separately. We use this iteration for the first branch.
// Conditionals are just like alternations in this regard.
// e.g. abc*|def* => ab(?>c*)|de(?>f*)
case RegexNodeKind.Alternate:
case RegexNodeKind.BackreferenceConditional:
case RegexNodeKind.ExpressionConditional:
{
int branches = node.ChildCount();
for (int i = 1; i < branches; i++)
{
node.Child(i).EliminateEndingBacktracking();
}
if (node.Kind != RegexNodeKind.ExpressionConditional) // ReduceExpressionConditional will have already applied ending backtracking removal
{
node = node.Child(0);
continue;
}
}
break;
// For {Lazy}Loop, we search to see if there's a viable last expression, and iff there
// is we recur into processing it. Also, as with the single-char lazy loops, LazyLoop
// can have its max iteration count dropped to its min iteration count, as there's no
// reason for it to match more than the minimal at the end; that in turn makes it a
// repeater, which results in better code generation.
// e.g. (?:abc*)* => (?:ab(?>c*))*
// e.g. (abc*?)+? => (ab){1}
case RegexNodeKind.Lazyloop:
node.N = node.M;
goto case RegexNodeKind.Loop;
case RegexNodeKind.Loop:
{
if (node.N == 1)
{
// If the loop has a max iteration count of 1 (e.g. it's an optional node),
// there's no possibility for conflict between multiple iterations, so
// we can process it.
node = node.Child(0);
continue;
}
RegexNode? loopDescendent = node.FindLastExpressionInLoopForAutoAtomic();
if (loopDescendent != null)
{
node = loopDescendent;
continue; // loop around to process node
}
}
break;
}
break;
}
}
/// <summary>
/// Removes redundant nodes from the subtree, and returns an optimized subtree.
/// </summary>
internal RegexNode Reduce()
{
// TODO: https://github.com/dotnet/runtime/issues/61048
// As part of overhauling IgnoreCase handling, the parser shouldn't produce any nodes other than Backreference
// that ever have IgnoreCase set on them. For now, though, remove IgnoreCase from any nodes for which it
// has no behavioral effect.
switch (Kind)
{
default:
// No effect
Options &= ~RegexOptions.IgnoreCase;
break;
case RegexNodeKind.One or RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notone or RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Set or RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic:
case RegexNodeKind.Multi:
case RegexNodeKind.Backreference:
// Still meaningful
break;
}
return Kind switch
{
RegexNodeKind.Alternate => ReduceAlternation(),
RegexNodeKind.Atomic => ReduceAtomic(),
RegexNodeKind.Concatenate => ReduceConcatenation(),
RegexNodeKind.Group => ReduceGroup(),
RegexNodeKind.Loop or RegexNodeKind.Lazyloop => ReduceLoops(),
RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround => ReduceLookaround(),
RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy => ReduceSet(),
RegexNodeKind.ExpressionConditional => ReduceExpressionConditional(),
RegexNodeKind.BackreferenceConditional => ReduceBackreferenceConditional(),
_ => this,
};
}
/// <summary>Remove an unnecessary Concatenation or Alternation node</summary>
/// <remarks>
/// Simple optimization for a concatenation or alternation:
/// - if the node has only one child, use it instead
/// - if the node has zero children, turn it into an empty with Nothing for an alternation or Empty for a concatenation
/// </remarks>
private RegexNode ReplaceNodeIfUnnecessary()
{
Debug.Assert(Kind is RegexNodeKind.Alternate or RegexNodeKind.Concatenate);
return ChildCount() switch
{
0 => new RegexNode(Kind == RegexNodeKind.Alternate ? RegexNodeKind.Nothing : RegexNodeKind.Empty, Options),
1 => Child(0),
_ => this,
};
}
/// <summary>Remove all non-capturing groups.</summary>
/// <remark>
/// Simple optimization: once parsed into a tree, non-capturing groups
/// serve no function, so strip them out.
/// e.g. (?:(?:(?:abc))) => abc
/// </remark>
private RegexNode ReduceGroup()
{
Debug.Assert(Kind == RegexNodeKind.Group);
RegexNode u = this;
while (u.Kind == RegexNodeKind.Group)
{
Debug.Assert(u.ChildCount() == 1);
u = u.Child(0);
}
return u;
}
/// <summary>
/// Remove unnecessary atomic nodes, and make appropriate descendents of the atomic node themselves atomic.
/// </summary>
/// <remarks>
/// e.g. (?>(?>(?>a*))) => (?>a*)
/// e.g. (?>(abc*)*) => (?>(abc(?>c*))*)
/// </remarks>
private RegexNode ReduceAtomic()
{
// RegexOptions.NonBacktracking doesn't support atomic groups, so when that option
// is set we don't want to create atomic groups where they weren't explicitly authored.
if ((Options & RegexOptions.NonBacktracking) != 0)
{
return this;
}
Debug.Assert(Kind == RegexNodeKind.Atomic);
Debug.Assert(ChildCount() == 1);
RegexNode atomic = this;
RegexNode child = Child(0);
while (child.Kind == RegexNodeKind.Atomic)
{
atomic = child;
child = atomic.Child(0);
}
switch (child.Kind)
{
// If the child is empty/nothing, there's nothing to be made atomic so the Atomic
// node can simply be removed.
case RegexNodeKind.Empty:
case RegexNodeKind.Nothing:
return child;
// If the child is already atomic, we can just remove the atomic node.
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Setloopatomic:
return child;
// If an atomic subexpression contains only a {one/notone/set}{loop/lazy},
// change it to be an {one/notone/set}loopatomic and remove the atomic node.
case RegexNodeKind.Oneloop:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Setloop:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Setlazy:
child.MakeLoopAtomic();
return child;
// Alternations have a variety of possible optimizations that can be applied
// iff they're atomic.
case RegexNodeKind.Alternate:
if ((Options & RegexOptions.RightToLeft) == 0)
{
List<RegexNode>? branches = child.Children as List<RegexNode>;
Debug.Assert(branches is not null && branches.Count != 0);
// If an alternation is atomic and its first branch is Empty, the whole thing
// is a nop, as Empty will match everything trivially, and no backtracking
// into the node will be performed, making the remaining branches irrelevant.
if (branches[0].Kind == RegexNodeKind.Empty)
{
return new RegexNode(RegexNodeKind.Empty, child.Options);
}
// Similarly, we can trim off any branches after an Empty, as they'll never be used.
// An Empty will match anything, and thus branches after that would only be used
// if we backtracked into it and advanced passed the Empty after trying the Empty...
// but if the alternation is atomic, such backtracking won't happen.
for (int i = 1; i < branches.Count - 1; i++)
{
if (branches[i].Kind == RegexNodeKind.Empty)
{
branches.RemoveRange(i + 1, branches.Count - (i + 1));
break;
}
}
// If an alternation is atomic, we won't ever backtrack back into it, which
// means order matters but not repetition. With backtracking, it would be incorrect
// to convert an expression like "hi|there|hello" into "hi|hello|there", as doing
// so could then change the order of results if we matched "hi" and then failed
// based on what came after it, and both "hello" and "there" could be successful
// with what came later. But without backtracking, we can reorder "hi|there|hello"
// to instead be "hi|hello|there", as "hello" and "there" can't match the same text,
// and once this atomic alternation has matched, we won't try another branch. This
// reordering is valuable as it then enables further optimizations, e.g.
// "hi|there|hello" => "hi|hello|there" => "h(?:i|ello)|there", which means we only
// need to check the 'h' once in case it's not an 'h', and it's easier to employ different
// code gen that, for example, switches on first character of the branches, enabling faster
// choice of branch without always having to walk through each.
bool reordered = false;
for (int start = 0; start < branches.Count; start++)
{
// Get the node that may start our range. If it's a one, multi, or concat of those, proceed.
RegexNode startNode = branches[start];
if (startNode.FindBranchOneOrMultiStart() is null)
{
continue;
}
// Find the contiguous range of nodes from this point that are similarly one, multi, or concat of those.
int endExclusive = start + 1;
while (endExclusive < branches.Count && branches[endExclusive].FindBranchOneOrMultiStart() is not null)
{
endExclusive++;
}
// If there's at least 3, there may be something to reorder (we won't reorder anything
// before the starting position, and so only 2 items is considered ordered).
if (endExclusive - start >= 3)
{
int compare = start;
while (compare < endExclusive)
{
// Get the starting character
char c = branches[compare].FindBranchOneOrMultiStart()!.FirstCharOfOneOrMulti();
// Move compare to point to the last branch that has the same starting value.
while (compare < endExclusive && branches[compare].FindBranchOneOrMultiStart()!.FirstCharOfOneOrMulti() == c)
{
compare++;
}
// Compare now points to the first node that doesn't match the starting node.
// If we've walked off our range, there's nothing left to reorder.
if (compare < endExclusive)
{
// There may be something to reorder. See if there are any other nodes that begin with the same character.
for (int next = compare + 1; next < endExclusive; next++)
{
RegexNode nextChild = branches[next];
if (nextChild.FindBranchOneOrMultiStart()!.FirstCharOfOneOrMulti() == c)
{
branches.RemoveAt(next);
branches.Insert(compare++, nextChild);
reordered = true;
}
}
}
}
}
// Move to the end of the range we've now explored. endExclusive is not a viable
// starting position either, and the start++ for the loop will thus take us to
// the next potential place to start a range.
start = endExclusive;
}
// If anything was reordered, there may be new optimization opportunities inside
// of the alternation, so reduce it again.
if (reordered)
{
atomic.ReplaceChild(0, child);
child = atomic.Child(0);
}
}
goto default;
// For everything else, try to reduce ending backtracking of the last contained expression.
default:
child.EliminateEndingBacktracking();
return atomic;
}
}
/// <summary>Combine nested loops where applicable.</summary>
/// <remarks>
/// Nested repeaters just get multiplied with each other if they're not too lumpy.
/// Other optimizations may have also resulted in {Lazy}loops directly containing
/// sets, ones, and notones, in which case they can be transformed into the corresponding
/// individual looping constructs.
/// </remarks>
private RegexNode ReduceLoops()
{
Debug.Assert(Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
RegexNode u = this;
RegexNodeKind kind = Kind;
int min = M;
int max = N;
while (u.ChildCount() > 0)
{
RegexNode child = u.Child(0);
// multiply reps of the same type only
if (child.Kind != kind)
{
bool valid = false;
if (kind == RegexNodeKind.Loop)
{
switch (child.Kind)
{
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
valid = true;
break;
}
}
else // type == Lazyloop
{
switch (child.Kind)
{
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Setlazy:
valid = true;
break;
}
}
if (!valid)
{
break;
}
}
// child can be too lumpy to blur, e.g., (a {100,105}) {3} or (a {2,})?
// [but things like (a {2,})+ are not too lumpy...]
if (u.M == 0 && child.M > 1 || child.N < child.M * 2)
{
break;
}
u = child;
if (u.M > 0)
{
u.M = min = ((int.MaxValue - 1) / u.M < min) ? int.MaxValue : u.M * min;
}
if (u.N > 0)
{
u.N = max = ((int.MaxValue - 1) / u.N < max) ? int.MaxValue : u.N * max;
}
}
if (min == int.MaxValue)
{
return new RegexNode(RegexNodeKind.Nothing, Options);
}
// If the Loop or Lazyloop now only has one child node and its a Set, One, or Notone,
// reduce to just Setloop/lazy, Oneloop/lazy, or Notoneloop/lazy. The parser will
// generally have only produced the latter, but other reductions could have exposed
// this.
if (u.ChildCount() == 1)
{
RegexNode child = u.Child(0);
switch (child.Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
child.MakeRep(u.Kind == RegexNodeKind.Lazyloop ? RegexNodeKind.Onelazy : RegexNodeKind.Oneloop, u.M, u.N);
u = child;
break;
}
}
return u;
}
/// <summary>
/// Reduces set-related nodes to simpler one-related and notone-related nodes, where applicable.
/// </summary>
/// <remarks>
/// e.g.
/// [a] => a
/// [a]* => a*
/// [a]*? => a*?
/// (?>[a]*) => (?>a*)
/// [^a] => ^a
/// []* => Nothing
/// </remarks>
private RegexNode ReduceSet()
{
// Extract empty-set, one, and not-one case as special
Debug.Assert(Kind is RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy);
Debug.Assert(!string.IsNullOrEmpty(Str));
if (RegexCharClass.IsEmpty(Str))
{
Kind = RegexNodeKind.Nothing;
Str = null;
}
else if (RegexCharClass.IsSingleton(Str))
{
Ch = RegexCharClass.SingletonChar(Str);
Str = null;
Kind =
Kind == RegexNodeKind.Set ? RegexNodeKind.One :
Kind == RegexNodeKind.Setloop ? RegexNodeKind.Oneloop :
Kind == RegexNodeKind.Setloopatomic ? RegexNodeKind.Oneloopatomic :
RegexNodeKind.Onelazy;
}
else if (RegexCharClass.IsSingletonInverse(Str))
{
Ch = RegexCharClass.SingletonChar(Str);
Str = null;
Kind =
Kind == RegexNodeKind.Set ? RegexNodeKind.Notone :
Kind == RegexNodeKind.Setloop ? RegexNodeKind.Notoneloop :
Kind == RegexNodeKind.Setloopatomic ? RegexNodeKind.Notoneloopatomic :
RegexNodeKind.Notonelazy;
}
return this;
}
/// <summary>Optimize an alternation.</summary>
private RegexNode ReduceAlternation()
{
Debug.Assert(Kind == RegexNodeKind.Alternate);
switch (ChildCount())
{
case 0:
return new RegexNode(RegexNodeKind.Nothing, Options);
case 1:
return Child(0);
default:
ReduceSingleLetterAndNestedAlternations();
RegexNode node = ReplaceNodeIfUnnecessary();
if (node.Kind == RegexNodeKind.Alternate)
{
node = ExtractCommonPrefixText(node);
if (node.Kind == RegexNodeKind.Alternate)
{
node = ExtractCommonPrefixOneNotoneSet(node);
if (node.Kind == RegexNodeKind.Alternate)
{
node = RemoveRedundantEmptiesAndNothings(node);
}
}
}
return node;
}
// This function performs two optimizations:
// - Single-letter alternations can be replaced by faster set specifications
// e.g. "a|b|c|def|g|h" -> "[a-c]|def|[gh]"
// - Nested alternations with no intervening operators can be flattened:
// e.g. "apple|(?:orange|pear)|grape" -> "apple|orange|pear|grape"
void ReduceSingleLetterAndNestedAlternations()
{
bool wasLastSet = false;
bool lastNodeCannotMerge = false;
RegexOptions optionsLast = 0;
RegexOptions optionsAt;
int i;
int j;
RegexNode at;
RegexNode prev;
List<RegexNode> children = (List<RegexNode>)Children!;
for (i = 0, j = 0; i < children.Count; i++, j++)
{
at = children[i];
if (j < i)
children[j] = at;
while (true)
{
if (at.Kind == RegexNodeKind.Alternate)
{
if (at.Children is List<RegexNode> atChildren)
{
for (int k = 0; k < atChildren.Count; k++)
{
atChildren[k].Parent = this;
}
children.InsertRange(i + 1, atChildren);
}
else
{
RegexNode atChild = (RegexNode)at.Children!;
atChild.Parent = this;
children.Insert(i + 1, atChild);
}
j--;
}
else if (at.Kind is RegexNodeKind.Set or RegexNodeKind.One)
{
// Cannot merge sets if L or I options differ, or if either are negated.
optionsAt = at.Options & (RegexOptions.RightToLeft | RegexOptions.IgnoreCase);
if (at.Kind == RegexNodeKind.Set)
{
if (!wasLastSet || optionsLast != optionsAt || lastNodeCannotMerge || !RegexCharClass.IsMergeable(at.Str!))
{
wasLastSet = true;
lastNodeCannotMerge = !RegexCharClass.IsMergeable(at.Str!);
optionsLast = optionsAt;
break;
}
}
else if (!wasLastSet || optionsLast != optionsAt || lastNodeCannotMerge)
{
wasLastSet = true;
lastNodeCannotMerge = false;
optionsLast = optionsAt;
break;
}
// The last node was a Set or a One, we're a Set or One and our options are the same.
// Merge the two nodes.
j--;
prev = children[j];
RegexCharClass prevCharClass;
if (prev.Kind == RegexNodeKind.One)
{
prevCharClass = new RegexCharClass();
prevCharClass.AddChar(prev.Ch);
}
else
{
prevCharClass = RegexCharClass.Parse(prev.Str!);
}
if (at.Kind == RegexNodeKind.One)
{
prevCharClass.AddChar(at.Ch);
}
else
{
RegexCharClass atCharClass = RegexCharClass.Parse(at.Str!);
prevCharClass.AddCharClass(atCharClass);
}
prev.Kind = RegexNodeKind.Set;
prev.Str = prevCharClass.ToStringClass(Options);
if ((prev.Options & RegexOptions.IgnoreCase) != 0 &&
RegexCharClass.MakeCaseSensitiveIfPossible(prev.Str, RegexParser.GetTargetCulture(prev.Options)) is string newSetString)
{
prev.Str = newSetString;
prev.Options &= ~RegexOptions.IgnoreCase;
}
}
else if (at.Kind == RegexNodeKind.Nothing)
{
j--;
}
else
{
wasLastSet = false;
lastNodeCannotMerge = false;
}
break;
}
}
if (j < i)
{
children.RemoveRange(j, i - j);
}
}
// This function optimizes out prefix nodes from alternation branches that are
// the same across multiple contiguous branches.
// e.g. \w12|\d34|\d56|\w78|\w90 => \w12|\d(?:34|56)|\w(?:78|90)
static RegexNode ExtractCommonPrefixOneNotoneSet(RegexNode alternation)
{
Debug.Assert(alternation.Kind == RegexNodeKind.Alternate);
Debug.Assert(alternation.Children is List<RegexNode> { Count: >= 2 });
var children = (List<RegexNode>)alternation.Children;
// Only process left-to-right prefixes.
if ((alternation.Options & RegexOptions.RightToLeft) != 0)
{
return alternation;
}
// Only handle the case where each branch is a concatenation
foreach (RegexNode child in children)
{
if (child.Kind != RegexNodeKind.Concatenate || child.ChildCount() < 2)
{
return alternation;
}
}
for (int startingIndex = 0; startingIndex < children.Count - 1; startingIndex++)
{
Debug.Assert(children[startingIndex].Children is List<RegexNode> { Count: >= 2 });
// Only handle the case where each branch begins with the same One, Notone, or Set (individual or loop).
// Note that while we can do this for individual characters, fixed length loops, and atomic loops, doing
// it for non-atomic variable length loops could change behavior as each branch could otherwise have a
// different number of characters consumed by the loop based on what's after it.
RegexNode required = children[startingIndex].Child(0);
switch (required.Kind)
{
case RegexNodeKind.One or RegexNodeKind.Notone or RegexNodeKind.Set:
case RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloopatomic:
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop or RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when required.M == required.N:
break;
default:
continue;
}
// Only handle the case where each branch begins with the exact same node value
int endingIndex = startingIndex + 1;
for (; endingIndex < children.Count; endingIndex++)
{
RegexNode other = children[endingIndex].Child(0);
if (required.Kind != other.Kind ||
required.Options != other.Options ||
required.M != other.M ||
required.N != other.N ||
required.Ch != other.Ch ||
required.Str != other.Str)
{
break;
}
}
if (endingIndex - startingIndex <= 1)
{
// Nothing to extract from this starting index.
continue;
}
// Remove the prefix node from every branch, adding it to a new alternation
var newAlternate = new RegexNode(RegexNodeKind.Alternate, alternation.Options);
for (int i = startingIndex; i < endingIndex; i++)
{
((List<RegexNode>)children[i].Children!).RemoveAt(0);
newAlternate.AddChild(children[i]);
}
// If this alternation is wrapped as atomic, we need to do the same for the new alternation.
if (alternation.Parent is RegexNode { Kind: RegexNodeKind.Atomic } parent)
{
var atomic = new RegexNode(RegexNodeKind.Atomic, alternation.Options);
atomic.AddChild(newAlternate);
newAlternate = atomic;
}
// Now create a concatenation of the prefix node with the new alternation for the combined
// branches, and replace all of the branches in this alternation with that new concatenation.
var newConcat = new RegexNode(RegexNodeKind.Concatenate, alternation.Options);
newConcat.AddChild(required);
newConcat.AddChild(newAlternate);
alternation.ReplaceChild(startingIndex, newConcat);
children.RemoveRange(startingIndex + 1, endingIndex - startingIndex - 1);
}
return alternation.ReplaceNodeIfUnnecessary();
}
// Removes unnecessary Empty and Nothing nodes from the alternation. A Nothing will never
// match, so it can be removed entirely, and an Empty can be removed if there's a previous
// Empty in the alternation: it's an extreme case of just having a repeated branch in an
// alternation, and while we don't check for all duplicates, checking for empty is easy.
static RegexNode RemoveRedundantEmptiesAndNothings(RegexNode node)
{
Debug.Assert(node.Kind == RegexNodeKind.Alternate);
Debug.Assert(node.ChildCount() >= 2);
var children = (List<RegexNode>)node.Children!;
int i = 0, j = 0;
bool seenEmpty = false;
while (i < children.Count)
{
RegexNode child = children[i];
switch (child.Kind)
{
case RegexNodeKind.Empty when !seenEmpty:
seenEmpty = true;
goto default;
case RegexNodeKind.Empty:
case RegexNodeKind.Nothing:
i++;
break;
default:
children[j] = children[i];
i++;
j++;
break;
}
}
children.RemoveRange(j, children.Count - j);
return node.ReplaceNodeIfUnnecessary();
}
// Analyzes all the branches of the alternation for text that's identical at the beginning
// of every branch. That text is then pulled out into its own one or multi node in a
// concatenation with the alternation (whose branches are updated to remove that prefix).
// This is valuable for a few reasons. One, it exposes potentially more text to the
// expression prefix analyzer used to influence FindFirstChar. Second, it exposes more
// potential alternation optimizations, e.g. if the same prefix is followed in two branches
// by sets that can be merged. Third, it reduces the amount of duplicated comparisons required
// if we end up backtracking into subsequent branches.
// e.g. abc|ade => a(?bc|de)
static RegexNode ExtractCommonPrefixText(RegexNode alternation)
{
Debug.Assert(alternation.Kind == RegexNodeKind.Alternate);
Debug.Assert(alternation.Children is List<RegexNode> { Count: >= 2 });
var children = (List<RegexNode>)alternation.Children;
// To keep things relatively simple, we currently only handle:
// - Left to right (e.g. we don't process alternations in lookbehinds)
// - Branches that are one or multi nodes, or that are concatenations beginning with one or multi nodes.
// - All branches having the same options.
// Only extract left-to-right prefixes.
if ((alternation.Options & RegexOptions.RightToLeft) != 0)
{
return alternation;
}
Span<char> scratchChar = stackalloc char[1];
ReadOnlySpan<char> startingSpan = stackalloc char[0];
for (int startingIndex = 0; startingIndex < children.Count - 1; startingIndex++)
{
// Process the first branch to get the maximum possible common string.
RegexNode? startingNode = children[startingIndex].FindBranchOneOrMultiStart();
if (startingNode is null)
{
return alternation;
}
RegexOptions startingNodeOptions = startingNode.Options;
startingSpan = startingNode.Str.AsSpan();
if (startingNode.Kind == RegexNodeKind.One)
{
scratchChar[0] = startingNode.Ch;
startingSpan = scratchChar;
}
Debug.Assert(startingSpan.Length > 0);
// Now compare the rest of the branches against it.
int endingIndex = startingIndex + 1;
for (; endingIndex < children.Count; endingIndex++)
{
// Get the starting node of the next branch.
startingNode = children[endingIndex].FindBranchOneOrMultiStart();
if (startingNode is null || startingNode.Options != startingNodeOptions)
{
break;
}
// See if the new branch's prefix has a shared prefix with the current one.
// If it does, shorten to that; if it doesn't, bail.
if (startingNode.Kind == RegexNodeKind.One)
{
if (startingSpan[0] != startingNode.Ch)
{
break;
}
if (startingSpan.Length != 1)
{
startingSpan = startingSpan.Slice(0, 1);
}
}
else
{
Debug.Assert(startingNode.Kind == RegexNodeKind.Multi);
Debug.Assert(startingNode.Str!.Length > 0);
int minLength = Math.Min(startingSpan.Length, startingNode.Str.Length);
int c = 0;
while (c < minLength && startingSpan[c] == startingNode.Str[c]) c++;
if (c == 0)
{
break;
}
startingSpan = startingSpan.Slice(0, c);
}
}
// When we get here, we have a starting string prefix shared by all branches
// in the range [startingIndex, endingIndex).
if (endingIndex - startingIndex <= 1)
{
// There's nothing to consolidate for this starting node.
continue;
}
// We should be able to consolidate something for the nodes in the range [startingIndex, endingIndex).
Debug.Assert(startingSpan.Length > 0);
// Create a new node of the form:
// Concatenation(prefix, Alternation(each | node | with | prefix | removed))
// that replaces all these branches in this alternation.
var prefix = startingSpan.Length == 1 ?
new RegexNode(RegexNodeKind.One, startingNodeOptions, startingSpan[0]) :
new RegexNode(RegexNodeKind.Multi, startingNodeOptions, startingSpan.ToString());
var newAlternate = new RegexNode(RegexNodeKind.Alternate, startingNodeOptions);
for (int i = startingIndex; i < endingIndex; i++)
{
RegexNode branch = children[i];
ProcessOneOrMulti(branch.Kind == RegexNodeKind.Concatenate ? branch.Child(0) : branch, startingSpan);
branch = branch.Reduce();
newAlternate.AddChild(branch);
// Remove the starting text from the one or multi node. This may end up changing
// the type of the node to be Empty if the starting text matches the node's full value.
static void ProcessOneOrMulti(RegexNode node, ReadOnlySpan<char> startingSpan)
{
if (node.Kind == RegexNodeKind.One)
{
Debug.Assert(startingSpan.Length == 1);
Debug.Assert(startingSpan[0] == node.Ch);
node.Kind = RegexNodeKind.Empty;
node.Ch = '\0';
}
else
{
Debug.Assert(node.Kind == RegexNodeKind.Multi);
Debug.Assert(node.Str.AsSpan().StartsWith(startingSpan, StringComparison.Ordinal));
if (node.Str!.Length == startingSpan.Length)
{
node.Kind = RegexNodeKind.Empty;
node.Str = null;
}
else if (node.Str.Length - 1 == startingSpan.Length)
{
node.Kind = RegexNodeKind.One;
node.Ch = node.Str[node.Str.Length - 1];
node.Str = null;
}
else
{
node.Str = node.Str.Substring(startingSpan.Length);
}
}
}
}
if (alternation.Parent is RegexNode parent && parent.Kind == RegexNodeKind.Atomic)
{
var atomic = new RegexNode(RegexNodeKind.Atomic, startingNodeOptions);
atomic.AddChild(newAlternate);
newAlternate = atomic;
}
var newConcat = new RegexNode(RegexNodeKind.Concatenate, startingNodeOptions);
newConcat.AddChild(prefix);
newConcat.AddChild(newAlternate);
alternation.ReplaceChild(startingIndex, newConcat);
children.RemoveRange(startingIndex + 1, endingIndex - startingIndex - 1);
}
return alternation.ChildCount() == 1 ? alternation.Child(0) : alternation;
}
}
/// <summary>
/// Finds the starting one or multi of the branch, if it has one; otherwise, returns null.
/// For simplicity, this only considers branches that are One or Multi, or a Concatenation
/// beginning with a One or Multi. We don't traverse more than one level to avoid the
/// complication of then having to later update that hierarchy when removing the prefix,
/// but it could be done in the future if proven beneficial enough.
/// </summary>
public RegexNode? FindBranchOneOrMultiStart()
{
RegexNode branch = Kind == RegexNodeKind.Concatenate ? Child(0) : this;
return branch.Kind is RegexNodeKind.One or RegexNodeKind.Multi ? branch : null;
}
/// <summary>Same as <see cref="FindBranchOneOrMultiStart"/> but also for Sets.</summary>
public RegexNode? FindBranchOneMultiOrSetStart()
{
RegexNode branch = Kind == RegexNodeKind.Concatenate ? Child(0) : this;
return branch.Kind is RegexNodeKind.One or RegexNodeKind.Multi or RegexNodeKind.Set ? branch : null;
}
/// <summary>Gets the character that begins a One or Multi.</summary>
public char FirstCharOfOneOrMulti()
{
Debug.Assert(Kind is RegexNodeKind.One or RegexNodeKind.Multi);
Debug.Assert((Options & RegexOptions.RightToLeft) == 0);
return Kind == RegexNodeKind.One ? Ch : Str![0];
}
/// <summary>Finds the guaranteed beginning literal(s) of the node, or null if none exists.</summary>
public (char Char, string? String, string? SetChars)? FindStartingLiteral(int maxSetCharacters = 5) // 5 is max optimized by IndexOfAny today
{
Debug.Assert(maxSetCharacters >= 0 && maxSetCharacters <= 128, $"{nameof(maxSetCharacters)} == {maxSetCharacters} should be small enough to be stack allocated.");
RegexNode? node = this;
while (true)
{
if (node is not null && (node.Options & RegexOptions.RightToLeft) == 0)
{
switch (node.Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy when node.M > 0:
if ((node.Options & RegexOptions.IgnoreCase) == 0 || !RegexCharClass.ParticipatesInCaseConversion(node.Ch))
{
return (node.Ch, null, null);
}
break;
case RegexNodeKind.Multi:
if ((node.Options & RegexOptions.IgnoreCase) == 0 || !RegexCharClass.ParticipatesInCaseConversion(node.Str.AsSpan()))
{
return ('\0', node.Str, null);
}
break;
case RegexNodeKind.Set:
case RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy when node.M > 0:
Span<char> setChars = stackalloc char[maxSetCharacters];
int numChars;
if (!RegexCharClass.IsNegated(node.Str!) &&
(numChars = RegexCharClass.GetSetChars(node.Str!, setChars)) != 0)
{
setChars = setChars.Slice(0, numChars);
if ((node.Options & RegexOptions.IgnoreCase) == 0 || !RegexCharClass.ParticipatesInCaseConversion(setChars))
{
return ('\0', null, setChars.ToString());
}
}
break;
case RegexNodeKind.Atomic:
case RegexNodeKind.Concatenate:
case RegexNodeKind.Capture:
case RegexNodeKind.Group:
case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M > 0:
case RegexNodeKind.PositiveLookaround:
node = node.Child(0);
continue;
}
}
return null;
}
}
/// <summary>
/// Optimizes a concatenation by coalescing adjacent characters and strings,
/// coalescing adjacent loops, converting loops to be atomic where applicable,
/// and removing the concatenation itself if it's unnecessary.
/// </summary>
private RegexNode ReduceConcatenation()
{
Debug.Assert(Kind == RegexNodeKind.Concatenate);
// If the concat node has zero or only one child, get rid of the concat.
switch (ChildCount())
{
case 0:
return new RegexNode(RegexNodeKind.Empty, Options);
case 1:
return Child(0);
}
// Coalesce adjacent loops. This helps to minimize work done by the interpreter, minimize code gen,
// and also help to reduce catastrophic backtracking.
ReduceConcatenationWithAdjacentLoops();
// Coalesce adjacent characters/strings. This is done after the adjacent loop coalescing so that
// a One adjacent to both a Multi and a Loop prefers being folded into the Loop rather than into
// the Multi. Doing so helps with auto-atomicity when it's later applied.
ReduceConcatenationWithAdjacentStrings();
// If the concatenation is now empty, return an empty node, or if it's got a single child, return that child.
// Otherwise, return this.
return ReplaceNodeIfUnnecessary();
}
/// <summary>
/// Combine adjacent characters/strings.
/// e.g. (?:abc)(?:def) -> abcdef
/// </summary>
private void ReduceConcatenationWithAdjacentStrings()
{
Debug.Assert(Kind == RegexNodeKind.Concatenate);
Debug.Assert(Children is List<RegexNode>);
bool wasLastString = false;
RegexOptions optionsLast = 0;
int i, j;
List<RegexNode> children = (List<RegexNode>)Children!;
for (i = 0, j = 0; i < children.Count; i++, j++)
{
RegexNode at = children[i];
if (j < i)
{
children[j] = at;
}
if (at.Kind == RegexNodeKind.Concatenate &&
((at.Options & RegexOptions.RightToLeft) == (Options & RegexOptions.RightToLeft)))
{
if (at.Children is List<RegexNode> atChildren)
{
for (int k = 0; k < atChildren.Count; k++)
{
atChildren[k].Parent = this;
}
children.InsertRange(i + 1, atChildren);
}
else
{
RegexNode atChild = (RegexNode)at.Children!;
atChild.Parent = this;
children.Insert(i + 1, atChild);
}
j--;
}
else if (at.Kind is RegexNodeKind.Multi or RegexNodeKind.One)
{
// Cannot merge strings if L or I options differ
RegexOptions optionsAt = at.Options & (RegexOptions.RightToLeft | RegexOptions.IgnoreCase);
if (!wasLastString || optionsLast != optionsAt)
{
wasLastString = true;
optionsLast = optionsAt;
continue;
}
RegexNode prev = children[--j];
if (prev.Kind == RegexNodeKind.One)
{
prev.Kind = RegexNodeKind.Multi;
prev.Str = prev.Ch.ToString();
}
if ((optionsAt & RegexOptions.RightToLeft) == 0)
{
prev.Str = (at.Kind == RegexNodeKind.One) ? $"{prev.Str}{at.Ch}" : prev.Str + at.Str;
}
else
{
prev.Str = (at.Kind == RegexNodeKind.One) ? $"{at.Ch}{prev.Str}" : at.Str + prev.Str;
}
}
else if (at.Kind == RegexNodeKind.Empty)
{
j--;
}
else
{
wasLastString = false;
}
}
if (j < i)
{
children.RemoveRange(j, i - j);
}
}
/// <summary>
/// Combine adjacent loops.
/// e.g. a*a*a* => a*
/// e.g. a+ab => a{2,}b
/// </summary>
private void ReduceConcatenationWithAdjacentLoops()
{
Debug.Assert(Kind == RegexNodeKind.Concatenate);
Debug.Assert(Children is List<RegexNode>);
var children = (List<RegexNode>)Children!;
int current = 0, next = 1, nextSave = 1;
while (next < children.Count)
{
RegexNode currentNode = children[current];
RegexNode nextNode = children[next];
if (currentNode.Options == nextNode.Options)
{
static bool CanCombineCounts(int nodeMin, int nodeMax, int nextMin, int nextMax)
{
// We shouldn't have an infinite minimum; bail if we find one. Also check for the
// degenerate case where we'd make the min overflow or go infinite when it wasn't already.
if (nodeMin == int.MaxValue ||
nextMin == int.MaxValue ||
(uint)nodeMin + (uint)nextMin >= int.MaxValue)
{
return false;
}
// Similar overflow / go infinite check for max (which can be infinite).
if (nodeMax != int.MaxValue &&
nextMax != int.MaxValue &&
(uint)nodeMax + (uint)nextMax >= int.MaxValue)
{
return false;
}
return true;
}
switch (currentNode.Kind)
{
// Coalescing a loop with its same type
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy when nextNode.Kind == currentNode.Kind && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy when nextNode.Kind == currentNode.Kind && currentNode.Str == nextNode.Str:
if (CanCombineCounts(currentNode.M, currentNode.N, nextNode.M, nextNode.N))
{
currentNode.M += nextNode.M;
if (currentNode.N != int.MaxValue)
{
currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N;
}
next++;
continue;
}
break;
// Coalescing a loop with an additional item of the same type
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy when nextNode.Kind == RegexNodeKind.One && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy when nextNode.Kind == RegexNodeKind.Notone && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy when nextNode.Kind == RegexNodeKind.Set && currentNode.Str == nextNode.Str:
if (CanCombineCounts(currentNode.M, currentNode.N, 1, 1))
{
currentNode.M++;
if (currentNode.N != int.MaxValue)
{
currentNode.N++;
}
next++;
continue;
}
break;
// Coalescing a loop with a subsequent string
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy when nextNode.Kind == RegexNodeKind.Multi && currentNode.Ch == nextNode.Str![0]:
{
// Determine how many of the multi's characters can be combined.
// We already checked for the first, so we know it's at least one.
int matchingCharsInMulti = 1;
while (matchingCharsInMulti < nextNode.Str.Length && currentNode.Ch == nextNode.Str[matchingCharsInMulti])
{
matchingCharsInMulti++;
}
if (CanCombineCounts(currentNode.M, currentNode.N, matchingCharsInMulti, matchingCharsInMulti))
{
// Update the loop's bounds to include those characters from the multi
currentNode.M += matchingCharsInMulti;
if (currentNode.N != int.MaxValue)
{
currentNode.N += matchingCharsInMulti;
}
// If it was the full multi, skip/remove the multi and continue processing this loop.
if (nextNode.Str.Length == matchingCharsInMulti)
{
next++;
continue;
}
// Otherwise, trim the characters from the multiple that were absorbed into the loop.
// If it now only has a single character, it becomes a One.
Debug.Assert(matchingCharsInMulti < nextNode.Str.Length);
if (nextNode.Str.Length - matchingCharsInMulti == 1)
{
nextNode.Kind = RegexNodeKind.One;
nextNode.Ch = nextNode.Str[nextNode.Str.Length - 1];
nextNode.Str = null;
}
else
{
nextNode.Str = nextNode.Str.Substring(matchingCharsInMulti);
}
}
}
break;
// NOTE: We could add support for coalescing a string with a subsequent loop, but the benefits of that
// are limited. Pulling a subsequent string's prefix back into the loop helps with making the loop atomic,
// but if the loop is after the string, pulling the suffix of the string forward into the loop may actually
// be a deoptimization as those characters could end up matching more slowly as part of loop matching.
// Coalescing an individual item with a loop.
case RegexNodeKind.One when (nextNode.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy) && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Notone when (nextNode.Kind is RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy) && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Set when (nextNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy) && currentNode.Str == nextNode.Str:
if (CanCombineCounts(1, 1, nextNode.M, nextNode.N))
{
currentNode.Kind = nextNode.Kind;
currentNode.M = nextNode.M + 1;
currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1;
next++;
continue;
}
break;
// Coalescing an individual item with another individual item.
// We don't coalesce adjacent One nodes into a Oneloop as we'd rather they be joined into a Multi.
case RegexNodeKind.Notone when nextNode.Kind == currentNode.Kind && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Set when nextNode.Kind == RegexNodeKind.Set && currentNode.Str == nextNode.Str:
currentNode.MakeRep(RegexNodeKind.Oneloop, 2, 2);
next++;
continue;
}
}
children[nextSave++] = children[next];
current = next;
next++;
}
if (nextSave < children.Count)
{
children.RemoveRange(nextSave, children.Count - nextSave);
}
}
/// <summary>
/// Finds {one/notone/set}loop nodes in the concatenation that can be automatically upgraded
/// to {one/notone/set}loopatomic nodes. Such changes avoid potential useless backtracking.
/// e.g. A*B (where sets A and B don't overlap) => (?>A*)B.
/// </summary>
private void FindAndMakeLoopsAtomic()
{
Debug.Assert((Options & RegexOptions.NonBacktracking) == 0, "Atomic groups aren't supported and don't help performance with NonBacktracking");
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we're too deep on the stack, give up optimizing further.
return;
}
if ((Options & RegexOptions.RightToLeft) != 0)
{
// RTL is so rare, we don't need to spend additional time/code optimizing for it.
return;
}
// For all node types that have children, recur into each of those children.
int childCount = ChildCount();
if (childCount != 0)
{
for (int i = 0; i < childCount; i++)
{
Child(i).FindAndMakeLoopsAtomic();
}
}
// If this isn't a concatenation, nothing more to do.
if (Kind is not RegexNodeKind.Concatenate)
{
return;
}
// This is a concatenation. Iterate through each pair of nodes in the concatenation seeing whether we can
// make the first node (or its right-most child) atomic based on the second node (or its left-most child).
Debug.Assert(Children is List<RegexNode>);
var children = (List<RegexNode>)Children;
for (int i = 0; i < childCount - 1; i++)
{
ProcessNode(children[i], children[i + 1]);
static void ProcessNode(RegexNode node, RegexNode subsequent)
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we can't recur further, just stop optimizing.
return;
}
// Skip down the node past irrelevant nodes.
while (true)
{
// We can always recur into captures and into the last node of concatenations.
if (node.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate)
{
node = node.Child(node.ChildCount() - 1);
continue;
}
// For loops with at least one guaranteed iteration, we can recur into them, but
// we need to be careful not to just always do so; the ending node of a loop can only
// be made atomic if what comes after the loop but also the beginning of the loop are
// compatible for the optimization.
if (node.Kind == RegexNodeKind.Loop)
{
RegexNode? loopDescendent = node.FindLastExpressionInLoopForAutoAtomic();
if (loopDescendent != null)
{
node = loopDescendent;
continue;
}
}
// Can't skip any further.
break;
}
// If the node can be changed to atomic based on what comes after it, do so.
switch (node.Kind)
{
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop when CanBeMadeAtomic(node, subsequent, allowSubsequentIteration: true):
node.MakeLoopAtomic();
break;
case RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional:
// In the case of alternation, we can't change the alternation node itself
// based on what comes after it (at least not with more complicated analysis
// that factors in all branches together), but we can look at each individual
// branch, and analyze ending loops in each branch individually to see if they
// can be made atomic. Then if we do end up backtracking into the alternation,
// we at least won't need to backtrack into that loop. The same is true for
// conditionals, though we don't want to process the condition expression
// itself, as it's already considered atomic and handled as part of ReduceExpressionConditional.
{
int alternateBranches = node.ChildCount();
for (int b = node.Kind == RegexNodeKind.ExpressionConditional ? 1 : 0; b < alternateBranches; b++)
{
ProcessNode(node.Child(b), subsequent);
}
}
break;
}
}
}
}
/// <summary>
/// Recurs into the last expression of a loop node, looking to see if it can find a node
/// that could be made atomic _assuming_ the conditions exist for it with the loop's ancestors.
/// </summary>
/// <returns>The found node that should be explored further for auto-atomicity; null if it doesn't exist.</returns>
private RegexNode? FindLastExpressionInLoopForAutoAtomic()
{
RegexNode node = this;
Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
// Start by looking at the loop's sole child.
node = node.Child(0);
// Skip past captures.
while (node.Kind == RegexNodeKind.Capture)
{
node = node.Child(0);
}
// If the loop's body is a concatenate, we can skip to its last child iff that
// last child doesn't conflict with the first child, since this whole concatenation
// could be repeated, such that the first node ends up following the last. For
// example, in the expression (a+[def])*, the last child is [def] and the first is
// a+, which can't possibly overlap with [def]. In contrast, if we had (a+[ade])*,
// [ade] could potentially match the starting 'a'.
if (node.Kind == RegexNodeKind.Concatenate)
{
int concatCount = node.ChildCount();
RegexNode lastConcatChild = node.Child(concatCount - 1);
if (CanBeMadeAtomic(lastConcatChild, node.Child(0), allowSubsequentIteration: false))
{
return lastConcatChild;
}
}
// Otherwise, the loop has nothing that can participate in auto-atomicity.
return null;
}
/// <summary>Optimizations for positive and negative lookaheads/behinds.</summary>
private RegexNode ReduceLookaround()
{
Debug.Assert(Kind is RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround);
Debug.Assert(ChildCount() == 1);
// A lookaround is a zero-width atomic assertion.
// As it's atomic, nothing will backtrack into it, and we can
// eliminate any ending backtracking from it.
EliminateEndingBacktracking();
// A positive lookaround wrapped around an empty is a nop, and we can reduce it
// to simply Empty. A developer typically doesn't write this, but rather it evolves
// due to optimizations resulting in empty.
// A negative lookaround wrapped around an empty child, i.e. (?!), is
// sometimes used as a way to insert a guaranteed no-match into the expression,
// often as part of a conditional. We can reduce it to simply Nothing.
if (Child(0).Kind == RegexNodeKind.Empty)
{
Kind = Kind == RegexNodeKind.PositiveLookaround ? RegexNodeKind.Empty : RegexNodeKind.Nothing;
Children = null;
}
return this;
}
/// <summary>Optimizations for backreference conditionals.</summary>
private RegexNode ReduceBackreferenceConditional()
{
Debug.Assert(Kind == RegexNodeKind.BackreferenceConditional);
Debug.Assert(ChildCount() is 1 or 2);
// This isn't so much an optimization as it is changing the tree for consistency. We want
// all engines to be able to trust that every backreference conditional will have two children,
// even though it's optional in the syntax. If it's missing a "not matched" branch,
// we add one that will match empty.
if (ChildCount() == 1)
{
AddChild(new RegexNode(RegexNodeKind.Empty, Options));
}
return this;
}
/// <summary>Optimizations for expression conditionals.</summary>
private RegexNode ReduceExpressionConditional()
{
Debug.Assert(Kind == RegexNodeKind.ExpressionConditional);
Debug.Assert(ChildCount() is 2 or 3);
// This isn't so much an optimization as it is changing the tree for consistency. We want
// all engines to be able to trust that every expression conditional will have three children,
// even though it's optional in the syntax. If it's missing a "not matched" branch,
// we add one that will match empty.
if (ChildCount() == 2)
{
AddChild(new RegexNode(RegexNodeKind.Empty, Options));
}
// It's common for the condition to be an explicit positive lookahead, as specifying
// that eliminates any ambiguity in syntax as to whether the expression is to be matched
// as an expression or to be a reference to a capture group. After parsing, however,
// there's no ambiguity, and we can remove an extra level of positive lookahead, as the
// engines need to treat the condition as a zero-width positive, atomic assertion regardless.
RegexNode condition = Child(0);
if (condition.Kind == RegexNodeKind.PositiveLookaround && (condition.Options & RegexOptions.RightToLeft) == 0)
{
ReplaceChild(0, condition.Child(0));
}
// We can also eliminate any ending backtracking in the condition, as the condition
// is considered to be a positive lookahead, which is an atomic zero-width assertion.
condition = Child(0);
condition.EliminateEndingBacktracking();
return this;
}
/// <summary>
/// Determines whether node can be switched to an atomic loop. Subsequent is the node
/// immediately after 'node'.
/// </summary>
private static bool CanBeMadeAtomic(RegexNode node, RegexNode subsequent, bool allowSubsequentIteration)
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we can't recur further, just stop optimizing.
return false;
}
// In most case, we'll simply check the node against whatever subsequent is. However, in case
// subsequent ends up being a loop with a min bound of 0, we'll also need to evaluate the node
// against whatever comes after subsequent. In that case, we'll walk the tree to find the
// next subsequent, and we'll loop around against to perform the comparison again.
while (true)
{
// Skip the successor down to the closest node that's guaranteed to follow it.
int childCount;
while ((childCount = subsequent.ChildCount()) > 0)
{
Debug.Assert(subsequent.Kind != RegexNodeKind.Group);
switch (subsequent.Kind)
{
case RegexNodeKind.Concatenate:
case RegexNodeKind.Capture:
case RegexNodeKind.Atomic:
case RegexNodeKind.PositiveLookaround when (subsequent.Options & RegexOptions.RightToLeft) == 0: // only lookaheads, not lookbehinds (represented as RTL PositiveLookaround nodes)
case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when subsequent.M > 0:
subsequent = subsequent.Child(0);
continue;
}
break;
}
// If the two nodes don't agree on options in any way, don't try to optimize them.
// TODO: Remove this once https://github.com/dotnet/runtime/issues/61048 is implemented.
if (node.Options != subsequent.Options)
{
return false;
}
// If the successor is an alternation, all of its children need to be evaluated, since any of them
// could come after this node. If any of them fail the optimization, then the whole node fails.
// This applies to expression conditionals as well, as long as they have both a yes and a no branch (if there's
// only a yes branch, we'd need to also check whatever comes after the conditional). It doesn't apply to
// backreference conditionals, as the condition itself is unknown statically and could overlap with the
// loop being considered for atomicity.
switch (subsequent.Kind)
{
case RegexNodeKind.Alternate:
case RegexNodeKind.ExpressionConditional when childCount == 3: // condition, yes, and no branch
for (int i = 0; i < childCount; i++)
{
if (!CanBeMadeAtomic(node, subsequent.Child(i), allowSubsequentIteration))
{
return false;
}
}
return true;
}
// If this node is a {one/notone/set}loop, see if it overlaps with its successor in the concatenation.
// If it doesn't, then we can upgrade it to being a {one/notone/set}loopatomic.
// Doing so avoids unnecessary backtracking.
switch (node.Kind)
{
case RegexNodeKind.Oneloop:
switch (subsequent.Kind)
{
case RegexNodeKind.One when node.Ch != subsequent.Ch:
case RegexNodeKind.Notone when node.Ch == subsequent.Ch:
case RegexNodeKind.Set when !RegexCharClass.CharInClass(node.Ch, subsequent.Str!):
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && node.Ch != subsequent.Ch:
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic when subsequent.M > 0 && node.Ch == subsequent.Ch:
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M > 0 && !RegexCharClass.CharInClass(node.Ch, subsequent.Str!):
case RegexNodeKind.Multi when node.Ch != subsequent.Str![0]:
case RegexNodeKind.End:
case RegexNodeKind.EndZ or RegexNodeKind.Eol when node.Ch != '\n':
case RegexNodeKind.Boundary when RegexCharClass.IsBoundaryWordChar(node.Ch):
case RegexNodeKind.NonBoundary when !RegexCharClass.IsBoundaryWordChar(node.Ch):
case RegexNodeKind.ECMABoundary when RegexCharClass.IsECMAWordChar(node.Ch):
case RegexNodeKind.NonECMABoundary when !RegexCharClass.IsECMAWordChar(node.Ch):
return true;
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && node.Ch != subsequent.Ch:
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic when subsequent.M == 0 && node.Ch == subsequent.Ch:
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M == 0 && !RegexCharClass.CharInClass(node.Ch, subsequent.Str!):
// The loop can be made atomic based on this subsequent node, but we'll need to evaluate the next one as well.
break;
default:
return false;
}
break;
case RegexNodeKind.Notoneloop:
switch (subsequent.Kind)
{
case RegexNodeKind.One when node.Ch == subsequent.Ch:
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && node.Ch == subsequent.Ch:
case RegexNodeKind.Multi when node.Ch == subsequent.Str![0]:
case RegexNodeKind.End:
return true;
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && node.Ch == subsequent.Ch:
// The loop can be made atomic based on this subsequent node, but we'll need to evaluate the next one as well.
break;
default:
return false;
}
break;
case RegexNodeKind.Setloop:
switch (subsequent.Kind)
{
case RegexNodeKind.One when !RegexCharClass.CharInClass(subsequent.Ch, node.Str!):
case RegexNodeKind.Set when !RegexCharClass.MayOverlap(node.Str!, subsequent.Str!):
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && !RegexCharClass.CharInClass(subsequent.Ch, node.Str!):
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M > 0 && !RegexCharClass.MayOverlap(node.Str!, subsequent.Str!):
case RegexNodeKind.Multi when !RegexCharClass.CharInClass(subsequent.Str![0], node.Str!):
case RegexNodeKind.End:
case RegexNodeKind.EndZ or RegexNodeKind.Eol when !RegexCharClass.CharInClass('\n', node.Str!):
case RegexNodeKind.Boundary when node.Str is RegexCharClass.WordClass or RegexCharClass.DigitClass:
case RegexNodeKind.NonBoundary when node.Str is RegexCharClass.NotWordClass or RegexCharClass.NotDigitClass:
case RegexNodeKind.ECMABoundary when node.Str is RegexCharClass.ECMAWordClass or RegexCharClass.ECMADigitClass:
case RegexNodeKind.NonECMABoundary when node.Str is RegexCharClass.NotECMAWordClass or RegexCharClass.NotDigitClass:
return true;
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && !RegexCharClass.CharInClass(subsequent.Ch, node.Str!):
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M == 0 && !RegexCharClass.MayOverlap(node.Str!, subsequent.Str!):
// The loop can be made atomic based on this subsequent node, but we'll need to evaluate the next one as well.
break;
default:
return false;
}
break;
default:
return false;
}
// We only get here if the node could be made atomic based on subsequent but subsequent has a lower bound of zero
// and thus we need to move subsequent to be the next node in sequence and loop around to try again.
Debug.Assert(subsequent.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy);
Debug.Assert(subsequent.M == 0);
if (!allowSubsequentIteration)
{
return false;
}
// To be conservative, we only walk up through a very limited set of constructs (even though we may have walked
// down through more, like loops), looking for the next concatenation that we're not at the end of, at
// which point subsequent becomes whatever node is next in that concatenation.
while (true)
{
RegexNode? parent = subsequent.Parent;
switch (parent?.Kind)
{
case RegexNodeKind.Atomic:
case RegexNodeKind.Alternate:
case RegexNodeKind.Capture:
subsequent = parent;
continue;
case RegexNodeKind.Concatenate:
var peers = (List<RegexNode>)parent.Children!;
int currentIndex = peers.IndexOf(subsequent);
Debug.Assert(currentIndex >= 0, "Node should have been in its parent's child list");
if (currentIndex + 1 == peers.Count)
{
subsequent = parent;
continue;
}
else
{
subsequent = peers[currentIndex + 1];
break;
}
case null:
// If we hit the root, we're at the end of the expression, at which point nothing could backtrack
// in and we can declare success.
return true;
default:
// Anything else, we don't know what to do, so we have to assume it could conflict with the loop.
return false;
}
break;
}
}
}
/// <summary>Computes a min bound on the required length of any string that could possibly match.</summary>
/// <returns>The min computed length. If the result is 0, there is no minimum we can enforce.</returns>
/// <remarks>
/// e.g. abc[def](ghijkl|mn) => 6
/// </remarks>
public int ComputeMinLength()
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we can't recur further, assume there's no minimum we can enforce.
return 0;
}
switch (Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
// Single character.
return 1;
case RegexNodeKind.Multi:
// Every character in the string needs to match.
return Str!.Length;
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Setlazy:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
// One character repeated at least M times.
return M;
case RegexNodeKind.Lazyloop:
case RegexNodeKind.Loop:
// A node graph repeated at least M times.
return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength());
case RegexNodeKind.Alternate:
// The minimum required length for any of the alternation's branches.
{
int childCount = ChildCount();
Debug.Assert(childCount >= 2);
int min = Child(0).ComputeMinLength();
for (int i = 1; i < childCount && min > 0; i++)
{
min = Math.Min(min, Child(i).ComputeMinLength());
}
return min;
}
case RegexNodeKind.BackreferenceConditional:
// Minimum of its yes and no branches. The backreference doesn't add to the length.
return Math.Min(Child(0).ComputeMinLength(), Child(1).ComputeMinLength());
case RegexNodeKind.ExpressionConditional:
// Minimum of its yes and no branches. The condition is a zero-width assertion.
return Math.Min(Child(1).ComputeMinLength(), Child(2).ComputeMinLength());
case RegexNodeKind.Concatenate:
// The sum of all of the concatenation's children.
{
long sum = 0;
int childCount = ChildCount();
for (int i = 0; i < childCount; i++)
{
sum += Child(i).ComputeMinLength();
}
return (int)Math.Min(int.MaxValue - 1, sum);
}
case RegexNodeKind.Atomic:
case RegexNodeKind.Capture:
case RegexNodeKind.Group:
// For groups, we just delegate to the sole child.
Debug.Assert(ChildCount() == 1);
return Child(0).ComputeMinLength();
case RegexNodeKind.Empty:
case RegexNodeKind.Nothing:
case RegexNodeKind.UpdateBumpalong:
// Nothing to match. In the future, we could potentially use Nothing to say that the min length
// is infinite, but that would require a different structure, as that would only apply if the
// Nothing match is required in all cases (rather than, say, as one branch of an alternation).
case RegexNodeKind.Beginning:
case RegexNodeKind.Bol:
case RegexNodeKind.Boundary:
case RegexNodeKind.ECMABoundary:
case RegexNodeKind.End:
case RegexNodeKind.EndZ:
case RegexNodeKind.Eol:
case RegexNodeKind.NonBoundary:
case RegexNodeKind.NonECMABoundary:
case RegexNodeKind.Start:
case RegexNodeKind.NegativeLookaround:
case RegexNodeKind.PositiveLookaround:
// Zero-width
case RegexNodeKind.Backreference:
// Requires matching data available only at run-time. In the future, we could choose to find
// and follow the capture group this aligns with, while being careful not to end up in an
// infinite cycle.
return 0;
default:
Debug.Fail($"Unknown node: {Kind}");
goto case RegexNodeKind.Empty;
}
}
/// <summary>Computes a maximum length of any string that could possibly match.</summary>
/// <returns>The maximum length of any string that could possibly match, or null if the length may not always be the same.</returns>
/// <remarks>
/// e.g. abc[def](gh|ijklmnop) => 12
/// </remarks>
public int? ComputeMaxLength()
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we can't recur further, assume there's no minimum we can enforce.
return null;
}
switch (Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
// Single character.
return 1;
case RegexNodeKind.Multi:
// Every character in the string needs to match.
return Str!.Length;
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or
RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or
RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic:
// Return the max number of iterations if there's an upper bound, or null if it's infinite
return N == int.MaxValue ? null : N;
case RegexNodeKind.Loop or RegexNodeKind.Lazyloop:
if (N != int.MaxValue)
{
// A node graph repeated a fixed number of times
if (Child(0).ComputeMaxLength() is int childMaxLength)
{
long maxLength = (long)N * childMaxLength;
if (maxLength < int.MaxValue)
{
return (int)maxLength;
}
}
}
return null;
case RegexNodeKind.Alternate:
// The maximum length of any child branch, as long as they all have one.
{
int childCount = ChildCount();
Debug.Assert(childCount >= 2);
if (Child(0).ComputeMaxLength() is not int maxLength)
{
return null;
}
for (int i = 1; i < childCount; i++)
{
if (Child(i).ComputeMaxLength() is not int next)
{
return null;
}
maxLength = Math.Max(maxLength, next);
}
return maxLength;
}
case RegexNodeKind.BackreferenceConditional:
case RegexNodeKind.ExpressionConditional:
// The maximum length of either child branch, as long as they both have one.. The condition for an expression conditional is a zero-width assertion.
{
int i = Kind == RegexNodeKind.BackreferenceConditional ? 0 : 1;
return Child(i).ComputeMaxLength() is int yes && Child(i + 1).ComputeMaxLength() is int no ?
Math.Max(yes, no) :
null;
}
case RegexNodeKind.Concatenate:
// The sum of all of the concatenation's children's max lengths, as long as they all have one.
{
long sum = 0;
int childCount = ChildCount();
for (int i = 0; i < childCount; i++)
{
if (Child(i).ComputeMaxLength() is not int length)
{
return null;
}
sum += length;
}
if (sum < int.MaxValue)
{
return (int)sum;
}
return null;
}
case RegexNodeKind.Atomic:
case RegexNodeKind.Capture:
// For groups, we just delegate to the sole child.
Debug.Assert(ChildCount() == 1);
return Child(0).ComputeMaxLength();
case RegexNodeKind.Empty:
case RegexNodeKind.Nothing:
case RegexNodeKind.UpdateBumpalong:
case RegexNodeKind.Beginning:
case RegexNodeKind.Bol:
case RegexNodeKind.Boundary:
case RegexNodeKind.ECMABoundary:
case RegexNodeKind.End:
case RegexNodeKind.EndZ:
case RegexNodeKind.Eol:
case RegexNodeKind.NonBoundary:
case RegexNodeKind.NonECMABoundary:
case RegexNodeKind.Start:
case RegexNodeKind.PositiveLookaround:
case RegexNodeKind.NegativeLookaround:
// Zero-width
return 0;
case RegexNodeKind.Backreference:
// Requires matching data available only at run-time. In the future, we could choose to find
// and follow the capture group this aligns with, while being careful not to end up in an
// infinite cycle.
return null;
default:
Debug.Fail($"Unknown node: {Kind}");
goto case RegexNodeKind.Empty;
}
}
/// <summary>
/// Determines whether the specified child index of a concatenation begins a sequence whose values
/// should be used to perform an ordinal case-insensitive comparison.
/// </summary>
/// <param name="childIndex">The index of the child with which to start the sequence.</param>
/// <param name="exclusiveChildBound">The exclusive upper bound on the child index to iterate to.</param>
/// <param name="nodesConsumed">How many nodes make up the sequence, if any.</param>
/// <param name="caseInsensitiveString">The string to use for an ordinal case-insensitive comparison, if any.</param>
/// <returns>true if a sequence was found; otherwise, false.</returns>
public bool TryGetOrdinalCaseInsensitiveString(int childIndex, int exclusiveChildBound, out int nodesConsumed, [NotNullWhen(true)] out string? caseInsensitiveString)
{
Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
var vsb = new ValueStringBuilder(stackalloc char[32]);
// We're looking in particular for sets of ASCII characters, so we focus only on sets with two characters in them, e.g. [Aa].
Span<char> twoChars = stackalloc char[2];
// Iterate from the child index to the exclusive upper bound.
int i = childIndex;
for ( ; i < exclusiveChildBound; i++)
{
RegexNode child = Child(i);
if ((child.Options & RegexOptions.IgnoreCase) != 0)
{
// TODO https://github.com/dotnet/runtime/issues/61048: Remove this block once fixed.
// We don't want any nodes that are still IgnoreCase, as they'd no longer be IgnoreCase if
// they were applicable to this optimization.
break;
}
if (child.Kind is RegexNodeKind.One)
{
// We only want to include ASCII characters, and only if they don't participate in case conversion
// such that they only case to themselves and nothing other cases to them. Otherwise, including
// them would potentially cause us to match against things not allowed by the pattern.
if (child.Ch >= 128 ||
RegexCharClass.ParticipatesInCaseConversion(child.Ch))
{
break;
}
vsb.Append(child.Ch);
}
else if (child.Kind is RegexNodeKind.Multi)
{
// As with RegexNodeKind.One, the string needs to be composed solely of ASCII characters that
// don't participate in case conversion.
if (!RegexCharClass.IsAscii(child.Str.AsSpan()) ||
RegexCharClass.ParticipatesInCaseConversion(child.Str.AsSpan()))
{
break;
}
vsb.Append(child.Str);
}
else if (child.Kind is RegexNodeKind.Set ||
(child.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic && child.M == child.N))
{
// In particular we want to look for sets that contain only the upper and lowercase variant
// of the same ASCII letter.
if (RegexCharClass.IsNegated(child.Str!) ||
RegexCharClass.GetSetChars(child.Str!, twoChars) != 2 ||
twoChars[0] >= 128 ||
twoChars[1] >= 128 ||
twoChars[0] == twoChars[1] ||
!char.IsLetter(twoChars[0]) ||
!char.IsLetter(twoChars[1]) ||
((twoChars[0] | 0x20) != (twoChars[1] | 0x20)))
{
break;
}
vsb.Append((char)(twoChars[0] | 0x20), child.Kind is RegexNodeKind.Set ? 1 : child.M);
}
else
{
break;
}
}
// If we found at least two characters, consider it a sequence found. It's possible
// they all came from the same node, so this could be a sequence of just one node.
if (vsb.Length >= 2)
{
caseInsensitiveString = vsb.ToString();
nodesConsumed = i - childIndex;
return true;
}
// No sequence found.
caseInsensitiveString = null;
nodesConsumed = 0;
vsb.Dispose();
return false;
}
/// <summary>
/// Determine whether the specified child node is the beginning of a sequence that can
/// trivially have length checks combined in order to avoid bounds checks.
/// </summary>
/// <param name="childIndex">The starting index of the child to check.</param>
/// <param name="requiredLength">The sum of all the fixed lengths for the nodes in the sequence.</param>
/// <param name="exclusiveEnd">The index of the node just after the last one in the sequence.</param>
/// <returns>true if more than one node can have their length checks combined; otherwise, false.</returns>
/// <remarks>
/// There are additional node types for which we can prove a fixed length, e.g. examining all branches
/// of an alternation and returning true if all their lengths are equal. However, the primary purpose
/// of this method is to avoid bounds checks by consolidating length checks that guard accesses to
/// strings/spans for which the JIT can see a fixed index within bounds, and alternations employ
/// patterns that defeat that (e.g. reassigning the span in question). As such, the implementation
/// remains focused on only a core subset of nodes that are a) likely to be used in concatenations and
/// b) employ simple patterns of checks.
/// </remarks>
public bool TryGetJoinableLengthCheckChildRange(int childIndex, out int requiredLength, out int exclusiveEnd)
{
Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
static bool CanJoinLengthCheck(RegexNode node) => node.Kind switch
{
RegexNodeKind.One or RegexNodeKind.Notone or RegexNodeKind.Set => true,
RegexNodeKind.Multi => true,
RegexNodeKind.Oneloop or RegexNodeKind.Onelazy or RegexNodeKind.Oneloopatomic or
RegexNodeKind.Notoneloop or RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloopatomic or
RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic
when node.M == node.N => true,
_ => false,
};
RegexNode child = Child(childIndex);
if (CanJoinLengthCheck(child))
{
requiredLength = child.ComputeMinLength();
int childCount = ChildCount();
for (exclusiveEnd = childIndex + 1; exclusiveEnd < childCount; exclusiveEnd++)
{
child = Child(exclusiveEnd);
if (!CanJoinLengthCheck(child))
{
break;
}
requiredLength += child.ComputeMinLength();
}
if (exclusiveEnd - childIndex > 1)
{
return true;
}
}
requiredLength = 0;
exclusiveEnd = 0;
return false;
}
public RegexNode MakeQuantifier(bool lazy, int min, int max)
{
// Certain cases of repeaters (min == max) can be handled specially
if (min == max)
{
switch (max)
{
case 0:
// The node is repeated 0 times, so it's actually empty.
return new RegexNode(RegexNodeKind.Empty, Options);
case 1:
// The node is repeated 1 time, so it's not actually a repeater.
return this;
case <= MultiVsRepeaterLimit when Kind == RegexNodeKind.One:
// The same character is repeated a fixed number of times, so it's actually a multi.
// While this could remain a repeater, multis are more readily optimized later in
// processing. The counts used here in real-world expressions are invariably small (e.g. 4),
// but we set an upper bound just to avoid creating really large strings.
Debug.Assert(max >= 2);
Kind = RegexNodeKind.Multi;
Str = new string(Ch, max);
Ch = '\0';
return this;
}
}
switch (Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
MakeRep(lazy ? RegexNodeKind.Onelazy : RegexNodeKind.Oneloop, min, max);
return this;
default:
var result = new RegexNode(lazy ? RegexNodeKind.Lazyloop : RegexNodeKind.Loop, Options, min, max);
result.AddChild(this);
return result;
}
}
public void AddChild(RegexNode newChild)
{
newChild.Parent = this; // so that the child can see its parent while being reduced
newChild = newChild.Reduce();
newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented
if (Children is null)
{
Children = newChild;
}
else if (Children is RegexNode currentChild)
{
Children = new List<RegexNode>() { currentChild, newChild };
}
else
{
((List<RegexNode>)Children).Add(newChild);
}
}
public void InsertChild(int index, RegexNode newChild)
{
Debug.Assert(Children is List<RegexNode>);
newChild.Parent = this; // so that the child can see its parent while being reduced
newChild = newChild.Reduce();
newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented
((List<RegexNode>)Children).Insert(index, newChild);
}
public void ReplaceChild(int index, RegexNode newChild)
{
Debug.Assert(Children != null);
Debug.Assert(index < ChildCount());
newChild.Parent = this; // so that the child can see its parent while being reduced
newChild = newChild.Reduce();
newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented
if (Children is RegexNode)
{
Children = newChild;
}
else
{
((List<RegexNode>)Children)[index] = newChild;
}
}
public RegexNode Child(int i) => Children is RegexNode child ? child : ((List<RegexNode>)Children!)[i];
public int ChildCount()
{
if (Children is null)
{
return 0;
}
if (Children is List<RegexNode> children)
{
return children.Count;
}
Debug.Assert(Children is RegexNode);
return 1;
}
// Determines whether the node supports a compilation / code generation strategy based on walking the node tree.
// Also returns a human-readable string to explain the reason (it will be emitted by the source generator, hence
// there's no need to localize).
internal bool SupportsCompilation([NotNullWhen(false)] out string? reason)
{
if ((Options & RegexOptions.NonBacktracking) != 0)
{
reason = "RegexOptions.NonBacktracking isn't supported";
return false;
}
if (ExceedsMaxDepthAllowedDepth(this, allowedDepth: 40))
{
// For the source generator, deep RegexNode trees can result in emitting C# code that exceeds C# compiler
// limitations, leading to "CS8078: An expression is too long or complex to compile". As such, we place
// an artificial limit on max tree depth in order to mitigate such issues. The allowed depth can be tweaked
// as needed; its exceedingly rare to find expressions with such deep trees. And while RegexCompiler doesn't
// have to deal with C# compiler limitations, we still want to limit max tree depth as we want to limit
// how deep recursion we'll employ as part of code generation.
reason = "the expression may result exceeding run-time or compiler limits";
return false;
}
// Supported.
reason = null;
return true;
static bool ExceedsMaxDepthAllowedDepth(RegexNode node, int allowedDepth)
{
if (allowedDepth <= 0)
{
return true;
}
int childCount = node.ChildCount();
for (int i = 0; i < childCount; i++)
{
if (ExceedsMaxDepthAllowedDepth(node.Child(i), allowedDepth - 1))
{
return true;
}
}
return false;
}
}
/// <summary>Gets whether the node is a Set/Setloop/Setloopatomic/Setlazy node.</summary>
public bool IsSetFamily => Kind is RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy;
/// <summary>Gets whether the node is a One/Oneloop/Oneloopatomic/Onelazy node.</summary>
public bool IsOneFamily => Kind is RegexNodeKind.One or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy;
/// <summary>Gets whether the node is a Notone/Notoneloop/Notoneloopatomic/Notonelazy node.</summary>
public bool IsNotoneFamily => Kind is RegexNodeKind.Notone or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy;
/// <summary>Gets whether this node is contained inside of a loop.</summary>
public bool IsInLoop()
{
for (RegexNode? parent = Parent; parent is not null; parent = parent.Parent)
{
if (parent.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop)
{
return true;
}
}
return false;
}
#if DEBUG
[ExcludeFromCodeCoverage]
public override string ToString()
{
RegexNode? curNode = this;
int curChild = 0;
var sb = new StringBuilder().AppendLine(curNode.Describe());
var stack = new List<int>();
while (true)
{
if (curChild < curNode!.ChildCount())
{
stack.Add(curChild + 1);
curNode = curNode.Child(curChild);
curChild = 0;
sb.Append(new string(' ', stack.Count * 2)).Append(curNode.Describe()).AppendLine();
}
else
{
if (stack.Count == 0)
{
break;
}
curChild = stack[stack.Count - 1];
stack.RemoveAt(stack.Count - 1);
curNode = curNode.Parent;
}
}
return sb.ToString();
}
[ExcludeFromCodeCoverage]
private string Describe()
{
var sb = new StringBuilder(Kind.ToString());
if ((Options & RegexOptions.ExplicitCapture) != 0) sb.Append("-C");
if ((Options & RegexOptions.IgnoreCase) != 0) sb.Append("-I");
if ((Options & RegexOptions.RightToLeft) != 0) sb.Append("-L");
if ((Options & RegexOptions.Multiline) != 0) sb.Append("-M");
if ((Options & RegexOptions.Singleline) != 0) sb.Append("-S");
if ((Options & RegexOptions.IgnorePatternWhitespace) != 0) sb.Append("-X");
if ((Options & RegexOptions.ECMAScript) != 0) sb.Append("-E");
switch (Kind)
{
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.One:
case RegexNodeKind.Notone:
sb.Append(" '").Append(RegexCharClass.DescribeChar(Ch)).Append('\'');
break;
case RegexNodeKind.Capture:
sb.Append(' ').Append($"index = {M}");
if (N != -1)
{
sb.Append($", unindex = {N}");
}
break;
case RegexNodeKind.Backreference:
case RegexNodeKind.BackreferenceConditional:
sb.Append(' ').Append($"index = {M}");
break;
case RegexNodeKind.Multi:
sb.Append(" \"").Append(Str).Append('"');
break;
case RegexNodeKind.Set:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
case RegexNodeKind.Setlazy:
sb.Append(' ').Append(RegexCharClass.DescribeSet(Str!));
break;
}
switch (Kind)
{
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
case RegexNodeKind.Setlazy:
case RegexNodeKind.Loop:
case RegexNodeKind.Lazyloop:
sb.Append(
(M == 0 && N == int.MaxValue) ? "*" :
(M == 0 && N == 1) ? "?" :
(M == 1 && N == int.MaxValue) ? "+" :
(N == int.MaxValue) ? $"{{{M}, *}}" :
(N == M) ? $"{{{M}}}" :
$"{{{M}, {N}}}");
break;
}
return sb.ToString();
}
#endif
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Threading;
namespace System.Text.RegularExpressions
{
/// <summary>Represents a regex subexpression.</summary>
internal sealed class RegexNode
{
/// <summary>empty bit from the node's options to store data on whether a node contains captures</summary>
internal const RegexOptions HasCapturesFlag = (RegexOptions)(1 << 31);
/// <summary>Arbitrary number of repetitions of the same character when we'd prefer to represent that as a repeater of that character rather than a string.</summary>
internal const int MultiVsRepeaterLimit = 64;
/// <summary>The node's children.</summary>
/// <remarks>null if no children, a <see cref="RegexNode"/> if one child, or a <see cref="List{RegexNode}"/> if multiple children.</remarks>
private object? Children;
/// <summary>The kind of expression represented by this node.</summary>
public RegexNodeKind Kind { get; private set; }
/// <summary>A string associated with the node.</summary>
/// <remarks>For a <see cref="RegexNodeKind.Multi"/>, this is the string from the expression. For an <see cref="IsSetFamily"/> node, this is the character class string from <see cref="RegexCharClass"/>.</remarks>
public string? Str { get; private set; }
/// <summary>The character associated with the node.</summary>
/// <remarks>For a <see cref="IsOneFamily"/> or <see cref="IsNotoneFamily"/> node, the character from the expression.</remarks>
public char Ch { get; private set; }
/// <summary>The minimum number of iterations for a loop, or the capture group number for a capture or backreference.</summary>
/// <remarks>No minimum is represented by 0. No capture group is represented by -1.</remarks>
public int M { get; private set; }
/// <summary>The maximum number of iterations for a loop, or the uncapture group number for a balancing group.</summary>
/// <remarks>No upper bound is represented by <see cref="int.MaxValue"/>. No capture group is represented by -1.</remarks>
public int N { get; private set; }
/// <summary>The options associated with the node.</summary>
public RegexOptions Options;
/// <summary>The node's parent node in the tree.</summary>
/// <remarks>
/// During parsing, top-level nodes are also stacked onto a parse stack (a stack of trees) using <see cref="Parent"/>.
/// After parsing, <see cref="Parent"/> is the node in the tree that has this node as or in <see cref="Children"/>.
/// </remarks>
public RegexNode? Parent;
public RegexNode(RegexNodeKind kind, RegexOptions options)
{
Kind = kind;
Options = options;
}
public RegexNode(RegexNodeKind kind, RegexOptions options, char ch)
{
Kind = kind;
Options = options;
Ch = ch;
}
public RegexNode(RegexNodeKind kind, RegexOptions options, string str)
{
Kind = kind;
Options = options;
Str = str;
}
public RegexNode(RegexNodeKind kind, RegexOptions options, int m)
{
Kind = kind;
Options = options;
M = m;
}
public RegexNode(RegexNodeKind kind, RegexOptions options, int m, int n)
{
Kind = kind;
Options = options;
M = m;
N = n;
}
/// <summary>Creates a RegexNode representing a single character.</summary>
/// <param name="ch">The character.</param>
/// <param name="options">The node's options.</param>
/// <param name="culture">The culture to use to perform any required transformations.</param>
/// <returns>The created RegexNode. This might be a RegexNode.One or a RegexNode.Set.</returns>
public static RegexNode CreateOneWithCaseConversion(char ch, RegexOptions options, CultureInfo? culture)
{
// If the options specify case-insensitivity, we try to create a node that fully encapsulates that.
if ((options & RegexOptions.IgnoreCase) != 0)
{
Debug.Assert(culture is not null);
// If the character is part of a Unicode category that doesn't participate in case conversion,
// we can simply strip out the IgnoreCase option and make the node case-sensitive.
if (!RegexCharClass.ParticipatesInCaseConversion(ch))
{
return new RegexNode(RegexNodeKind.One, options & ~RegexOptions.IgnoreCase, ch);
}
// Create a set for the character, trying to include all case-insensitive equivalent characters.
// If it's successful in doing so, resultIsCaseInsensitive will be false and we can strip
// out RegexOptions.IgnoreCase as part of creating the set.
string stringSet = RegexCharClass.OneToStringClass(ch, culture, out bool resultIsCaseInsensitive);
if (!resultIsCaseInsensitive)
{
return new RegexNode(RegexNodeKind.Set, options & ~RegexOptions.IgnoreCase, stringSet);
}
// Otherwise, until we can get rid of ToLower usage at match time entirely (https://github.com/dotnet/runtime/issues/61048),
// lowercase the character and proceed to create an IgnoreCase One node.
ch = culture.TextInfo.ToLower(ch);
}
// Create a One node for the character.
return new RegexNode(RegexNodeKind.One, options, ch);
}
/// <summary>Reverses all children of a concatenation when in RightToLeft mode.</summary>
public RegexNode ReverseConcatenationIfRightToLeft()
{
if ((Options & RegexOptions.RightToLeft) != 0 &&
Kind == RegexNodeKind.Concatenate &&
ChildCount() > 1)
{
((List<RegexNode>)Children!).Reverse();
}
return this;
}
/// <summary>
/// Pass type as OneLazy or OneLoop
/// </summary>
private void MakeRep(RegexNodeKind kind, int min, int max)
{
Kind += kind - RegexNodeKind.One;
M = min;
N = max;
}
private void MakeLoopAtomic()
{
switch (Kind)
{
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop:
// For loops, we simply change the Type to the atomic variant.
// Atomic greedy loops should consume as many values as they can.
Kind += RegexNodeKind.Oneloopatomic - RegexNodeKind.Oneloop;
break;
case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy:
// For lazy, we not only change the Type, we also lower the max number of iterations
// to the minimum number of iterations, creating a repeater, as they should end up
// matching as little as possible.
Kind += RegexNodeKind.Oneloopatomic - RegexNodeKind.Onelazy;
N = M;
if (N == 0)
{
// If moving the max to be the same as the min dropped it to 0, there's no
// work to be done for this node, and we can make it Empty.
Kind = RegexNodeKind.Empty;
Str = null;
Ch = '\0';
}
else if (Kind == RegexNodeKind.Oneloopatomic && N is >= 2 and <= MultiVsRepeaterLimit)
{
// If this is now a One repeater with a small enough length,
// make it a Multi instead, as they're better optimized down the line.
Kind = RegexNodeKind.Multi;
Str = new string(Ch, N);
Ch = '\0';
M = N = 0;
}
break;
default:
Debug.Fail($"Unexpected type: {Kind}");
break;
}
}
#if DEBUG
/// <summary>Validate invariants the rest of the implementation relies on for processing fully-built trees.</summary>
[Conditional("DEBUG")]
private void ValidateFinalTreeInvariants()
{
Debug.Assert(Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
var toExamine = new Stack<RegexNode>();
toExamine.Push(this);
while (toExamine.Count > 0)
{
RegexNode node = toExamine.Pop();
// Add all children to be examined
int childCount = node.ChildCount();
for (int i = 0; i < childCount; i++)
{
RegexNode child = node.Child(i);
Debug.Assert(child.Parent == node, $"{child.Describe()} missing reference to parent {node.Describe()}");
toExamine.Push(child);
}
// Validate that we never see certain node types.
Debug.Assert(Kind != RegexNodeKind.Group, "All Group nodes should have been removed.");
// Validate node types and expected child counts.
switch (node.Kind)
{
case RegexNodeKind.Group:
Debug.Fail("All Group nodes should have been removed.");
break;
case RegexNodeKind.Beginning:
case RegexNodeKind.Bol:
case RegexNodeKind.Boundary:
case RegexNodeKind.ECMABoundary:
case RegexNodeKind.Empty:
case RegexNodeKind.End:
case RegexNodeKind.EndZ:
case RegexNodeKind.Eol:
case RegexNodeKind.Multi:
case RegexNodeKind.NonBoundary:
case RegexNodeKind.NonECMABoundary:
case RegexNodeKind.Nothing:
case RegexNodeKind.Notone:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.One:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Backreference:
case RegexNodeKind.Set:
case RegexNodeKind.Setlazy:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
case RegexNodeKind.Start:
case RegexNodeKind.UpdateBumpalong:
Debug.Assert(childCount == 0, $"Expected zero children for {node.Kind}, got {childCount}.");
break;
case RegexNodeKind.Atomic:
case RegexNodeKind.Capture:
case RegexNodeKind.Lazyloop:
case RegexNodeKind.Loop:
case RegexNodeKind.NegativeLookaround:
case RegexNodeKind.PositiveLookaround:
Debug.Assert(childCount == 1, $"Expected one and only one child for {node.Kind}, got {childCount}.");
break;
case RegexNodeKind.BackreferenceConditional:
Debug.Assert(childCount == 2, $"Expected two children for {node.Kind}, got {childCount}");
break;
case RegexNodeKind.ExpressionConditional:
Debug.Assert(childCount == 3, $"Expected three children for {node.Kind}, got {childCount}");
break;
case RegexNodeKind.Concatenate:
case RegexNodeKind.Alternate:
Debug.Assert(childCount >= 2, $"Expected at least two children for {node.Kind}, got {childCount}.");
break;
default:
Debug.Fail($"Unexpected node type: {node.Kind}");
break;
}
// Validate node configuration.
switch (node.Kind)
{
case RegexNodeKind.Multi:
Debug.Assert(node.Str is not null, "Expect non-null multi string");
Debug.Assert(node.Str.Length >= 2, $"Expected {node.Str} to be at least two characters");
break;
case RegexNodeKind.Set:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
case RegexNodeKind.Setlazy:
Debug.Assert(!string.IsNullOrEmpty(node.Str), $"Expected non-null, non-empty string for {node.Kind}.");
break;
default:
Debug.Assert(node.Str is null, $"Expected null string for {node.Kind}, got \"{node.Str}\".");
break;
}
}
}
#endif
/// <summary>Performs additional optimizations on an entire tree prior to being used.</summary>
/// <remarks>
/// Some optimizations are performed by the parser while parsing, and others are performed
/// as nodes are being added to the tree. The optimizations here expect the tree to be fully
/// formed, as they inspect relationships between nodes that may not have been in place as
/// individual nodes were being processed/added to the tree.
/// </remarks>
internal RegexNode FinalOptimize()
{
RegexNode rootNode = this;
Debug.Assert(rootNode.Kind == RegexNodeKind.Capture);
Debug.Assert(rootNode.Parent is null);
Debug.Assert(rootNode.ChildCount() == 1);
// Only apply optimization when LTR to avoid needing additional code for the much rarer RTL case.
// Also only apply these optimizations when not using NonBacktracking, as these optimizations are
// all about avoiding things that are impactful for the backtracking engines but nops for non-backtracking.
if ((Options & (RegexOptions.RightToLeft | RegexOptions.NonBacktracking)) == 0)
{
// Optimization: eliminate backtracking for loops.
// For any single-character loop (Oneloop, Notoneloop, Setloop), see if we can automatically convert
// that into its atomic counterpart (Oneloopatomic, Notoneloopatomic, Setloopatomic) based on what
// comes after it in the expression tree.
rootNode.FindAndMakeLoopsAtomic();
// Optimization: backtracking removal at expression end.
// If we find backtracking construct at the end of the regex, we can instead make it non-backtracking,
// since nothing would ever backtrack into it anyway. Doing this then makes the construct available
// to implementations that don't support backtracking.
rootNode.EliminateEndingBacktracking();
// Optimization: unnecessary re-processing of starting loops.
// If an expression is guaranteed to begin with a single-character unbounded loop that isn't part of an alternation (in which case it
// wouldn't be guaranteed to be at the beginning) or a capture (in which case a back reference could be influenced by its length), then we
// can update the tree with a temporary node to indicate that the implementation should use that node's ending position in the input text
// as the next starting position at which to start the next match. This avoids redoing matches we've already performed, e.g. matching
// "\[email protected]" against "is this a valid [email protected]", the \w+ will initially match the "is" and then will fail to match the "@".
// Rather than bumping the scan loop by 1 and trying again to match at the "s", we can instead start at the " ". For functional correctness
// we can only consider unbounded loops, as to be able to start at the end of the loop we need the loop to have consumed all possible matches;
// otherwise, you could end up with a pattern like "a{1,3}b" matching against "aaaabc", which should match, but if we pre-emptively stop consuming
// after the first three a's and re-start from that position, we'll end up failing the match even though it should have succeeded. We can also
// apply this optimization to non-atomic loops: even though backtracking could be necessary, such backtracking would be handled within the processing
// of a single starting position. Lazy loops similarly benefit, as a failed match will result in exploring the exact same search space as with
// a greedy loop, just in the opposite order (and a successful match will overwrite the bumpalong position); we need to avoid atomic lazy loops,
// however, as they will only end up as a repeater for the minimum length and thus will effectively end up with a non-infinite upper bound, which
// we've already outlined is problematic.
{
RegexNode node = rootNode.Child(0); // skip implicit root capture node
bool atomicByAncestry = true; // the root is implicitly atomic because nothing comes after it (same for the implicit root capture)
while (true)
{
switch (node.Kind)
{
case RegexNodeKind.Atomic:
node = node.Child(0);
continue;
case RegexNodeKind.Concatenate:
atomicByAncestry = false;
node = node.Child(0);
continue;
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when node.N == int.MaxValue:
case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when node.N == int.MaxValue && !atomicByAncestry:
if (node.Parent is { Kind: RegexNodeKind.Concatenate } parent)
{
parent.InsertChild(1, new RegexNode(RegexNodeKind.UpdateBumpalong, node.Options));
}
break;
}
break;
}
}
}
// Done optimizing. Return the final tree.
#if DEBUG
rootNode.ValidateFinalTreeInvariants();
#endif
return rootNode;
}
/// <summary>Converts nodes at the end of the node tree to be atomic.</summary>
/// <remarks>
/// The correctness of this optimization depends on nothing being able to backtrack into
/// the provided node. That means it must be at the root of the overall expression, or
/// it must be an Atomic node that nothing will backtrack into by the very nature of Atomic.
/// </remarks>
private void EliminateEndingBacktracking()
{
if (!StackHelper.TryEnsureSufficientExecutionStack() ||
(Options & (RegexOptions.RightToLeft | RegexOptions.NonBacktracking)) != 0)
{
// If we can't recur further, just stop optimizing.
// We haven't done the work to validate this is correct for RTL.
// And NonBacktracking doesn't support atomic groups and doesn't have backtracking to be eliminated.
return;
}
// Walk the tree starting from the current node.
RegexNode node = this;
while (true)
{
switch (node.Kind)
{
// {One/Notone/Set}loops can be upgraded to {One/Notone/Set}loopatomic nodes, e.g. [abc]* => (?>[abc]*).
// And {One/Notone/Set}lazys can similarly be upgraded to be atomic, which really makes them into repeaters
// or even empty nodes.
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop:
case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy:
node.MakeLoopAtomic();
break;
// Just because a particular node is atomic doesn't mean all its descendants are.
// Process them as well. Lookarounds are implicitly atomic.
case RegexNodeKind.Atomic:
case RegexNodeKind.PositiveLookaround:
case RegexNodeKind.NegativeLookaround:
node = node.Child(0);
continue;
// For Capture and Concatenate, we just recur into their last child (only child in the case
// of Capture). However, if the child is an alternation or loop, we can also make the
// node itself atomic by wrapping it in an Atomic node. Since we later check to see whether a
// node is atomic based on its parent or grandparent, we don't bother wrapping such a node in
// an Atomic one if its grandparent is already Atomic.
// e.g. [xyz](?:abc|def) => [xyz](?>abc|def)
case RegexNodeKind.Capture:
case RegexNodeKind.Concatenate:
RegexNode existingChild = node.Child(node.ChildCount() - 1);
if ((existingChild.Kind is RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional or RegexNodeKind.Loop or RegexNodeKind.Lazyloop) &&
(node.Parent is null || node.Parent.Kind != RegexNodeKind.Atomic)) // validate grandparent isn't atomic
{
var atomic = new RegexNode(RegexNodeKind.Atomic, existingChild.Options);
atomic.AddChild(existingChild);
node.ReplaceChild(node.ChildCount() - 1, atomic);
}
node = existingChild;
continue;
// For alternate, we can recur into each branch separately. We use this iteration for the first branch.
// Conditionals are just like alternations in this regard.
// e.g. abc*|def* => ab(?>c*)|de(?>f*)
case RegexNodeKind.Alternate:
case RegexNodeKind.BackreferenceConditional:
case RegexNodeKind.ExpressionConditional:
{
int branches = node.ChildCount();
for (int i = 1; i < branches; i++)
{
node.Child(i).EliminateEndingBacktracking();
}
if (node.Kind != RegexNodeKind.ExpressionConditional) // ReduceExpressionConditional will have already applied ending backtracking removal
{
node = node.Child(0);
continue;
}
}
break;
// For {Lazy}Loop, we search to see if there's a viable last expression, and iff there
// is we recur into processing it. Also, as with the single-char lazy loops, LazyLoop
// can have its max iteration count dropped to its min iteration count, as there's no
// reason for it to match more than the minimal at the end; that in turn makes it a
// repeater, which results in better code generation.
// e.g. (?:abc*)* => (?:ab(?>c*))*
// e.g. (abc*?)+? => (ab){1}
case RegexNodeKind.Lazyloop:
node.N = node.M;
goto case RegexNodeKind.Loop;
case RegexNodeKind.Loop:
{
if (node.N == 1)
{
// If the loop has a max iteration count of 1 (e.g. it's an optional node),
// there's no possibility for conflict between multiple iterations, so
// we can process it.
node = node.Child(0);
continue;
}
RegexNode? loopDescendent = node.FindLastExpressionInLoopForAutoAtomic();
if (loopDescendent != null)
{
node = loopDescendent;
continue; // loop around to process node
}
}
break;
}
break;
}
}
/// <summary>
/// Removes redundant nodes from the subtree, and returns an optimized subtree.
/// </summary>
internal RegexNode Reduce()
{
// TODO: https://github.com/dotnet/runtime/issues/61048
// As part of overhauling IgnoreCase handling, the parser shouldn't produce any nodes other than Backreference
// that ever have IgnoreCase set on them. For now, though, remove IgnoreCase from any nodes for which it
// has no behavioral effect.
switch (Kind)
{
default:
// No effect
Options &= ~RegexOptions.IgnoreCase;
break;
case RegexNodeKind.One or RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notone or RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Set or RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic:
case RegexNodeKind.Multi:
case RegexNodeKind.Backreference:
// Still meaningful
break;
}
return Kind switch
{
RegexNodeKind.Alternate => ReduceAlternation(),
RegexNodeKind.Atomic => ReduceAtomic(),
RegexNodeKind.Concatenate => ReduceConcatenation(),
RegexNodeKind.Group => ReduceGroup(),
RegexNodeKind.Loop or RegexNodeKind.Lazyloop => ReduceLoops(),
RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround => ReduceLookaround(),
RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy => ReduceSet(),
RegexNodeKind.ExpressionConditional => ReduceExpressionConditional(),
RegexNodeKind.BackreferenceConditional => ReduceBackreferenceConditional(),
_ => this,
};
}
/// <summary>Remove an unnecessary Concatenation or Alternation node</summary>
/// <remarks>
/// Simple optimization for a concatenation or alternation:
/// - if the node has only one child, use it instead
/// - if the node has zero children, turn it into an empty with Nothing for an alternation or Empty for a concatenation
/// </remarks>
private RegexNode ReplaceNodeIfUnnecessary()
{
Debug.Assert(Kind is RegexNodeKind.Alternate or RegexNodeKind.Concatenate);
return ChildCount() switch
{
0 => new RegexNode(Kind == RegexNodeKind.Alternate ? RegexNodeKind.Nothing : RegexNodeKind.Empty, Options),
1 => Child(0),
_ => this,
};
}
/// <summary>Remove all non-capturing groups.</summary>
/// <remark>
/// Simple optimization: once parsed into a tree, non-capturing groups
/// serve no function, so strip them out.
/// e.g. (?:(?:(?:abc))) => abc
/// </remark>
private RegexNode ReduceGroup()
{
Debug.Assert(Kind == RegexNodeKind.Group);
RegexNode u = this;
while (u.Kind == RegexNodeKind.Group)
{
Debug.Assert(u.ChildCount() == 1);
u = u.Child(0);
}
return u;
}
/// <summary>
/// Remove unnecessary atomic nodes, and make appropriate descendents of the atomic node themselves atomic.
/// </summary>
/// <remarks>
/// e.g. (?>(?>(?>a*))) => (?>a*)
/// e.g. (?>(abc*)*) => (?>(abc(?>c*))*)
/// </remarks>
private RegexNode ReduceAtomic()
{
// RegexOptions.NonBacktracking doesn't support atomic groups, so when that option
// is set we don't want to create atomic groups where they weren't explicitly authored.
if ((Options & RegexOptions.NonBacktracking) != 0)
{
return this;
}
Debug.Assert(Kind == RegexNodeKind.Atomic);
Debug.Assert(ChildCount() == 1);
RegexNode atomic = this;
RegexNode child = Child(0);
while (child.Kind == RegexNodeKind.Atomic)
{
atomic = child;
child = atomic.Child(0);
}
switch (child.Kind)
{
// If the child is empty/nothing, there's nothing to be made atomic so the Atomic
// node can simply be removed.
case RegexNodeKind.Empty:
case RegexNodeKind.Nothing:
return child;
// If the child is already atomic, we can just remove the atomic node.
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Setloopatomic:
return child;
// If an atomic subexpression contains only a {one/notone/set}{loop/lazy},
// change it to be an {one/notone/set}loopatomic and remove the atomic node.
case RegexNodeKind.Oneloop:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Setloop:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Setlazy:
child.MakeLoopAtomic();
return child;
// Alternations have a variety of possible optimizations that can be applied
// iff they're atomic.
case RegexNodeKind.Alternate:
if ((Options & RegexOptions.RightToLeft) == 0)
{
List<RegexNode>? branches = child.Children as List<RegexNode>;
Debug.Assert(branches is not null && branches.Count != 0);
// If an alternation is atomic and its first branch is Empty, the whole thing
// is a nop, as Empty will match everything trivially, and no backtracking
// into the node will be performed, making the remaining branches irrelevant.
if (branches[0].Kind == RegexNodeKind.Empty)
{
return new RegexNode(RegexNodeKind.Empty, child.Options);
}
// Similarly, we can trim off any branches after an Empty, as they'll never be used.
// An Empty will match anything, and thus branches after that would only be used
// if we backtracked into it and advanced passed the Empty after trying the Empty...
// but if the alternation is atomic, such backtracking won't happen.
for (int i = 1; i < branches.Count - 1; i++)
{
if (branches[i].Kind == RegexNodeKind.Empty)
{
branches.RemoveRange(i + 1, branches.Count - (i + 1));
break;
}
}
// If an alternation is atomic, we won't ever backtrack back into it, which
// means order matters but not repetition. With backtracking, it would be incorrect
// to convert an expression like "hi|there|hello" into "hi|hello|there", as doing
// so could then change the order of results if we matched "hi" and then failed
// based on what came after it, and both "hello" and "there" could be successful
// with what came later. But without backtracking, we can reorder "hi|there|hello"
// to instead be "hi|hello|there", as "hello" and "there" can't match the same text,
// and once this atomic alternation has matched, we won't try another branch. This
// reordering is valuable as it then enables further optimizations, e.g.
// "hi|there|hello" => "hi|hello|there" => "h(?:i|ello)|there", which means we only
// need to check the 'h' once in case it's not an 'h', and it's easier to employ different
// code gen that, for example, switches on first character of the branches, enabling faster
// choice of branch without always having to walk through each.
bool reordered = false;
for (int start = 0; start < branches.Count; start++)
{
// Get the node that may start our range. If it's a one, multi, or concat of those, proceed.
RegexNode startNode = branches[start];
if (startNode.FindBranchOneOrMultiStart() is null)
{
continue;
}
// Find the contiguous range of nodes from this point that are similarly one, multi, or concat of those.
int endExclusive = start + 1;
while (endExclusive < branches.Count && branches[endExclusive].FindBranchOneOrMultiStart() is not null)
{
endExclusive++;
}
// If there's at least 3, there may be something to reorder (we won't reorder anything
// before the starting position, and so only 2 items is considered ordered).
if (endExclusive - start >= 3)
{
int compare = start;
while (compare < endExclusive)
{
// Get the starting character
char c = branches[compare].FindBranchOneOrMultiStart()!.FirstCharOfOneOrMulti();
// Move compare to point to the last branch that has the same starting value.
while (compare < endExclusive && branches[compare].FindBranchOneOrMultiStart()!.FirstCharOfOneOrMulti() == c)
{
compare++;
}
// Compare now points to the first node that doesn't match the starting node.
// If we've walked off our range, there's nothing left to reorder.
if (compare < endExclusive)
{
// There may be something to reorder. See if there are any other nodes that begin with the same character.
for (int next = compare + 1; next < endExclusive; next++)
{
RegexNode nextChild = branches[next];
if (nextChild.FindBranchOneOrMultiStart()!.FirstCharOfOneOrMulti() == c)
{
branches.RemoveAt(next);
branches.Insert(compare++, nextChild);
reordered = true;
}
}
}
}
}
// Move to the end of the range we've now explored. endExclusive is not a viable
// starting position either, and the start++ for the loop will thus take us to
// the next potential place to start a range.
start = endExclusive;
}
// If anything was reordered, there may be new optimization opportunities inside
// of the alternation, so reduce it again.
if (reordered)
{
atomic.ReplaceChild(0, child);
child = atomic.Child(0);
}
}
goto default;
// For everything else, try to reduce ending backtracking of the last contained expression.
default:
child.EliminateEndingBacktracking();
return atomic;
}
}
/// <summary>Combine nested loops where applicable.</summary>
/// <remarks>
/// Nested repeaters just get multiplied with each other if they're not too lumpy.
/// Other optimizations may have also resulted in {Lazy}loops directly containing
/// sets, ones, and notones, in which case they can be transformed into the corresponding
/// individual looping constructs.
/// </remarks>
private RegexNode ReduceLoops()
{
Debug.Assert(Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
RegexNode u = this;
RegexNodeKind kind = Kind;
int min = M;
int max = N;
while (u.ChildCount() > 0)
{
RegexNode child = u.Child(0);
// multiply reps of the same type only
if (child.Kind != kind)
{
bool valid = false;
if (kind == RegexNodeKind.Loop)
{
switch (child.Kind)
{
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
valid = true;
break;
}
}
else // type == Lazyloop
{
switch (child.Kind)
{
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Setlazy:
valid = true;
break;
}
}
if (!valid)
{
break;
}
}
// child can be too lumpy to blur, e.g., (a {100,105}) {3} or (a {2,})?
// [but things like (a {2,})+ are not too lumpy...]
if (u.M == 0 && child.M > 1 || child.N < child.M * 2)
{
break;
}
u = child;
if (u.M > 0)
{
u.M = min = ((int.MaxValue - 1) / u.M < min) ? int.MaxValue : u.M * min;
}
if (u.N > 0)
{
u.N = max = ((int.MaxValue - 1) / u.N < max) ? int.MaxValue : u.N * max;
}
}
if (min == int.MaxValue)
{
return new RegexNode(RegexNodeKind.Nothing, Options);
}
// If the Loop or Lazyloop now only has one child node and its a Set, One, or Notone,
// reduce to just Setloop/lazy, Oneloop/lazy, or Notoneloop/lazy. The parser will
// generally have only produced the latter, but other reductions could have exposed
// this.
if (u.ChildCount() == 1)
{
RegexNode child = u.Child(0);
switch (child.Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
child.MakeRep(u.Kind == RegexNodeKind.Lazyloop ? RegexNodeKind.Onelazy : RegexNodeKind.Oneloop, u.M, u.N);
u = child;
break;
}
}
return u;
}
/// <summary>
/// Reduces set-related nodes to simpler one-related and notone-related nodes, where applicable.
/// </summary>
/// <remarks>
/// e.g.
/// [a] => a
/// [a]* => a*
/// [a]*? => a*?
/// (?>[a]*) => (?>a*)
/// [^a] => ^a
/// []* => Nothing
/// </remarks>
private RegexNode ReduceSet()
{
// Extract empty-set, one, and not-one case as special
Debug.Assert(Kind is RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy);
Debug.Assert(!string.IsNullOrEmpty(Str));
if (RegexCharClass.IsEmpty(Str))
{
Kind = RegexNodeKind.Nothing;
Str = null;
}
else if (RegexCharClass.IsSingleton(Str))
{
Ch = RegexCharClass.SingletonChar(Str);
Str = null;
Kind =
Kind == RegexNodeKind.Set ? RegexNodeKind.One :
Kind == RegexNodeKind.Setloop ? RegexNodeKind.Oneloop :
Kind == RegexNodeKind.Setloopatomic ? RegexNodeKind.Oneloopatomic :
RegexNodeKind.Onelazy;
}
else if (RegexCharClass.IsSingletonInverse(Str))
{
Ch = RegexCharClass.SingletonChar(Str);
Str = null;
Kind =
Kind == RegexNodeKind.Set ? RegexNodeKind.Notone :
Kind == RegexNodeKind.Setloop ? RegexNodeKind.Notoneloop :
Kind == RegexNodeKind.Setloopatomic ? RegexNodeKind.Notoneloopatomic :
RegexNodeKind.Notonelazy;
}
return this;
}
/// <summary>Optimize an alternation.</summary>
private RegexNode ReduceAlternation()
{
Debug.Assert(Kind == RegexNodeKind.Alternate);
switch (ChildCount())
{
case 0:
return new RegexNode(RegexNodeKind.Nothing, Options);
case 1:
return Child(0);
default:
ReduceSingleLetterAndNestedAlternations();
RegexNode node = ReplaceNodeIfUnnecessary();
if (node.Kind == RegexNodeKind.Alternate)
{
node = ExtractCommonPrefixText(node);
if (node.Kind == RegexNodeKind.Alternate)
{
node = ExtractCommonPrefixOneNotoneSet(node);
if (node.Kind == RegexNodeKind.Alternate)
{
node = RemoveRedundantEmptiesAndNothings(node);
}
}
}
return node;
}
// This function performs two optimizations:
// - Single-letter alternations can be replaced by faster set specifications
// e.g. "a|b|c|def|g|h" -> "[a-c]|def|[gh]"
// - Nested alternations with no intervening operators can be flattened:
// e.g. "apple|(?:orange|pear)|grape" -> "apple|orange|pear|grape"
void ReduceSingleLetterAndNestedAlternations()
{
bool wasLastSet = false;
bool lastNodeCannotMerge = false;
RegexOptions optionsLast = 0;
RegexOptions optionsAt;
int i;
int j;
RegexNode at;
RegexNode prev;
List<RegexNode> children = (List<RegexNode>)Children!;
for (i = 0, j = 0; i < children.Count; i++, j++)
{
at = children[i];
if (j < i)
children[j] = at;
while (true)
{
if (at.Kind == RegexNodeKind.Alternate)
{
if (at.Children is List<RegexNode> atChildren)
{
for (int k = 0; k < atChildren.Count; k++)
{
atChildren[k].Parent = this;
}
children.InsertRange(i + 1, atChildren);
}
else
{
RegexNode atChild = (RegexNode)at.Children!;
atChild.Parent = this;
children.Insert(i + 1, atChild);
}
j--;
}
else if (at.Kind is RegexNodeKind.Set or RegexNodeKind.One)
{
// Cannot merge sets if L or I options differ, or if either are negated.
optionsAt = at.Options & (RegexOptions.RightToLeft | RegexOptions.IgnoreCase);
if (at.Kind == RegexNodeKind.Set)
{
if (!wasLastSet || optionsLast != optionsAt || lastNodeCannotMerge || !RegexCharClass.IsMergeable(at.Str!))
{
wasLastSet = true;
lastNodeCannotMerge = !RegexCharClass.IsMergeable(at.Str!);
optionsLast = optionsAt;
break;
}
}
else if (!wasLastSet || optionsLast != optionsAt || lastNodeCannotMerge)
{
wasLastSet = true;
lastNodeCannotMerge = false;
optionsLast = optionsAt;
break;
}
// The last node was a Set or a One, we're a Set or One and our options are the same.
// Merge the two nodes.
j--;
prev = children[j];
RegexCharClass prevCharClass;
if (prev.Kind == RegexNodeKind.One)
{
prevCharClass = new RegexCharClass();
prevCharClass.AddChar(prev.Ch);
}
else
{
prevCharClass = RegexCharClass.Parse(prev.Str!);
}
if (at.Kind == RegexNodeKind.One)
{
prevCharClass.AddChar(at.Ch);
}
else
{
RegexCharClass atCharClass = RegexCharClass.Parse(at.Str!);
prevCharClass.AddCharClass(atCharClass);
}
prev.Kind = RegexNodeKind.Set;
prev.Str = prevCharClass.ToStringClass(Options);
if ((prev.Options & RegexOptions.IgnoreCase) != 0 &&
RegexCharClass.MakeCaseSensitiveIfPossible(prev.Str, RegexParser.GetTargetCulture(prev.Options)) is string newSetString)
{
prev.Str = newSetString;
prev.Options &= ~RegexOptions.IgnoreCase;
}
}
else if (at.Kind == RegexNodeKind.Nothing)
{
j--;
}
else
{
wasLastSet = false;
lastNodeCannotMerge = false;
}
break;
}
}
if (j < i)
{
children.RemoveRange(j, i - j);
}
}
// This function optimizes out prefix nodes from alternation branches that are
// the same across multiple contiguous branches.
// e.g. \w12|\d34|\d56|\w78|\w90 => \w12|\d(?:34|56)|\w(?:78|90)
static RegexNode ExtractCommonPrefixOneNotoneSet(RegexNode alternation)
{
Debug.Assert(alternation.Kind == RegexNodeKind.Alternate);
Debug.Assert(alternation.Children is List<RegexNode> { Count: >= 2 });
var children = (List<RegexNode>)alternation.Children;
// Only process left-to-right prefixes.
if ((alternation.Options & RegexOptions.RightToLeft) != 0)
{
return alternation;
}
// Only handle the case where each branch is a concatenation
foreach (RegexNode child in children)
{
if (child.Kind != RegexNodeKind.Concatenate || child.ChildCount() < 2)
{
return alternation;
}
}
for (int startingIndex = 0; startingIndex < children.Count - 1; startingIndex++)
{
Debug.Assert(children[startingIndex].Children is List<RegexNode> { Count: >= 2 });
// Only handle the case where each branch begins with the same One, Notone, or Set (individual or loop).
// Note that while we can do this for individual characters, fixed length loops, and atomic loops, doing
// it for non-atomic variable length loops could change behavior as each branch could otherwise have a
// different number of characters consumed by the loop based on what's after it.
RegexNode required = children[startingIndex].Child(0);
switch (required.Kind)
{
case RegexNodeKind.One or RegexNodeKind.Notone or RegexNodeKind.Set:
case RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloopatomic:
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop or RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when required.M == required.N:
break;
default:
continue;
}
// Only handle the case where each branch begins with the exact same node value
int endingIndex = startingIndex + 1;
for (; endingIndex < children.Count; endingIndex++)
{
RegexNode other = children[endingIndex].Child(0);
if (required.Kind != other.Kind ||
required.Options != other.Options ||
required.M != other.M ||
required.N != other.N ||
required.Ch != other.Ch ||
required.Str != other.Str)
{
break;
}
}
if (endingIndex - startingIndex <= 1)
{
// Nothing to extract from this starting index.
continue;
}
// Remove the prefix node from every branch, adding it to a new alternation
var newAlternate = new RegexNode(RegexNodeKind.Alternate, alternation.Options);
for (int i = startingIndex; i < endingIndex; i++)
{
((List<RegexNode>)children[i].Children!).RemoveAt(0);
newAlternate.AddChild(children[i]);
}
// If this alternation is wrapped as atomic, we need to do the same for the new alternation.
if (alternation.Parent is RegexNode { Kind: RegexNodeKind.Atomic } parent)
{
var atomic = new RegexNode(RegexNodeKind.Atomic, alternation.Options);
atomic.AddChild(newAlternate);
newAlternate = atomic;
}
// Now create a concatenation of the prefix node with the new alternation for the combined
// branches, and replace all of the branches in this alternation with that new concatenation.
var newConcat = new RegexNode(RegexNodeKind.Concatenate, alternation.Options);
newConcat.AddChild(required);
newConcat.AddChild(newAlternate);
alternation.ReplaceChild(startingIndex, newConcat);
children.RemoveRange(startingIndex + 1, endingIndex - startingIndex - 1);
}
return alternation.ReplaceNodeIfUnnecessary();
}
// Removes unnecessary Empty and Nothing nodes from the alternation. A Nothing will never
// match, so it can be removed entirely, and an Empty can be removed if there's a previous
// Empty in the alternation: it's an extreme case of just having a repeated branch in an
// alternation, and while we don't check for all duplicates, checking for empty is easy.
static RegexNode RemoveRedundantEmptiesAndNothings(RegexNode node)
{
Debug.Assert(node.Kind == RegexNodeKind.Alternate);
Debug.Assert(node.ChildCount() >= 2);
var children = (List<RegexNode>)node.Children!;
int i = 0, j = 0;
bool seenEmpty = false;
while (i < children.Count)
{
RegexNode child = children[i];
switch (child.Kind)
{
case RegexNodeKind.Empty when !seenEmpty:
seenEmpty = true;
goto default;
case RegexNodeKind.Empty:
case RegexNodeKind.Nothing:
i++;
break;
default:
children[j] = children[i];
i++;
j++;
break;
}
}
children.RemoveRange(j, children.Count - j);
return node.ReplaceNodeIfUnnecessary();
}
// Analyzes all the branches of the alternation for text that's identical at the beginning
// of every branch. That text is then pulled out into its own one or multi node in a
// concatenation with the alternation (whose branches are updated to remove that prefix).
// This is valuable for a few reasons. One, it exposes potentially more text to the
// expression prefix analyzer used to influence FindFirstChar. Second, it exposes more
// potential alternation optimizations, e.g. if the same prefix is followed in two branches
// by sets that can be merged. Third, it reduces the amount of duplicated comparisons required
// if we end up backtracking into subsequent branches.
// e.g. abc|ade => a(?bc|de)
static RegexNode ExtractCommonPrefixText(RegexNode alternation)
{
Debug.Assert(alternation.Kind == RegexNodeKind.Alternate);
Debug.Assert(alternation.Children is List<RegexNode> { Count: >= 2 });
var children = (List<RegexNode>)alternation.Children;
// To keep things relatively simple, we currently only handle:
// - Left to right (e.g. we don't process alternations in lookbehinds)
// - Branches that are one or multi nodes, or that are concatenations beginning with one or multi nodes.
// - All branches having the same options.
// Only extract left-to-right prefixes.
if ((alternation.Options & RegexOptions.RightToLeft) != 0)
{
return alternation;
}
Span<char> scratchChar = stackalloc char[1];
ReadOnlySpan<char> startingSpan = stackalloc char[0];
for (int startingIndex = 0; startingIndex < children.Count - 1; startingIndex++)
{
// Process the first branch to get the maximum possible common string.
RegexNode? startingNode = children[startingIndex].FindBranchOneOrMultiStart();
if (startingNode is null)
{
return alternation;
}
RegexOptions startingNodeOptions = startingNode.Options;
startingSpan = startingNode.Str.AsSpan();
if (startingNode.Kind == RegexNodeKind.One)
{
scratchChar[0] = startingNode.Ch;
startingSpan = scratchChar;
}
Debug.Assert(startingSpan.Length > 0);
// Now compare the rest of the branches against it.
int endingIndex = startingIndex + 1;
for (; endingIndex < children.Count; endingIndex++)
{
// Get the starting node of the next branch.
startingNode = children[endingIndex].FindBranchOneOrMultiStart();
if (startingNode is null || startingNode.Options != startingNodeOptions)
{
break;
}
// See if the new branch's prefix has a shared prefix with the current one.
// If it does, shorten to that; if it doesn't, bail.
if (startingNode.Kind == RegexNodeKind.One)
{
if (startingSpan[0] != startingNode.Ch)
{
break;
}
if (startingSpan.Length != 1)
{
startingSpan = startingSpan.Slice(0, 1);
}
}
else
{
Debug.Assert(startingNode.Kind == RegexNodeKind.Multi);
Debug.Assert(startingNode.Str!.Length > 0);
int minLength = Math.Min(startingSpan.Length, startingNode.Str.Length);
int c = 0;
while (c < minLength && startingSpan[c] == startingNode.Str[c]) c++;
if (c == 0)
{
break;
}
startingSpan = startingSpan.Slice(0, c);
}
}
// When we get here, we have a starting string prefix shared by all branches
// in the range [startingIndex, endingIndex).
if (endingIndex - startingIndex <= 1)
{
// There's nothing to consolidate for this starting node.
continue;
}
// We should be able to consolidate something for the nodes in the range [startingIndex, endingIndex).
Debug.Assert(startingSpan.Length > 0);
// Create a new node of the form:
// Concatenation(prefix, Alternation(each | node | with | prefix | removed))
// that replaces all these branches in this alternation.
var prefix = startingSpan.Length == 1 ?
new RegexNode(RegexNodeKind.One, startingNodeOptions, startingSpan[0]) :
new RegexNode(RegexNodeKind.Multi, startingNodeOptions, startingSpan.ToString());
var newAlternate = new RegexNode(RegexNodeKind.Alternate, startingNodeOptions);
for (int i = startingIndex; i < endingIndex; i++)
{
RegexNode branch = children[i];
ProcessOneOrMulti(branch.Kind == RegexNodeKind.Concatenate ? branch.Child(0) : branch, startingSpan);
branch = branch.Reduce();
newAlternate.AddChild(branch);
// Remove the starting text from the one or multi node. This may end up changing
// the type of the node to be Empty if the starting text matches the node's full value.
static void ProcessOneOrMulti(RegexNode node, ReadOnlySpan<char> startingSpan)
{
if (node.Kind == RegexNodeKind.One)
{
Debug.Assert(startingSpan.Length == 1);
Debug.Assert(startingSpan[0] == node.Ch);
node.Kind = RegexNodeKind.Empty;
node.Ch = '\0';
}
else
{
Debug.Assert(node.Kind == RegexNodeKind.Multi);
Debug.Assert(node.Str.AsSpan().StartsWith(startingSpan, StringComparison.Ordinal));
if (node.Str!.Length == startingSpan.Length)
{
node.Kind = RegexNodeKind.Empty;
node.Str = null;
}
else if (node.Str.Length - 1 == startingSpan.Length)
{
node.Kind = RegexNodeKind.One;
node.Ch = node.Str[node.Str.Length - 1];
node.Str = null;
}
else
{
node.Str = node.Str.Substring(startingSpan.Length);
}
}
}
}
if (alternation.Parent is RegexNode parent && parent.Kind == RegexNodeKind.Atomic)
{
var atomic = new RegexNode(RegexNodeKind.Atomic, startingNodeOptions);
atomic.AddChild(newAlternate);
newAlternate = atomic;
}
var newConcat = new RegexNode(RegexNodeKind.Concatenate, startingNodeOptions);
newConcat.AddChild(prefix);
newConcat.AddChild(newAlternate);
alternation.ReplaceChild(startingIndex, newConcat);
children.RemoveRange(startingIndex + 1, endingIndex - startingIndex - 1);
}
return alternation.ChildCount() == 1 ? alternation.Child(0) : alternation;
}
}
/// <summary>
/// Finds the starting one or multi of the branch, if it has one; otherwise, returns null.
/// For simplicity, this only considers branches that are One or Multi, or a Concatenation
/// beginning with a One or Multi. We don't traverse more than one level to avoid the
/// complication of then having to later update that hierarchy when removing the prefix,
/// but it could be done in the future if proven beneficial enough.
/// </summary>
public RegexNode? FindBranchOneOrMultiStart()
{
RegexNode branch = Kind == RegexNodeKind.Concatenate ? Child(0) : this;
return branch.Kind is RegexNodeKind.One or RegexNodeKind.Multi ? branch : null;
}
/// <summary>Same as <see cref="FindBranchOneOrMultiStart"/> but also for Sets.</summary>
public RegexNode? FindBranchOneMultiOrSetStart()
{
RegexNode branch = Kind == RegexNodeKind.Concatenate ? Child(0) : this;
return branch.Kind is RegexNodeKind.One or RegexNodeKind.Multi or RegexNodeKind.Set ? branch : null;
}
/// <summary>Gets the character that begins a One or Multi.</summary>
public char FirstCharOfOneOrMulti()
{
Debug.Assert(Kind is RegexNodeKind.One or RegexNodeKind.Multi);
Debug.Assert((Options & RegexOptions.RightToLeft) == 0);
return Kind == RegexNodeKind.One ? Ch : Str![0];
}
/// <summary>Finds the guaranteed beginning literal(s) of the node, or null if none exists.</summary>
public (char Char, string? String, string? SetChars)? FindStartingLiteral(int maxSetCharacters = 5) // 5 is max optimized by IndexOfAny today
{
Debug.Assert(maxSetCharacters >= 0 && maxSetCharacters <= 128, $"{nameof(maxSetCharacters)} == {maxSetCharacters} should be small enough to be stack allocated.");
RegexNode? node = this;
while (true)
{
if (node is not null && (node.Options & RegexOptions.RightToLeft) == 0)
{
switch (node.Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy when node.M > 0:
if ((node.Options & RegexOptions.IgnoreCase) == 0 || !RegexCharClass.ParticipatesInCaseConversion(node.Ch))
{
return (node.Ch, null, null);
}
break;
case RegexNodeKind.Multi:
if ((node.Options & RegexOptions.IgnoreCase) == 0 || !RegexCharClass.ParticipatesInCaseConversion(node.Str.AsSpan()))
{
return ('\0', node.Str, null);
}
break;
case RegexNodeKind.Set:
case RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy when node.M > 0:
Span<char> setChars = stackalloc char[maxSetCharacters];
int numChars;
if (!RegexCharClass.IsNegated(node.Str!) &&
(numChars = RegexCharClass.GetSetChars(node.Str!, setChars)) != 0)
{
setChars = setChars.Slice(0, numChars);
if ((node.Options & RegexOptions.IgnoreCase) == 0 || !RegexCharClass.ParticipatesInCaseConversion(setChars))
{
return ('\0', null, setChars.ToString());
}
}
break;
case RegexNodeKind.Atomic:
case RegexNodeKind.Concatenate:
case RegexNodeKind.Capture:
case RegexNodeKind.Group:
case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M > 0:
case RegexNodeKind.PositiveLookaround:
node = node.Child(0);
continue;
}
}
return null;
}
}
/// <summary>
/// Optimizes a concatenation by coalescing adjacent characters and strings,
/// coalescing adjacent loops, converting loops to be atomic where applicable,
/// and removing the concatenation itself if it's unnecessary.
/// </summary>
private RegexNode ReduceConcatenation()
{
Debug.Assert(Kind == RegexNodeKind.Concatenate);
// If the concat node has zero or only one child, get rid of the concat.
switch (ChildCount())
{
case 0:
return new RegexNode(RegexNodeKind.Empty, Options);
case 1:
return Child(0);
}
// Coalesce adjacent loops. This helps to minimize work done by the interpreter, minimize code gen,
// and also help to reduce catastrophic backtracking.
ReduceConcatenationWithAdjacentLoops();
// Coalesce adjacent characters/strings. This is done after the adjacent loop coalescing so that
// a One adjacent to both a Multi and a Loop prefers being folded into the Loop rather than into
// the Multi. Doing so helps with auto-atomicity when it's later applied.
ReduceConcatenationWithAdjacentStrings();
// If the concatenation is now empty, return an empty node, or if it's got a single child, return that child.
// Otherwise, return this.
return ReplaceNodeIfUnnecessary();
}
/// <summary>
/// Combine adjacent characters/strings.
/// e.g. (?:abc)(?:def) -> abcdef
/// </summary>
private void ReduceConcatenationWithAdjacentStrings()
{
Debug.Assert(Kind == RegexNodeKind.Concatenate);
Debug.Assert(Children is List<RegexNode>);
bool wasLastString = false;
RegexOptions optionsLast = 0;
int i, j;
List<RegexNode> children = (List<RegexNode>)Children!;
for (i = 0, j = 0; i < children.Count; i++, j++)
{
RegexNode at = children[i];
if (j < i)
{
children[j] = at;
}
if (at.Kind == RegexNodeKind.Concatenate &&
((at.Options & RegexOptions.RightToLeft) == (Options & RegexOptions.RightToLeft)))
{
if (at.Children is List<RegexNode> atChildren)
{
for (int k = 0; k < atChildren.Count; k++)
{
atChildren[k].Parent = this;
}
children.InsertRange(i + 1, atChildren);
}
else
{
RegexNode atChild = (RegexNode)at.Children!;
atChild.Parent = this;
children.Insert(i + 1, atChild);
}
j--;
}
else if (at.Kind is RegexNodeKind.Multi or RegexNodeKind.One)
{
// Cannot merge strings if L or I options differ
RegexOptions optionsAt = at.Options & (RegexOptions.RightToLeft | RegexOptions.IgnoreCase);
if (!wasLastString || optionsLast != optionsAt)
{
wasLastString = true;
optionsLast = optionsAt;
continue;
}
RegexNode prev = children[--j];
if (prev.Kind == RegexNodeKind.One)
{
prev.Kind = RegexNodeKind.Multi;
prev.Str = prev.Ch.ToString();
}
if ((optionsAt & RegexOptions.RightToLeft) == 0)
{
prev.Str = (at.Kind == RegexNodeKind.One) ? $"{prev.Str}{at.Ch}" : prev.Str + at.Str;
}
else
{
prev.Str = (at.Kind == RegexNodeKind.One) ? $"{at.Ch}{prev.Str}" : at.Str + prev.Str;
}
}
else if (at.Kind == RegexNodeKind.Empty)
{
j--;
}
else
{
wasLastString = false;
}
}
if (j < i)
{
children.RemoveRange(j, i - j);
}
}
/// <summary>
/// Combine adjacent loops.
/// e.g. a*a*a* => a*
/// e.g. a+ab => a{2,}b
/// </summary>
private void ReduceConcatenationWithAdjacentLoops()
{
Debug.Assert(Kind == RegexNodeKind.Concatenate);
Debug.Assert(Children is List<RegexNode>);
var children = (List<RegexNode>)Children!;
int current = 0, next = 1, nextSave = 1;
while (next < children.Count)
{
RegexNode currentNode = children[current];
RegexNode nextNode = children[next];
if (currentNode.Options == nextNode.Options)
{
static bool CanCombineCounts(int nodeMin, int nodeMax, int nextMin, int nextMax)
{
// We shouldn't have an infinite minimum; bail if we find one. Also check for the
// degenerate case where we'd make the min overflow or go infinite when it wasn't already.
if (nodeMin == int.MaxValue ||
nextMin == int.MaxValue ||
(uint)nodeMin + (uint)nextMin >= int.MaxValue)
{
return false;
}
// Similar overflow / go infinite check for max (which can be infinite).
if (nodeMax != int.MaxValue &&
nextMax != int.MaxValue &&
(uint)nodeMax + (uint)nextMax >= int.MaxValue)
{
return false;
}
return true;
}
switch (currentNode.Kind)
{
// Coalescing a loop with its same type
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy when nextNode.Kind == currentNode.Kind && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy when nextNode.Kind == currentNode.Kind && currentNode.Str == nextNode.Str:
if (CanCombineCounts(currentNode.M, currentNode.N, nextNode.M, nextNode.N))
{
currentNode.M += nextNode.M;
if (currentNode.N != int.MaxValue)
{
currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N;
}
next++;
continue;
}
break;
// Coalescing a loop with an additional item of the same type
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy when nextNode.Kind == RegexNodeKind.One && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy when nextNode.Kind == RegexNodeKind.Notone && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy when nextNode.Kind == RegexNodeKind.Set && currentNode.Str == nextNode.Str:
if (CanCombineCounts(currentNode.M, currentNode.N, 1, 1))
{
currentNode.M++;
if (currentNode.N != int.MaxValue)
{
currentNode.N++;
}
next++;
continue;
}
break;
// Coalescing a loop with a subsequent string
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy when nextNode.Kind == RegexNodeKind.Multi && currentNode.Ch == nextNode.Str![0]:
{
// Determine how many of the multi's characters can be combined.
// We already checked for the first, so we know it's at least one.
int matchingCharsInMulti = 1;
while (matchingCharsInMulti < nextNode.Str.Length && currentNode.Ch == nextNode.Str[matchingCharsInMulti])
{
matchingCharsInMulti++;
}
if (CanCombineCounts(currentNode.M, currentNode.N, matchingCharsInMulti, matchingCharsInMulti))
{
// Update the loop's bounds to include those characters from the multi
currentNode.M += matchingCharsInMulti;
if (currentNode.N != int.MaxValue)
{
currentNode.N += matchingCharsInMulti;
}
// If it was the full multi, skip/remove the multi and continue processing this loop.
if (nextNode.Str.Length == matchingCharsInMulti)
{
next++;
continue;
}
// Otherwise, trim the characters from the multiple that were absorbed into the loop.
// If it now only has a single character, it becomes a One.
Debug.Assert(matchingCharsInMulti < nextNode.Str.Length);
if (nextNode.Str.Length - matchingCharsInMulti == 1)
{
nextNode.Kind = RegexNodeKind.One;
nextNode.Ch = nextNode.Str[nextNode.Str.Length - 1];
nextNode.Str = null;
}
else
{
nextNode.Str = nextNode.Str.Substring(matchingCharsInMulti);
}
}
}
break;
// NOTE: We could add support for coalescing a string with a subsequent loop, but the benefits of that
// are limited. Pulling a subsequent string's prefix back into the loop helps with making the loop atomic,
// but if the loop is after the string, pulling the suffix of the string forward into the loop may actually
// be a deoptimization as those characters could end up matching more slowly as part of loop matching.
// Coalescing an individual item with a loop.
case RegexNodeKind.One when (nextNode.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy) && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Notone when (nextNode.Kind is RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy) && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Set when (nextNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy) && currentNode.Str == nextNode.Str:
if (CanCombineCounts(1, 1, nextNode.M, nextNode.N))
{
currentNode.Kind = nextNode.Kind;
currentNode.M = nextNode.M + 1;
currentNode.N = nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1;
next++;
continue;
}
break;
// Coalescing an individual item with another individual item.
// We don't coalesce adjacent One nodes into a Oneloop as we'd rather they be joined into a Multi.
case RegexNodeKind.Notone when nextNode.Kind == currentNode.Kind && currentNode.Ch == nextNode.Ch:
case RegexNodeKind.Set when nextNode.Kind == RegexNodeKind.Set && currentNode.Str == nextNode.Str:
currentNode.MakeRep(RegexNodeKind.Oneloop, 2, 2);
next++;
continue;
}
}
children[nextSave++] = children[next];
current = next;
next++;
}
if (nextSave < children.Count)
{
children.RemoveRange(nextSave, children.Count - nextSave);
}
}
/// <summary>
/// Finds {one/notone/set}loop nodes in the concatenation that can be automatically upgraded
/// to {one/notone/set}loopatomic nodes. Such changes avoid potential useless backtracking.
/// e.g. A*B (where sets A and B don't overlap) => (?>A*)B.
/// </summary>
private void FindAndMakeLoopsAtomic()
{
Debug.Assert((Options & RegexOptions.NonBacktracking) == 0, "Atomic groups aren't supported and don't help performance with NonBacktracking");
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we're too deep on the stack, give up optimizing further.
return;
}
if ((Options & RegexOptions.RightToLeft) != 0)
{
// RTL is so rare, we don't need to spend additional time/code optimizing for it.
return;
}
// For all node types that have children, recur into each of those children.
int childCount = ChildCount();
if (childCount != 0)
{
for (int i = 0; i < childCount; i++)
{
Child(i).FindAndMakeLoopsAtomic();
}
}
// If this isn't a concatenation, nothing more to do.
if (Kind is not RegexNodeKind.Concatenate)
{
return;
}
// This is a concatenation. Iterate through each pair of nodes in the concatenation seeing whether we can
// make the first node (or its right-most child) atomic based on the second node (or its left-most child).
Debug.Assert(Children is List<RegexNode>);
var children = (List<RegexNode>)Children;
for (int i = 0; i < childCount - 1; i++)
{
ProcessNode(children[i], children[i + 1]);
static void ProcessNode(RegexNode node, RegexNode subsequent)
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we can't recur further, just stop optimizing.
return;
}
// Skip down the node past irrelevant nodes.
while (true)
{
// We can always recur into captures and into the last node of concatenations.
if (node.Kind is RegexNodeKind.Capture or RegexNodeKind.Concatenate)
{
node = node.Child(node.ChildCount() - 1);
continue;
}
// For loops with at least one guaranteed iteration, we can recur into them, but
// we need to be careful not to just always do so; the ending node of a loop can only
// be made atomic if what comes after the loop but also the beginning of the loop are
// compatible for the optimization.
if (node.Kind == RegexNodeKind.Loop)
{
RegexNode? loopDescendent = node.FindLastExpressionInLoopForAutoAtomic();
if (loopDescendent != null)
{
node = loopDescendent;
continue;
}
}
// Can't skip any further.
break;
}
// If the node can be changed to atomic based on what comes after it, do so.
switch (node.Kind)
{
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop when CanBeMadeAtomic(node, subsequent, allowSubsequentIteration: true):
node.MakeLoopAtomic();
break;
case RegexNodeKind.Alternate or RegexNodeKind.BackreferenceConditional or RegexNodeKind.ExpressionConditional:
// In the case of alternation, we can't change the alternation node itself
// based on what comes after it (at least not with more complicated analysis
// that factors in all branches together), but we can look at each individual
// branch, and analyze ending loops in each branch individually to see if they
// can be made atomic. Then if we do end up backtracking into the alternation,
// we at least won't need to backtrack into that loop. The same is true for
// conditionals, though we don't want to process the condition expression
// itself, as it's already considered atomic and handled as part of ReduceExpressionConditional.
{
int alternateBranches = node.ChildCount();
for (int b = node.Kind == RegexNodeKind.ExpressionConditional ? 1 : 0; b < alternateBranches; b++)
{
ProcessNode(node.Child(b), subsequent);
}
}
break;
}
}
}
}
/// <summary>
/// Recurs into the last expression of a loop node, looking to see if it can find a node
/// that could be made atomic _assuming_ the conditions exist for it with the loop's ancestors.
/// </summary>
/// <returns>The found node that should be explored further for auto-atomicity; null if it doesn't exist.</returns>
private RegexNode? FindLastExpressionInLoopForAutoAtomic()
{
RegexNode node = this;
Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
// Start by looking at the loop's sole child.
node = node.Child(0);
// Skip past captures.
while (node.Kind == RegexNodeKind.Capture)
{
node = node.Child(0);
}
// If the loop's body is a concatenate, we can skip to its last child iff that
// last child doesn't conflict with the first child, since this whole concatenation
// could be repeated, such that the first node ends up following the last. For
// example, in the expression (a+[def])*, the last child is [def] and the first is
// a+, which can't possibly overlap with [def]. In contrast, if we had (a+[ade])*,
// [ade] could potentially match the starting 'a'.
if (node.Kind == RegexNodeKind.Concatenate)
{
int concatCount = node.ChildCount();
RegexNode lastConcatChild = node.Child(concatCount - 1);
if (CanBeMadeAtomic(lastConcatChild, node.Child(0), allowSubsequentIteration: false))
{
return lastConcatChild;
}
}
// Otherwise, the loop has nothing that can participate in auto-atomicity.
return null;
}
/// <summary>Optimizations for positive and negative lookaheads/behinds.</summary>
private RegexNode ReduceLookaround()
{
Debug.Assert(Kind is RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround);
Debug.Assert(ChildCount() == 1);
// A lookaround is a zero-width atomic assertion.
// As it's atomic, nothing will backtrack into it, and we can
// eliminate any ending backtracking from it.
EliminateEndingBacktracking();
// A positive lookaround wrapped around an empty is a nop, and we can reduce it
// to simply Empty. A developer typically doesn't write this, but rather it evolves
// due to optimizations resulting in empty.
// A negative lookaround wrapped around an empty child, i.e. (?!), is
// sometimes used as a way to insert a guaranteed no-match into the expression,
// often as part of a conditional. We can reduce it to simply Nothing.
if (Child(0).Kind == RegexNodeKind.Empty)
{
Kind = Kind == RegexNodeKind.PositiveLookaround ? RegexNodeKind.Empty : RegexNodeKind.Nothing;
Children = null;
}
return this;
}
/// <summary>Optimizations for backreference conditionals.</summary>
private RegexNode ReduceBackreferenceConditional()
{
Debug.Assert(Kind == RegexNodeKind.BackreferenceConditional);
Debug.Assert(ChildCount() is 1 or 2);
// This isn't so much an optimization as it is changing the tree for consistency. We want
// all engines to be able to trust that every backreference conditional will have two children,
// even though it's optional in the syntax. If it's missing a "not matched" branch,
// we add one that will match empty.
if (ChildCount() == 1)
{
AddChild(new RegexNode(RegexNodeKind.Empty, Options));
}
return this;
}
/// <summary>Optimizations for expression conditionals.</summary>
private RegexNode ReduceExpressionConditional()
{
Debug.Assert(Kind == RegexNodeKind.ExpressionConditional);
Debug.Assert(ChildCount() is 2 or 3);
// This isn't so much an optimization as it is changing the tree for consistency. We want
// all engines to be able to trust that every expression conditional will have three children,
// even though it's optional in the syntax. If it's missing a "not matched" branch,
// we add one that will match empty.
if (ChildCount() == 2)
{
AddChild(new RegexNode(RegexNodeKind.Empty, Options));
}
// It's common for the condition to be an explicit positive lookahead, as specifying
// that eliminates any ambiguity in syntax as to whether the expression is to be matched
// as an expression or to be a reference to a capture group. After parsing, however,
// there's no ambiguity, and we can remove an extra level of positive lookahead, as the
// engines need to treat the condition as a zero-width positive, atomic assertion regardless.
RegexNode condition = Child(0);
if (condition.Kind == RegexNodeKind.PositiveLookaround && (condition.Options & RegexOptions.RightToLeft) == 0)
{
ReplaceChild(0, condition.Child(0));
}
// We can also eliminate any ending backtracking in the condition, as the condition
// is considered to be a positive lookahead, which is an atomic zero-width assertion.
condition = Child(0);
condition.EliminateEndingBacktracking();
return this;
}
/// <summary>
/// Determines whether node can be switched to an atomic loop. Subsequent is the node
/// immediately after 'node'.
/// </summary>
private static bool CanBeMadeAtomic(RegexNode node, RegexNode subsequent, bool allowSubsequentIteration)
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we can't recur further, just stop optimizing.
return false;
}
// In most case, we'll simply check the node against whatever subsequent is. However, in case
// subsequent ends up being a loop with a min bound of 0, we'll also need to evaluate the node
// against whatever comes after subsequent. In that case, we'll walk the tree to find the
// next subsequent, and we'll loop around against to perform the comparison again.
while (true)
{
// Skip the successor down to the closest node that's guaranteed to follow it.
int childCount;
while ((childCount = subsequent.ChildCount()) > 0)
{
Debug.Assert(subsequent.Kind != RegexNodeKind.Group);
switch (subsequent.Kind)
{
case RegexNodeKind.Concatenate:
case RegexNodeKind.Capture:
case RegexNodeKind.Atomic:
case RegexNodeKind.PositiveLookaround when (subsequent.Options & RegexOptions.RightToLeft) == 0: // only lookaheads, not lookbehinds (represented as RTL PositiveLookaround nodes)
case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when subsequent.M > 0:
subsequent = subsequent.Child(0);
continue;
}
break;
}
// If the two nodes don't agree on options in any way, don't try to optimize them.
// TODO: Remove this once https://github.com/dotnet/runtime/issues/61048 is implemented.
if (node.Options != subsequent.Options)
{
return false;
}
// If the successor is an alternation, all of its children need to be evaluated, since any of them
// could come after this node. If any of them fail the optimization, then the whole node fails.
// This applies to expression conditionals as well, as long as they have both a yes and a no branch (if there's
// only a yes branch, we'd need to also check whatever comes after the conditional). It doesn't apply to
// backreference conditionals, as the condition itself is unknown statically and could overlap with the
// loop being considered for atomicity.
switch (subsequent.Kind)
{
case RegexNodeKind.Alternate:
case RegexNodeKind.ExpressionConditional when childCount == 3: // condition, yes, and no branch
for (int i = 0; i < childCount; i++)
{
if (!CanBeMadeAtomic(node, subsequent.Child(i), allowSubsequentIteration))
{
return false;
}
}
return true;
}
// If this node is a {one/notone/set}loop, see if it overlaps with its successor in the concatenation.
// If it doesn't, then we can upgrade it to being a {one/notone/set}loopatomic.
// Doing so avoids unnecessary backtracking.
switch (node.Kind)
{
case RegexNodeKind.Oneloop:
switch (subsequent.Kind)
{
case RegexNodeKind.One when node.Ch != subsequent.Ch:
case RegexNodeKind.Notone when node.Ch == subsequent.Ch:
case RegexNodeKind.Set when !RegexCharClass.CharInClass(node.Ch, subsequent.Str!):
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && node.Ch != subsequent.Ch:
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic when subsequent.M > 0 && node.Ch == subsequent.Ch:
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M > 0 && !RegexCharClass.CharInClass(node.Ch, subsequent.Str!):
case RegexNodeKind.Multi when node.Ch != subsequent.Str![0]:
case RegexNodeKind.End:
case RegexNodeKind.EndZ or RegexNodeKind.Eol when node.Ch != '\n':
case RegexNodeKind.Boundary when RegexCharClass.IsBoundaryWordChar(node.Ch):
case RegexNodeKind.NonBoundary when !RegexCharClass.IsBoundaryWordChar(node.Ch):
case RegexNodeKind.ECMABoundary when RegexCharClass.IsECMAWordChar(node.Ch):
case RegexNodeKind.NonECMABoundary when !RegexCharClass.IsECMAWordChar(node.Ch):
return true;
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && node.Ch != subsequent.Ch:
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic when subsequent.M == 0 && node.Ch == subsequent.Ch:
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M == 0 && !RegexCharClass.CharInClass(node.Ch, subsequent.Str!):
// The loop can be made atomic based on this subsequent node, but we'll need to evaluate the next one as well.
break;
default:
return false;
}
break;
case RegexNodeKind.Notoneloop:
switch (subsequent.Kind)
{
case RegexNodeKind.One when node.Ch == subsequent.Ch:
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && node.Ch == subsequent.Ch:
case RegexNodeKind.Multi when node.Ch == subsequent.Str![0]:
case RegexNodeKind.End:
return true;
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && node.Ch == subsequent.Ch:
// The loop can be made atomic based on this subsequent node, but we'll need to evaluate the next one as well.
break;
default:
return false;
}
break;
case RegexNodeKind.Setloop:
switch (subsequent.Kind)
{
case RegexNodeKind.One when !RegexCharClass.CharInClass(subsequent.Ch, node.Str!):
case RegexNodeKind.Set when !RegexCharClass.MayOverlap(node.Str!, subsequent.Str!):
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && !RegexCharClass.CharInClass(subsequent.Ch, node.Str!):
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M > 0 && !RegexCharClass.MayOverlap(node.Str!, subsequent.Str!):
case RegexNodeKind.Multi when !RegexCharClass.CharInClass(subsequent.Str![0], node.Str!):
case RegexNodeKind.End:
case RegexNodeKind.EndZ or RegexNodeKind.Eol when !RegexCharClass.CharInClass('\n', node.Str!):
case RegexNodeKind.Boundary when node.Str is RegexCharClass.WordClass or RegexCharClass.DigitClass:
case RegexNodeKind.NonBoundary when node.Str is RegexCharClass.NotWordClass or RegexCharClass.NotDigitClass:
case RegexNodeKind.ECMABoundary when node.Str is RegexCharClass.ECMAWordClass or RegexCharClass.ECMADigitClass:
case RegexNodeKind.NonECMABoundary when node.Str is RegexCharClass.NotECMAWordClass or RegexCharClass.NotDigitClass:
return true;
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && !RegexCharClass.CharInClass(subsequent.Ch, node.Str!):
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M == 0 && !RegexCharClass.MayOverlap(node.Str!, subsequent.Str!):
// The loop can be made atomic based on this subsequent node, but we'll need to evaluate the next one as well.
break;
default:
return false;
}
break;
default:
return false;
}
// We only get here if the node could be made atomic based on subsequent but subsequent has a lower bound of zero
// and thus we need to move subsequent to be the next node in sequence and loop around to try again.
Debug.Assert(subsequent.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy);
Debug.Assert(subsequent.M == 0);
if (!allowSubsequentIteration)
{
return false;
}
// To be conservative, we only walk up through a very limited set of constructs (even though we may have walked
// down through more, like loops), looking for the next concatenation that we're not at the end of, at
// which point subsequent becomes whatever node is next in that concatenation.
while (true)
{
RegexNode? parent = subsequent.Parent;
switch (parent?.Kind)
{
case RegexNodeKind.Atomic:
case RegexNodeKind.Alternate:
case RegexNodeKind.Capture:
subsequent = parent;
continue;
case RegexNodeKind.Concatenate:
var peers = (List<RegexNode>)parent.Children!;
int currentIndex = peers.IndexOf(subsequent);
Debug.Assert(currentIndex >= 0, "Node should have been in its parent's child list");
if (currentIndex + 1 == peers.Count)
{
subsequent = parent;
continue;
}
else
{
subsequent = peers[currentIndex + 1];
break;
}
case null:
// If we hit the root, we're at the end of the expression, at which point nothing could backtrack
// in and we can declare success.
return true;
default:
// Anything else, we don't know what to do, so we have to assume it could conflict with the loop.
return false;
}
break;
}
}
}
/// <summary>Computes a min bound on the required length of any string that could possibly match.</summary>
/// <returns>The min computed length. If the result is 0, there is no minimum we can enforce.</returns>
/// <remarks>
/// e.g. abc[def](ghijkl|mn) => 6
/// </remarks>
public int ComputeMinLength()
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we can't recur further, assume there's no minimum we can enforce.
return 0;
}
switch (Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
// Single character.
return 1;
case RegexNodeKind.Multi:
// Every character in the string needs to match.
return Str!.Length;
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Setlazy:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
// One character repeated at least M times.
return M;
case RegexNodeKind.Lazyloop:
case RegexNodeKind.Loop:
// A node graph repeated at least M times.
return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength());
case RegexNodeKind.Alternate:
// The minimum required length for any of the alternation's branches.
{
int childCount = ChildCount();
Debug.Assert(childCount >= 2);
int min = Child(0).ComputeMinLength();
for (int i = 1; i < childCount && min > 0; i++)
{
min = Math.Min(min, Child(i).ComputeMinLength());
}
return min;
}
case RegexNodeKind.BackreferenceConditional:
// Minimum of its yes and no branches. The backreference doesn't add to the length.
return Math.Min(Child(0).ComputeMinLength(), Child(1).ComputeMinLength());
case RegexNodeKind.ExpressionConditional:
// Minimum of its yes and no branches. The condition is a zero-width assertion.
return Math.Min(Child(1).ComputeMinLength(), Child(2).ComputeMinLength());
case RegexNodeKind.Concatenate:
// The sum of all of the concatenation's children.
{
long sum = 0;
int childCount = ChildCount();
for (int i = 0; i < childCount; i++)
{
sum += Child(i).ComputeMinLength();
}
return (int)Math.Min(int.MaxValue - 1, sum);
}
case RegexNodeKind.Atomic:
case RegexNodeKind.Capture:
case RegexNodeKind.Group:
// For groups, we just delegate to the sole child.
Debug.Assert(ChildCount() == 1);
return Child(0).ComputeMinLength();
case RegexNodeKind.Empty:
case RegexNodeKind.Nothing:
case RegexNodeKind.UpdateBumpalong:
// Nothing to match. In the future, we could potentially use Nothing to say that the min length
// is infinite, but that would require a different structure, as that would only apply if the
// Nothing match is required in all cases (rather than, say, as one branch of an alternation).
case RegexNodeKind.Beginning:
case RegexNodeKind.Bol:
case RegexNodeKind.Boundary:
case RegexNodeKind.ECMABoundary:
case RegexNodeKind.End:
case RegexNodeKind.EndZ:
case RegexNodeKind.Eol:
case RegexNodeKind.NonBoundary:
case RegexNodeKind.NonECMABoundary:
case RegexNodeKind.Start:
case RegexNodeKind.NegativeLookaround:
case RegexNodeKind.PositiveLookaround:
// Zero-width
case RegexNodeKind.Backreference:
// Requires matching data available only at run-time. In the future, we could choose to find
// and follow the capture group this aligns with, while being careful not to end up in an
// infinite cycle.
return 0;
default:
Debug.Fail($"Unknown node: {Kind}");
goto case RegexNodeKind.Empty;
}
}
/// <summary>Computes a maximum length of any string that could possibly match.</summary>
/// <returns>The maximum length of any string that could possibly match, or null if the length may not always be the same.</returns>
/// <remarks>
/// e.g. abc[def](gh|ijklmnop) => 12
/// </remarks>
public int? ComputeMaxLength()
{
if (!StackHelper.TryEnsureSufficientExecutionStack())
{
// If we can't recur further, assume there's no minimum we can enforce.
return null;
}
switch (Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
// Single character.
return 1;
case RegexNodeKind.Multi:
// Every character in the string needs to match.
return Str!.Length;
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or
RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or
RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic:
// Return the max number of iterations if there's an upper bound, or null if it's infinite
return N == int.MaxValue ? null : N;
case RegexNodeKind.Loop or RegexNodeKind.Lazyloop:
if (N != int.MaxValue)
{
// A node graph repeated a fixed number of times
if (Child(0).ComputeMaxLength() is int childMaxLength)
{
long maxLength = (long)N * childMaxLength;
if (maxLength < int.MaxValue)
{
return (int)maxLength;
}
}
}
return null;
case RegexNodeKind.Alternate:
// The maximum length of any child branch, as long as they all have one.
{
int childCount = ChildCount();
Debug.Assert(childCount >= 2);
if (Child(0).ComputeMaxLength() is not int maxLength)
{
return null;
}
for (int i = 1; i < childCount; i++)
{
if (Child(i).ComputeMaxLength() is not int next)
{
return null;
}
maxLength = Math.Max(maxLength, next);
}
return maxLength;
}
case RegexNodeKind.BackreferenceConditional:
case RegexNodeKind.ExpressionConditional:
// The maximum length of either child branch, as long as they both have one.. The condition for an expression conditional is a zero-width assertion.
{
int i = Kind == RegexNodeKind.BackreferenceConditional ? 0 : 1;
return Child(i).ComputeMaxLength() is int yes && Child(i + 1).ComputeMaxLength() is int no ?
Math.Max(yes, no) :
null;
}
case RegexNodeKind.Concatenate:
// The sum of all of the concatenation's children's max lengths, as long as they all have one.
{
long sum = 0;
int childCount = ChildCount();
for (int i = 0; i < childCount; i++)
{
if (Child(i).ComputeMaxLength() is not int length)
{
return null;
}
sum += length;
}
if (sum < int.MaxValue)
{
return (int)sum;
}
return null;
}
case RegexNodeKind.Atomic:
case RegexNodeKind.Capture:
// For groups, we just delegate to the sole child.
Debug.Assert(ChildCount() == 1);
return Child(0).ComputeMaxLength();
case RegexNodeKind.Empty:
case RegexNodeKind.Nothing:
case RegexNodeKind.UpdateBumpalong:
case RegexNodeKind.Beginning:
case RegexNodeKind.Bol:
case RegexNodeKind.Boundary:
case RegexNodeKind.ECMABoundary:
case RegexNodeKind.End:
case RegexNodeKind.EndZ:
case RegexNodeKind.Eol:
case RegexNodeKind.NonBoundary:
case RegexNodeKind.NonECMABoundary:
case RegexNodeKind.Start:
case RegexNodeKind.PositiveLookaround:
case RegexNodeKind.NegativeLookaround:
// Zero-width
return 0;
case RegexNodeKind.Backreference:
// Requires matching data available only at run-time. In the future, we could choose to find
// and follow the capture group this aligns with, while being careful not to end up in an
// infinite cycle.
return null;
default:
Debug.Fail($"Unknown node: {Kind}");
goto case RegexNodeKind.Empty;
}
}
/// <summary>
/// Determines whether the specified child index of a concatenation begins a sequence whose values
/// should be used to perform an ordinal case-insensitive comparison.
/// </summary>
/// <param name="childIndex">The index of the child with which to start the sequence.</param>
/// <param name="exclusiveChildBound">The exclusive upper bound on the child index to iterate to.</param>
/// <param name="nodesConsumed">How many nodes make up the sequence, if any.</param>
/// <param name="caseInsensitiveString">The string to use for an ordinal case-insensitive comparison, if any.</param>
/// <returns>true if a sequence was found; otherwise, false.</returns>
public bool TryGetOrdinalCaseInsensitiveString(int childIndex, int exclusiveChildBound, out int nodesConsumed, [NotNullWhen(true)] out string? caseInsensitiveString)
{
Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
var vsb = new ValueStringBuilder(stackalloc char[32]);
// We're looking in particular for sets of ASCII characters, so we focus only on sets with two characters in them, e.g. [Aa].
Span<char> twoChars = stackalloc char[2];
// Iterate from the child index to the exclusive upper bound.
int i = childIndex;
for ( ; i < exclusiveChildBound; i++)
{
RegexNode child = Child(i);
if ((child.Options & RegexOptions.IgnoreCase) != 0)
{
// TODO https://github.com/dotnet/runtime/issues/61048: Remove this block once fixed.
// We don't want any nodes that are still IgnoreCase, as they'd no longer be IgnoreCase if
// they were applicable to this optimization.
break;
}
if (child.Kind is RegexNodeKind.One)
{
// We only want to include ASCII characters, and only if they don't participate in case conversion
// such that they only case to themselves and nothing other cases to them. Otherwise, including
// them would potentially cause us to match against things not allowed by the pattern.
if (child.Ch >= 128 ||
RegexCharClass.ParticipatesInCaseConversion(child.Ch))
{
break;
}
vsb.Append(child.Ch);
}
else if (child.Kind is RegexNodeKind.Multi)
{
// As with RegexNodeKind.One, the string needs to be composed solely of ASCII characters that
// don't participate in case conversion.
if (!RegexCharClass.IsAscii(child.Str.AsSpan()) ||
RegexCharClass.ParticipatesInCaseConversion(child.Str.AsSpan()))
{
break;
}
vsb.Append(child.Str);
}
else if (child.Kind is RegexNodeKind.Set ||
(child.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic && child.M == child.N))
{
// In particular we want to look for sets that contain only the upper and lowercase variant
// of the same ASCII letter.
if (RegexCharClass.IsNegated(child.Str!) ||
RegexCharClass.GetSetChars(child.Str!, twoChars) != 2 ||
twoChars[0] >= 128 ||
twoChars[1] >= 128 ||
twoChars[0] == twoChars[1] ||
!char.IsLetter(twoChars[0]) ||
!char.IsLetter(twoChars[1]) ||
((twoChars[0] | 0x20) != (twoChars[1] | 0x20)))
{
break;
}
vsb.Append((char)(twoChars[0] | 0x20), child.Kind is RegexNodeKind.Set ? 1 : child.M);
}
else
{
break;
}
}
// If we found at least two characters, consider it a sequence found. It's possible
// they all came from the same node, so this could be a sequence of just one node.
if (vsb.Length >= 2)
{
caseInsensitiveString = vsb.ToString();
nodesConsumed = i - childIndex;
return true;
}
// No sequence found.
caseInsensitiveString = null;
nodesConsumed = 0;
vsb.Dispose();
return false;
}
/// <summary>
/// Determine whether the specified child node is the beginning of a sequence that can
/// trivially have length checks combined in order to avoid bounds checks.
/// </summary>
/// <param name="childIndex">The starting index of the child to check.</param>
/// <param name="requiredLength">The sum of all the fixed lengths for the nodes in the sequence.</param>
/// <param name="exclusiveEnd">The index of the node just after the last one in the sequence.</param>
/// <returns>true if more than one node can have their length checks combined; otherwise, false.</returns>
/// <remarks>
/// There are additional node types for which we can prove a fixed length, e.g. examining all branches
/// of an alternation and returning true if all their lengths are equal. However, the primary purpose
/// of this method is to avoid bounds checks by consolidating length checks that guard accesses to
/// strings/spans for which the JIT can see a fixed index within bounds, and alternations employ
/// patterns that defeat that (e.g. reassigning the span in question). As such, the implementation
/// remains focused on only a core subset of nodes that are a) likely to be used in concatenations and
/// b) employ simple patterns of checks.
/// </remarks>
public bool TryGetJoinableLengthCheckChildRange(int childIndex, out int requiredLength, out int exclusiveEnd)
{
Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
static bool CanJoinLengthCheck(RegexNode node) => node.Kind switch
{
RegexNodeKind.One or RegexNodeKind.Notone or RegexNodeKind.Set => true,
RegexNodeKind.Multi => true,
RegexNodeKind.Oneloop or RegexNodeKind.Onelazy or RegexNodeKind.Oneloopatomic or
RegexNodeKind.Notoneloop or RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloopatomic or
RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic
when node.M == node.N => true,
_ => false,
};
RegexNode child = Child(childIndex);
if (CanJoinLengthCheck(child))
{
requiredLength = child.ComputeMinLength();
int childCount = ChildCount();
for (exclusiveEnd = childIndex + 1; exclusiveEnd < childCount; exclusiveEnd++)
{
child = Child(exclusiveEnd);
if (!CanJoinLengthCheck(child))
{
break;
}
requiredLength += child.ComputeMinLength();
}
if (exclusiveEnd - childIndex > 1)
{
return true;
}
}
requiredLength = 0;
exclusiveEnd = 0;
return false;
}
public RegexNode MakeQuantifier(bool lazy, int min, int max)
{
// Certain cases of repeaters (min == max) can be handled specially
if (min == max)
{
switch (max)
{
case 0:
// The node is repeated 0 times, so it's actually empty.
return new RegexNode(RegexNodeKind.Empty, Options);
case 1:
// The node is repeated 1 time, so it's not actually a repeater.
return this;
case <= MultiVsRepeaterLimit when Kind == RegexNodeKind.One:
// The same character is repeated a fixed number of times, so it's actually a multi.
// While this could remain a repeater, multis are more readily optimized later in
// processing. The counts used here in real-world expressions are invariably small (e.g. 4),
// but we set an upper bound just to avoid creating really large strings.
Debug.Assert(max >= 2);
Kind = RegexNodeKind.Multi;
Str = new string(Ch, max);
Ch = '\0';
return this;
}
}
switch (Kind)
{
case RegexNodeKind.One:
case RegexNodeKind.Notone:
case RegexNodeKind.Set:
MakeRep(lazy ? RegexNodeKind.Onelazy : RegexNodeKind.Oneloop, min, max);
return this;
default:
var result = new RegexNode(lazy ? RegexNodeKind.Lazyloop : RegexNodeKind.Loop, Options, min, max);
result.AddChild(this);
return result;
}
}
public void AddChild(RegexNode newChild)
{
newChild.Parent = this; // so that the child can see its parent while being reduced
newChild = newChild.Reduce();
newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented
if (Children is null)
{
Children = newChild;
}
else if (Children is RegexNode currentChild)
{
Children = new List<RegexNode>() { currentChild, newChild };
}
else
{
((List<RegexNode>)Children).Add(newChild);
}
}
public void InsertChild(int index, RegexNode newChild)
{
Debug.Assert(Children is List<RegexNode>);
newChild.Parent = this; // so that the child can see its parent while being reduced
newChild = newChild.Reduce();
newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented
((List<RegexNode>)Children).Insert(index, newChild);
}
public void ReplaceChild(int index, RegexNode newChild)
{
Debug.Assert(Children != null);
Debug.Assert(index < ChildCount());
newChild.Parent = this; // so that the child can see its parent while being reduced
newChild = newChild.Reduce();
newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented
if (Children is RegexNode)
{
Children = newChild;
}
else
{
((List<RegexNode>)Children)[index] = newChild;
}
}
public RegexNode Child(int i) => Children is RegexNode child ? child : ((List<RegexNode>)Children!)[i];
public int ChildCount()
{
if (Children is null)
{
return 0;
}
if (Children is List<RegexNode> children)
{
return children.Count;
}
Debug.Assert(Children is RegexNode);
return 1;
}
// Determines whether the node supports a compilation / code generation strategy based on walking the node tree.
// Also returns a human-readable string to explain the reason (it will be emitted by the source generator, hence
// there's no need to localize).
internal bool SupportsCompilation([NotNullWhen(false)] out string? reason)
{
if ((Options & RegexOptions.NonBacktracking) != 0)
{
reason = "RegexOptions.NonBacktracking isn't supported";
return false;
}
if (ExceedsMaxDepthAllowedDepth(this, allowedDepth: 40))
{
// For the source generator, deep RegexNode trees can result in emitting C# code that exceeds C# compiler
// limitations, leading to "CS8078: An expression is too long or complex to compile". As such, we place
// an artificial limit on max tree depth in order to mitigate such issues. The allowed depth can be tweaked
// as needed; its exceedingly rare to find expressions with such deep trees. And while RegexCompiler doesn't
// have to deal with C# compiler limitations, we still want to limit max tree depth as we want to limit
// how deep recursion we'll employ as part of code generation.
reason = "the expression may result exceeding run-time or compiler limits";
return false;
}
// Supported.
reason = null;
return true;
static bool ExceedsMaxDepthAllowedDepth(RegexNode node, int allowedDepth)
{
if (allowedDepth <= 0)
{
return true;
}
int childCount = node.ChildCount();
for (int i = 0; i < childCount; i++)
{
if (ExceedsMaxDepthAllowedDepth(node.Child(i), allowedDepth - 1))
{
return true;
}
}
return false;
}
}
/// <summary>Gets whether the node is a Set/Setloop/Setloopatomic/Setlazy node.</summary>
public bool IsSetFamily => Kind is RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy;
/// <summary>Gets whether the node is a One/Oneloop/Oneloopatomic/Onelazy node.</summary>
public bool IsOneFamily => Kind is RegexNodeKind.One or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy;
/// <summary>Gets whether the node is a Notone/Notoneloop/Notoneloopatomic/Notonelazy node.</summary>
public bool IsNotoneFamily => Kind is RegexNodeKind.Notone or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy;
/// <summary>Gets whether this node is contained inside of a loop.</summary>
public bool IsInLoop()
{
for (RegexNode? parent = Parent; parent is not null; parent = parent.Parent)
{
if (parent.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop)
{
return true;
}
}
return false;
}
#if DEBUG
[ExcludeFromCodeCoverage]
public override string ToString()
{
RegexNode? curNode = this;
int curChild = 0;
var sb = new StringBuilder().AppendLine(curNode.Describe());
var stack = new List<int>();
while (true)
{
if (curChild < curNode!.ChildCount())
{
stack.Add(curChild + 1);
curNode = curNode.Child(curChild);
curChild = 0;
sb.Append(new string(' ', stack.Count * 2)).Append(curNode.Describe()).AppendLine();
}
else
{
if (stack.Count == 0)
{
break;
}
curChild = stack[stack.Count - 1];
stack.RemoveAt(stack.Count - 1);
curNode = curNode.Parent;
}
}
return sb.ToString();
}
[ExcludeFromCodeCoverage]
private string Describe()
{
var sb = new StringBuilder(Kind.ToString());
if ((Options & RegexOptions.ExplicitCapture) != 0) sb.Append("-C");
if ((Options & RegexOptions.IgnoreCase) != 0) sb.Append("-I");
if ((Options & RegexOptions.RightToLeft) != 0) sb.Append("-L");
if ((Options & RegexOptions.Multiline) != 0) sb.Append("-M");
if ((Options & RegexOptions.Singleline) != 0) sb.Append("-S");
if ((Options & RegexOptions.IgnorePatternWhitespace) != 0) sb.Append("-X");
if ((Options & RegexOptions.ECMAScript) != 0) sb.Append("-E");
switch (Kind)
{
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.One:
case RegexNodeKind.Notone:
sb.Append(" '").Append(RegexCharClass.DescribeChar(Ch)).Append('\'');
break;
case RegexNodeKind.Capture:
sb.Append(' ').Append($"index = {M}");
if (N != -1)
{
sb.Append($", unindex = {N}");
}
break;
case RegexNodeKind.Backreference:
case RegexNodeKind.BackreferenceConditional:
sb.Append(' ').Append($"index = {M}");
break;
case RegexNodeKind.Multi:
sb.Append(" \"").Append(Str).Append('"');
break;
case RegexNodeKind.Set:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
case RegexNodeKind.Setlazy:
sb.Append(' ').Append(RegexCharClass.DescribeSet(Str!));
break;
}
switch (Kind)
{
case RegexNodeKind.Oneloop:
case RegexNodeKind.Oneloopatomic:
case RegexNodeKind.Notoneloop:
case RegexNodeKind.Notoneloopatomic:
case RegexNodeKind.Onelazy:
case RegexNodeKind.Notonelazy:
case RegexNodeKind.Setloop:
case RegexNodeKind.Setloopatomic:
case RegexNodeKind.Setlazy:
case RegexNodeKind.Loop:
case RegexNodeKind.Lazyloop:
sb.Append(
(M == 0 && N == int.MaxValue) ? "*" :
(M == 0 && N == 1) ? "?" :
(M == 1 && N == int.MaxValue) ? "+" :
(N == int.MaxValue) ? $"{{{M}, *}}" :
(N == M) ? $"{{{M}}}" :
$"{{{M}, {N}}}");
break;
}
return sb.ToString();
}
#endif
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Private.Xml.Linq/tests/misc/Annotation.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Test.ModuleCore;
using Xunit;
namespace System.Xml.Linq.Tests
{
public class Annotations
{
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddStringAnnotation(XObject xo)
{
const string expected = "test string";
xo.AddAnnotation(expected);
ValidateAnnotations(xo, new string[] { expected });
Assert.Equal(expected, xo.Annotation<string>());
Assert.Equal(expected, (string)xo.Annotation(typeof(string)));
Assert.Equal(expected, xo.Annotation(typeof(object)));
Assert.Equal(expected, xo.Annotation<object>());
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddIntAnnotation(XObject xo)
{
const int expected = 123456;
xo.AddAnnotation(expected);
ValidateAnnotations(xo, new object[] { expected });
Assert.Equal(expected, xo.Annotation<object>());
Assert.Equal(expected, (int)xo.Annotation(typeof(int)));
Assert.Equal(expected, xo.Annotation(typeof(object)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddIntAndStringAnnotation(XObject xo)
{
const string expectedStr = "<!@@63784sgdh111>";
const int expectedNum = 123456;
xo.AddAnnotation(expectedStr);
xo.AddAnnotation(expectedNum);
ValidateAnnotations(xo, new object[] { expectedStr, expectedNum });
ValidateAnnotations(xo, new string[] { expectedStr });
Assert.Equal(expectedNum, (int)xo.Annotation(typeof(int)));
Assert.Equal(expectedStr, xo.Annotation<string>());
Assert.Equal(expectedStr, (string)xo.Annotation(typeof(string)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddRemoveGetAnnotation(XObject xo)
{
string str1 = "<!@@63784sgdh111>";
string str2 = "<!@@63784sgdh222>";
int num = 123456;
xo.AddAnnotation(str1);
xo.AddAnnotation(str2);
xo.AddAnnotation(num);
ValidateAnnotations(xo, new object[] { str1, str2, num });
ValidateAnnotations(xo, new string[] { str1, str2 });
xo.RemoveAnnotations<string>();
ValidateAnnotations(xo, new object[] { num });
xo.RemoveAnnotations(typeof(int));
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationWithoutAdding(XObject xo)
{
xo.RemoveAnnotations<string>();
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
xo.RemoveAnnotations(typeof(int));
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddIntRemoveStringGetIntAnnotation(XObject xo)
{
const int num = 123456;
xo.AddAnnotation(num);
xo.RemoveAnnotations<string>();
ValidateAnnotations(xo, new object[] { num });
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddMultipleStringAnnotations(XObject xo)
{
const string str1 = "<!@@63784sgdh111>";
const string str2 = "sdjverqjbe4 kjvweh342$$% ";
xo.AddAnnotation(str1);
xo.AddAnnotation(str2);
ValidateAnnotations(xo, new string[] { str1, str2 });
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationTwice(XObject xo)
{
xo.RemoveAnnotations<object>();
xo.RemoveAnnotations<object>();
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddGenericAnnotation(XObject xo)
{
Dictionary<string, string> d = new Dictionary<string, string>();
xo.AddAnnotation(d);
ValidateAnnotations(xo, new Dictionary<string, string>[] { d });
Assert.Equal(d, xo.Annotation<Dictionary<string, string>>());
Assert.Equal(d, (Dictionary<string, string>)xo.Annotation(typeof(Dictionary<string, string>)));
Assert.Equal(d, xo.Annotation<object>());
Assert.Equal(d, xo.Annotation(typeof(object)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveGenericAnnotation(XObject xo)
{
Dictionary<string, string> d = new Dictionary<string, string>();
xo.AddAnnotation(d);
xo.RemoveAnnotations<Dictionary<string, string>>();
Assert.Equal(expected: 0, actual: CountAnnotations<Dictionary<string, string>>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddInheritedAnnotation(XObject xo)
{
A a = new A();
B b = new B();
xo.AddAnnotation(a);
xo.AddAnnotation(b);
ValidateAnnotations(xo, new A[] { a, b });
ValidateAnnotations(xo, new B[] { b });
Assert.Equal(b, xo.Annotation<B>());
Assert.Equal(b, (B)xo.Annotation(typeof(B)));
Assert.Equal(a, xo.Annotation<A>());
Assert.Equal(a, (A)xo.Annotation(typeof(A)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveInheritedAnnotation(XObject xo)
{
A a = new A();
B b = new B();
xo.AddAnnotation(a);
xo.AddAnnotation(b);
xo.RemoveAnnotations<B>();
ValidateAnnotations(xo, new A[] { a });
Assert.Equal(a, xo.Annotation<A>());
Assert.Equal(a, (A)xo.Annotation(typeof(A)));
Assert.Equal(a, xo.Annotation<object>());
Assert.Equal(a, xo.Annotation(typeof(object)));
Assert.Equal(0, CountAnnotations<B>(xo));
xo.RemoveAnnotations(typeof(A));
Assert.Equal(0, CountAnnotations<A>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddNull(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("annotation", () => xo.AddAnnotation(null));
Assert.Null(xo.Annotation<object>());
AssertExtensions.Throws<ArgumentNullException>("annotation", () => xo.AddAnnotation(null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveNull(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.RemoveAnnotations(null));
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.RemoveAnnotations(null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void GetAllNull(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.Annotations(null));
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.Annotations(null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void GetOneNull(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.Annotation(null));
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.Annotation(null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddNullString(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("annotation", () => xo.AddAnnotation((string)null));
Assert.Null(xo.Annotation<object>());
AssertExtensions.Throws<ArgumentNullException>("annotation", () => xo.AddAnnotation((string)null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddAnnotationWithSameClassNameButDifferentNamespace(XObject xo)
{
DifferentNamespace.A a1 = new DifferentNamespace.A();
A a2 = new A();
xo.AddAnnotation(a1);
xo.AddAnnotation(a2);
ValidateAnnotations(xo, new DifferentNamespace.A[] { a1 });
ValidateAnnotations(xo, new A[] { a2 });
Assert.Equal(a1, xo.Annotation<DifferentNamespace.A>());
Assert.Equal(a1, (DifferentNamespace.A)xo.Annotation(typeof(DifferentNamespace.A)));
Assert.Equal(a2, xo.Annotation<A>());
Assert.Equal(a2, (A)xo.Annotation(typeof(A)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationWithSameClassNameButDifferentNamespace(XObject xo)
{
DifferentNamespace.A a1 = new DifferentNamespace.A();
A a2 = new A();
xo.AddAnnotation(a1);
xo.AddAnnotation(a2);
xo.RemoveAnnotations<DifferentNamespace.A>();
Assert.Equal(expected: 0, actual: CountAnnotations<DifferentNamespace.A>(xo));
ValidateAnnotations<A>(xo, new A[] { a2 });
Assert.Equal(a2, xo.Annotation<A>());
Assert.Equal(a2, (A)xo.Annotation(typeof(A)));
xo.RemoveAnnotations(typeof(A));
Assert.Equal(expected: 0, actual: CountAnnotations<A>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationsOfDifferentTypesAndDifferentXObjects(XObject xo)
{
AddAnnotation(xo);
foreach (Type type in GetTypes())
{
RemoveAnnotations(xo, type);
}
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveTwiceAnnotationsOfDifferentTypesAndDifferentXObjects(XObject xo)
{
foreach (Type type in GetTypes())
{
RemoveAnnotations(xo, type);
}
foreach (Type type in GetTypes())
{
RemoveAnnotations(xo, type);
}
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddTwiceRemoveOnceAnnotationsOfDifferentTypesAndDifferentXObjects(XObject xo)
{
AddAnnotation(xo);
int count = CountAnnotations<object>(xo) * 2;
AddAnnotation(xo);
Assert.Equal(expected: count, actual: CountAnnotations<object>(xo));
foreach (Type type in GetTypes())
{
RemoveAnnotations(xo, type);
}
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Fact]
public void AddAnnotationAndClone()
{
// Add annotation to XElement, and clone this element to another subtree, get null annotation
const string expected = "element1111";
XElement element1 = new XElement("e", new XAttribute("a", "value"));
element1.AddAnnotation(expected);
XElement element2 = new XElement(element1);
ValidateAnnotations(element1, new string[] { expected });
Assert.Equal(expected, element1.Annotation<string>());
Assert.Equal(expected, element1.Annotation(typeof(string)));
Assert.Equal(0, CountAnnotations<string>(element2));
}
[Fact]
public void AddAnnotationXElementRemoveAndGet()
{
// Add annotation to XElement, and remove this element, get annotation
const string expected = "element1111";
XElement root = new XElement("root");
XElement element = new XElement("elem1");
root.Add(element);
element.AddAnnotation(expected);
element.Remove();
ValidateAnnotations(element, new string[] { expected });
Assert.Equal(expected, element.Annotation<string>());
Assert.Equal(expected, element.Annotation(typeof(string)));
}
[Fact]
public void AddAnnotationToParentAndChildAndValIdate()
{
// Add annotation to parent and child, valIdate annotations for each XObjects
string str1 = "root 1111";
string str2 = "element 1111";
XElement root = new XElement("root");
XElement element = new XElement("elem1");
root.Add(element);
root.AddAnnotation(str1);
element.AddAnnotation(str2);
ValidateAnnotations(root, new string[] { str1 });
Assert.Equal(str1, root.Annotation<string>());
Assert.Equal(str1, root.Annotation(typeof(string)));
ValidateAnnotations(element, new string[] { str2 });
Assert.Equal(str2, element.Annotation<string>());
Assert.Equal(str2, element.Annotation(typeof(string)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddAnnotationsAndRemoveOfTypeObject(XObject xo)
{
AddAnnotation(xo);
RemoveAnnotations(xo, typeof(object));
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void EnumerateAnnotationsWithoutAdding(XObject xo)
{
Assert.Null(xo.Annotation(typeof(object)));
Assert.Null(xo.Annotation<object>());
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
Assert.Equal(expected: 0, actual: CountAnnotations<string>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationsUsingTypeObject(XObject xo)
{
AddAnnotation(xo);
RemoveAnnotations<object>(xo);
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveTwiceAnnotationsWithoutAddingUsingTypeObject(XObject xo)
{
RemoveAnnotations<object>(xo);
RemoveAnnotations<object>(xo);
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
//
// helpers
//
public static IEnumerable<object[]> GetXObjects()
{
yield return new object[] { new XDocument() };
yield return new object[] { new XAttribute("attr", "val") };
yield return new object[] { new XElement("elem1") };
yield return new object[] { new XText("text1") };
yield return new object[] { new XComment("comment1") };
yield return new object[] { new XProcessingInstruction("pi1", "pi1pi1pi1pi1pi1") };
yield return new object[] { new XCData("cdata cdata") };
yield return new object[] { new XDocumentType("dtd1", "dtd1dtd1dtd1", "dtd1dtd1", "dtd1dtd1dtd1dtd1") };
}
public static object[] GetObjects()
{
object[] aObject = new object[]
{
new A(), new B(), new DifferentNamespace.A(), new DifferentNamespace.B(), "stringstring", 12345,
new Dictionary<string, string>(), new XDocument(), new XAttribute("attr", "val"), new XElement("elem1"),
new XText("text1 text1"), new XComment("comment1 comment1"),
new XProcessingInstruction("pi1", "pi1pi1pi1pi1pi1"), new XCData("cdata cdata"),
new XDeclaration("234", "UTF-8", "yes"), XNamespace.Xmlns,
//new XStreamingElement("elementSequence"),
new XDocumentType("dtd1", "dtd1dtd1dtd1", "dtd1 dtd1", "dtd1 dtd1 dtd1 ")
};
return aObject;
}
private static void ValidateAnnotations<T>(XObject xo, T[] values) where T : class
{
//
// use inefficient n^2 algorithm, which is OK for our testing purposes
// assumes that all items are unique
//
int count = CountAnnotations<T>(xo);
TestLog.Compare(count, values.Length, "unexpected number of annotations");
foreach (T value in values)
{
//
// use non-generics enum first
//
bool found = false;
foreach (T annotation in xo.Annotations(typeof(T)))
{
if (annotation.Equals(value))
{
found = true;
break;
}
}
TestLog.Compare(found, "didn't find value using non-generic enumeration");
//
// now double check with generics one
//
found = false;
foreach (T annotation in xo.Annotations<T>())
{
if (annotation.Equals(value))
{
found = true;
break;
}
}
TestLog.Compare(found, "didn't find value using generic enumeration");
}
}
private static int CountAnnotations<T>(XObject xo) where T : class
{
int count = xo.Annotations(typeof(T)).Count();
Assert.Equal(count, xo.Annotations<T>().Count());
// Generics and non-generics annotations enumerations returned different number of objects
return count;
}
private static void AddAnnotation(XObject xo)
{
foreach (object o in GetObjects())
{
xo.AddAnnotation(o);
}
}
private static void RemoveAnnotations(XObject xo, Type type)
{
xo.RemoveAnnotations(type);
}
private static void RemoveAnnotations<T>(XObject xo) where T : class
{
xo.RemoveAnnotations<T>();
}
private static Type[] GetTypes()
{
Type[] types = new Type[]
{
typeof(string), typeof(int), typeof(Dictionary<string, string>), typeof(A), typeof(B),
typeof(DifferentNamespace.A), typeof(DifferentNamespace.B), typeof(XAttribute), typeof(XElement),
typeof(Extensions), typeof(XDocument), typeof(XText), typeof(XName), typeof(XComment),
typeof(XProcessingInstruction), typeof(XCData), typeof(XDeclaration), typeof(XNamespace),
//typeof(XStreamingElement),
typeof(XDocumentType)
};
return types;
}
public class A
{
}
public class B : A
{
}
}
namespace DifferentNamespace
{
public class A { }
public class B : A { }
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Test.ModuleCore;
using Xunit;
namespace System.Xml.Linq.Tests
{
public class Annotations
{
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddStringAnnotation(XObject xo)
{
const string expected = "test string";
xo.AddAnnotation(expected);
ValidateAnnotations(xo, new string[] { expected });
Assert.Equal(expected, xo.Annotation<string>());
Assert.Equal(expected, (string)xo.Annotation(typeof(string)));
Assert.Equal(expected, xo.Annotation(typeof(object)));
Assert.Equal(expected, xo.Annotation<object>());
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddIntAnnotation(XObject xo)
{
const int expected = 123456;
xo.AddAnnotation(expected);
ValidateAnnotations(xo, new object[] { expected });
Assert.Equal(expected, xo.Annotation<object>());
Assert.Equal(expected, (int)xo.Annotation(typeof(int)));
Assert.Equal(expected, xo.Annotation(typeof(object)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddIntAndStringAnnotation(XObject xo)
{
const string expectedStr = "<!@@63784sgdh111>";
const int expectedNum = 123456;
xo.AddAnnotation(expectedStr);
xo.AddAnnotation(expectedNum);
ValidateAnnotations(xo, new object[] { expectedStr, expectedNum });
ValidateAnnotations(xo, new string[] { expectedStr });
Assert.Equal(expectedNum, (int)xo.Annotation(typeof(int)));
Assert.Equal(expectedStr, xo.Annotation<string>());
Assert.Equal(expectedStr, (string)xo.Annotation(typeof(string)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddRemoveGetAnnotation(XObject xo)
{
string str1 = "<!@@63784sgdh111>";
string str2 = "<!@@63784sgdh222>";
int num = 123456;
xo.AddAnnotation(str1);
xo.AddAnnotation(str2);
xo.AddAnnotation(num);
ValidateAnnotations(xo, new object[] { str1, str2, num });
ValidateAnnotations(xo, new string[] { str1, str2 });
xo.RemoveAnnotations<string>();
ValidateAnnotations(xo, new object[] { num });
xo.RemoveAnnotations(typeof(int));
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationWithoutAdding(XObject xo)
{
xo.RemoveAnnotations<string>();
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
xo.RemoveAnnotations(typeof(int));
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddIntRemoveStringGetIntAnnotation(XObject xo)
{
const int num = 123456;
xo.AddAnnotation(num);
xo.RemoveAnnotations<string>();
ValidateAnnotations(xo, new object[] { num });
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddMultipleStringAnnotations(XObject xo)
{
const string str1 = "<!@@63784sgdh111>";
const string str2 = "sdjverqjbe4 kjvweh342$$% ";
xo.AddAnnotation(str1);
xo.AddAnnotation(str2);
ValidateAnnotations(xo, new string[] { str1, str2 });
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationTwice(XObject xo)
{
xo.RemoveAnnotations<object>();
xo.RemoveAnnotations<object>();
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddGenericAnnotation(XObject xo)
{
Dictionary<string, string> d = new Dictionary<string, string>();
xo.AddAnnotation(d);
ValidateAnnotations(xo, new Dictionary<string, string>[] { d });
Assert.Equal(d, xo.Annotation<Dictionary<string, string>>());
Assert.Equal(d, (Dictionary<string, string>)xo.Annotation(typeof(Dictionary<string, string>)));
Assert.Equal(d, xo.Annotation<object>());
Assert.Equal(d, xo.Annotation(typeof(object)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveGenericAnnotation(XObject xo)
{
Dictionary<string, string> d = new Dictionary<string, string>();
xo.AddAnnotation(d);
xo.RemoveAnnotations<Dictionary<string, string>>();
Assert.Equal(expected: 0, actual: CountAnnotations<Dictionary<string, string>>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddInheritedAnnotation(XObject xo)
{
A a = new A();
B b = new B();
xo.AddAnnotation(a);
xo.AddAnnotation(b);
ValidateAnnotations(xo, new A[] { a, b });
ValidateAnnotations(xo, new B[] { b });
Assert.Equal(b, xo.Annotation<B>());
Assert.Equal(b, (B)xo.Annotation(typeof(B)));
Assert.Equal(a, xo.Annotation<A>());
Assert.Equal(a, (A)xo.Annotation(typeof(A)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveInheritedAnnotation(XObject xo)
{
A a = new A();
B b = new B();
xo.AddAnnotation(a);
xo.AddAnnotation(b);
xo.RemoveAnnotations<B>();
ValidateAnnotations(xo, new A[] { a });
Assert.Equal(a, xo.Annotation<A>());
Assert.Equal(a, (A)xo.Annotation(typeof(A)));
Assert.Equal(a, xo.Annotation<object>());
Assert.Equal(a, xo.Annotation(typeof(object)));
Assert.Equal(0, CountAnnotations<B>(xo));
xo.RemoveAnnotations(typeof(A));
Assert.Equal(0, CountAnnotations<A>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddNull(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("annotation", () => xo.AddAnnotation(null));
Assert.Null(xo.Annotation<object>());
AssertExtensions.Throws<ArgumentNullException>("annotation", () => xo.AddAnnotation(null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveNull(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.RemoveAnnotations(null));
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.RemoveAnnotations(null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void GetAllNull(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.Annotations(null));
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.Annotations(null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void GetOneNull(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.Annotation(null));
AssertExtensions.Throws<ArgumentNullException>("type", () => xo.Annotation(null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddNullString(XObject xo)
{
AssertExtensions.Throws<ArgumentNullException>("annotation", () => xo.AddAnnotation((string)null));
Assert.Null(xo.Annotation<object>());
AssertExtensions.Throws<ArgumentNullException>("annotation", () => xo.AddAnnotation((string)null));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddAnnotationWithSameClassNameButDifferentNamespace(XObject xo)
{
DifferentNamespace.A a1 = new DifferentNamespace.A();
A a2 = new A();
xo.AddAnnotation(a1);
xo.AddAnnotation(a2);
ValidateAnnotations(xo, new DifferentNamespace.A[] { a1 });
ValidateAnnotations(xo, new A[] { a2 });
Assert.Equal(a1, xo.Annotation<DifferentNamespace.A>());
Assert.Equal(a1, (DifferentNamespace.A)xo.Annotation(typeof(DifferentNamespace.A)));
Assert.Equal(a2, xo.Annotation<A>());
Assert.Equal(a2, (A)xo.Annotation(typeof(A)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationWithSameClassNameButDifferentNamespace(XObject xo)
{
DifferentNamespace.A a1 = new DifferentNamespace.A();
A a2 = new A();
xo.AddAnnotation(a1);
xo.AddAnnotation(a2);
xo.RemoveAnnotations<DifferentNamespace.A>();
Assert.Equal(expected: 0, actual: CountAnnotations<DifferentNamespace.A>(xo));
ValidateAnnotations<A>(xo, new A[] { a2 });
Assert.Equal(a2, xo.Annotation<A>());
Assert.Equal(a2, (A)xo.Annotation(typeof(A)));
xo.RemoveAnnotations(typeof(A));
Assert.Equal(expected: 0, actual: CountAnnotations<A>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationsOfDifferentTypesAndDifferentXObjects(XObject xo)
{
AddAnnotation(xo);
foreach (Type type in GetTypes())
{
RemoveAnnotations(xo, type);
}
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveTwiceAnnotationsOfDifferentTypesAndDifferentXObjects(XObject xo)
{
foreach (Type type in GetTypes())
{
RemoveAnnotations(xo, type);
}
foreach (Type type in GetTypes())
{
RemoveAnnotations(xo, type);
}
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddTwiceRemoveOnceAnnotationsOfDifferentTypesAndDifferentXObjects(XObject xo)
{
AddAnnotation(xo);
int count = CountAnnotations<object>(xo) * 2;
AddAnnotation(xo);
Assert.Equal(expected: count, actual: CountAnnotations<object>(xo));
foreach (Type type in GetTypes())
{
RemoveAnnotations(xo, type);
}
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Fact]
public void AddAnnotationAndClone()
{
// Add annotation to XElement, and clone this element to another subtree, get null annotation
const string expected = "element1111";
XElement element1 = new XElement("e", new XAttribute("a", "value"));
element1.AddAnnotation(expected);
XElement element2 = new XElement(element1);
ValidateAnnotations(element1, new string[] { expected });
Assert.Equal(expected, element1.Annotation<string>());
Assert.Equal(expected, element1.Annotation(typeof(string)));
Assert.Equal(0, CountAnnotations<string>(element2));
}
[Fact]
public void AddAnnotationXElementRemoveAndGet()
{
// Add annotation to XElement, and remove this element, get annotation
const string expected = "element1111";
XElement root = new XElement("root");
XElement element = new XElement("elem1");
root.Add(element);
element.AddAnnotation(expected);
element.Remove();
ValidateAnnotations(element, new string[] { expected });
Assert.Equal(expected, element.Annotation<string>());
Assert.Equal(expected, element.Annotation(typeof(string)));
}
[Fact]
public void AddAnnotationToParentAndChildAndValIdate()
{
// Add annotation to parent and child, valIdate annotations for each XObjects
string str1 = "root 1111";
string str2 = "element 1111";
XElement root = new XElement("root");
XElement element = new XElement("elem1");
root.Add(element);
root.AddAnnotation(str1);
element.AddAnnotation(str2);
ValidateAnnotations(root, new string[] { str1 });
Assert.Equal(str1, root.Annotation<string>());
Assert.Equal(str1, root.Annotation(typeof(string)));
ValidateAnnotations(element, new string[] { str2 });
Assert.Equal(str2, element.Annotation<string>());
Assert.Equal(str2, element.Annotation(typeof(string)));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void AddAnnotationsAndRemoveOfTypeObject(XObject xo)
{
AddAnnotation(xo);
RemoveAnnotations(xo, typeof(object));
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void EnumerateAnnotationsWithoutAdding(XObject xo)
{
Assert.Null(xo.Annotation(typeof(object)));
Assert.Null(xo.Annotation<object>());
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
Assert.Equal(expected: 0, actual: CountAnnotations<string>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveAnnotationsUsingTypeObject(XObject xo)
{
AddAnnotation(xo);
RemoveAnnotations<object>(xo);
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
[Theory]
[MemberData(nameof(GetXObjects))]
public void RemoveTwiceAnnotationsWithoutAddingUsingTypeObject(XObject xo)
{
RemoveAnnotations<object>(xo);
RemoveAnnotations<object>(xo);
Assert.Equal(expected: 0, actual: CountAnnotations<object>(xo));
}
//
// helpers
//
public static IEnumerable<object[]> GetXObjects()
{
yield return new object[] { new XDocument() };
yield return new object[] { new XAttribute("attr", "val") };
yield return new object[] { new XElement("elem1") };
yield return new object[] { new XText("text1") };
yield return new object[] { new XComment("comment1") };
yield return new object[] { new XProcessingInstruction("pi1", "pi1pi1pi1pi1pi1") };
yield return new object[] { new XCData("cdata cdata") };
yield return new object[] { new XDocumentType("dtd1", "dtd1dtd1dtd1", "dtd1dtd1", "dtd1dtd1dtd1dtd1") };
}
public static object[] GetObjects()
{
object[] aObject = new object[]
{
new A(), new B(), new DifferentNamespace.A(), new DifferentNamespace.B(), "stringstring", 12345,
new Dictionary<string, string>(), new XDocument(), new XAttribute("attr", "val"), new XElement("elem1"),
new XText("text1 text1"), new XComment("comment1 comment1"),
new XProcessingInstruction("pi1", "pi1pi1pi1pi1pi1"), new XCData("cdata cdata"),
new XDeclaration("234", "UTF-8", "yes"), XNamespace.Xmlns,
//new XStreamingElement("elementSequence"),
new XDocumentType("dtd1", "dtd1dtd1dtd1", "dtd1 dtd1", "dtd1 dtd1 dtd1 ")
};
return aObject;
}
private static void ValidateAnnotations<T>(XObject xo, T[] values) where T : class
{
//
// use inefficient n^2 algorithm, which is OK for our testing purposes
// assumes that all items are unique
//
int count = CountAnnotations<T>(xo);
TestLog.Compare(count, values.Length, "unexpected number of annotations");
foreach (T value in values)
{
//
// use non-generics enum first
//
bool found = false;
foreach (T annotation in xo.Annotations(typeof(T)))
{
if (annotation.Equals(value))
{
found = true;
break;
}
}
TestLog.Compare(found, "didn't find value using non-generic enumeration");
//
// now double check with generics one
//
found = false;
foreach (T annotation in xo.Annotations<T>())
{
if (annotation.Equals(value))
{
found = true;
break;
}
}
TestLog.Compare(found, "didn't find value using generic enumeration");
}
}
private static int CountAnnotations<T>(XObject xo) where T : class
{
int count = xo.Annotations(typeof(T)).Count();
Assert.Equal(count, xo.Annotations<T>().Count());
// Generics and non-generics annotations enumerations returned different number of objects
return count;
}
private static void AddAnnotation(XObject xo)
{
foreach (object o in GetObjects())
{
xo.AddAnnotation(o);
}
}
private static void RemoveAnnotations(XObject xo, Type type)
{
xo.RemoveAnnotations(type);
}
private static void RemoveAnnotations<T>(XObject xo) where T : class
{
xo.RemoveAnnotations<T>();
}
private static Type[] GetTypes()
{
Type[] types = new Type[]
{
typeof(string), typeof(int), typeof(Dictionary<string, string>), typeof(A), typeof(B),
typeof(DifferentNamespace.A), typeof(DifferentNamespace.B), typeof(XAttribute), typeof(XElement),
typeof(Extensions), typeof(XDocument), typeof(XText), typeof(XName), typeof(XComment),
typeof(XProcessingInstruction), typeof(XCData), typeof(XDeclaration), typeof(XNamespace),
//typeof(XStreamingElement),
typeof(XDocumentType)
};
return types;
}
public class A
{
}
public class B : A
{
}
}
namespace DifferentNamespace
{
public class A { }
public class B : A { }
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.Net.Security/src/System/Net/Security/SslConnectionInfo.Android.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Diagnostics;
using System.Security.Authentication;
namespace System.Net.Security
{
internal sealed partial class SslConnectionInfo
{
public SslConnectionInfo(SafeSslHandle sslContext)
{
string protocolString = Interop.AndroidCrypto.SSLStreamGetProtocol(sslContext);
SslProtocols protocol = protocolString switch
{
#pragma warning disable 0618 // 'SslProtocols.Ssl3' is obsolete
"SSLv3" => SslProtocols.Ssl3,
#pragma warning restore
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
"TLSv1" => SslProtocols.Tls,
"TLSv1.1" => SslProtocols.Tls11,
#pragma warning restore SYSLIB0039
"TLSv1.2" => SslProtocols.Tls12,
"TLSv1.3" => SslProtocols.Tls13,
_ => SslProtocols.None,
};
Protocol = (int)protocol;
// Enum value names should match the cipher suite name, so we just parse the
string cipherSuite = Interop.AndroidCrypto.SSLStreamGetCipherSuite(sslContext);
MapCipherSuite(Enum.Parse<TlsCipherSuite>(cipherSuite));
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Diagnostics;
using System.Security.Authentication;
namespace System.Net.Security
{
internal sealed partial class SslConnectionInfo
{
public SslConnectionInfo(SafeSslHandle sslContext)
{
string protocolString = Interop.AndroidCrypto.SSLStreamGetProtocol(sslContext);
SslProtocols protocol = protocolString switch
{
#pragma warning disable 0618 // 'SslProtocols.Ssl3' is obsolete
"SSLv3" => SslProtocols.Ssl3,
#pragma warning restore
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
"TLSv1" => SslProtocols.Tls,
"TLSv1.1" => SslProtocols.Tls11,
#pragma warning restore SYSLIB0039
"TLSv1.2" => SslProtocols.Tls12,
"TLSv1.3" => SslProtocols.Tls13,
_ => SslProtocols.None,
};
Protocol = (int)protocol;
// Enum value names should match the cipher suite name, so we just parse the
string cipherSuite = Interop.AndroidCrypto.SSLStreamGetCipherSuite(sslContext);
MapCipherSuite(Enum.Parse<TlsCipherSuite>(cipherSuite));
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/coreclr/pal/tests/palsuite/c_runtime/fabsf/test1/test1.cpp
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*=============================================================================
**
** Source: test1.c
**
** Purpose: Test to ensure that fabsf return the correct values
**
** Dependencies: PAL_Initialize
** PAL_Terminate
** Fail
**
**===========================================================================*/
#include <palsuite.h>
// binary32 (float) has a machine epsilon of 2^-23 (approx. 1.19e-07). However, this
// is slightly too accurate when writing tests meant to run against libm implementations
// for various platforms. 2^-21 (approx. 4.76e-07) seems to be as accurate as we can get.
//
// The tests themselves will take PAL_EPSILON and adjust it according to the expected result
// so that the delta used for comparison will compare the most significant digits and ignore
// any digits that are outside the double precision range (6-9 digits).
// For example, a test with an expect result in the format of 0.xxxxxxxxx will use PAL_EPSILON
// for the variance, while an expected result in the format of 0.0xxxxxxxxx will use
// PAL_EPSILON / 10 and and expected result in the format of x.xxxxxx will use PAL_EPSILON * 10.
#define PAL_EPSILON 4.76837158e-07
#define PAL_NAN sqrt(-1.0)
#define PAL_POSINF -log(0.0)
#define PAL_NEGINF log(0.0)
/**
* Helper test structure
*/
struct test
{
float value; /* value to test the function with */
float expected; /* expected result */
float variance; /* maximum delta between the expected and actual result */
};
/**
* fabsf_test1_validate
*
* test validation function
*/
void __cdecl fabsf_test1_validate(float value, float expected, float variance)
{
float result = fabsf(value);
/*
* The test is valid when the difference between result
* and expected is less than or equal to variance
*/
float delta = fabsf(result - expected);
if (delta > variance)
{
Fail("fabsf(%g) returned %10.9g when it should have returned %10.9g",
value, result, expected);
}
}
/**
* fabsf_test1_validate
*
* test validation function for values returning NaN
*/
void __cdecl fabsf_test1_validate_isnan(float value)
{
float result = fabsf(value);
if (!_isnan(result))
{
Fail("fabsf(%g) returned %10.9g when it should have returned %10.9g",
value, result, PAL_NAN);
}
}
/**
* main
*
* executable entry point
*/
PALTEST(c_runtime_fabsf_test1_paltest_fabsf_test1, "c_runtime/fabsf/test1/paltest_fabsf_test1")
{
struct test tests[] =
{
/* value expected variance */
{ PAL_NEGINF, PAL_POSINF, 0 },
{ -3.14159265f, 3.14159265f, PAL_EPSILON * 10 }, // value: -(pi) expected: pi
{ -2.71828183f, 2.71828183f, PAL_EPSILON * 10 }, // value: -(e) expected: e
{ -2.30258509f, 2.30258509f, PAL_EPSILON * 10 }, // value: -(ln(10)) expected: ln(10)
{ -1.57079633f, 1.57079633f, PAL_EPSILON * 10 }, // value: -(pi / 2) expected: pi / 2
{ -1.44269504f, 1.44269504f, PAL_EPSILON * 10 }, // value: -(log2(e)) expected: log2(e)
{ -1.41421356f, 1.41421356f, PAL_EPSILON * 10 }, // value: -(sqrt(2)) expected: sqrt(2)
{ -1.12837917f, 1.12837917f, PAL_EPSILON * 10 }, // value: -(2 / sqrt(pi)) expected: 2 / sqrt(pi)
{ -1, 1, PAL_EPSILON * 10 },
{ -0.785398163f, 0.785398163f, PAL_EPSILON }, // value: -(pi / 4) expected: pi / 4
{ -0.707106781f, 0.707106781f, PAL_EPSILON }, // value: -(1 / sqrt(2)) expected: 1 / sqrt(2)
{ -0.693147181f, 0.693147181f, PAL_EPSILON }, // value: -(ln(2)) expected: ln(2)
{ -0.636619772f, 0.636619772f, PAL_EPSILON }, // value: -(2 / pi) expected: 2 / pi
{ -0.434294482f, 0.434294482f, PAL_EPSILON }, // value: -(log10(e)) expected: log10(e)
{ -0.318309886f, 0.318309886f, PAL_EPSILON }, // value: -(1 / pi) expected: 1 / pi
{ -0.0f, 0, PAL_EPSILON },
};
// PAL initialization
if (PAL_Initialize(argc, argv) != 0)
{
return FAIL;
}
for (int i = 0; i < (sizeof(tests) / sizeof(struct test)); i++)
{
fabsf_test1_validate( tests[i].value, tests[i].expected, tests[i].variance);
fabsf_test1_validate(-tests[i].value, tests[i].expected, tests[i].variance);
}
fabsf_test1_validate_isnan(PAL_NAN);
PAL_Terminate();
return PASS;
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*=============================================================================
**
** Source: test1.c
**
** Purpose: Test to ensure that fabsf return the correct values
**
** Dependencies: PAL_Initialize
** PAL_Terminate
** Fail
**
**===========================================================================*/
#include <palsuite.h>
// binary32 (float) has a machine epsilon of 2^-23 (approx. 1.19e-07). However, this
// is slightly too accurate when writing tests meant to run against libm implementations
// for various platforms. 2^-21 (approx. 4.76e-07) seems to be as accurate as we can get.
//
// The tests themselves will take PAL_EPSILON and adjust it according to the expected result
// so that the delta used for comparison will compare the most significant digits and ignore
// any digits that are outside the double precision range (6-9 digits).
// For example, a test with an expect result in the format of 0.xxxxxxxxx will use PAL_EPSILON
// for the variance, while an expected result in the format of 0.0xxxxxxxxx will use
// PAL_EPSILON / 10 and and expected result in the format of x.xxxxxx will use PAL_EPSILON * 10.
#define PAL_EPSILON 4.76837158e-07
#define PAL_NAN sqrt(-1.0)
#define PAL_POSINF -log(0.0)
#define PAL_NEGINF log(0.0)
/**
* Helper test structure
*/
struct test
{
float value; /* value to test the function with */
float expected; /* expected result */
float variance; /* maximum delta between the expected and actual result */
};
/**
* fabsf_test1_validate
*
* test validation function
*/
void __cdecl fabsf_test1_validate(float value, float expected, float variance)
{
float result = fabsf(value);
/*
* The test is valid when the difference between result
* and expected is less than or equal to variance
*/
float delta = fabsf(result - expected);
if (delta > variance)
{
Fail("fabsf(%g) returned %10.9g when it should have returned %10.9g",
value, result, expected);
}
}
/**
* fabsf_test1_validate
*
* test validation function for values returning NaN
*/
void __cdecl fabsf_test1_validate_isnan(float value)
{
float result = fabsf(value);
if (!_isnan(result))
{
Fail("fabsf(%g) returned %10.9g when it should have returned %10.9g",
value, result, PAL_NAN);
}
}
/**
* main
*
* executable entry point
*/
PALTEST(c_runtime_fabsf_test1_paltest_fabsf_test1, "c_runtime/fabsf/test1/paltest_fabsf_test1")
{
struct test tests[] =
{
/* value expected variance */
{ PAL_NEGINF, PAL_POSINF, 0 },
{ -3.14159265f, 3.14159265f, PAL_EPSILON * 10 }, // value: -(pi) expected: pi
{ -2.71828183f, 2.71828183f, PAL_EPSILON * 10 }, // value: -(e) expected: e
{ -2.30258509f, 2.30258509f, PAL_EPSILON * 10 }, // value: -(ln(10)) expected: ln(10)
{ -1.57079633f, 1.57079633f, PAL_EPSILON * 10 }, // value: -(pi / 2) expected: pi / 2
{ -1.44269504f, 1.44269504f, PAL_EPSILON * 10 }, // value: -(log2(e)) expected: log2(e)
{ -1.41421356f, 1.41421356f, PAL_EPSILON * 10 }, // value: -(sqrt(2)) expected: sqrt(2)
{ -1.12837917f, 1.12837917f, PAL_EPSILON * 10 }, // value: -(2 / sqrt(pi)) expected: 2 / sqrt(pi)
{ -1, 1, PAL_EPSILON * 10 },
{ -0.785398163f, 0.785398163f, PAL_EPSILON }, // value: -(pi / 4) expected: pi / 4
{ -0.707106781f, 0.707106781f, PAL_EPSILON }, // value: -(1 / sqrt(2)) expected: 1 / sqrt(2)
{ -0.693147181f, 0.693147181f, PAL_EPSILON }, // value: -(ln(2)) expected: ln(2)
{ -0.636619772f, 0.636619772f, PAL_EPSILON }, // value: -(2 / pi) expected: 2 / pi
{ -0.434294482f, 0.434294482f, PAL_EPSILON }, // value: -(log10(e)) expected: log10(e)
{ -0.318309886f, 0.318309886f, PAL_EPSILON }, // value: -(1 / pi) expected: 1 / pi
{ -0.0f, 0, PAL_EPSILON },
};
// PAL initialization
if (PAL_Initialize(argc, argv) != 0)
{
return FAIL;
}
for (int i = 0; i < (sizeof(tests) / sizeof(struct test)); i++)
{
fabsf_test1_validate( tests[i].value, tests[i].expected, tests[i].variance);
fabsf_test1_validate(-tests[i].value, tests[i].expected, tests[i].variance);
}
fabsf_test1_validate_isnan(PAL_NAN);
PAL_Terminate();
return PASS;
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/tests/JIT/HardwareIntrinsics/X86/X86Base/Pause.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
namespace IntelHardwareIntrinsicTest
{
class Program
{
const int Pass = 100;
const int Fail = 0;
static unsafe int Main(string[] args)
{
int testResult = X86Base.IsSupported ? Pass : Fail;
try
{
X86Base.Pause();
}
catch (Exception e)
{
testResult = (X86Base.IsSupported || (e is not PlatformNotSupportedException)) ? Fail : Pass;
}
return testResult;
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
namespace IntelHardwareIntrinsicTest
{
class Program
{
const int Pass = 100;
const int Fail = 0;
static unsafe int Main(string[] args)
{
int testResult = X86Base.IsSupported ? Pass : Fail;
try
{
X86Base.Pause();
}
catch (Exception e)
{
testResult = (X86Base.IsSupported || (e is not PlatformNotSupportedException)) ? Fail : Pass;
}
return testResult;
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationFailureCollection.cs
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections;
using System.Runtime.InteropServices;
namespace System.DirectoryServices.ActiveDirectory
{
public class ReplicationFailureCollection : ReadOnlyCollectionBase
{
private readonly DirectoryServer _server;
private readonly Hashtable _nameTable;
internal ReplicationFailureCollection(DirectoryServer server)
{
_server = server;
Hashtable tempNameTable = new Hashtable();
_nameTable = Hashtable.Synchronized(tempNameTable);
}
public ReplicationFailure this[int index] => (ReplicationFailure)InnerList[index]!;
public bool Contains(ReplicationFailure failure)
{
if (failure == null)
throw new ArgumentNullException(nameof(failure));
return InnerList.Contains(failure);
}
public int IndexOf(ReplicationFailure failure)
{
if (failure == null)
throw new ArgumentNullException(nameof(failure));
return InnerList.IndexOf(failure);
}
public void CopyTo(ReplicationFailure[] failures, int index)
{
InnerList.CopyTo(failures, index);
}
private int Add(ReplicationFailure failure) => InnerList.Add(failure);
internal void AddHelper(DS_REPL_KCC_DSA_FAILURES failures, IntPtr info)
{
// get the count
int count = failures.cNumEntries;
IntPtr addr = (IntPtr)0;
for (int i = 0; i < count; i++)
{
addr = IntPtr.Add(info, sizeof(int) * 2 + i * Marshal.SizeOf(typeof(DS_REPL_KCC_DSA_FAILURE)));
ReplicationFailure managedFailure = new ReplicationFailure(addr, _server, _nameTable);
// in certain scenario, KCC returns some failure records that we need to process it first before returning
if (managedFailure.LastErrorCode == 0)
{
// we change the error code to some generic one
managedFailure.lastResult = ExceptionHelper.ERROR_DS_UNKNOWN_ERROR;
}
Add(managedFailure);
}
}
}
}
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections;
using System.Runtime.InteropServices;
namespace System.DirectoryServices.ActiveDirectory
{
public class ReplicationFailureCollection : ReadOnlyCollectionBase
{
private readonly DirectoryServer _server;
private readonly Hashtable _nameTable;
internal ReplicationFailureCollection(DirectoryServer server)
{
_server = server;
Hashtable tempNameTable = new Hashtable();
_nameTable = Hashtable.Synchronized(tempNameTable);
}
public ReplicationFailure this[int index] => (ReplicationFailure)InnerList[index]!;
public bool Contains(ReplicationFailure failure)
{
if (failure == null)
throw new ArgumentNullException(nameof(failure));
return InnerList.Contains(failure);
}
public int IndexOf(ReplicationFailure failure)
{
if (failure == null)
throw new ArgumentNullException(nameof(failure));
return InnerList.IndexOf(failure);
}
public void CopyTo(ReplicationFailure[] failures, int index)
{
InnerList.CopyTo(failures, index);
}
private int Add(ReplicationFailure failure) => InnerList.Add(failure);
internal void AddHelper(DS_REPL_KCC_DSA_FAILURES failures, IntPtr info)
{
// get the count
int count = failures.cNumEntries;
IntPtr addr = (IntPtr)0;
for (int i = 0; i < count; i++)
{
addr = IntPtr.Add(info, sizeof(int) * 2 + i * Marshal.SizeOf(typeof(DS_REPL_KCC_DSA_FAILURE)));
ReplicationFailure managedFailure = new ReplicationFailure(addr, _server, _nameTable);
// in certain scenario, KCC returns some failure records that we need to process it first before returning
if (managedFailure.LastErrorCode == 0)
{
// we change the error code to some generic one
managedFailure.lastResult = ExceptionHelper.ERROR_DS_UNKNOWN_ERROR;
}
Add(managedFailure);
}
}
}
}
| -1 |
dotnet/runtime
| 66,432 |
Overhaul how regex generated code is structured
|
Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
stephentoub
| 2022-03-10T04:10:24Z | 2022-03-10T23:42:20Z |
458524aa752f6841db44bd4443ccc3f3863e0a4e
|
3fc949bc10a83c8b62c8938ba2ae09b6ceb8169d
|
Overhaul how regex generated code is structured. Fixes https://github.com/dotnet/runtime/issues/63502
Fixes https://github.com/dotnet/runtime/issues/63512
For every regex, we currently emit a private type next to the partial member we're implementing, and that private type contains all the code for the regex, including all the helpers it needs. There are multiple issues with this:
- We're emitting a lot of duplicated code into an assembly that has multiple/many uses of [RegexGenerator(...)]. System.Private.Xml has ~10 uses of it now and it has ~1000 lines of unnecessarily duplicative code being generated.
- We have to global::-qualify all uses of types we rely on in the implementation, because C# binding rules would otherwise bind to things declared inside the user's partial type we're generating into. This is particularly bad for extension methods, which we then can't use as extensions, and we make heavy use of MemoryExtensions throughout the generated code for all of our interactions with spans.
- We could avoid the code duplication by putting all the helpers into a shared utilities type, but then that type would need to be internal and would effectively be shipping surface area we don't want to ship.
- Code inside that user's type can see the private type we're emitting, and EditorBrowsable doesn't currently help (https://github.com/dotnet/roslyn/issues/60080).
With this PR, we instead move all of the types into a separate namespace and parent class, which then enables a) having usings inside the namespace declaration so that we can avoid fully-qualifying everything and b) separating out all of the helper methods into a class that's then private to the parent wrapper class, shielding it from the rest of the assembly.
Hopefully C# 11 will see a solution to https://github.com/dotnet/csharplang/issues/5529, at which point we can use that to hide all of the separated out generated code other than the partial method definitions (with the changes in this PR, doing so should involve minimal tweaks to the code generation). Until then, we still have a similar problem as we do today for the generated Regex-derived types being visible to other code in the assembly, but at least the shared helpers aren't.
cc: @joperezr, @chsienki
|
./src/mono/dlls/mscordbi/cordb-blocking-obj.h
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// File: CORDB-BLOCKING-OBJ.H
//
#ifndef __MONO_DEBUGGER_CORDB_BLOCKING_OBJ_H__
#define __MONO_DEBUGGER_CORDB_BLOCKING_OBJ_H__
#include <cordb.h>
class CordbBlockingObjectEnum : public CordbBaseMono, public ICorDebugBlockingObjectEnum
{
public:
CordbBlockingObjectEnum(Connection* conn);
ULONG STDMETHODCALLTYPE AddRef(void)
{
return (BaseAddRef());
}
ULONG STDMETHODCALLTYPE Release(void)
{
return (BaseRelease());
}
const char* GetClassName()
{
return "CordbBlockingObjectEnum";
}
HRESULT STDMETHODCALLTYPE Next(ULONG celt, CorDebugBlockingObject values[], ULONG* pceltFetched);
HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
HRESULT STDMETHODCALLTYPE Reset(void);
HRESULT STDMETHODCALLTYPE Clone(ICorDebugEnum** ppEnum);
HRESULT STDMETHODCALLTYPE GetCount(ULONG* pcelt);
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
};
#endif
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// File: CORDB-BLOCKING-OBJ.H
//
#ifndef __MONO_DEBUGGER_CORDB_BLOCKING_OBJ_H__
#define __MONO_DEBUGGER_CORDB_BLOCKING_OBJ_H__
#include <cordb.h>
class CordbBlockingObjectEnum : public CordbBaseMono, public ICorDebugBlockingObjectEnum
{
public:
CordbBlockingObjectEnum(Connection* conn);
ULONG STDMETHODCALLTYPE AddRef(void)
{
return (BaseAddRef());
}
ULONG STDMETHODCALLTYPE Release(void)
{
return (BaseRelease());
}
const char* GetClassName()
{
return "CordbBlockingObjectEnum";
}
HRESULT STDMETHODCALLTYPE Next(ULONG celt, CorDebugBlockingObject values[], ULONG* pceltFetched);
HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
HRESULT STDMETHODCALLTYPE Reset(void);
HRESULT STDMETHODCALLTYPE Clone(ICorDebugEnum** ppEnum);
HRESULT STDMETHODCALLTYPE GetCount(ULONG* pcelt);
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
};
#endif
| -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.