Class fsData
A union type that stores a serialized value. The stored type can be one
of six different
types: null, boolean, double, Int64, string, Dictionary, or List.
Syntax
public sealed class fsData
Constructors
fsData()
Creates a fsData instance that holds null.
Declaration
fsData(Boolean)
Creates a fsData instance that holds a boolean.
Declaration
public fsData(bool boolean)
Parameters
Type |
Name |
Description |
Boolean |
boolean |
|
fsData(Dictionary<String, fsData>)
Creates a fsData instance that holds a dictionary of values.
Declaration
public fsData(Dictionary<string, fsData> dict)
Parameters
fsData(List<fsData>)
Creates a fsData instance that holds a list of values.
Declaration
public fsData(List<fsData> list)
Parameters
fsData(Double)
Creates a fsData instance that holds a double.
Declaration
Parameters
Type |
Name |
Description |
Double |
f |
|
fsData(Int64)
Creates a new fsData instance that holds an integer.
Declaration
Parameters
Type |
Name |
Description |
Int64 |
i |
|
fsData(String)
Creates a fsData instance that holds a string.
Declaration
public fsData(string str)
Parameters
Type |
Name |
Description |
String |
str |
|
Fields
False
Declaration
public static readonly fsData False
Field Value
Null
Declaration
public static readonly fsData Null
Field Value
True
Declaration
public static readonly fsData True
Field Value
Properties
AsBool
Casts this fsData to a boolean. Throws an exception if it is not a
boolean.
Declaration
public bool AsBool { get; }
Property Value
AsDictionary
Casts this fsData to a Dictionary. Throws an exception if it is not a
Dictionary.
Declaration
public Dictionary<string, fsData> AsDictionary { get; }
Property Value
AsDouble
Casts this fsData to a double. Throws an exception if it is not a
double.
Declaration
public double AsDouble { get; }
Property Value
AsInt64
Casts this fsData to an Int64. Throws an exception if it is not an
Int64.
Declaration
public long AsInt64 { get; }
Property Value
AsList
Casts this fsData to a List. Throws an exception if it is not a List.
Declaration
public List<fsData> AsList { get; }
Property Value
AsString
Casts this fsData to a string. Throws an exception if it is not a
string.
Declaration
public string AsString { get; }
Property Value
IsBool
Returns true if this fsData instance maps back to a boolean.
Declaration
public bool IsBool { get; }
Property Value
IsDictionary
Returns true if this fsData instance maps back to a Dictionary.
Declaration
public bool IsDictionary { get; }
Property Value
IsDouble
Returns true if this fsData instance maps back to a double.
Declaration
public bool IsDouble { get; }
Property Value
IsInt64
Returns true if this fsData instance maps back to an Int64.
Declaration
public bool IsInt64 { get; }
Property Value
IsList
Returns true if this fsData instance maps back to a List.
Declaration
public bool IsList { get; }
Property Value
IsNull
Returns true if this fsData instance maps back to null.
Declaration
public bool IsNull { get; }
Property Value
IsString
Returns true if this fsData instance maps back to a string.
Declaration
public bool IsString { get; }
Property Value
Type
Declaration
public fsDataType Type { get; }
Property Value
Methods
CreateDictionary()
Helper method to create a fsData instance that holds a dictionary.
Declaration
public static fsData CreateDictionary()
Returns
CreateList()
Helper method to create a fsData instance that holds a list.
Declaration
public static fsData CreateList()
Returns
CreateList(Int32)
Helper method to create a fsData instance that holds a list with the
initial capacity.
Declaration
public static fsData CreateList(int capacity)
Parameters
Type |
Name |
Description |
Int32 |
capacity |
|
Returns
Equals(Object)
Determines whether the specified object is equal to the current
object.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
Equals(fsData)
Determines whether the specified object is equal to the current
object.
Declaration
public bool Equals(fsData other)
Parameters
Type |
Name |
Description |
fsData |
other |
|
Returns
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
Int32 |
A hash code for this instance, suitable for use in hashing algorithms
and data structures like a hash table.
|
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
Equality(fsData, fsData)
Declaration
public static bool operator ==(fsData a, fsData b)
Parameters
Returns
Inequality(fsData, fsData)
Declaration
public static bool operator !=(fsData a, fsData b)
Parameters
Returns
Extension Methods