internal static ContentDispositionInfo GetContentDisposition(string value) { if (string.IsNullOrEmpty(value)) { return(null); } Match m = _getContentDisposition.Match(value); if (!m.Success) { return(null); } string val = m.Value; ContentDispositionInfo cdi = new ContentDispositionInfo(); m = _getContentDispositionName.Match(val); if (m.Success) { cdi.name = m.Value; } m = _getContentDispositionFileName.Match(val); if (m.Success) { cdi.filename = GetFileName(m.Value); } return(cdi); }
internal static ContentDispositionInfo GetContentDisposition(string value) { if (string.IsNullOrEmpty(value)) return null; Match m = _getContentDisposition.Match(value); if (!m.Success) return null; string val = m.Value; ContentDispositionInfo cdi = new ContentDispositionInfo(); m = _getContentDispositionName.Match(val); if (m.Success) cdi.name = m.Value; m = _getContentDispositionFileName.Match(val); if (m.Success) cdi.filename =GetFileName(m.Value); return cdi; }