DocBase ProcessInfo(string targetNamePrefix, string fullName, string baseTypeName)
{
switch(targetNamePrefix) {
case "T": {
return GetTypeByName(fullName, baseTypeName);
}
case "M": {
var info = new MethodDoc(fullName);
GetTypeByName(info.Namespace).AddMethod(info);
return info;
}
case "P": {
var info = new PropertyDoc(fullName);
GetTypeByName(info.Namespace).AddProperty(info);
return info;
}
case "E": {
var info = new EventDoc(fullName);
GetTypeByName(info.Namespace).AddEvent(info);
return info;
}
case "cT": {
return GetTypeByName(fullName, baseTypeName);
}
case "cM": {
var info = new MethodDoc(fullName);
GetTypeByName(info.Namespace).AddClientMethod(info);
return info;
}
case "cP": {
var info = new ClientPropertyDoc(fullName);
GetTypeByName(info.Namespace).AddClientProperty(info);
return info;
}
case "cE": {
var info = new ClientEventDoc(fullName);
GetTypeByName(info.Namespace).AddClientEvent(info);
return info;
}
}
throw new ArgumentException("Unknown info type", "fullName");
}