public static BaseObject Link(NamespaceMapping aPckg, TypeMapping aType) { if (!aType.HasClassifier()) { return(null); } string aKey = aType.FullName; //aPckg.FullName + "::" + aType.FullName; ProperRef ref2 = (ProperRef)_tabRefs[aKey]; if (ref2 != null) { return(ref2._obj); } Classifier anObj = aType.Classifier; BasePackage newPackage = aPckg.Package; BasePackage package = (BasePackage)anObj.Package; if (newPackage.ObjectID == package.ObjectID) { ref2 = new ProperRef(aKey, anObj); return(anObj); } BaseObject obj2 = anObj.CreateShortcut(newPackage, ""); ref2 = new ProperRef(aKey, obj2); return(obj2); }
public static BaseObject Link(NamespaceMapping aPckg, TypeMapping aType) { if (!aType.HasClassifier()) { return null; } string aKey = aType.FullName; //aPckg.FullName + "::" + aType.FullName; ProperRef ref2 = (ProperRef) _tabRefs[aKey]; if (ref2 != null) { return ref2._obj; } Classifier anObj = aType.Classifier; BasePackage newPackage = aPckg.Package; BasePackage package = (BasePackage) anObj.Package; if (newPackage.ObjectID == package.ObjectID) { ref2 = new ProperRef(aKey, anObj); return anObj; } BaseObject obj2 = anObj.CreateShortcut(newPackage, ""); ref2 = new ProperRef(aKey, obj2); return obj2; }