Click or drag to resize

Snak Class

This is preliminary documentation and is subject to change.

Represents a "snak", i.e. a pair of property and value.
Inheritance Hierarchy
SystemObject
  WikiClientLibrary.WikibaseSnak

Namespace: WikiClientLibrary.Wikibase
Assembly: WikiClientLibrary.Wikibase (in WikiClientLibrary.Wikibase.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public sealed class Snak

The Snak type exposes the following members.

Constructors
 NameDescription
Public methodSnak(String) Initializes a snak with specified property ID and empty value.
Public methodSnak(Entity, Object) Initializes a snak with specified property and data value.
Public methodSnak(String, SnakType) Initializes a snak with specified property ID and snak type.
Public methodSnak(String, Object, WikibaseDataType) Initializes a snak with specified property ID and data value.
Public methodSnak(String, JsonObject, WikibaseDataType) Initializes a snak with specified property ID and raw data value.
Top
Properties
 NameDescription
Public propertyDataTypeData value type.
Public propertyDataValueParsed value of datavalue node.
Public propertyHashSnak hash.
Public propertyPropertyIdProperty ID, with "P" prefix.
Public propertyRawDataValueRaw JSON value of datavalue node.
Public propertySnakTypeSnak type.
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Overrides ObjectToString)
Top
Remarks
To compare the equality of two snaks' values, consider using DeepEquals(JsonNode, JsonNode) on RawDataValue.
See Also