protected override List <DbParameter> GetFilterParameters() { List <DbParameter> temp; if (ContextParams != null) { temp = FilterParams == null ? ContextParams : ContextParams.Union(FilterParams).ToList(); } else { temp = FilterParams; } return(temp); }
public void TestContextEscaping() { var context = new StringDictionary(); context.Add("key", "val=ue"); var uploadParams = new ImageUploadParams { Context = context }; Assert.AreEqual(@"key=val\=ue", uploadParams.ToParamsDictionary()["context"]); context.Add(@"hello=world|2", "goodbye|wo=rld2"); var contextParams = new ContextParams() { Context = @"val\=ue", ContextDict = context }; Assert.AreEqual(@"key=val\=ue|hello\=world\|2=goodbye\|wo\=rld2|val\=ue", contextParams.ToParamsDictionary()["context"]); }
protected override List <DbParameter> GetFilterParameters() { return(FilterParams == null ? ContextParams : ContextParams.Union(FilterParams).ToList()); }