Esempio n. 1
0
        //static ClassRef @class = new ClassRef(typeof(AirRecord));

        public AirRecord()
        {
            //Debug.EnableTracing(@class);

            FieldNames = new List <string> {
                nameof(Id), nameof(CreatedTime), nameof(Fields)
            };
            Fields = new FeildSet();
        }
Esempio n. 2
0
        //public Dictionary<string, object> GetFields(params string[] fieldNames)
        //{
        //	var fields = new Dictionary<string, object>();
        //	foreach (var name in fieldNames) {
        //		if (Fields.ContainsKey(name)) {
        //			fields.Add(name, Fields[name]);
        //		}
        //	}
        //	return fields;
        //}

        public FeildSet GetFields(IEnumerable <string> fieldNames = null)
        {
            if (fieldNames == null)
            {
                fieldNames = Fields.Keys;
            }

            var fields = new FeildSet();

            foreach (var name in fieldNames)
            {
                if (Fields.ContainsKey(name))
                {
                    fields.Add(name, Fields[name]);
                }
            }
            return(fields);
        }