Esempio n. 1
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Type
            dictionary.Add("Type", Type);

            // Name
            dictionary.Add("Name", Name);

            // Checksum
            dictionary.Add("Checksum", Checksum);

            // Date Uploaded
            dictionary.Add("DateUploaded", JsonSerialisation.Serialise(DateUploaded));

            // Url
            dictionary.Add("Url", Url);

            // Size
            dictionary.Add("Size", Size);

            // Files
            var serialisedFiles = JsonSerialisation.Serialise(Files, (DlcPackageFile element) =>
            {
                return(element.Serialise());
            });

            dictionary.Add("Files", serialisedFiles);

            return(dictionary);
        }
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            if (Key != null)
            {
                dictionary.Add("Key", Key);
            }

            // Tags
            if (Tags != null)
            {
                var serialisedTags = JsonSerialisation.Serialise(Tags, (string element) =>
                {
                    return(element);
                });
                dictionary.Add("Tags", serialisedTags);
            }

            // Page
            if (Page != null)
            {
                dictionary.Add("Page", Page);
            }

            return(dictionary);
        }
Esempio n. 3
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Name
            dictionary.Add("Name", Name);

            // Location
            dictionary.Add("Location", Location);

            // Size
            dictionary.Add("Size", Size);

            // Checksum
            dictionary.Add("Checksum", Checksum);

            // Items
            var serialisedItems = JsonSerialisation.Serialise(Items, (EconomyPackageFileItem element) =>
            {
                return(element.Serialise());
            });

            dictionary.Add("Items", serialisedItems);

            return(dictionary);
        }
Esempio n. 4
0
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Match Id
            dictionary.Add("MatchID", MatchId);

            // State Data
            if (StateData != null)
            {
                dictionary.Add("StateData", StateData.Serialise());
            }

            // Turn Order
            if (TurnOrder != null)
            {
                var serialisedTurnOrder = JsonSerialisation.Serialise(TurnOrder, (string element) =>
                {
                    return(element);
                });
                dictionary.Add("TurnOrder", serialisedTurnOrder);
            }

            return(dictionary);
        }
Esempio n. 5
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Name
            dictionary.Add("Name", Name);

            // Key
            dictionary.Add("Key", Key);

            // Start Date
            dictionary.Add("StartDate", JsonSerialisation.Serialise(StartDate));

            // End Date
            if (EndDate.HasValue)
            {
                dictionary.Add("EndDate", JsonSerialisation.Serialise(EndDate.Value));
            }

            // Custom Data
            if (CustomData != null)
            {
                dictionary.Add("CustomData", CustomData.Serialise());
            }

            return(dictionary);
        }
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            dictionary.Add("Key", Key);

            // Name
            dictionary.Add("Name", Name);

            // Tags
            var serialisedTags = JsonSerialisation.Serialise(Tags, (string element) =>
            {
                return(element);
            });

            dictionary.Add("Tags", serialisedTags);

            // Custom Data
            if (CustomData != null)
            {
                dictionary.Add("CustomData", CustomData.Serialise());
            }

            // Patches
            var serialisedPatches = JsonSerialisation.Serialise(Patches, (UnrealMobilePatchDefinitionPatch element) =>
            {
                return(element.Serialise());
            });

            dictionary.Add("Patches", serialisedPatches);

            return(dictionary);
        }
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Type
            dictionary.Add("Type", Type);

            // Date
            dictionary.Add("Date", JsonSerialisation.Serialise(Date));

            // Parameters
            if (Parameters != null)
            {
                var serialisedParameters = JsonSerialisation.Serialise(Parameters, (string element) =>
                {
                    return(element);
                });
                dictionary.Add("Params", serialisedParameters);
            }

            // Count
            if (Count != null)
            {
                dictionary.Add("Count", Count);
            }

            return(dictionary);
        }
Esempio n. 8
0
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            dictionary.Add("Key", Key);

            // Page
            if (Page != null)
            {
                dictionary.Add("Page", Page);
            }

            // Partition Key
            if (PartitionKey != null)
            {
                dictionary.Add("PartitionKey", PartitionKey);
            }

            // Period
            if (Period.HasValue)
            {
                dictionary.Add("Period", JsonSerialisation.Serialise(Period.Value));
            }

            return(dictionary);
        }
Esempio n. 9
0
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            dictionary.Add("Key", Key);

            // Chilli Connect Ids
            var serialisedChilliConnectIds = JsonSerialisation.Serialise(ChilliConnectIds, (string element) =>
            {
                return(element);
            });

            dictionary.Add("ChilliConnectIDs", serialisedChilliConnectIds);

            // Include Me
            if (IncludeMe != null)
            {
                dictionary.Add("IncludeMe", IncludeMe);
            }

            // Partition Key
            if (PartitionKey != null)
            {
                dictionary.Add("PartitionKey", PartitionKey);
            }

            // Period
            if (Period.HasValue)
            {
                dictionary.Add("Period", JsonSerialisation.Serialise(Period.Value));
            }

            return(dictionary);
        }
Esempio n. 10
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            dictionary.Add("Key", Key);

            // Value
            if (Value != null)
            {
                dictionary.Add("Value", Value.Serialise());
            }

            // Has Attachment
            if (HasAttachment != null)
            {
                dictionary.Add("HasAttachment", HasAttachment);
            }

            // Write Lock
            if (WriteLock != null)
            {
                dictionary.Add("WriteLock", WriteLock);
            }

            // Date Created
            dictionary.Add("DateCreated", JsonSerialisation.Serialise(DateCreated));

            // Date Modified
            dictionary.Add("DateModified", JsonSerialisation.Serialise(DateModified));

            return(dictionary);
        }
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Match Type Key
            dictionary.Add("MatchTypeKey", MatchTypeKey);

            // Query
            if (Query != null)
            {
                var serialisedQuery = JsonSerialisation.Serialise(Query, (string element) =>
                {
                    return(element);
                });
                dictionary.Add("Query", serialisedQuery);
            }

            // Params
            if (Params != null)
            {
                var serialisedParams = JsonSerialisation.Serialise(Params, (MultiTypeValue element) =>
                {
                    return(element.Serialise());
                });
                dictionary.Add("Params", serialisedParams);
            }

            // Fallback To Any
            if (FallbackToAny != null)
            {
                dictionary.Add("FallbackToAny", FallbackToAny);
            }

            return(dictionary);
        }
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            dictionary.Add("Key", Key);

            // Name
            dictionary.Add("Name", Name);

            // Tags
            var serialisedTags = JsonSerialisation.Serialise(Tags, (string element) =>
            {
                return(element);
            });

            dictionary.Add("Tags", serialisedTags);

            // Custom Data
            if (CustomData != null)
            {
                dictionary.Add("CustomData", CustomData.Serialise());
            }

            // Costs
            dictionary.Add("Costs", Costs.Serialise());

            // Rewards
            dictionary.Add("Rewards", Rewards.Serialise());

            return(dictionary);
        }
Esempio n. 13
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            dictionary.Add("Key", Key);

            // Name
            dictionary.Add("Name", Name);

            // Tags
            var serialisedTags = JsonSerialisation.Serialise(Tags, (string element) =>
            {
                return(element);
            });

            dictionary.Add("Tags", serialisedTags);

            // Data
            if (Data != null)
            {
                dictionary.Add("Data", Data.Serialise());
            }

            return(dictionary);
        }
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            dictionary.Add("Key", Key);

            // Name
            dictionary.Add("Name", Name);

            // Tags
            var serialisedTags = JsonSerialisation.Serialise(Tags, (string element) =>
            {
                return(element);
            });

            dictionary.Add("Tags", serialisedTags);

            // Custom Data
            if (CustomData != null)
            {
                dictionary.Add("CustomData", CustomData.Serialise());
            }

            // Rules
            var serialisedRules = JsonSerialisation.Serialise(Rules, (ConversionRuleDefinition element) =>
            {
                return(element.Serialise());
            });

            dictionary.Add("Rules", serialisedRules);

            return(dictionary);
        }
Esempio n. 15
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Chilli Connect Id
            dictionary.Add("ChilliConnectID", ChilliConnectId);

            // Key
            dictionary.Add("Key", Key);

            // Value
            dictionary.Add("Value", Value.Serialise());

            // User Name
            if (UserName != null)
            {
                dictionary.Add("UserName", UserName);
            }

            // Display Name
            if (DisplayName != null)
            {
                dictionary.Add("DisplayName", DisplayName);
            }

            // Date Created
            dictionary.Add("DateCreated", JsonSerialisation.Serialise(DateCreated));

            // Date Modified
            dictionary.Add("DateModified", JsonSerialisation.Serialise(DateModified));

            return(dictionary);
        }
Esempio n. 16
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Key
            dictionary.Add("Key", Key);

            // Name
            dictionary.Add("Name", Name);

            // Tags
            var serialisedTags = JsonSerialisation.Serialise(Tags, (string element) =>
            {
                return(element);
            });

            dictionary.Add("Tags", serialisedTags);

            // Custom Data
            if (CustomData != null)
            {
                dictionary.Add("CustomData", CustomData.Serialise());
            }

            // Initial
            dictionary.Add("Initial", Initial);

            // Max
            dictionary.Add("Max", Max);

            return(dictionary);
        }
Esempio n. 17
0
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Date
            dictionary.Add("Date", JsonSerialisation.Serialise(Date));

            return(dictionary);
        }
Esempio n. 18
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Turn Number
            dictionary.Add("TurnNumber", TurnNumber);

            // State
            dictionary.Add("State", State);

            // Players Waiting For
            if (PlayersWaitingFor != null)
            {
                var serialisedPlayersWaitingFor = JsonSerialisation.Serialise(PlayersWaitingFor, (Player element) =>
                {
                    return(element.Serialise());
                });
                dictionary.Add("PlayersWaitingFor", serialisedPlayersWaitingFor);
            }

            // Player Turns
            if (PlayerTurns != null)
            {
                var serialisedPlayerTurns = JsonSerialisation.Serialise(PlayerTurns, (PlayerTurn element) =>
                {
                    return(element.Serialise());
                });
                dictionary.Add("PlayerTurns", serialisedPlayerTurns);
            }

            // Pre State Data
            if (PreStateData != null)
            {
                dictionary.Add("PreStateData", PreStateData.Serialise());
            }

            // Post State Data
            if (PostStateData != null)
            {
                dictionary.Add("PostStateData", PostStateData.Serialise());
            }

            // Date Started
            dictionary.Add("DateStarted", JsonSerialisation.Serialise(DateStarted));

            // Date Completed
            if (DateCompleted.HasValue)
            {
                dictionary.Add("DateCompleted", JsonSerialisation.Serialise(DateCompleted.Value));
            }

            return(dictionary);
        }
Esempio n. 19
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Seconds Remaining
            dictionary.Add("SecondsRemaining", SecondsRemaining);

            // Expires
            dictionary.Add("Expires", JsonSerialisation.Serialise(Expires));

            return(dictionary);
        }
Esempio n. 20
0
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Events
            var serialisedEvents = JsonSerialisation.Serialise(Events, (MetricsEvent element) =>
            {
                return(element.Serialise());
            });

            dictionary.Add("Events", serialisedEvents);

            return(dictionary);
        }
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Groups
            var serialisedGroups = JsonSerialisation.Serialise(Groups, (string element) =>
            {
                return(element);
            });

            dictionary.Add("Groups", serialisedGroups);

            return(dictionary);
        }
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // User Names
            var serialisedUserNames = JsonSerialisation.Serialise(UserNames, (string element) =>
            {
                return(element);
            });

            dictionary.Add("UserNames", serialisedUserNames);

            return(dictionary);
        }
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Item Ids
            var serialisedItemIds = JsonSerialisation.Serialise(ItemIds, (string element) =>
            {
                return(element);
            });

            dictionary.Add("ItemIDs", serialisedItemIds);

            return(dictionary);
        }
Esempio n. 24
0
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Keys
            var serialisedKeys = JsonSerialisation.Serialise(Keys, (string element) =>
            {
                return(element);
            });

            dictionary.Add("Keys", serialisedKeys);

            return(dictionary);
        }
Esempio n. 25
0
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // Properties
            var serialisedProperties = JsonSerialisation.Serialise(Properties, (MultiTypeValue element) =>
            {
                return(element.Serialise());
            });

            dictionary.Add("Properties", serialisedProperties);

            return(dictionary);
        }
Esempio n. 26
0
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // To
            dictionary.Add("To", To);

            // Title
            if (Title != null)
            {
                dictionary.Add("Title", Title);
            }

            // Text
            if (Text != null)
            {
                dictionary.Add("Text", Text);
            }

            // Data
            if (Data != null)
            {
                dictionary.Add("Data", Data.Serialise());
            }

            // Tags
            if (Tags != null)
            {
                var serialisedTags = JsonSerialisation.Serialise(Tags, (string element) =>
                {
                    return(element);
                });
                dictionary.Add("Tags", serialisedTags);
            }

            // Expiry
            if (Expiry != null)
            {
                dictionary.Add("Expiry", Expiry);
            }

            // Transfer
            if (Transfer != null)
            {
                dictionary.Add("Transfer", Transfer.Serialise());
            }

            return(dictionary);
        }
Esempio n. 27
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Match Id
            dictionary.Add("MatchID", MatchId);

            // State
            dictionary.Add("State", State);

            // Turn Type
            dictionary.Add("TurnType", TurnType);

            // Turn Number
            if (TurnNumber != null)
            {
                dictionary.Add("TurnNumber", TurnNumber);
            }

            // Turn Timeout
            if (TurnTimeout != null)
            {
                dictionary.Add("TurnTimeout", TurnTimeout.Serialise());
            }

            // Waiting Timeout
            if (WaitingTimeout != null)
            {
                dictionary.Add("WaitingTimeout", WaitingTimeout.Serialise());
            }

            // Players
            if (Players != null)
            {
                var serialisedPlayers = JsonSerialisation.Serialise(Players, (Player element) =>
                {
                    return(element.Serialise());
                });
                dictionary.Add("Players", serialisedPlayers);
            }

            // Can Submit Turn
            dictionary.Add("CanSubmitTurn", CanSubmitTurn);

            // Date Created
            dictionary.Add("DateCreated", JsonSerialisation.Serialise(DateCreated));

            return(dictionary);
        }
Esempio n. 28
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Start
            dictionary.Add("Start", JsonSerialisation.Serialise(Start));

            // End
            if (End.HasValue)
            {
                dictionary.Add("End", JsonSerialisation.Serialise(End.Value));
            }

            return(dictionary);
        }
        /// <summary>
        /// Serialises all body properties. The output will be a dictionary containing the
        /// body of the request in a form that can easily be converted to Json. Will return
        /// an empty dictionary if there is no body.
        /// </summary>
        ///
        /// <returns>The body Json in dictionary form.</returns>
        public IDictionary <string, object> SerialiseBody()
        {
            var dictionary = new Dictionary <string, object>();

            // User Id
            dictionary.Add("UserID", UserId);

            // Date
            dictionary.Add("Date", JsonSerialisation.Serialise(Date));

            // App Version
            dictionary.Add("AppVersion", AppVersion);

            return(dictionary);
        }
Esempio n. 30
0
        /// <summary>
        /// Serialises all properties. The output will be a dictionary containing the
        /// objects properties in a form that can easily be converted to Json.
        /// </summary>
        ///
        /// <returns>The serialised object in dictionary form.</returns>
        public IDictionary <string, object> Serialise()
        {
            var dictionary = new Dictionary <string, object>();

            // Chilli Connect Id
            dictionary.Add("ChilliConnectID", ChilliConnectId);

            // User Name
            if (UserName != null)
            {
                dictionary.Add("UserName", UserName);
            }

            // Display Name
            if (DisplayName != null)
            {
                dictionary.Add("DisplayName", DisplayName);
            }

            // Facebook Name
            dictionary.Add("FacebookName", FacebookName);

            // Facebook Profile Image
            dictionary.Add("FacebookProfileImage", FacebookProfileImage);

            // Date
            dictionary.Add("Date", JsonSerialisation.Serialise(Date));

            // Data
            if (Data != null)
            {
                dictionary.Add("Data", Data.Serialise());
            }

            // Score
            dictionary.Add("Score", Score);

            // Global Rank
            dictionary.Add("GlobalRank", GlobalRank);

            // Global Total
            dictionary.Add("GlobalTotal", GlobalTotal);

            // Local Rank
            dictionary.Add("LocalRank", LocalRank);

            return(dictionary);
        }