Beispiel #1
0
 static void _Patch(CodeTypeReference tr, CodeDomVisitContext ctx, CodeDomResolver res)
 {
     if (null != tr)
     {
         if (res.IsValidType(tr, res.GetScope(tr)))
         {
             tr.UserData.Remove("slang:unresolved");
             return;
         }
         // see if this is an attribute type
         var n = tr.BaseType;
         tr.BaseType += "Attribute";
         if (res.IsValidType(tr, res.GetScope(tr)))
         {
             tr.UserData.Remove("slang:unresolved");
             return;
         }
         tr.BaseType = n;                 // restore it
         // this is probably a nested type but with . instead of +
         // so now we need to crack it apart and hunt it down
         throw new NotImplementedException();
     }
 }
Beispiel #2
0
 static void _Patch(CodeTypeReferenceExpression tr, CodeDomVisitContext ctx, CodeDomResolver res)
 {
     if (null != tr)
     {
         if (res.IsValidType(tr.Type))
         {
             tr.Type.UserData.Remove("slang:unresolved");
             tr.UserData.Remove("slang:unresolved");
         }
         else
         {
             // TODO: Check for nested type.
             throw new ArgumentException(_AppendLineInfo(string.Format("Unable to resolve type {0}", tr.Type.BaseType), tr.Type), "compileUnits");
         }
     }
 }