/// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.TimestampUtc)
 .Hash(this.Id)
 .Hash(this.SendEmailResponse)
 .Value;
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     return(HashCodeHelper.CombineHashCodes(X, Y));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode() => HashCodeHelper.Hash(start, end);
Exemplo n.º 4
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine((int)EntryType, (int)m_escaping, m_data));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Value.GetHashCode(), Name.GetHashCode()));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data
 /// structures like a hash table.
 /// </returns>
 public override int GetHashCode() => HashCodeHelper.Hash(recurrence, daylightSavingsIndicator);
Exemplo n.º 7
0
 public override int GetHashCode() =>
 HashCodeHelper.Initialize().Hash(standardOffset).Hash(dstRecurrence).Hash(standardRecurrence).Value;
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.MemberHash)
 .Hash(this.Type)
 .Value;
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(FileContentInfo.GetHashCode(), Identity.GetHashCode()));
 }
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.Year)
 .Value;
Exemplo n.º 11
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Line, Position));
 }
Exemplo n.º 12
0
 /// <inheritdoc />
 public override int GetHashCode(OffsetDateTime obj) => HashCodeHelper.Hash(obj.yearMonthDayCalendar, obj.NanosecondOfDay);
Exemplo n.º 13
0
 /// <summary>
 /// Returns a hash code for this offset date and time.
 /// </summary>
 /// <returns>A hash code for this offset date and time.</returns>
 public override int GetHashCode() => HashCodeHelper.Hash(LocalDateTime, Offset);
Exemplo n.º 14
0
 public override int GetHashCode() =>
 PredecessorEdge != null?HashCodeHelper.Combine(MarkedEdge.GetHashCode(), PredecessorEdge.GetHashCode(), Cost.GetHashCode())
     : HashCodeHelper.Combine(MarkedEdge.GetHashCode(), Cost.GetHashCode());
Exemplo n.º 15
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(Hash.GetHashCode(), SerializedLengthAndExistence.GetHashCode()));
 }
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.NodeType)
 .Hash(this.Type)
 .Hash(this.Name)
 .Value;
Exemplo n.º 17
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(m_absolutePath.GetHashCode(), m_lineInfo.GetHashCode(), m_absolutePosition.GetHashCode()));
 }
Exemplo n.º 18
0
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.Email)
 .Hash(this.Vid)
 .Hash(this.Properties)
 .Value;
Exemplo n.º 19
0
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.Statement)
 .Value;
Exemplo n.º 20
0
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.NodeType)
 .Hash(this.Type)
 .Hash(this.NewExpressionRepresentation)
 .Hash(this.Bindings)
 .Value;
Exemplo n.º 21
0
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.OriginalSubject)
 .Hash(this.Summary)
 .Value;
Exemplo n.º 22
0
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.OutputParameter)
 .Hash(this.Value)
 .Value;
Exemplo n.º 23
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 tempRoot,
            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,
                       tempRoot,
                       moduleId,
                       moduleName,
                       valuePip,
                       pipRelativePath,
                       semiStableHashSeed));
        }
Exemplo n.º 24
0
        public override int GetHashCode()
        {
            var result = HashCodeHelper.Initialize().Hash(this.SomeValue).Hash(this.SomeValue2).Hash(this.ExpressionBodiedProperty).Value;

            return(result);
        }
Exemplo n.º 25
0
 public override int GetHashCode()
 {
     return(HashCodeHelper.CombineHashCodes(97621, Condition, IfBlock, ElseBlock));
 }
Exemplo n.º 26
0
 /// <inheritdoc />
 public override int GetHashCode() => HashCodeHelper.Initialize()
 .Hash(this.ParentInt)
 .Hash(this.Child2Int)
 .Hash(this.Grandchild2AInt)
 .Value;
Exemplo n.º 27
0
 /// <summary>
 /// Returns a hash code for this offset time.
 /// </summary>
 /// <returns>A hash code for this offset time.</returns>
 public override int GetHashCode() => HashCodeHelper.Hash(TimeOfDay, Offset);
 /// <inheritdoc />
 public override int GetHashCode() =>
 HashCodeHelper.Initialize()
 .Hash(this.UnitOfTimeKind)
 .Hash(this.UnitOfTimeGranularity)
 .Value;
Exemplo n.º 29
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(ReparsePointType.GetHashCode(), m_targetString.GetHashCode()));
 }
Exemplo n.º 30
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeHelper.Combine(LazyLineInfo.GetHashCode(), Path.GetHashCode()));
 }