5
WCF將匹配這樣的:WCF/Rest/UriTemplate可變長度查詢字符串參數列表?
http://localhost:8888/test/blahFirst/blahSecond/sdfsdf,wwewe
這樣:
[OperationContract]
[WebGet(UriTemplate = "test/{first}/{second}/{val1},{val2}")]
string GetVal(string first, string second, string val1, string val2);
有沒有一種方法,使VA11,VAL2是參數的可變長度的名單?所以它可能是val1,....,valN?並最終得到一個服務方法,如:
string GetVal(string first, string second, List<string> params);
或沿着這些線?
Basicall我發現我的問題的答案是「不,你不能直接這樣做。」但是,是的,你的方法將起作用。無論如何,我會給它一張支票。 – MonkeyWrench 2011-01-14 16:43:41