public static SqlBinary AsBinary(this IQueryPlanNode planNode, ISystemContext context) { using (var memoryStream = new MemoryStream()) { context.SerializeQueryPlan(planNode, memoryStream); memoryStream.Flush(); return(new SqlBinary(memoryStream.ToArray())); } }
public static SqlBinary AsBinary(this IQueryPlanNode planNode, ISystemContext context) { using (var memoryStream = new MemoryStream()) { context.SerializeQueryPlan(planNode, memoryStream); memoryStream.Flush(); return new SqlBinary(memoryStream.ToArray()); } }
public static void SerializeQueryPlan(this ISystemContext context, IQueryPlanNode planNode, Stream stream) { using (var writer = new BinaryWriter(stream, Encoding.Unicode)) { context.SerializeQueryPlan(planNode, writer); } }