Struct SeedContent
A SeedContent represents a unit of scraped data with a semantic type and a value. Two SeedContent with the same type and value are considered equal.
Implements
Inherited Members
Namespace: Snowflake.Scraping
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public struct SeedContent : IEquatable<SeedContent>
Constructors
SeedContent(String, String)
Initializes a new instance of the SeedContent struct.
Declaration
public SeedContent(string type, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | type | The semantic type of the content. |
| System.String | value | The value of the content. |
Fields
NullSeedType
Represents a null value seedcontent.
Declaration
public static readonly string NullSeedType
Field Value
| Type | Description |
|---|---|
| System.String |
RootSeedType
By convention, any non root seeds must be a child of the root seed, which has a type __root.
Declaration
public static readonly string RootSeedType
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
Type
Gets the semantic type of the content.
Declaration
public string Type { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Value
Gets the string value of the content.
Declaration
public string Value { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
Equals(SeedContent)
Determines if this SeedContent is equal to another.
Declaration
public bool Equals(SeedContent other)
Parameters
| Type | Name | Description |
|---|---|---|
| SeedContent | other | The other SeedContent |
Returns
| Type | Description |
|---|---|
| System.Boolean | if the two objects are equal. |
Equals(Object)
Determines if this SeedContent is equal to another object.
Declaration
public override bool Equals(object other)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | other | The object to compare. |
Returns
| Type | Description |
|---|---|
| System.Boolean | if the two objects are equal. |
Overrides
GetHashCode()
Gets the hashcode of this SeedContent.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | The hashcode of this SeedContent. |
Overrides
Operators
Equality(SeedContent, SeedContent)
Determines if two SeedContent are equal.
Declaration
public static bool operator ==(SeedContent x, SeedContent y)
Parameters
| Type | Name | Description |
|---|---|---|
| SeedContent | x | The SeedContent on the left side of the operator |
| SeedContent | y | The SeedContent on the right side of the operator |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the twoSeedContent are equal. |
Implicit(SeedContent to (String type, String value))
A SeedContent is polymorphically equivalent to a System.ValueTuple`2
Declaration
public static implicit operator (string type, string value)(SeedContent seedContent)
Parameters
| Type | Name | Description |
|---|---|---|
| SeedContent | seedContent | The SeedContent to coerce. |
Returns
| Type | Description |
|---|---|
| System.ValueTuple<System.String, System.String> |
Implicit((String type, String value) to SeedContent)
A SeedContent is polymorphically equivalent to a System.ValueTuple`2
Declaration
public static implicit operator SeedContent((string type, string value) contentTuple)
Parameters
| Type | Name | Description |
|---|---|---|
| System.ValueTuple<System.String, System.String> | contentTuple | The System.ValueTuple`2 to coerce. |
Returns
| Type | Description |
|---|---|
| SeedContent |
Inequality(SeedContent, SeedContent)
Determines if two SeedContent are not equal.
Declaration
public static bool operator !=(SeedContent x, SeedContent y)
Parameters
| Type | Name | Description |
|---|---|---|
| SeedContent | x | The SeedContent on the left side of the operator |
| SeedContent | y | The SeedContent on the right side of the operator |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the twoSeedContent are not equal. |