public static AddToCurrentPackage ( string name ) : void | ||
name | string | |
Результат | void |
public UmlEnum(Tag tag) : base(tag) { name = tag.Params ["name"]; tag.Content = tag.Content.Replace(" = ", "="); Tag[] literalTags = VSParser.ExtractTags(ref tag.Content, "enumerationLiteral"); List <string> literals = new List <string> (); foreach (Tag literalTag in literalTags) { if (literalTag.Params.ContainsKey("name")) { literals.Add(literalTag.Params ["name"]); } else { Console.WriteLine("weird: " + literalTag.Content); } } values = literals.ToArray(); commentsKey = Comments.Key(name); Packages.AddToCurrentPackage(name); }
public UmlClass(Tag classtag) : base(classtag) { if (classtag.Tagname == "interface") { type = ClassType.Interface; } else { type = ClassType.Class; } Content = ParseContent(classtag).ToArray(); Publicity = Publicity.Public; List <string> _bases = new List <string> (); Tag[] baseclasses = VSParser.ExtractTags(ref classtag.Content, "generalization"); foreach (Tag baseclass in baseclasses) { _bases.Add(baseclass.ParseType()); } Tag[] baseinterfaces = VSParser.ExtractTags(ref classtag.Content, "interfaceRealization"); Console.WriteLine("interfaceRealization: " + name + ": " + classtag.Content); foreach (Tag baseinterface in baseinterfaces) { Console.WriteLine("interfaceRealization: " + name + " <- " + baseinterface.Content); _bases.Add(baseinterface.ParseType()); } bases = _bases.ToArray(); commentsKey = Comments.Key(name); Packages.AddToCurrentPackage(name); }
public UmlClass(UmlBlock block) : base(block) { name = name.IfContains("class ", () => type = ClassType.Class); name = name.IfContains("struct ", () => type = ClassType.Struct); name = name.IfContains("interface ", () => type = ClassType.Interface); string[] p = name.Split(":"); if (p.Length == 2) { name = p [0].Trim(); bases = p [1].Trim().Split(",").TrimAll().ToArray(); if (bases.Length == 1 && bases [0].Length == 0) { bases = new string[] {} } ; } else { bases = new string[] {}; } Content = ParseContent(block.Content).ToArray(); string _name = name; Packages.SplitName(_name, out Packages.CurrentPackage, out name); Comments.AddTo(commentsKey = Comments.Key(name), block.comments); Packages.AddToCurrentPackage(name); }
public UmlClass(CSharpBlock block) : base(block) { name = name.IfContains("class ", () => type = ClassType.Class); name = name.IfContains("struct ", () => type = ClassType.Struct); name = name.IfContains("interface ", () => type = ClassType.Interface); string[] p = name.Split(":"); if (p.Length == 2) { name = p [0].Trim(); bases = new HashSet <string> (p [1].Trim().Split(",").TrimAll()).ToArray(); } else { bases = new string[] {}; } Content = ParseContent(block.Content).ToArray(); if (type == ClassType.Interface) { foreach (IUmlObject obj in Content) { if (obj is UmlObject) { (obj as UmlObject).Publicity = CSharpUML.Publicity.Public; } } } commentsKey = Comments.Key(name); Packages.AddToCurrentPackage(name); }
public UmlEnum(CSharpBlock block) : base(block) { name = name.IfContains("enum ", () => {}); values = ParseContent(block.Content).ToArray(); commentsKey = Comments.Key(name); Packages.AddToCurrentPackage(name); }
public UmlEnum(UmlBlock block) : base(block) { name = name.IfContains("enum ", () => {}); values = ParseContent(block.Content).ToArray(); string _name = name; Packages.SplitName(_name, out Packages.CurrentPackage, out name); Comments.AddTo(commentsKey = Comments.Key(name), block.comments); Packages.AddToCurrentPackage(name); }