本文整理汇总了C#中HaloMap.Meta.Meta.WriteReferences方法的典型用法代码示例。如果您正苦于以下问题:C# Meta.WriteReferences方法的具体用法?C# Meta.WriteReferences怎么用?C# Meta.WriteReferences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HaloMap.Meta.Meta
的用法示例。
在下文中一共展示了Meta.WriteReferences方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildMeta
/// <summary>
/// The build meta.
/// </summary>
/// <param name="metasplit">The metasplit.</param>
/// <param name="map">The map.</param>
/// <returns></returns>
/// <remarks></remarks>
public static Meta BuildMeta(MetaSplitter metasplit, Map map)
{
metasize = 0;
MetaStream = new MemoryStream(metasplit.Header.chunksize);
BinaryWriter BW = new BinaryWriter(MetaStream);
// BW.BaseStream.Position = 0;
// BW.Write(metasplit.Header.MS.ToArray(), 0, metasplit.Header.chunksize);
metasize += metasplit.Header.chunksize;
TagIndex = metasplit.TagIndex;
Meta m = new Meta(map);
List<Meta.Item> NewItems = new List<Meta.Item>();
// Major error here! Size is not calculated right!
RecursivelyAddPiecesToMeta(metasplit.Header, ref NewItems, ref BW);
m.items = NewItems;
if (MetaStream.Length % 4 != 0)
{
metasize += (int)MetaStream.Length % 4;
MetaStream.SetLength(MetaStream.Length + MetaStream.Length % 4);
}
m.MS = MetaStream;
m.size = metasize;
m.type = metasplit.type;
m.name = metasplit.name;
m.rawType = metasplit.rawtype;
m.raw = metasplit.raw;
m.magic = metasplit.magic;
m.offset = metasplit.offset;
m.TagIndex = TagIndex;
m.RelinkReferences();
m.WriteReferences();
// m.items.Clear();
// MetaScanner Ms = new MetaScanner();
if (m.rawType != RawDataContainerType.Empty)
{
map.OpenMap(MapTypes.Internal);
m.raw = map.Functions.ForMeta.ReadRaw(m.TagIndex, false);
map.CloseMap();
}
// map.OpenMap(MapTypes.Internal);
// IFPIO ifp=IFP.IFPHashMap.GetIfp(m.type);
// m.parsed = true;
// Ms.ScanWithIFP(ref ifp, ref m, map) ;
// map.CloseMap();
return m;
}