Exemple #1
0
        // Cookie names should be unique, so this is actually probably okay.
        public IToken?FindClosestEquivalent(TokenCollection tokens)
        {
            List <IToken> matches = tokens.GetByName(this.Name);

            if (matches.Count > 1)
            {
                Console.WriteLine("WARNING: Multiple cookies with the same name. This probably shouldn't happen.");
                foreach (IToken match in matches)
                {
                    Console.WriteLine($"\t {match.ToString()}");
                }
            }
            if (matches.Count >= 1)
            {
                return(matches[0]);
            }
            return(null);
        }
Exemple #2
0
 // TODO: This may actually need an implementation.
 public IToken?FindClosestEquivalent(TokenCollection tokens)
 {
     throw new NotImplementedException();
 }