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
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.