menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CookieCollection - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class CookieCollection

    Class which represents collection of cookies name and value pair of data.

    Inheritance
    System.Object
    System.Collections.Generic.Dictionary<System.String, System.String>
    CookieCollection
    Implements
    System.Collections.Generic.IDictionary<System.String, System.String>
    System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>
    System.Collections.IDictionary
    System.Collections.ICollection
    System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>
    System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>
    System.Collections.IEnumerable
    System.Runtime.Serialization.ISerializable
    System.Runtime.Serialization.IDeserializationCallback
    Inherited Members
    System.Collections.Generic.Dictionary<System.String, System.String>.Add(System.String, System.String)
    System.Collections.Generic.Dictionary<System.String, System.String>.Clear()
    System.Collections.Generic.Dictionary<System.String, System.String>.Comparer
    System.Collections.Generic.Dictionary<System.String, System.String>.ContainsKey(System.String)
    System.Collections.Generic.Dictionary<System.String, System.String>.ContainsValue(System.String)
    System.Collections.Generic.Dictionary<System.String, System.String>.Count
    System.Collections.Generic.Dictionary<System.String, System.String>.GetEnumerator()
    System.Collections.Generic.Dictionary<System.String, System.String>.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
    System.Collections.Generic.Dictionary<System.String, System.String>.Item[System.String]
    System.Collections.Generic.Dictionary<System.String, System.String>.Keys
    System.Collections.Generic.Dictionary<System.String, System.String>.OnDeserialization(System.Object)
    System.Collections.Generic.Dictionary<System.String, System.String>.Remove(System.String)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.Add(System.Collections.Generic.KeyValuePair<System.String, System.String>)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.Contains(System.Collections.Generic.KeyValuePair<System.String, System.String>)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.CopyTo(System.Collections.Generic.KeyValuePair<System.String, System.String>[], System.Int32)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.IsReadOnly
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.Remove(System.Collections.Generic.KeyValuePair<System.String, System.String>)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IDictionary<System.String, System.String>.Keys
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IDictionary<System.String, System.String>.Values
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>.GetEnumerator()
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>.Keys
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>.Values
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.ICollection.IsSynchronized
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.ICollection.SyncRoot
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Add(System.Object, System.Object)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Contains(System.Object)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.get_Item(System.Object)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.GetEnumerator()
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.IsFixedSize
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.IsReadOnly
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Item[System.Object]
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Keys
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Remove(System.Object)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.set_Item(System.Object, System.Object)
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Values
    System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IEnumerable.GetEnumerator()
    System.Collections.Generic.Dictionary<System.String, System.String>.TryGetValue(System.String, System.String)
    System.Collections.Generic.Dictionary<System.String, System.String>.Values
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.HtmlConverter
    Assembly: Syncfusion.HtmlConverter.Base.dll
    Syntax
    public class CookieCollection : Dictionary<string, string>, IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IDictionary, ICollection, IReadOnlyDictionary<string, string>, IReadOnlyCollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IEnumerable, ISerializable, IDeserializationCallback
    Remarks

    To know more details about cookies, refer this link.

    Examples
    Initialize HTML converter
    HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
    //Initialize WebKit converter settings
    WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
    //Assign the WebKit path
    webKitSettings.WebKitPath = @"/QtBinaries/";
    //Initialize cookie collection and add the cookies name and value. 
    CookieCollection cookieCollection = new CookieCollection();
    cookieCollection.Add("CookieName1", "CookieValue1");
    cookieCollection.Add("CookieName2", "CookieValue2");
    //Assign the cookie collection to the webkit settings.
    webKitSettings.Cookies = cookieCollection;
    //Assign the WebKit settings
    htmlConverter.ConverterSettings = webKitSettings;
    //Convert url to pdf
    PdfDocument document = htmlConverter.Convert("https://www.google.com");
    //Save and close the PDF document
    document.Save("Output.pdf");
    document.Close(true);
    'Initialize HTML converter
    Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
    'Initialize WebKit converter settings
    Dim webKitSettings As New WebKitConverterSettings()
    'Assign the WebKit path
    webKitSettings.WebKitPath = "/QtBinaries/"
    'Initialize cookie collection and add the cookies name and value. 
    Dim cookieCollection As New CookieCollection()
    cookieCollection.Add("CookieName1", "CookieValue1")
    cookieCollection.Add("CookieName2", "CookieValue2")
    'Assign the cookie collection to the webkit settings.
    webKitSettings.Cookies = cookieCollection
    'Assign the WebKit settings
    htmlConverter.ConverterSettings = webKitSettings
    'Convert url to pdf
    Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
    'Save and close the PDF document
    document.Save("Output.pdf")
    document.Close(True)

    Constructors

    CookieCollection()

    Declaration
    public CookieCollection()

    Implements

    System.Collections.Generic.IDictionary<TKey, TValue>
    System.Collections.Generic.ICollection<T>
    System.Collections.IDictionary
    System.Collections.ICollection
    System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    System.Runtime.Serialization.ISerializable
    System.Runtime.Serialization.IDeserializationCallback

    Extension Methods

    EnumerableExtensions.Average<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Average<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Max<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Max<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Min<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Min<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.OrderBy<T>(IEnumerable<T>, String, Func<String, Object, Object>)
    EnumerableExtensions.OrderByDescending<T>(IEnumerable<T>, String, Func<String, Object, Object>)
    EnumerableExtensions.OrderBy<T>(IEnumerable<T>, String, Func<String, Object, Object>, IComparer<Object>)
    EnumerableExtensions.OrderByDescending<T>(IEnumerable<T>, String, Func<String, Object, Object>, IComparer<Object>)
    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.IterateIndex<T>(IEnumerable<T>, Action<Int32, T>)
    FunctionalExtensions.IterateIndex<T>(IEnumerable<T>, Action<Int32, T>, Int32)
    FunctionalExtensions.Zip<TFirst, TSecond, TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)
    FunctionalExtensions.Fold<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.FoldLeft<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.FoldRight<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.ToObservableCollection<T>(IEnumerable<T>)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, String[], IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, List<String>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, Int32, Func<TElement, Object>[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    ChartExtensionUtils.DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)

    See Also

    WebKitConverterSettings
    BlinkConverterSettings
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved