Exemplo n.º 1
0
        public IDictionary <string, object> Encode <T>(T state,
                                                       IDictionary <string, IParseFieldOperation> operations,
                                                       ParseEncoder encoder) where T : IObjectState
        {
            var result = new Dictionary <string, object>();

            foreach (var pair in operations)
            {
                // Serialize the data
                var operation = pair.Value;

                result[pair.Key] = encoder.Encode(operation);
            }

            return(result);
        }
Exemplo n.º 2
0
        public IDictionary <string, object> Encode <T>(T state, IDictionary <string, IParseFieldOperation> operations, ParseEncoder encoder) where T : IObjectState
        {
            Dictionary <string, object> result = new Dictionary <string, object> {
            };

            foreach (KeyValuePair <string, IParseFieldOperation> pair in operations)
            {
                result[pair.Key] = encoder.Encode(pair.Value);
            }

            return(result);
        }