Class Metadata
A helper class that's just a block of key value pairs that map string
keys to different types of data.
Inheritance
System.Object
Metadata
Implements
System.Collections.Generic.IEnumerable<
System.Collections.Generic.KeyValuePair<
System.String,
IProperty>>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Recolude.Core.dll
public class Metadata : IEnumerable<KeyValuePair<string, IProperty>>, IEnumerable
Constructors
Declaration
Declaration
public Metadata(Dictionary<string, IProperty> data)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, IProperty> |
data |
|
Declaration
public Metadata(Dictionary<string, string> basicData)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
basicData |
|
Properties
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public IProperty this[string key] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
key |
|
Property Value
Methods
Declaration
public bool AsBool(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool[] AsBoolArray(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean[] |
|
Declaration
public byte AsByte(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Byte |
|
Declaration
public byte[] AsByteArray(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Byte[] |
|
Declaration
public float AsFloat(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Single |
|
Declaration
public float[] AsFloatArray(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Single[] |
|
Declaration
public int AsInt(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public int[] AsIntArray(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int32[] |
|
Declaration
public Metadata AsMetadata(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Declaration
public Metadata[] AsMetadataArray(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Declaration
public string AsString(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
Declaration
public string[] AsStringArray(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.String[] |
|
Declaration
public DateTime AsTime(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.DateTime |
|
Declaration
public DateTime[] AsTimeArray(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.DateTime[] |
|
Declaration
public T AsType<T>(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type Parameters
Declaration
public Vector2 AsVector2(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
UnityEngine.Vector2 |
|
Declaration
public Vector2[] AsVector2Array(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
UnityEngine.Vector2[] |
|
Declaration
public Vector3 AsVector3(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
UnityEngine.Vector3 |
|
Declaration
public Vector3[] AsVector3Array(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
UnityEngine.Vector3[] |
|
Declaration
public bool ContainsKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
Declaration
public IEnumerator<KeyValuePair<string, IProperty>> GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, IProperty>> |
|
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Declaration
public bool IsFloat(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool IsInt(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool IsString(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool IsType<T>(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Declaration
public bool IsVector2(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public bool IsVector3(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static Metadata Read(BinaryUtilReader reader)
Parameters
Returns
Declaration
public static Metadata Read(BinaryUtilReader reader, string[] metadataKeys)
Parameters
Returns
Declaration
Declaration
Returns
Type |
Description |
System.String |
|
Declaration
public Dictionary<string, string> ToSimpleDictionary()
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
|
Declaration
public void Write(BinaryWriter writer)
Parameters
Type |
Name |
Description |
System.IO.BinaryWriter |
writer |
|
Explicit Interface Implementations
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable