public static async Task<ISelfAssemblingPlan> CreateSelfAssemblingAsync(StandardLibraryPreference stdPreference, CancellationToken token) { var plan = new SelfAssemblingPlan(); if (stdPreference == StandardLibraryPreference.Default) { // Provide modules that the standard library may be composed of. No dependency checking. await Task.WhenAll(_stdLibModules.Select(s => plan.RegisterModule(Source.FromString(s), token))); // Describe standard library. Dependencies must be satisfied var stdlib = await plan.AssembleAsync(Source.FromString(Resources.sys), token); plan.StandardLibrary.Add(stdlib.Name); } return plan; }
public static ISelfAssemblingPlan CreateSelfAssembling(StandardLibraryPreference stdPreference) { return CreateSelfAssemblingAsync(stdPreference, CancellationToken.None).Result; }