public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(TargetEdge.GetHashCode(), SourceEdge.GetHashCode()));
 }
Exemple #2
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(hashCode(Path), hashCode(HashOrContent)));
Exemple #3
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Protocol.GetHashCode(), Id.GetHashCode(), Version.GetHashCode(), Alias?.GetHashCode() ?? 0));
 }
Exemple #4
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(NameId.GetHashCode(), Value.GetHashCode()));
 }
Exemple #5
0
 /// <summary>
 /// Hashing.
 /// </summary>
 public int GetHashCode([DisallowNull] NameEntry obj) =>
 HashCodeHelper.Combine(obj.Prefix.GetHashCode(), obj.Atom.GetHashCode());
Exemple #6
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(ReparsePointType.GetHashCode(), m_targetString.GetHashCode()));
 }
Exemple #7
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(MinVersion.Value, MaxVersion.Value));
 }
Exemple #8
0
 /// <summary>
 /// Class constructor
 /// </summary>
 protected ClosureFunctionFilter(PipFilter inner, ClosureMode closureMode = ClosureMode.TransitiveIncludingSelf)
 {
     Inner            = inner;
     ClosureMode      = closureMode;
     m_cachedHashCode = HashCodeHelper.Combine(Inner.GetHashCode(), GetType().GetHashCode(), (int)ClosureMode);
 }
Exemple #9
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(
                Key.GetHashCode(),
                HashCodeHelper.Combine(Values, id => id.Value)));
 }
Exemple #10
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(ReadCounters.GetHashCode(), WriteCounters.GetHashCode(), OtherCounters.GetHashCode()));
 }
Exemple #11
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(OperationCount.GetHashCode(), TransferCount.GetHashCode()));
 }
Exemple #12
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Type.GetHashCode(), Hash.GetHashCode(), PathEntry.GetHashCode()));
 }
Exemple #13
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Count, SizeInBytes));
 }
Exemple #14
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(AllTableStats.Select(t => t.GetHashCode()).ToArray()));
 }
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Hash.GetHashCode(), TimeToLive.GetHashCode(), Usn.GetHashCode(), Length.GetHashCode()));
 }
Exemple #16
0
 /// <inheritdoc/>
 public override int GetHashCode() => HashCodeHelper.Combine(Src, Dest);
Exemple #17
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Name.Value, Version.GetHashCode()));
 }
Exemple #18
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Pattern.GetHashCode(), (int)Options));
 }
Exemple #19
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(WarningRegex.GetHashCode(), LogErrorToConsole ? 1 : 0, LogOutputToConsole ? 1 : 0));
 }
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(FileContentInfo.GetHashCode(), Subscription.GetHashCode(), ReparsePointInfo.GetHashCode()));
 }
Exemple #21
0
        /// <summary>
        /// Creates a new PipConstructionHelper
        /// </summary>
        /// <remarks>
        /// Ideally this function would take ModuleId, FullSymbol QualifierId and compute uniqueOutputLocation itself. Unfortunately today the data is not yet
        /// exposed via IPipGraph, therefore the responsibility is on the call site for now.
        /// </remarks>
        public static PipConstructionHelper Create(
            PipExecutionContext context,
            AbsolutePath objectRoot,
            AbsolutePath redirectedRoot,
            AbsolutePath tempRoot,
            IPipGraph pipGraph,
            ModuleId moduleId,
            string moduleName,
            RelativePath specRelativePath,
            FullSymbol symbol,
            LocationData thunkLocation,
            QualifierId qualifierId)
        {
            var stringTable = context.StringTable;
            var pathTable   = context.PathTable;

            // We have to manually compute the pipPipUniqueString here, Ideally we pass PackageId, SpecFile, FullSymbol and qualiferId and have it computed inside, but the IPipGraph does not allow querying it for now.
            string hashString;
            long   semiStableHashSeed = 0;

            using (var builderWrapper = Pools.GetStringBuilder())
            {
                var builder = builderWrapper.Instance;

                builder.Append(moduleName);
                builder.Append('/');
                semiStableHashSeed = HashCodeHelper.GetOrdinalHashCode64(moduleName);

                if (specRelativePath.IsValid)
                {
                    string specPath = specRelativePath.ToString(stringTable);
                    builder.Append(specPath);
                    builder.Append('/');
                    semiStableHashSeed = HashCodeHelper.Combine(semiStableHashSeed, HashCodeHelper.GetOrdinalHashCode64(specPath));
                }

                var symbolName = symbol.ToStringAsCharArray(context.SymbolTable);
                builder.Append(symbolName);
                builder.Append('/');
                semiStableHashSeed = HashCodeHelper.Combine(semiStableHashSeed, HashCodeHelper.GetOrdinalHashCode64(symbolName));

                var qualifierDisplayValue = context.QualifierTable.GetCanonicalDisplayString(qualifierId);
                builder.Append(qualifierDisplayValue);
                semiStableHashSeed = HashCodeHelper.Combine(semiStableHashSeed, HashCodeHelper.GetOrdinalHashCode64(qualifierDisplayValue));

                var pipPipUniqueString = builder.ToString();
                hashString = Hash(pipPipUniqueString);
            }

            var pipRelativePath = RelativePath.Create(
                PathAtom.Create(stringTable, hashString.Substring(0, 1)),
                PathAtom.Create(stringTable, hashString.Substring(1, 1)),
                PathAtom.Create(stringTable, hashString.Substring(2)));

            var valuePip = new ValuePip(symbol, qualifierId, thunkLocation);

            return(new PipConstructionHelper(
                       context,
                       objectRoot,
                       redirectedRoot,
                       tempRoot,
                       pipGraph,
                       moduleId,
                       moduleName,
                       valuePip,
                       pipRelativePath,
                       semiStableHashSeed));
        }
Exemple #22
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Path.GetHashCode(), Name.GetHashCode()));
 }
Exemple #23
0
 /// <nodoc />
 private QualifiedModuleId(ModuleLiteralId id, QualifierId qualifier)
 {
     Id          = id;
     QualifierId = qualifier;
     m_hashCode  = HashCodeHelper.Combine(Id.GetHashCode(), QualifierId.GetHashCode());
 }
Exemple #24
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(FileId.GetHashCode(), Usn.GetHashCode(), (int)Reason, ContainerFileId.GetHashCode()));
 }
Exemple #25
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(hashCode(Path), hashCode(Flags), hashCode(Pattern), hashCode(AccessType), hashCode(Hash)));
Exemple #26
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Thunk.GetHashCode(), QualifierId.GetHashCode()));
 }
Exemple #27
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(hashCode(Path), hashCode(Attributes)));
Exemple #28
0
 /// <nodoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Id.GetHashCode(), DisplayName.GetHashCode(), Name.GetHashCode(), Version.GetHashCode()));
 }
Exemple #29
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine((int)EntryType, (int)m_escaping, m_data));
 }
Exemple #30
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(FromInclusive.GetHashCode(), ToInclusive.GetHashCode()));
 }