bool TryGetBlobGroup(GroupTagDatum groupTag, int version, ref BlobGroup group, ref BlobGroupVersionAndBuildInfo infoForVersion) { if (groupTag != null) { var group_candidate = Groups[groupTag]; if (group_candidate.VersionAndBuildMap.TryGetValue(version, out infoForVersion)) { group = group_candidate; return(true); } } return(false); }
internal static void SerializeGroupsKey <TDoc, TCursor>(IO.TagElementStream <TDoc, TCursor, string> s, BlobSystem system, ref GroupTagDatum groupTag) where TDoc : class where TCursor : class { var tag_string = s.IsReading ? null : groupTag.TagString; s.StreamAttribute("tag", ref tag_string); if (s.IsReading) { groupTag = (GroupTagDatum)system.GroupTags.FindGroupByTag(tag_string); if (groupTag == null) { s.ThrowReadException(new KeyNotFoundException(string.Format( "The tag '{0}' isn't defined in this system", tag_string))); } } }
public BlobGroup() { mGroupTag = GroupTagDatum.Null; mKnownAs = WellKnownBlob.NotWellKnown; mVersionAndBuildMap = new Dictionary <int, BlobGroupVersionAndBuildInfo>(); }