/* * Construct header value string */ internal String ToHeaderString() { StringBuilder s; Object item; int i, n; if (_varyStar) { return("*"); } else if (_headers != null) { s = new StringBuilder(); for (i = 0, n = _headers.Size; i < n; i++) { item = _headers.GetValue(i); if (item != null) { HttpCachePolicy.AppendValueToHeader(s, (String)item); } } if (s.Length > 0) { return(s.ToString()); } } return(null); }
internal String[] GetParams() { String[] s = null; Object item; int i, j, c, n; if (_ignoreParams == 1) { s = new String[1] { "" }; } else if (_paramsStar) { s = new String[1] { "*" }; } else if (_parameters != null) { n = _parameters.Size; c = 0; for (i = 0; i < n; i++) { item = _parameters.GetValue(i); if (item != null) { c++; } } if (c > 0) { s = new string[c]; j = 0; for (i = 0; i < n; i++) { item = _parameters.GetValue(i); if (item != null) { s[j] = (String)item; j++; } } Debug.Assert(j == c, "j == c"); } } return(s); }