예제 #1
0
        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));
        }
예제 #2
0
파일: SwContext.cs 프로젝트: bopohaa/Sw
 public SwContext(SwContextMeta meta)
 {
     _meta            = meta;
     _exportInstances = new object[_meta.ExportCnt];
 }