public Type GetTypeSpecified(CILProgramInstance programInstance) { if (Type != null) { return(Type.GetRuntimeType(programInstance)); } if (ClassName != null) { var customType = programInstance.GetCustomType(ClassName); if (customType != null) { return(customType); } var reflectedAssembly = Assembly.Load(ClassName.AssemblyName); return(reflectedAssembly.GetType(ClassName.ClassName)); } throw new ArgumentException("Cannot get type specified."); }
public Type GetRuntimeType(CILProgramInstance programInstance) { if (SimpleType != null) { return(SimpleType); } if (ClassName != null) { var customType = programInstance.GetCustomType(ClassName); if (customType != null) { return(customType); } var reflectedAssembly = Assembly.Load(ClassName.AssemblyName); return(reflectedAssembly.GetType(ClassName.ClassName)); } throw new NotImplementedException("Complex types are not supported yet."); }