public override XElement ToXml() { var xe = base.ToXml(); xe.Add(new XAttribute("Namespace", Namespace)); xe.Add(new XAttribute("Kind", Kind)); switch (Kind) { case TypeIndexKind.GenericDefinition: var names = GenericParams.Select(p => p.Name); xe.Add(new XAttribute("Params", string.Join(",", names))); break; case TypeIndexKind.GenericType: foreach (var par in GenericParams) { xe.Add(par.ToXml()); } break; } return(xe); }
public CSType ToCSType() { return(ToCSType(GenericParams.Select(gen => new CSSimpleType(gen.Name.Name)))); }