/// <summary>
 /// Adds a filledAutofillField to the collection, indexed by all of its hints.
 /// </summary>
 /// <returns>The add.</returns>
 /// <param name="filledAutofillField">Filled autofill field.</param>
 public void Add(FilledAutofillField filledAutofillField)
 {
     foreach (string hint in filledAutofillField.AutofillHints)
     {
         if (AutofillHintsHelper.IsSupportedHint(hint))
         {
             HintMap.Add(hint, filledAutofillField);
         }
         else
         {
             CommonUtil.loge($"Invalid hint: {hint}");
         }
     }
 }
示例#2
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            FilledAutofillField that = (FilledAutofillField)obj;

            if (!TextValue?.Equals(that.TextValue) ?? that.TextValue != null)
            {
                return(false);
            }
            if (DateValue != null ? !DateValue.Equals(that.DateValue) : that.DateValue != null)
            {
                return(false);
            }
            return(ToggleValue != null?ToggleValue.Equals(that.ToggleValue) : that.ToggleValue == null);
        }