コード例 #1
0
        public void Add(IContextStatistics stats)
        {
            NumRepositories                      += stats.NumRepositories;
            NumUsers                             += stats.NumUsers;
            NumSolutions                         += stats.NumSolutions;
            EstimatedLinesOfCode                 += stats.EstimatedLinesOfCode;
            NumTypeDeclTopLevel                  += stats.NumTypeDeclTopLevel;
            NumTypeDeclNested                    += stats.NumTypeDeclNested;
            NumPartial                           += stats.NumPartial;
            NumClasses                           += stats.NumClasses;
            NumInterfaces                        += stats.NumInterfaces;
            NumDelegates                         += stats.NumDelegates;
            NumStructs                           += stats.NumStructs;
            NumEnums                             += stats.NumEnums;
            NumUnusualType                       += stats.NumUnusualType;
            NumTypeDeclExtendsOrImplements       += stats.NumTypeDeclExtendsOrImplements;
            NumMethodDeclsTotal                  += stats.NumMethodDeclsTotal;
            NumMethodDeclsOverrideOrImplement    += stats.NumMethodDeclsOverrideOrImplement;
            NumMethodDeclsOverrideOrImplementAsm += stats.NumMethodDeclsOverrideOrImplementAsm;
            NumValidInvocations                  += stats.NumValidInvocations;
            NumUnknownInvocations                += stats.NumUnknownInvocations;
            NumAsmCalls                          += stats.NumAsmCalls;
            NumAsmDelegateCalls                  += stats.NumAsmDelegateCalls;
            NumAsmFieldRead                      += stats.NumAsmFieldRead;
            NumAsmPropertyRead                   += stats.NumAsmPropertyRead;

            UniqueTypeDecl.AddAll(stats.UniqueTypeDecl);
            UniqueMethodDeclsOverrideOrImplementAsm.AddAll(stats.UniqueMethodDeclsOverrideOrImplementAsm);
            UniqueAssemblies.AddAll(stats.UniqueAssemblies);
            UniqueAsmMethods.AddAll(stats.UniqueAsmMethods);
            UniqueAsmFields.AddAll(stats.UniqueAsmFields);
            UniqueAsmProperties.AddAll(stats.UniqueAsmProperties);
        }
コード例 #2
0
 protected bool Equals(ContextStatistics other)
 {
     return(NumRepositories == other.NumRepositories && NumUsers == other.NumUsers &&
            NumSolutions == other.NumSolutions && EstimatedLinesOfCode == other.EstimatedLinesOfCode &&
            NumTypeDeclTopLevel == other.NumTypeDeclTopLevel && NumTypeDeclNested == other.NumTypeDeclNested &&
            NumPartial == other.NumPartial && NumClasses == other.NumClasses &&
            NumInterfaces == other.NumInterfaces &&
            NumDelegates == other.NumDelegates && NumStructs == other.NumStructs && NumEnums == other.NumEnums &&
            NumUnusualType == other.NumUnusualType &&
            NumTypeDeclExtendsOrImplements == other.NumTypeDeclExtendsOrImplements &&
            NumMethodDeclsTotal == other.NumMethodDeclsTotal &&
            NumMethodDeclsOverrideOrImplement == other.NumMethodDeclsOverrideOrImplement &&
            NumMethodDeclsOverrideOrImplementAsm == other.NumMethodDeclsOverrideOrImplementAsm &&
            NumValidInvocations == other.NumValidInvocations &&
            NumUnknownInvocations == other.NumUnknownInvocations &&
            UniqueAssemblies.Equals(other.UniqueAssemblies) && NumAsmCalls == other.NumAsmCalls &&
            NumAsmDelegateCalls == other.NumAsmDelegateCalls && UniqueTypeDecl.Equals(other.UniqueTypeDecl) &&
            UniqueAsmMethods.Equals(other.UniqueAsmMethods) &&
            UniqueMethodDeclsOverrideOrImplementAsm.Equals(other.UniqueMethodDeclsOverrideOrImplementAsm) &&
            NumAsmFieldRead == other.NumAsmFieldRead && UniqueAsmFields.Equals(other.UniqueAsmFields) &&
            NumAsmPropertyRead == other.NumAsmPropertyRead &&
            UniqueAsmProperties.Equals(other.UniqueAsmProperties));
 }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = 63446;
         hashCode = (hashCode * 397) ^ NumRepositories;
         hashCode = (hashCode * 397) ^ NumUsers;
         hashCode = (hashCode * 397) ^ NumSolutions;
         hashCode = (hashCode * 397) ^ EstimatedLinesOfCode;
         hashCode = (hashCode * 397) ^ NumTypeDeclTopLevel;
         hashCode = (hashCode * 397) ^ NumTypeDeclNested;
         hashCode = (hashCode * 397) ^ NumPartial;
         hashCode = (hashCode * 397) ^ NumClasses;
         hashCode = (hashCode * 397) ^ NumInterfaces;
         hashCode = (hashCode * 397) ^ NumDelegates;
         hashCode = (hashCode * 397) ^ NumStructs;
         hashCode = (hashCode * 397) ^ NumEnums;
         hashCode = (hashCode * 397) ^ NumUnusualType;
         hashCode = (hashCode * 397) ^ NumTypeDeclExtendsOrImplements;
         hashCode = (hashCode * 397) ^ NumMethodDeclsTotal;
         hashCode = (hashCode * 397) ^ NumMethodDeclsOverrideOrImplement;
         hashCode = (hashCode * 397) ^ NumMethodDeclsOverrideOrImplementAsm;
         hashCode = (hashCode * 397) ^ UniqueMethodDeclsOverrideOrImplementAsm.GetHashCode();
         hashCode = (hashCode * 397) ^ NumValidInvocations;
         hashCode = (hashCode * 397) ^ NumUnknownInvocations;
         hashCode = (hashCode * 397) ^ UniqueTypeDecl.GetHashCode();
         hashCode = (hashCode * 397) ^ UniqueAssemblies.GetHashCode();
         hashCode = (hashCode * 397) ^ NumAsmCalls;
         hashCode = (hashCode * 397) ^ NumAsmDelegateCalls;
         hashCode = (hashCode * 397) ^ UniqueAsmMethods.GetHashCode();
         hashCode = (hashCode * 397) ^ NumAsmFieldRead;
         hashCode = (hashCode * 397) ^ UniqueAsmFields.GetHashCode();
         hashCode = (hashCode * 397) ^ NumAsmPropertyRead;
         hashCode = (hashCode * 397) ^ UniqueAsmProperties.GetHashCode();
         return(hashCode);
     }
 }