protected static Context CreateContextWithMethodDeclarationAndHierarchy(string elemId, string superId, string firstId) { var mh = new MethodHierarchy { Element = Names.Method(elemId) }; if (superId != null) { mh.Super = Names.Method(superId); } if (firstId != null) { mh.First = Names.Method(firstId); } return(new Context { TypeShape = new TypeShape { MethodHierarchies = { mh } }, SST = new SST { EnclosingType = Names.Type("C,P"), Methods = { new MethodDeclaration { Name = Names.Method(elemId) } } } }); }
private static MethodHierarchy CompleteDecl(string encType, string superType, string firstType) { var decl = new MethodHierarchy(Names.Method(encType)); if (!superType.IsEmpty()) { decl.Super = Names.Method(superType); } if (!firstType.IsEmpty()) { decl.First = Names.Method(firstType); } return(decl); }