/// <summary> /// Construct a GroupSerializable object from a Group object. /// </summary> /// <param name="group">The Group object being serialized.</param> public GroupSerializable(Group group) { if (this.InRecommendedGroup(group.GroupName)) { this.type = "named"; this.name = group.GroupName; this.sgDesc = null; } else if (group.Type == GroupType.ECC) { this.type = "ec"; this.name = null; this.sgDesc = null; } else if (group.Type == GroupType.Subgroup) { this.type = "sg"; this.sgDesc = new SubgroupGroupSerializable((SubgroupGroup)group); this.name = null; } else { throw new UProveSerializationException("Invalid GroupConstruction"); } return; }