Пример #1
0
        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;
        }
Пример #2
0
        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;
            if (enumeratedRepresentation.RelatedDDI != null)
            {
                Ddi = enumeratedRepresentation.RelatedDDI[0].ddi;
                if (enumeratedRepresentation.RelatedDDI.Any(d => d.isDefaultRepresentationForDDI))
                {
                    IsDefaultRepresentationForDDI = true;
                }
            }
        }
Пример #3
0
        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));
        }
Пример #4
0
 public EnumeratedRepresentation(RepresentationSystemRepresentationsEnumeratedRepresentation enumeratedRepresentation)
     : this(enumeratedRepresentation, CultureInfo.CurrentUICulture)
 {
 }