public string UnaliasTest(string name) { string result = InteropTypeResolver.Unalias(name); return(result); // TODO: add assertions to method InteropTypeResolverTest.UnaliasTest(String) }
public InteropTypeResolver ConstructorTest(AphidInterpreter interpreter) { InteropTypeResolver target = new InteropTypeResolver(interpreter); return(target); // TODO: add assertions to method InteropTypeResolverTest.ConstructorTest(AphidInterpreter) }
public Type ResolveTypeTest01(string name) { Type result = InteropTypeResolver.ResolveType(name); return(result); // TODO: add assertions to method InteropTypeResolverTest.ResolveTypeTest01(String) }
public Type TryResolveTypeTest( [PexAssumeUnderTest] InteropTypeResolver target, HashSet <string> imports, ReaderWriterLockSlim importsLock, string[] path, bool isType ) { Type result = target.TryResolveType(imports, importsLock, path, isType); return(result); // TODO: add assertions to method InteropTypeResolverTest.TryResolveTypeTest(InteropTypeResolver, HashSet`1<String>, ReaderWriterLockSlim, String[], Boolean) }
private Type GetPropertyType( TypeBuilder typeBuilder, string defaultType, IdentifierExpression property, HashSet <string> imports) { if (property.Attributes == null || property.Attributes.Count == 0) { return(Interpreter.InteropTypeResolver.ResolveType( imports, _importsLock, new[] { InteropTypeResolver.Unalias(defaultType) }, isType: true)); } var scanner = new AphidAttributeScanner(property); scanner.Next(); var typeName = InteropTypeResolver.Unalias(scanner.CurrentAttribute); Type t = typeName == typeBuilder.Name ? typeBuilder : Interpreter.InteropTypeResolver.ResolveType( imports, _importsLock, new[] { typeName }, isType: true); if (!scanner.Next()) { return(t); } t = scanner.Match("list") ? typeof(List <>).MakeGenericType(t) : scanner.Match("set") ? t.MakeArrayType() : throw new AphidParserException( "Invalid property attribute '{0}'.", scanner.CurrentAttribute); return(!scanner.EndOfStream() ? throw new AphidParserException( "Unexpected property attribute '{0}'.", scanner.CurrentAttribute) : t); }