コード例 #1
0
        internal static UmlPackageSpec Convert(BieLibrarySpec bieLibrarySpec)
        {
            var umlPackageSpec = new UmlPackageSpec
            {
                Stereotype   = "BIELibrary",
                Name         = bieLibrarySpec.Name,
                TaggedValues = new[]
                {
                    new UmlTaggedValueSpec("businessTerm", bieLibrarySpec.BusinessTerms),
                    new UmlTaggedValueSpec("copyright", bieLibrarySpec.Copyrights),
                    new UmlTaggedValueSpec("owner", bieLibrarySpec.Owners),
                    new UmlTaggedValueSpec("reference", bieLibrarySpec.References),
                    new UmlTaggedValueSpec("status", bieLibrarySpec.Status),
                    new UmlTaggedValueSpec("uniqueIdentifier", bieLibrarySpec.UniqueIdentifier)
                    {
                        DefaultValue = GenerateUniqueIdentifierDefaultValue(bieLibrarySpec)
                    },
                    new UmlTaggedValueSpec("versionIdentifier", bieLibrarySpec.VersionIdentifier),
                    new UmlTaggedValueSpec("baseURN", bieLibrarySpec.BaseURN),
                    new UmlTaggedValueSpec("namespacePrefix", bieLibrarySpec.NamespacePrefix),
                },
                DiagramType = UmlDiagramType.Class,
            };

            return(umlPackageSpec);
        }
コード例 #2
0
 public IBieLibrary UpdateBieLibrary(IBieLibrary bieLibrary, BieLibrarySpec specification)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 public IBieLibrary CreateBieLibrary(BieLibrarySpec specification)
 {
     throw new NotImplementedException();
 }
 private static string GenerateUniqueIdentifierDefaultValue(BieLibrarySpec bieLibrarySpec)
 {
     return(Guid.NewGuid().ToString());
 }
コード例 #5
0
 /// <summary>
 /// Updates a BIELibrary to match the given <paramref name="specification"/>.
 /// <param name="bieLibrary">A BIELibrary.</param>
 /// <param name="specification">A new specification for the given BIELibrary.</param>
 /// <returns>The updated BIELibrary. Depending on the implementation, this might be the same updated instance or a new instance!</returns>
 /// </summary>
 public IBieLibrary UpdateBieLibrary(IBieLibrary bieLibrary, BieLibrarySpec specification)
 {
     return(new UpccBieLibrary(UmlPackage.UpdatePackage(((UpccBieLibrary)bieLibrary).UmlPackage, BieLibrarySpecConverter.Convert(specification))));
 }
コード例 #6
0
 /// <summary>
 /// Creates a BIELibrary based on the given <paramref name="specification"/>.
 /// <param name="specification">A specification for a BIELibrary.</param>
 /// <returns>The newly created BIELibrary.</returns>
 /// </summary>
 public IBieLibrary CreateBieLibrary(BieLibrarySpec specification)
 {
     return(new UpccBieLibrary(UmlPackage.CreatePackage(BieLibrarySpecConverter.Convert(specification))));
 }