Beispiel #1
0
 protected JsonQuery(SerializationInfo info, StreamingContext context)
 {
     this.NodeProperties           = GraphViewSerializer.DeserializeList <string>(info, "NodeProperties");
     this.EdgeProperties           = GraphViewSerializer.DeserializeList <string>(info, "EdgeProperties");
     this.NodeAlias                = info.GetString("NodeAlias");
     this.EdgeAlias                = info.GetString("EdgeAlias");
     this.selectDictionary         = GraphViewSerializer.DeserializeDictionaryList <string, WPrimaryExpression>(info, "selectDictionary", true);
     this.FlatProperties           = GraphViewSerializer.DeserializeHashSet <string>(info, "FlatProperties");
     this.JoinDictionary           = GraphViewSerializer.DeserializeDictionary <string, string>(info, "JoinDictionary");
     this.JsonServerCollectionName = info.GetString("JsonServerCollectionName");
     this.dummyQueryString         = info.GetString("dummyQuery");
     this.RawWhereClause           = new WSqlParser().ParseWhereClauseFromSelect(this.dummyQueryString);
 }
Beispiel #2
0
        void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
        {
            GraphViewSerializer.SerializeList(info, "NodeProperties", this.NodeProperties);
            GraphViewSerializer.SerializeList(info, "EdgeProperties", this.EdgeProperties);
            info.AddValue("NodeAlias", this.NodeAlias, typeof(string));
            info.AddValue("EdgeAlias", this.EdgeAlias, typeof(string));
            GraphViewSerializer.SerializeDictionaryList(info, "selectDictionary", this.selectDictionary);
            GraphViewSerializer.SerializeHashSet(info, "FlatProperties", this.FlatProperties);
            GraphViewSerializer.SerializeDictionary(info, "JoinDictionary", this.JoinDictionary);
            info.AddValue("JsonServerCollectionName", this.JsonServerCollectionName, typeof(string));

            this.dummyQueryString = "SELECT *\nFROM T\n" + $"WHERE {this.RawWhereClause.ToString("", true)}";
            info.AddValue("dummyQuery", this.dummyQueryString, typeof(string));
        }