public UnrealHost()

in src/dotnet/RiderPlugin.UnrealLink/UnrealHost.cs [25:44]


        public UnrealHost(Lifetime lifetime, ISolution solution, IShellLocks locks, ICppUE4SolutionDetector solutionDetector)
        {
            myIsInTests = locks.Dispatcher.IsAsyncBehaviorProhibited;
            if (myIsInTests)
                return;

            myLifetime = lifetime;   
            myModel = solution.GetProtocolSolution().GetRdRiderModel();
            solutionDetector.IsUnrealSolution.Change.Advise_HasNew(myLifetime, args =>
            {
                myModel.IsUnrealEngineSolution.Set(args.New);
                myModel.IsUproject.Set(args.New && solutionDetector.SupportRiderProjectModel == CppUE4ProjectModelSupportMode.UprojectOpened);
                myModel.IsPreBuiltEngine.Set(args.New && !solutionDetector.UnrealContext.Value.IsBuiltFromSource);
            });
            
            if (myModel.TryGetProto() is {} protocol)
            {
                UE4Library.RegisterDeclaredTypesSerializers(protocol.Serializers);
            }
        }