private bool AdaptValue(string dataType) { Hl7DataTypeName type = Hl7DataTypeName.Create(dataType); string typeName = StringUtils.DeleteWhitespace(type.GetUnqualifiedVersion().ToString()); return("LIST<SXCM<TS>>".Equals(typeName)); }
private CollectionHelper CreateCollectionHelper(string dataType, Type expectedReturnType) { Hl7DataTypeName type = Hl7DataTypeName.Create(dataType); string typeName = StringUtils.DeleteWhitespace(type.GetUnqualifiedVersion().ToString()); CollectionHelper result = typeName.StartsWith("LIST") ? HandleListTypes(typeName, expectedReturnType) : HandleBagTypes(typeName ); if (result == null) { throw new MarshallingException("Cannot create a data type construct for data type " + dataType); } return(result); }
private CollectionHelper CreateCollectionHelper(string dataType) { Hl7DataTypeName type = Hl7DataTypeName.Create(dataType); string typeName = StringUtils.DeleteWhitespace(type.GetUnqualifiedVersion().ToString()); if ("BAG<AD>".Equals(typeName)) { return(new LISTImpl <AD, PostalAddress>(typeof(ADImpl))); } else { if ("BAG<GTS>".Equals(typeName)) { return(new LISTImpl <GTS, GeneralTimingSpecification>(typeof(GTSImpl))); } else { if ("BAG<II>".Equals(typeName)) { return(new LISTImpl <II, Identifier>(typeof(IIImpl))); } else { if ("BAG<PN>".Equals(typeName)) { return(new LISTImpl <PN, PersonName>(typeof(PNImpl))); } else { if ("BAG<ST>".Equals(typeName)) { return(new LISTImpl <ST, string>(typeof(STImpl))); } else { if ("BAG<TEL>".Equals(typeName)) { return(new LISTImpl <TEL, TelecommunicationAddress>(typeof(TELImpl))); } else { throw new MarshallingException("Cannot create a data type construct for data type " + dataType); } } } } } } }
private CollectionHelper CreateCollectionHelper(string dataType) { Hl7DataTypeName type = Hl7DataTypeName.Create(dataType); string typeName = StringUtils.DeleteWhitespace(type.GetUnqualifiedVersion().ToString()); if ("SET<CV>".Equals(typeName)) { return(new SETImpl <CV, Code>(typeof(CVImpl))); } else { if ("SET<II>".Equals(typeName)) { return(new SETImpl <II, Identifier>(typeof(IIImpl))); } else { if ("SET<PIVL>".Equals(typeName)) { return(new SETImpl <PIVL, PeriodicIntervalTime>(typeof(PIVLImpl))); } else { if ("SET<PN>".Equals(typeName)) { return(new SETImpl <PN, PersonName>(typeof(PNImpl))); } else { if ("SET<RTO<PQ,PQ>>".Equals(typeName)) { return(new SETImpl <RTO <PhysicalQuantity, PhysicalQuantity>, Ratio <PhysicalQuantity, PhysicalQuantity> >(typeof(RTOImpl <object , object>))); } else { if ("SET<ST>".Equals(typeName)) { return(new SETImpl <ST, string>(typeof(STImpl))); } else { if ("SET<TEL>".Equals(typeName)) { return(new SETImpl <TEL, TelecommunicationAddress>(typeof(TELImpl))); } else { if ("SET<TS>".Equals(typeName)) { return(new SETImpl <TS, PlatformDate>(typeof(TSImpl))); } else { if ("SET<CD>".Equals(typeName)) { return(new SETImpl <CD, Code>(typeof(CDImpl))); } else { if ("SET<CS>".Equals(typeName)) { return(new SETImpl <CS, Code>(typeof(CSImpl))); } else { if ("SET<AD>".Equals(typeName)) { return(new SETImpl <AD, PostalAddress>(typeof(ADImpl))); } else { if ("SET<TN>".Equals(typeName)) { return(new SETImpl <TN, TrivialName>(typeof(TNImpl))); } else { throw new MarshallingException("Cannot create a data type construct for data type " + dataType); } } } } } } } } } } } } }
private CollectionHelper CreateCollectionHelper(string dataType) { Hl7DataTypeName type = Hl7DataTypeName.Create(dataType); string typeName = StringUtils.DeleteWhitespace(type.GetUnqualifiedVersion().ToString()); if ("LIST<AD>".Equals(typeName)) { return(new LISTImpl <AD, PostalAddress>(typeof(ADImpl))); } else { if ("LIST<GTS>".Equals(typeName)) { return(new LISTImpl <GTS, GeneralTimingSpecification>(typeof(GTSImpl))); } else { if ("LIST<II>".Equals(typeName)) { return(new LISTImpl <II, Identifier>(typeof(IIImpl))); } else { if ("LIST<PN>".Equals(typeName)) { return(new LISTImpl <PN, PersonName>(typeof(PNImpl))); } else { if ("LIST<TEL>".Equals(typeName)) { return(new LISTImpl <TEL, TelecommunicationAddress>(typeof(TELImpl))); } else { if ("LIST<ON>".Equals(typeName)) { return(new LISTImpl <ON, OrganizationName>(typeof(ONImpl))); } else { if ("LIST<CD>".Equals(typeName)) { return(new LISTImpl <CD, Code>(typeof(CDImpl))); } else { if ("LIST<CS>".Equals(typeName)) { return(new LISTImpl <CS, Code>(typeof(CSImpl))); } else { if ("LIST<CE>".Equals(typeName)) { return(new LISTImpl <CE, Code>(typeof(CEImpl))); } else { if ("LIST<SXCM<TS>>".Equals(typeName)) { return(new LISTImpl <SXCM <TS>, SetComponent <TS> >(typeof(TSImpl))); } else { if ("LIST<ANY>".Equals(typeName)) { return(new LISTImpl <ANY <object>, object>(typeof(ANYImpl <object>))); } else { if ("LIST<INT>".Equals(typeName)) { return(new LISTImpl <INT, Int32?>(typeof(INTImpl))); } else { if ("LIST<PQ>".Equals(typeName)) { return(new LISTImpl <PQ, PhysicalQuantity>(typeof(PQImpl))); } else { if ("LIST<ST>".Equals(typeName)) { return(new LISTImpl <ST, string>(typeof(STImpl))); } else { if ("LIST<SXCMTSCDAR1>".Equals(typeName)) { return(new LISTImpl <SXCMTSCDAR1, MbDate>(typeof(SXCMTSCDAR1Impl))); } else { throw new MarshallingException("Cannot create a data type construct for data type " + dataType); } } } } } } } } } } } } } } } }