Microsoft.JScript.Class.AddImplicitInterfaces C# (CSharp) Method

AddImplicitInterfaces() private method

private AddImplicitInterfaces ( IReflect iface, IReflect explicitInterfaces, ArrayList implicitInterfaces ) : void
iface IReflect
explicitInterfaces IReflect
implicitInterfaces System.Collections.ArrayList
return void
      private void AddImplicitInterfaces(IReflect iface, IReflect[] explicitInterfaces, ArrayList implicitInterfaces){
        Type ifaceT = iface as Type;
        if (ifaceT != null){
          Type[] implInterfaces = ifaceT.GetInterfaces();
          foreach (Type implIface in implInterfaces){
            if (Array.IndexOf(explicitInterfaces, implIface, 0) >= 0) return;
            if (implicitInterfaces.IndexOf(implIface, 0) >= 0) return;
            implicitInterfaces.Add(implIface);
          }
          return;
        }
        foreach (TypeExpression ifaceExpr in ((ClassScope)iface).owner.interfaces){
          IReflect implIface = ifaceExpr.ToIReflect();
          if (Array.IndexOf(explicitInterfaces, implIface, 0) >= 0) return;
          if (implicitInterfaces.IndexOf(implIface, 0) >= 0) return;
          implicitInterfaces.Add(implIface);
        }
        return;
      }