Search Results for

    Show / Hide Table of Contents

    Class ScrapedData

    A flexible dictionary of object values used to conveniently store scraped data of any Type in a key-value dictionary which can be saved as JSON using the Yield method. ScrapedData can hold data objects of any Type, including Classes.

    E.g:

    var Data = new ScrapedData();
    Data['title'] = "Page Title";
    Data['date'] = DateTime.Now;

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

    Constructors

    ScrapedData()

    Declaration
    public ScrapedData()

    Methods

    FromJson(String)

    Deserializes a ScrapedData object from JSON created using the toJson() method.

    Declaration
    public static ScrapedData FromJson(string json)
    Parameters
    Type Name Description
    System.String json
    Returns
    Type Description
    ScrapedData

    Get<T>(String)

    Returns the specified ScrapedData item cast as the appropriate type.

    E.g:
     Get<string>("url");  
    Declaration
    public T Get<T>(string key)
    Parameters
    Type Name Description
    System.String key

    Key

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Type

    Exceptions
    Type Condition
    System.Collections.Generic.KeyNotFoundException

    ToJson()

    Converts the ScrapedData to a JSON string.

    Declaration
    public string ToJson()
    Returns
    Type Description
    System.String

    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
    ☀
    ☾
    In This Article
    Back to top
    Install with Nuget