C# Class Mycroft.Messages.App.AppManifest

Inheritance: AppBase
Show file Open project: rit-sse-mycroft/core Class Usage Examples

Public Methods

Method Description
Deserialize ( string json ) : DataPacket

Returns a new AppManifest from the given json. If a property is not given in the json then the instance variable to which it corresponds is set to null. Capabilities will always be non-null, but may be empty Dependencies will always be non-null, but also may be empty If API was not supplied it is set to -1, since ints cannot be nulled

Serialize ( ) : string

Private Methods

Method Description
TryGetValueFromDynamic ( dynamic obj, string key ) : object

Try to get a value from a dynamic object

Validate ( AppManifest manifest ) : void

Validate a given manifest. If the manifest is invalid a ParseException is thrown. The Received property of that exception is set to an empty string, and should be set by the caller that knows about the json that was parsed.

Method Details

Deserialize() public static method

Returns a new AppManifest from the given json. If a property is not given in the json then the instance variable to which it corresponds is set to null. Capabilities will always be non-null, but may be empty Dependencies will always be non-null, but also may be empty If API was not supplied it is set to -1, since ints cannot be nulled
public static Deserialize ( string json ) : DataPacket
json string the manifest json to parse
return DataPacket

Serialize() public method

public Serialize ( ) : string
return string