Class Object#
Defined in File Object.cs
Inheritance Relationships#
Base Types#
public DynamicObject
public IDynamicMetaObjectProvider
public IEnumerable< KeyValuePair< string, object > >
public IEquatable< Object >
Derived Types#
public xbe.sdk.AuthMethod
(Class AuthMethod)public xbe.sdk.ModelBase
(Class ModelBase)public xbe.sdk.Models.ACLRecord
(Class ACLRecord)public xbe.sdk.Models.Address
(Class Address)public xbe.sdk.Models.AssignServerInstance
(Class AssignServerInstance)public xbe.sdk.Models.OrderItem
(Class OrderItem)public xbe.sdk.Models.ResourceCost
(Class ResourceCost)public xbe.sdk.Models.ResourceDefaults
(Class ResourceDefaults)public xbe.sdk.Models.ServiceStatus
(Class ServiceStatus)public xbe.sdk.Models.ServiceStatusList
(Class ServiceStatusList)public xbe.sdk.Models.TransactionApproval
(Class TransactionApproval)public xbe.sdk.Network.SocketMessage
(Class SocketMessage)public xbe.sdk.Utils.JWTPayload
(Class JWTPayload)
Class Documentation#
- class xbe.sdk.Object : DynamicObject, IDynamicMetaObjectProvider, IEnumerable<KeyValuePair<string, object>>, IEquatable<Object>#
Provides a dynamic object capable of storing any arbitrary set of properties at runtime. When this object is serialized to/from JSON only the data set in the Properties map will be included. Everything else will be ignored.
If sub-classing this make sure to call
SetProperty
orGetProperty
in the property accessor you wish to be serialized.Subclassed by xbe.sdk.AuthMethod, xbe.sdk.ModelBase, xbe.sdk.Models.ACLRecord, xbe.sdk.Models.Address, xbe.sdk.Models.AssignServerInstance, xbe.sdk.Models.OrderItem, xbe.sdk.Models.ResourceCost, xbe.sdk.Models.ResourceDefaults, xbe.sdk.Models.ServiceStatus, xbe.sdk.Models.ServiceStatusList, xbe.sdk.Models.TransactionApproval, xbe.sdk.Network.SocketMessage, xbe.sdk.Utils.JWTPayload
Public Functions
- T GetValue<T> (string name)#
- void SetValue<T> (string name, Type propertyType, PropertyInfo propertyInfo, FieldInfo fieldInfo, object newValue, T genericNewValue, out T refToBackingField)#
- Object ()#
- Object (Object other)
- Object (dynamic other)
- override IEnumerable<string> GetDynamicMemberNames ()#
- override bool TryDeleteMember (DeleteMemberBinder binder)#
- override bool TryGetMember (GetMemberBinder binder, out object result)#
- override bool TrySetMember (SetMemberBinder binder, object value)#
- void Merge (dynamic other)#
- Object (IEnumerable<KeyValuePair<string, object>> other)
- IEnumerator<KeyValuePair<string, object>> GetEnumerator ()#
- override int GetHashCode ()#
- override bool Equals (object obj)
- bool HasProperty (string name)#
Returns true if the object contains a property with the given name, otherwise false.
- Param name:
- Return:
- object GetProperty (string name)#
Returns the value for the property with the given name if found, otherwise a null value.
- Param name:
- Return:
- T GetProperty<T> (string name)
Returns the value for the property with the given name if found, otherwise a null value.
summary> Gets the Value associated with the specified name /summary> param name=”name”>The name of the value to get.
param name=”value”>the value associated with the specified name
returns> true: if contains an element with the specified name
- Param name:
- Return:
- bool TryGetValue<T> (string name, out object value)#
- void RemoveProperty (string name)#
Deletes the value for the property with the given name.
- Param name:
- Object SetProperty (string name, object value)#
Sets the property of the given name to the provided value.
- Param name:
- Param value:
- Return:
Returns this object as a convenience for chaining.
- void Add (string name, object value)#
Interface for adding properties to the object using the { } syntax.
- Param name:
Property name.
- Param value:
Property value.
- override string ToString ()#
Returns the state of the object encoded as a JSON string.
- Return:
- void Merge (IEnumerable<KeyValuePair<string, object>> other)
Properties
- int Count { get; set; }#
Returns the number of properties stored in this object.
- object > Properties { get; set; }#
The object’s underlying map of stored values.
- string RemoteUrl { get; set; }#
The URL of the remote server endpoint where the object is managed.
- KeyCollection PropertyNames { get; set; }#
- object this[string key] {get;set;}
Convenience accessor for indexing properties by [] syntax and strongly typed naming. e.g.
Object myObject = new Object(); myObject["prop1"] = "hello"; myObject.prop2 = "world";
- Param key:
- Return:
Public Static Functions
- Object Parse (string json)#
Parses the given JSON encoded string into a new Object instance.
- Param json:
- Return:
- T Parse<T> (string json)
Parses the given JSON string into a new T instance.
- Tparam T:
A subclass of Object.
- Param json:
- Return:
Public Static Attributes
- ObjectConverter Converter = new ObjectConverter(false)#
- ObjectConverter ConverterWithClass = new ObjectConverter(true)#
Protected Attributes
- Dictionary<string, object> properties = new Dictionary<string, object>()#