protected override int ComputeHashCode()
 {
     return(HashUtilities.Combine(CreationOpt?.GetHashCode() ?? 0,
                                  HashUtilities.Combine(SymbolOpt?.GetHashCode() ?? 0,
                                                        HashUtilities.Combine(AnalysisEntityOpt?.GetHashCode() ?? 0,
                                                                              HashUtilities.Combine(LocationTypeOpt?.GetHashCode() ?? 0,
                                                                                                    HashUtilities.Combine(_isSpecialSingleton.GetHashCode(), IsNull.GetHashCode()))))));
 }
Пример #2
0
 protected override void ComputeHashCodeParts(ArrayBuilder <int> builder)
 {
     builder.Add(CreationOpt.GetHashCodeOrDefault());
     builder.Add(HashUtilities.Combine(CreationCallStack));
     builder.Add(SymbolOpt.GetHashCodeOrDefault());
     builder.Add(AnalysisEntityOpt.GetHashCodeOrDefault());
     builder.Add(LocationTypeOpt.GetHashCodeOrDefault());
     builder.Add(_isSpecialSingleton.GetHashCode());
     builder.Add(IsNull.GetHashCode());
 }
 private void ComputeHashCodePartsIgnoringLocation(Action <int> addPart)
 {
     addPart(SymbolOpt.GetHashCodeOrDefault());
     addPart(HashUtilities.Combine(Indices));
     addPart(InstanceReferenceOperationSyntaxOpt.GetHashCodeOrDefault());
     addPart(CaptureIdOpt.GetHashCodeOrDefault());
     addPart(Type.GetHashCode());
     addPart(ParentOpt.GetHashCodeOrDefault());
     addPart(IsThisOrMeInstance.GetHashCode());
 }
Пример #4
0
 private void ComputeHashCodePartsIgnoringLocation(ArrayBuilder <int> builder)
 {
     builder.Add(SymbolOpt.GetHashCodeOrDefault());
     builder.Add(HashUtilities.Combine(Indices));
     builder.Add(InstanceReferenceOperationSyntaxOpt.GetHashCodeOrDefault());
     builder.Add(CaptureIdOpt.GetHashCodeOrDefault());
     builder.Add(Type.GetHashCode());
     builder.Add(ParentOpt.GetHashCodeOrDefault());
     builder.Add(IsThisOrMeInstance.GetHashCode());
 }
Пример #5
0
 protected override void ComputeHashCodeParts(Action <int> addPart)
 {
     addPart(CreationOpt.GetHashCodeOrDefault());
     addPart(HashUtilities.Combine(CreationCallStack));
     addPart(SymbolOpt.GetHashCodeOrDefault());
     addPart(CaptureIdOpt.GetHashCodeOrDefault());
     addPart(AnalysisEntityOpt.GetHashCodeOrDefault());
     addPart(LocationTypeOpt.GetHashCodeOrDefault());
     addPart(_isSpecialSingleton.GetHashCode());
     addPart(IsNull.GetHashCode());
 }
Пример #6
0
        private int ComputeIgnoringLocationHashCode()
        {
            var hashCode = HashUtilities.Combine(SymbolOpt?.GetHashCode() ?? 0,
                                                 HashUtilities.Combine(InstanceReferenceOperationSyntaxOpt?.GetHashCode() ?? 0,
                                                                       HashUtilities.Combine(Type.GetHashCode(),
                                                                                             HashUtilities.Combine(ParentOpt?.GetHashCode() ?? 0, Indices.Length.GetHashCode()))));

            foreach (AbstractIndex index in Indices)
            {
                hashCode = HashUtilities.Combine(index.GetHashCode(), hashCode);
            }

            return(hashCode);
        }
 public override int GetHashCode()
 {
     return(HashUtilities.Combine(CreationOpt?.GetHashCode() ?? 0,
                                  HashUtilities.Combine(SymbolOpt?.GetHashCode() ?? 0, LocationType.GetHashCode())));
 }
 protected override int ComputeHashCode()
 {
     return(HashUtilities.Combine(CreationOpt?.GetHashCode() ?? 0,
                                  HashUtilities.Combine(SymbolOpt?.GetHashCode() ?? 0,
                                                        HashUtilities.Combine(AnalysisEntityOpt?.GetHashCode() ?? 0, LocationTypeOpt?.GetHashCode() ?? 0))));
 }