コード例 #1
0
ファイル: AnonymousType.cs プロジェクト: zhouzaoyuan/ILSpy
        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);
        }
コード例 #2
0
ファイル: AnonymousType.cs プロジェクト: zhouzaoyuan/ILSpy
 public AnonymousTypeProperty(IUnresolvedProperty unresolved, ITypeResolveContext parentContext, AnonymousType declaringType)
     : base(unresolved, parentContext)
 {
     this.declaringType = declaringType;
 }