<commit_before>﻿//-----------------------------------------------------------------------
// <copyright file="CustomAssemblyLoadContext.cs" company="NSwag">
//     Copyright (c) <NAME>. All rights reserved.
// </copyright>
// <license>https://github.com/RicoSuter/NSwag/blob/master/LICENSE.md</license>
// <author><NAME>, <EMAIL></author>
//-----------------------------------------------------------------------

#if !NET451

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.Loader;
using NJsonSchema.Infrastructure;
using NSwag.AssemblyLoader.Utilities;

namespace NSwag.AssemblyLoader
{
    public class CustomAssemblyLoadContext : AssemblyLoadContext
    {
        private readonly HashSet<string> _assembliesLoadedByAssemblyName = new HashSet<string>();
        private bool _isResolving = false;

        internal Dictionary<string, Assembly> Assemblies { get; } = new Dictionary<string, Assembly>();

        internal List<string> AllReferencePaths { get; set; }<commit_msg>Fixed potential NullReferenceException due to a race condition (#3015)<commit_after>﻿//-----------------------------------------------------------------------
// <copyright file="CustomAssemblyLoadContext.cs" company="NSwag">
//     Copyright (c) <NAME>. All rights reserved.
// </copyright>
// <license>https://github.com/RicoSuter/NSwag/blob/master/LICENSE.md</license>
// <author><NAME>, <EMAIL></author>
//-----------------------------------------------------------------------

#if !NET451

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.Loader;
using NJsonSchema.Infrastructure;
using NSwag.AssemblyLoader.Utilities;

namespace NSwag.AssemblyLoader
{
    public class CustomAssemblyLoadContext : AssemblyLoadContext
    {
        private readonly HashSet<string> _assembliesLoadedByAssemblyName = new HashSet<string>();
        private bool _isResolving = false;

        internal Dictionary<string, Assembly> Assemblies { get; } = new Dictionary<string, Assembly>();

        internal List<string> AllReferencePaths { get; set; } = new List<string>();
{'fraction_non_alphanumeric': 0.2350022552999549, 'fraction_numerical': 0.0045105999097880016, 'mean_word_length': 2.5431309904153356, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2647673', 'n_tokens_mistral': 555, 'n_tokens_neox': 546, 'n_words': 132}