Beispiel #1
0
        protected CapFunction(SerializationInfo info, StreamingContext context)
        {
            List <string> labels = GraphViewSerializer.DeserializeList <string>(info, "labels");
            AdditionalSerializationInfo additionalInfo = (AdditionalSerializationInfo)context.Context;

            this.sideEffectFunction = new List <Tuple <string, IAggregateFunction> >();
            foreach (string label in labels)
            {
                this.sideEffectFunction.Add(new Tuple <string, IAggregateFunction>(label, additionalInfo.SideEffectFunctions[label]));
            }
        }
Beispiel #2
0
        public static Tuple <GraphViewCommand, GraphViewExecutionOperator> Deserialize(string serializationString)
        {
            string[] arr = (string[])DeserializeWithSoapFormatter(serializationString);

            string           commandString = arr[0];
            GraphViewCommand command       = (GraphViewCommand)DeserializeWithSoapFormatter(commandString);

            // Deserilization of sideEffectFunctions needs information about command.
            string sideEffectString = arr[1];
            AdditionalSerializationInfo additionalInfo          = new AdditionalSerializationInfo(command);
            WrapSideEffectFunctions     wrapSideEffectFunctions =
                (WrapSideEffectFunctions)DeserializeWithSoapFormatter(sideEffectString, additionalInfo);

            // Deserilization of op needs information about command and sideEffectFunctions.
            string opString = arr[2];

            additionalInfo.SideEffectFunctions = wrapSideEffectFunctions.sideEffectFunctions;
            GraphViewExecutionOperator op = (GraphViewExecutionOperator)DeserializeWithSoapFormatter(opString, additionalInfo);

            return(new Tuple <GraphViewCommand, GraphViewExecutionOperator>(command, op));
        }
Beispiel #3
0
        private void Reconstruct(StreamingContext context)
        {
            AdditionalSerializationInfo additionalInfo = (AdditionalSerializationInfo)context.Context;

            this.treeFunction = (TreeFunction)additionalInfo.SideEffectFunctions[this.sideEffectKey];
        }
Beispiel #4
0
        private void Reconstruct(StreamingContext context)
        {
            AdditionalSerializationInfo additionalInfo = (AdditionalSerializationInfo)context.Context;

            this.subgraphState = new SubgraphState(additionalInfo.Command, "");
        }