Пример #1
0
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(TargetEdge.GetHashCode(), SourceEdge.GetHashCode()));
 }
Пример #2
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(hashCode(Path), hashCode(HashOrContent)));
Пример #3
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Protocol.GetHashCode(), Id.GetHashCode(), Version.GetHashCode(), Alias?.GetHashCode() ?? 0));
 }
Пример #4
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(NameId.GetHashCode(), Value.GetHashCode()));
 }
Пример #5
0
 /// <summary>
 /// Hashing.
 /// </summary>
 public int GetHashCode([DisallowNull] NameEntry obj) =>
 HashCodeHelper.Combine(obj.Prefix.GetHashCode(), obj.Atom.GetHashCode());
Пример #6
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(ReparsePointType.GetHashCode(), m_targetString.GetHashCode()));
 }
Пример #7
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(MinVersion.Value, MaxVersion.Value));
 }
Пример #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);
 }
Пример #9
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(
                Key.GetHashCode(),
                HashCodeHelper.Combine(Values, id => id.Value)));
 }
Пример #10
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(ReadCounters.GetHashCode(), WriteCounters.GetHashCode(), OtherCounters.GetHashCode()));
 }
Пример #11
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(OperationCount.GetHashCode(), TransferCount.GetHashCode()));
 }
Пример #12
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Type.GetHashCode(), Hash.GetHashCode(), PathEntry.GetHashCode()));
 }
Пример #13
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Count, SizeInBytes));
 }
Пример #14
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(AllTableStats.Select(t => t.GetHashCode()).ToArray()));
 }
Пример #15
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Hash.GetHashCode(), TimeToLive.GetHashCode(), Usn.GetHashCode(), Length.GetHashCode()));
 }
Пример #16
0
 /// <inheritdoc/>
 public override int GetHashCode() => HashCodeHelper.Combine(Src, Dest);
Пример #17
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Name.Value, Version.GetHashCode()));
 }
Пример #18
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Pattern.GetHashCode(), (int)Options));
 }
Пример #19
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(WarningRegex.GetHashCode(), LogErrorToConsole ? 1 : 0, LogOutputToConsole ? 1 : 0));
 }
Пример #20
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(FileContentInfo.GetHashCode(), Subscription.GetHashCode(), ReparsePointInfo.GetHashCode()));
 }
Пример #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));
        }
Пример #22
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Path.GetHashCode(), Name.GetHashCode()));
 }
Пример #23
0
 /// <nodoc />
 private QualifiedModuleId(ModuleLiteralId id, QualifierId qualifier)
 {
     Id          = id;
     QualifierId = qualifier;
     m_hashCode  = HashCodeHelper.Combine(Id.GetHashCode(), QualifierId.GetHashCode());
 }
Пример #24
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(FileId.GetHashCode(), Usn.GetHashCode(), (int)Reason, ContainerFileId.GetHashCode()));
 }
Пример #25
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(hashCode(Path), hashCode(Flags), hashCode(Pattern), hashCode(AccessType), hashCode(Hash)));
Пример #26
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Thunk.GetHashCode(), QualifierId.GetHashCode()));
 }
Пример #27
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(hashCode(Path), hashCode(Attributes)));
Пример #28
0
 /// <nodoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Id.GetHashCode(), DisplayName.GetHashCode(), Name.GetHashCode(), Version.GetHashCode()));
 }
Пример #29
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine((int)EntryType, (int)m_escaping, m_data));
 }
Пример #30
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(FromInclusive.GetHashCode(), ToInclusive.GetHashCode()));
 }