Пример #1
0
        public IDictionary <string, object> Encode(ParseInstallation installation)
        {
            IObjectState state = installation.GetState();
            IDictionary <string, object> data = PointerOrLocalIdEncoder.Instance.Encode(state.ToDictionary(x => x.Key, x => x.Value)) as IDictionary <string, object>;

            data["objectId"] = state.ObjectId;

            if (state.CreatedAt != null)
            {
                data["createdAt"] = state.CreatedAt.Value.ToString(ISO8601Format);
            }
            if (state.UpdatedAt != null)
            {
                data["updatedAt"] = state.UpdatedAt.Value.ToString(ISO8601Format);
            }

            return(data);
        }