AggKind() public method

public AggKind ( ) : AggKindEnum
return AggKindEnum
Beispiel #1
0
 public MethodSymbol LookupInvokeMeth(AggregateSymbol pAggDel)
 {
     Debug.Assert(pAggDel.AggKind() == AggKindEnum.Delegate);
     for (Symbol pSym = LookupAggMember(NameManager.GetPredefinedName(PredefinedName.PN_INVOKE), pAggDel, symbmask_t.MASK_ALL);
          pSym != null;
          pSym = LookupNextSym(pSym, pAggDel, symbmask_t.MASK_ALL))
     {
         if (pSym is MethodSymbol meth && meth.isInvoke())
         {
             return(meth);
         }
     }
     return(null);
 }
Beispiel #2
0
 public MethodSymbol LookupInvokeMeth(AggregateSymbol pAggDel)
 {
     Debug.Assert(pAggDel.AggKind() == AggKindEnum.Delegate);
     for (Symbol pSym = LookupAggMember(GetNameManager().GetPredefName(PredefinedName.PN_INVOKE), pAggDel, symbmask_t.MASK_ALL);
          pSym != null;
          pSym = LookupNextSym(pSym, pAggDel, symbmask_t.MASK_ALL))
     {
         if (pSym.IsMethodSymbol() && pSym.AsMethodSymbol().isInvoke())
         {
             return pSym.AsMethodSymbol();
         }
     }
     return null;
 }
        private AggregateSymbol FindPredefinedTypeCore(Name name, NamespaceOrAggregateSymbol bag, KAID aid, AggKindEnum aggKind, int arity,
                                                       out AggregateSymbol paggAmbig, out AggregateSymbol paggBad)
        {
            AggregateSymbol aggFound = null;

            paggAmbig = null;
            paggBad   = null;

            for (AggregateSymbol aggCur = _pBSymmgr.LookupGlobalSymCore(name, bag, symbmask_t.MASK_AggregateSymbol).AsAggregateSymbol();
                 aggCur != null;
                 aggCur = BSYMMGR.LookupNextSym(aggCur, bag, symbmask_t.MASK_AggregateSymbol).AsAggregateSymbol())
            {
                if (!aggCur.InAlias(aid) || aggCur.GetTypeVarsAll().size != arity)
                {
                    continue;
                }
                if (aggCur.AggKind() != aggKind)
                {
                    if (paggBad == null)
                    {
                        paggBad = aggCur;
                    }
                    continue;
                }
                if (aggFound != null)
                {
                    Debug.Assert(paggAmbig == null);
                    paggAmbig = aggCur;
                    break;
                }
                aggFound = aggCur;
                if (paggAmbig == null)
                {
                    break;
                }
            }

            return(aggFound);
        }