GeometryGym.Ifc.ParserIfc.LineParser C# (CSharp) Méthode

LineParser() private static méthode

private static LineParser ( string keyword, string str, ReleaseVersion schema ) : BaseClassIfc
keyword string
str string
schema ReleaseVersion
Résultat BaseClassIfc
        private static BaseClassIfc LineParser(string keyword, string str, ReleaseVersion schema)
        {
            Type type = null;
            if (mTypes.ContainsKey(keyword))
                type = mTypes[keyword];
            else
            {
                type = Type.GetType("GeometryGym.Ifc." + keyword, false, true);
                if (type != null)
                    mTypes.Add(keyword, type);
            }
            if (type != null)
            {
                MethodInfo parser = type.GetMethod("Parse",BindingFlags.Static | BindingFlags.NonPublic,null,CallingConventions.Any, argSet1,null);
                if (parser != null)
                    return parser.Invoke(null, new object[] { str,schema }) as BaseClassIfc;
                parser = type.GetMethod("Parse", BindingFlags.Static | BindingFlags.NonPublic, null, CallingConventions.Any, argSet2, null);
                if (parser != null)
                    return parser.Invoke(null, new object[] { str }) as BaseClassIfc;
            }
            if (string.Compare(keyword, "IfcParameterizedProfileDef", true) == 0)
                return LineParser("IfcProfileDef", str, schema);
            return null;
        }