Exemplo n.º 1
0
    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);
        }
    }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 3
0
    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);
    }