Ejemplo n.º 1
0
        /// <summary>
        /// Creates a field object from an object in the array at the specified index.
        /// </summary>
        /// <param name="array">The object array.</param>
        /// <param name="index">The index of the object in the array.</param>
        /// <returns></returns>
        public static Fields From(object[] array, int index)
        {
            object obj = array[index];
            if (obj != null)
            {
                Fields fields = array[index] as Fields;
                if (fields == null)
                {
                    fields = new Fields();
                    Map map = (Map)obj;
                    foreach (var key in map.Keys)
                    {
                        fields.Add(key, map[key]);
                    }

                    array[index] = fields;
                }

                return fields;
            }
            else
            {
                return null;
            }
        }
Ejemplo n.º 2
0
 internal FlowContext(ListenerLink link, int messages, Fields properties)
 {
     this.Link = link;
     this.Messages = messages;
     this.Properties = properties;
 }