Example #1
0
 public bool Merge(ITagElementGuess other)
 {
     var otherBlock = other as TagBlockGuess;
     if (otherBlock == null)
         return false;
     ElementLayout.Merge(otherBlock.ElementLayout);
     return true;
 }
Example #2
0
        public bool Merge(ITagElementGuess other)
        {
            var otherBlock = other as TagBlockGuess;

            if (otherBlock == null)
            {
                return(false);
            }
            ElementLayout.Merge(otherBlock.ElementLayout);
            return(true);
        }
 public bool Merge(ITagElementGuess other)
 {
     var otherData = other as DataReferenceGuess;
     if (otherData == null)
         return false;
     if (Align == 0)
         Align = otherData.Align;
     else if (otherData.Align != 0)
         Align = Math.Min(Align, otherData.Align);
     return true;
 }
 public bool Merge(ITagElementGuess other)
 {
     var otherBlock = other as TagBlockGuess;
     if (otherBlock == null)
         return false;
     ElementLayout.Merge(otherBlock.ElementLayout);
     if (Align == 0)
         Align = otherBlock.Align;
     else if (otherBlock.Align != 0)
         Align = Math.Min(Align, otherBlock.Align);
     return true;
 }
 /// <summary>
 /// Adds a guess to the layout.
 /// </summary>
 /// <param name="offset">The offset of the guess from the beginning of the layout.</param>
 /// <param name="guess">The guess to add.</param>
 public void Add(uint offset, ITagElementGuess guess)
 {
     if (offset >= Size)
         throw new ArgumentOutOfRangeException("offset", "Offset cannot be past the end of the layout");
     ITagElementGuess otherGuess;
     if (_guessesByOffset.TryGetValue(offset, out otherGuess))
     {
         if (!otherGuess.Merge(guess))
             Debug.WriteLine("WARNING: Merge failure between {0} and {1} at offset 0x{2:X}", otherGuess.GetType(), guess.GetType(), offset);
     }
     else
     {
         _guessesByOffset[offset] = guess;
     }
 }
        public bool Merge(ITagElementGuess other)
        {
            var otherData = other as DataReferenceGuess;

            if (otherData == null)
            {
                return(false);
            }
            if (Align == 0)
            {
                Align = otherData.Align;
            }
            else if (otherData.Align != 0)
            {
                Align = Math.Min(Align, otherData.Align);
            }
            return(true);
        }
Example #7
0
 /// <summary>
 /// Adds a guess to the layout.
 /// </summary>
 /// <param name="offset">The offset of the guess from the beginning of the layout.</param>
 /// <param name="guess">The guess to add.</param>
 public void Add(uint offset, ITagElementGuess guess)
 {
     if (offset >= Size)
     {
         throw new ArgumentOutOfRangeException("offset", "Offset cannot be past the end of the layout");
     }
     if (_guessesByOffset.TryGetValue(offset, out ITagElementGuess otherGuess))
     {
         if (!otherGuess.Merge(guess))
         {
             Debug.WriteLine("WARNING: Merge failure between {0} and {1} at offset 0x{2:X}", otherGuess.GetType(), guess.GetType(), offset);
         }
     }
     else
     {
         _guessesByOffset[offset] = guess;
     }
 }
Example #8
0
        public bool Merge(ITagElementGuess other)
        {
            var otherBlock = other as TagBlockGuess;

            if (otherBlock == null)
            {
                return(false);
            }
            ElementLayout.Merge(otherBlock.ElementLayout);
            if (Align == 0)
            {
                Align = otherBlock.Align;
            }
            else if (otherBlock.Align != 0)
            {
                Align = Math.Min(Align, otherBlock.Align);
            }
            return(true);
        }
 public bool Merge(ITagElementGuess other)
 {
     return (other is DataReferenceGuess);
 }
 public bool Merge(ITagElementGuess other)
 {
     return (other is ResourceReferenceGuess);
 }
Example #11
0
 public bool Merge(ITagElementGuess other)
 {
     return(other is DataReferenceGuess);
 }
Example #12
0
 public void AddGuess(uint offset, ITagElementGuess guess)
 {
     _builder.AddGuess(offset, guess);
 }
Example #13
0
 public void AddGuess(uint offset, ITagElementGuess guess)
 {
     guess.Accept(offset, this);
 }
Example #14
0
 public bool Merge(ITagElementGuess other)
 {
     return(other is ResourceReferenceGuess);
 }
 public void AddGuess(uint offset, ITagElementGuess guess)
 {
     _builder.AddGuess(offset, guess);
 }
 public void AddGuess(uint offset, ITagElementGuess guess)
 {
     guess.Accept(offset, this);
 }