Example #1
0
        internal static bool Load(string modelSystem, XTMFRuntime runtime, out ModelSystem?ms, ref string?error)
        {
            using var stream = new MemoryStream(Encoding.Unicode.GetBytes(modelSystem));
            var header = ModelSystemHeader.CreateRunHeader(runtime);

            ms = Load(stream, runtime.Modules, header, ref error);
            return(ms != null);
        }
Example #2
0
 /// <summary>
 /// Generate the concrete model system for execution.
 /// </summary>
 /// <param name="runtime">The XTMF run time that we are executing within.</param>
 /// <param name="error">An error message if it can not be constructed.</param>
 /// <returns>True if it was created, false with message otherwise.</returns>
 internal bool Construct(XTMFRuntime runtime, ref string?error)
 {
     return(GlobalBoundary.ConstructModules(runtime, ref error) &&
            GlobalBoundary.ConstructLinks(ref error));
 }