public static ApplicationDataModel.Representations.EnumeratedRepresentation ToModelRepresentation(this EnumeratedRepresentation representation) { var enumeratedRepresentation = new ApplicationDataModel.Representations.EnumeratedRepresentation { Code = representation.DomainId, Description = representation.Description, EnumeratedMembers = representation.EnumerationMembers.Select(m => m.ToModelEnumMember()).ToList(), }; enumeratedRepresentation.Id.UniqueIds.Add(new UniqueId { Id = representation.DomainId, IdType = IdTypeEnum.LongInt, Source = "http://dictionary.isobus.net/isobus/", SourceType = IdSourceTypeEnum.URI }); return enumeratedRepresentation; }
public static ApplicationDataModel.Representations.EnumeratedRepresentation ToModelRepresentation(this EnumeratedRepresentation representation) { var enumeratedRepresentation = new ApplicationDataModel.Representations.EnumeratedRepresentation { Code = representation.DomainId, Description = representation.Description, EnumeratedMembers = representation.EnumerationMembers.Select(m => m.ToModelEnumMember()).ToList(), }; enumeratedRepresentation.Id.UniqueIds.Add(new UniqueId { Id = representation.DomainId, CiTypeEnum = CompoundIdentifierTypeEnum.LongInt, Source = "http://dictionary.isobus.net/isobus/", SourceType = IdSourceTypeEnum.URI }); return(enumeratedRepresentation); }
public static EnumeratedRepresentation ToInternalRepresentation(this ApplicationDataModel.Representations.EnumeratedRepresentation representation) { return((EnumeratedRepresentation)RepresentationManager.Instance.Representations[representation.Code]); }