public EnumeratedRepresentation(RepresentationSystemRepresentationsEnumeratedRepresentation enumeratedRepresentation, CultureInfo culture) : base(enumeratedRepresentation.domainID, enumeratedRepresentation.domainTag) { EnumerationMembers = GetEnumerationMembers(enumeratedRepresentation); var name = GetName(enumeratedRepresentation.Name, culture); Name = name != null ? name.Value : null; Description = name != null ? name.description : null; }
private static RepresentationCollection<EnumerationMember> GetEnumerationMembers(RepresentationSystemRepresentationsEnumeratedRepresentation enumeratedRepresentation) { if (enumeratedRepresentation.Items == null) { return new RepresentationCollection<EnumerationMember>(); } var enumerationMembers = enumeratedRepresentation.Items .OfType<RepresentationSystemRepresentationsEnumeratedRepresentationEnumeratedMember>() .Select(d => new EnumerationMember(d)); return new RepresentationCollection<EnumerationMember>(enumerationMembers); }
public EnumeratedRepresentation(RepresentationSystemRepresentationsEnumeratedRepresentation enumeratedRepresentation) : this(enumeratedRepresentation, CultureInfo.CurrentUICulture) { }