internal TypeInfo(RuntimeType typeOfObj)
{
this.ServerType = TypeInfo.GetQualifiedTypeName(typeOfObj);
RuntimeType runtimeType = (RuntimeType)typeOfObj.BaseType;
int length = 0;
while ((Type)runtimeType != typeof(MarshalByRefObject) && runtimeType != (RuntimeType)null)
{
runtimeType = (RuntimeType)runtimeType.BaseType;
++length;
}
string[] strArray1 = (string[])null;
if (length > 0)
{
strArray1 = new string[length];
RuntimeType type = (RuntimeType)typeOfObj.BaseType;
for (int index = 0; index < length; ++index)
{
strArray1[index] = TypeInfo.GetQualifiedTypeName(type);
type = (RuntimeType)type.BaseType;
}
}
this.ServerHierarchy = strArray1;
Type[] interfaces = typeOfObj.GetInterfaces();
string[] strArray2 = (string[])null;
bool isInterface = typeOfObj.IsInterface;
if ((uint)interfaces.Length > 0U | isInterface)
{
strArray2 = new string[interfaces.Length + (isInterface ? 1 : 0)];
for (int index = 0; index < interfaces.Length; ++index)
{
strArray2[index] = TypeInfo.GetQualifiedTypeName((RuntimeType)interfaces[index]);
}
if (isInterface)
{
string[] strArray3 = strArray2;
int index = strArray3.Length - 1;
string qualifiedTypeName = TypeInfo.GetQualifiedTypeName(typeOfObj);
strArray3[index] = qualifiedTypeName;
}
}
this.InterfacesImplemented = strArray2;
}