public SwContext Build() { if (_instances.Count == 0) { throw new InvalidOperationException("Is not a created"); } if (_contextmeta.IsEmpty) { _contextmeta = new SwContextMeta(_entrypoints.ToArray(), _instances.ToArray(), _exportIndex.ToArray(), _importIndex.ToArray(), _executeList.ToArray(), _exportCnt); } return(new SwContext(_contextmeta)); }
public SwContext(SwContextMeta meta) { _meta = meta; _exportInstances = new object[_meta.ExportCnt]; }