internal static DkmCompiledClrInspectionQuery ToQueryResult( this CompileResult compResult, DkmCompilerId languageId, ResultProperties resultProperties, DkmClrRuntimeInstance runtimeInstance) { if (compResult == null) { return(null); } Debug.Assert(compResult.Assembly != null); Debug.Assert(compResult.TypeName != null); Debug.Assert(compResult.MethodName != null); ReadOnlyCollection <byte> customTypeInfo; Guid customTypeInfoId = compResult.GetCustomTypeInfo(out customTypeInfo); return(DkmCompiledClrInspectionQuery.Create( runtimeInstance, Binary: new ReadOnlyCollection <byte>(compResult.Assembly), DataContainer: null, LanguageId: languageId, TypeName: compResult.TypeName, MethodName: compResult.MethodName, FormatSpecifiers: compResult.FormatSpecifiers, CompilationFlags: resultProperties.Flags, ResultCategory: resultProperties.Category, Access: resultProperties.AccessType, StorageType: resultProperties.StorageType, TypeModifierFlags: resultProperties.ModifierFlags, CustomTypeInfo: customTypeInfo.ToCustomTypeInfo(customTypeInfoId))); }
private static void VerifyCustomTypeInfo(CompileResult compileResult, params byte[] expectedBytes) { VerifyCustomTypeInfo(compileResult.GetCustomTypeInfo(), expectedBytes); }
private static void VerifyCustomTypeInfo(CompileResult compileResult, params byte[] expectedBytes) { ReadOnlyCollection<byte> customTypeInfo; Guid customTypeInfoId = compileResult.GetCustomTypeInfo(out customTypeInfo); VerifyCustomTypeInfo(customTypeInfoId, customTypeInfo, expectedBytes); }