internal static void SetMetadataContext <TAssemblyContext>( this DkmClrAppDomain appDomain, MetadataContext <TAssemblyContext> context, bool report ) where TAssemblyContext : struct { if (report) { var process = appDomain.Process; var message = DkmUserMessage.Create( process.Connection, process, DkmUserMessageOutputKind.UnfilteredOutputWindowMessage, $"EE: AppDomain {appDomain.Id}, blocks {context.MetadataBlocks.Length}, contexts {context.AssemblyContexts.Count}" + Environment.NewLine, MessageBoxFlags.MB_OK, 0 ); message.Post(); } appDomain.SetDataItem( DkmDataCreationDisposition.CreateAlways, new MetadataContextItem <MetadataContext <TAssemblyContext> >(context) ); }
internal static bool HaveNotChanged(this ImmutableArray <MetadataBlock> metadataBlocks, MetadataContext previous) { return((previous != null) && metadataBlocks.SequenceEqual(previous.MetadataBlocks)); }