Esempio n. 1
0
        public static DatatypeRef Parse(String s)
        {
            DatatypeRef r = new DatatypeRef();

            if (!s.Contains("<")) // Generic?
                r.Name = s;
            else
            {
                r.Name = s.Substring(0, s.IndexOf("<"));
                r.SupplierBindingArgumentDatatype = new List<DatatypeRef>();
                string suppliers = s.Substring(s.IndexOf("<") + 1, s.LastIndexOf(">") - s.IndexOf("<") - 1);
                foreach (string sp in suppliers.Split(','))
                    r.supplierBindingArgumentDatatype.Add(DatatypeRef.Parse(sp));
            }
            return r;
        }
Esempio n. 2
0
        public static MohawkCollege.EHR.gpmr.COR.TypeReference Parse(DatatypeRef dtr)
        {
            MohawkCollege.EHR.gpmr.COR.TypeReference retVal = new MohawkCollege.EHR.gpmr.COR.TypeReference();

            retVal.Name = dtr.Name.Contains(".") ? dtr.Name.Substring(0, dtr.Name.IndexOf(".")) : dtr.Name;
            retVal.Flavor = dtr.Name.Contains(".") ? dtr.Name : null; // JF: Fixed the removal of the . 

            if (dtr.SupplierBindingArgumentDatatype != null && dtr.SupplierBindingArgumentDatatype.Count > 0)
            {
                retVal.GenericSupplier = new List<MohawkCollege.EHR.gpmr.COR.TypeReference>();
                foreach (DatatypeRef sba in dtr.SupplierBindingArgumentDatatype)
                    retVal.GenericSupplier.Add(TypeReferenceParser.Parse(sba));
            }

            return retVal;
        }
Esempio n. 3
0
        public static DatatypeRef Parse(String s)
        {
            DatatypeRef r = new DatatypeRef();

            if (!s.Contains("<")) // Generic?
            {
                r.Name = s;
            }
            else
            {
                r.Name = s.Substring(0, s.IndexOf("<"));
                r.SupplierBindingArgumentDatatype = new List <DatatypeRef>();
                string suppliers = s.Substring(s.IndexOf("<") + 1, s.LastIndexOf(">") - s.IndexOf("<") - 1);
                foreach (string sp in suppliers.Split(','))
                {
                    r.supplierBindingArgumentDatatype.Add(DatatypeRef.Parse(sp));
                }
            }
            return(r);
        }