Exemplo n.º 1
0
 public SegmentRange <int> GetCharactersLocationRange(SegmentRange <int> locationRange)
 {
     return(new SegmentRange <int>(
                locationRange.Start == 0 ? 0 :
                mCharacterPostLocation[locationRange.Start - 1],
                mCharacterPostLocation[locationRange.End]));
 }
Exemplo n.º 2
0
        public Asset CreateIndependentAsset(string path, string name, SegmentRange <int> range, List <Asset> dependentAssets)
        {
            //create independent asset(without reference count)
            //we do not have any reference count for independent asset
            System.IO.FileStream file = new System.IO.FileStream(path + "/" + name, System.IO.FileMode.Open);

            byte[] bytes = new byte[range.End - range.Start + 1];

            file.Read(bytes, range.Start, bytes.Length);

            return(mAssetDescriptions[name].CreateIndependentAsset(bytes, dependentAssets));
        }
Exemplo n.º 3
0
        public Asset CreateIndependentAsset(AssetDescription description, SegmentRange <int> range)
        {
            //for independent asset, we wiil search the dependent assets
            //and we will destory the dependent assets after we create independent asset
            var dependentAssets = SearchDependentAssets(mNodes[description]);

            var result = description.Package.CreateIndependentAsset(description.Name, range, dependentAssets);

            foreach (var dependentAsset in dependentAssets)
            {
                DestoryAsset(dependentAsset);
            }
            return(result);
        }
Exemplo n.º 4
0
 public Asset CreateIndependentAsset(AssetDescription description, SegmentRange <int> range)
 {
     return(mAssetGraph.CreateIndependentAsset(description, range));
 }
Exemplo n.º 5
0
 internal Asset CreateIndependentAsset(string name, SegmentRange <int> range, List <Asset> dependentAssets)
 {
     return(mPackageComponent.CreateIndependentAsset(FullPath, name, range, dependentAssets));
 }