public string GetInternalGroupName(ModelGroup modelGroup) { int internalNameOffset = (int) modelGroup.GetInternalNameOffset(); if (this.GroupNames.ContainsKey(internalNameOffset)) { return this.GroupNames[internalNameOffset]; } return null; }
public bool ContainsGroup(ModelGroup modelGroup) { bool containsGroupName = this.GroupNames.GroupNames.Count(kvp => kvp.Key == modelGroup.GetInternalNameOffset()) > 0; bool containsDescriptiveGroupName = this.GroupNames.GroupNames.Count(kvp => kvp.Key == modelGroup.GetInternalDescriptiveNameOffset()) > 0; // sometimes, model groups don't contain a descriptive name. if (modelGroup.GetInternalDescriptiveNameOffset() > 0) { return containsGroupName && containsDescriptiveGroupName; } return containsGroupName; }