Ejemplo n.º 1
0
        CustomAttributeBuilder GetAttributeBuilder()
        {
            ConstructorInfo ci = (ConstructorInfo)_ctor.Method.Member;

            if (_namedProperties == null && _namedFields == null)
            {
                return(new CustomAttributeBuilder(ci, _args));
            }

            if (_namedProperties == null)
            {
                return(new CustomAttributeBuilder(ci, _args, ArrayUtils.ToArray(_namedFields.Keys), ArrayUtils.ToArray(_namedFields.Values)));
            }

            if (_namedFields == null)
            {
                return(new CustomAttributeBuilder(ci, _args, ArrayUtils.ToArray(_namedProperties.Keys), ArrayUtils.ToArray(_namedProperties.Values)));
            }

            return(new CustomAttributeBuilder(ci, _args,
                                              ArrayUtils.ToArray(_namedProperties.Keys), ArrayUtils.ToArray(_namedProperties.Values),
                                              ArrayUtils.ToArray(_namedFields.Keys), ArrayUtils.ToArray(_namedFields.Values)));
        }
Ejemplo n.º 2
0
 public bool Match(MethodGen candidate)
 {
     return(candidate.Name == interfaceMethod.Name &&
            candidate.ReturnType == interfaceMethod.ReturnType &&
            ArrayUtils.Equals(candidate.ParameterTypes, interfaceMethod.ParameterTypes));
 }
Ejemplo n.º 3
0
 public bool SignatureEquals(ApplicableFunction other)
 {
     return(ArrayUtils.Equals(_appliedSignature, other._appliedSignature));
 }