Example #1
0
        /// <summary>
        /// Loads the state of the specified stateful operator from the specified state reader.
        /// </summary>
        /// <param name="reader">Reader to read operator state from.</param>
        /// <param name="node">Operator whose state to read.</param>
        public static void LoadState(this IOperatorStateReader reader, IStatefulOperator node)
        {
            var version = LoadVersionInfo(reader, node);

            if (version != null)
            {
                node.LoadState(reader, version);
            }
            else
            {
                reader.Reset();
            }
        }