Example #1
0
		/// <summary>
		///     Initializes a new instance of the <see cref="DataBlockBuilder" /> class.
		/// </summary>
		/// <param name="reader">The stream to read from.</param>
		/// <param name="tag">The tag to load data blocks for.</param>
		/// <param name="cacheFile">The cache file.</param>
		/// <param name="buildInfo">The build info for the cache file.</param>
		public DataBlockBuilder(IReader reader, ITag tag, ICacheFile cacheFile, EngineDescription buildInfo)
		{
			_reader = reader;
			_tag = tag;
			_cacheFile = cacheFile;
			_languageCache = new CachedLanguagePackLoader(_cacheFile.Languages);
			_tagRefLayout = buildInfo.Layouts.GetLayout("tag reference");
			_tagBlockLayout = buildInfo.Layouts.GetLayout("tag block");
			_dataRefLayout = buildInfo.Layouts.GetLayout("data reference");

			DataBlocks = new List<DataBlock>();
			ReferencedTags = new HashSet<DatumIndex>();
			ReferencedResources = new HashSet<DatumIndex>();
		}
		public TagContainerInjector(ICacheFile cacheFile, TagContainer container)
		{
			_cacheFile = cacheFile;
			_languageCache = new CachedLanguagePackLoader(cacheFile.Languages);
			_container = container;
		}