/// <summary> /// Returns the package-to-package containment relations specifying the possible meta-sub-packages of the given meta package. /// </summary> /// <param name="package"></param> /// <returns></returns> public static IEnumerable <MetaSubPackageRelation> GetSubPackageRelationsFor(MetaPackage package) { foreach (MetaSubPackageRelation relation in Instance.packageSubPackageRelations.All) { if (relation.ParentPackageType == package) { yield return(relation); } } }
public static bool HasClassifiers(MetaPackage package) { return(GetClassifierRelationsFor(package).Count() > 0); }
public static IEnumerable <MetaPackageClassifierRelation> GetClassifierRelationsFor(MetaPackage package) { foreach (MetaPackageClassifierRelation relation in Instance.packageClassifierRelations.All) { if (relation.PackageType == package) { yield return(relation); } } }
public static bool HasParentPackages(MetaPackage package) { return(GetParentPackageRelationsFor(package).Count() > 0); }
internal Packages(TaggedValues taggedValues) { var bLibraryTaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Copyright, taggedValues.Owner, taggedValues.Reference, taggedValues.Status, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, }; MetaTaggedValue[] elementLibraryTaggedValues = new List <MetaTaggedValue>(bLibraryTaggedValues) { taggedValues.BaseUrn, taggedValues.NamespacePrefix, }.ToArray(); PrimLibrary = new MetaPackage { Name = "PrimLibrary", Stereotype = MetaStereotype.PRIMLibrary, TaggedValues = elementLibraryTaggedValues, }; EnumLibrary = new MetaPackage { Name = "EnumLibrary", Stereotype = MetaStereotype.ENUMLibrary, TaggedValues = elementLibraryTaggedValues, }; CdtLibrary = new MetaPackage { Name = "CdtLibrary", Stereotype = MetaStereotype.CDTLibrary, TaggedValues = elementLibraryTaggedValues, }; CcLibrary = new MetaPackage { Name = "CcLibrary", Stereotype = MetaStereotype.CCLibrary, TaggedValues = elementLibraryTaggedValues, }; BdtLibrary = new MetaPackage { Name = "BdtLibrary", Stereotype = MetaStereotype.BDTLibrary, TaggedValues = elementLibraryTaggedValues, }; BieLibrary = new MetaPackage { Name = "BieLibrary", Stereotype = MetaStereotype.BIELibrary, TaggedValues = elementLibraryTaggedValues, }; DocLibrary = new MetaPackage { Name = "DocLibrary", Stereotype = MetaStereotype.DOCLibrary, TaggedValues = elementLibraryTaggedValues, }; BLibrary = new MetaPackage { Name = "BLibrary", Stereotype = MetaStereotype.bLibrary, TaggedValues = bLibraryTaggedValues, }; }