private void CollectFields(DatabaseStub stub, NameValueCollection input) { foreach (string key in input) { DatabaseStubElement element = new DatabaseStubElement() { Key = HttpUtility.HtmlDecode(key), Value = HttpUtility.HtmlDecode(input[key]), }; stub.Contents.Add(element); } }
private void AddOprindelse(DatabaseStub stub) { if (Request.UrlReferrer == null || stub.Contents.Any(lElement => lElement.Key == "new_oprindelse")) { return; } DatabaseStubElement element = new DatabaseStubElement() { Key = "new_oprindelse", Value = Request.UrlReferrer.AbsoluteUri, }; stub.Contents.Add(element); }
private void AddOprindelseIp(DatabaseStub stub) { if (stub.Contents.Any(lElement => lElement.Key == "new_oprindelseip")) { return; } DatabaseStubElement element = new DatabaseStubElement() { Key = "new_oprindelseip", Value = Request.UserHostAddress, }; stub.Contents.Add(element); }