Ejemplo n.º 1
0
        public override bool Equals(IType other)
        {
            AnonymousType o = other as AnonymousType;

            if (o == null || resolvedProperties.Count != o.resolvedProperties.Count)
            {
                return(false);
            }
            for (int i = 0; i < resolvedProperties.Count; i++)
            {
                IProperty p1 = resolvedProperties[i];
                IProperty p2 = o.resolvedProperties[i];
                if (p1.Name != p2.Name || !p1.ReturnType.Equals(p2.ReturnType))
                {
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
 public AnonymousTypeProperty(IUnresolvedProperty unresolved, ITypeResolveContext parentContext, AnonymousType declaringType)
     : base(unresolved, parentContext)
 {
     this.declaringType = declaringType;
 }