public (bool, long) MajorRecordHeaderGetStream() { var meta = frame.GetMajorRecord(); if (meta.RecordType != type) { return(false, -1); } return(true, meta.ContentLength); }
static bool ParseTemporaryOutliers(MutagenFrame frame, ICellInternal obj) { var majorMeta = frame.GetMajorRecord(); var nextHeader = majorMeta.RecordType; if (nextHeader.Equals(RecordTypes.PGRD)) { obj.PathGrid = PathGrid.CreateFromBinary( frame.SpawnWithLength(majorMeta.TotalLength), translationParams: null); return(true); } else if (nextHeader.Equals(RecordTypes.LAND)) { obj.Landscape = Landscape.CreateFromBinary( frame.SpawnWithLength(majorMeta.TotalLength), translationParams: null); return(true); } return(false); }
static bool ParseTemporaryOutliers(MutagenFrame frame, ICellInternal obj) { var majorMeta = frame.GetMajorRecord(); var nextHeader = majorMeta.RecordType; if (nextHeader.Equals(RecordTypes.NAVM)) { if (frame.MetaData.InWorldspace) { obj.NavigationMeshes.Add( WorldspaceNavigationMesh.CreateFromBinary( frame.SpawnWithLength(majorMeta.TotalLength), recordTypeConverter: null)); } else { obj.NavigationMeshes.Add( CellNavigationMesh.CreateFromBinary( frame.SpawnWithLength(majorMeta.TotalLength), recordTypeConverter: null)); } return(true); } else if (nextHeader.Equals(RecordTypes.LAND)) { if (obj.Landscape != null) { throw new ArgumentException("Had more than one landscape"); } obj.Landscape = Landscape.CreateFromBinary( frame.SpawnWithLength(majorMeta.TotalLength), recordTypeConverter: null); return(true); } return(false); }