Esempio n. 1
0
 partial void DeleteSql2005ResourceRequest(Sql2005ResourceRequest instance);
Esempio n. 2
0
 partial void UpdateSql2005ResourceRequest(Sql2005ResourceRequest instance);
Esempio n. 3
0
		private void detach_Sql2005ResourceRequests(Sql2005ResourceRequest entity)
		{
			this.SendPropertyChanging();
			entity.Sql2005Session = null;
		}
Esempio n. 4
0
 partial void InsertSql2005ResourceRequest(Sql2005ResourceRequest instance);
Esempio n. 5
0
        /// <summary>
        /// Override of the ResourceRequest creation function.
        /// Produces a populated Sql2005ResourceRequest object.
        /// </summary>
        /// <param name="pContext">HttpContext of request (will be used to populate RR object.</param>
        /// <returns>New ResourceRequestBase object, populated.</returns>
        public override ResourceRequestBase CreateNewResourceRequest(HttpContext pContext)
        {
            if (pContext == null)
                throw new ArgumentNullException("pContext");

            // Check to get the existing session ID, if it is already stored
            Guid? sessionID = GetSessionID(pContext.Session != null ? pContext.Session.SessionID : pContext.Request.Params["ASP.Net_SessionId"]);;
            if (!sessionID.HasValue)
            {
                sessionID = LogSession(pContext);
            }

            Sql2005ResourceRequest request = new Sql2005ResourceRequest();

            request.ResourceRequestID = Guid.NewGuid();
            request.Application = this.ApplicationName;
            request.Host = Environment.MachineName;
            request.User = (pContext.User != null ? pContext.User.Identity.Name : null);
            request.fkSessionID = sessionID;
            request.ResourceRequestTimeUtc = DateTime.UtcNow;
            request.RequestAcceptTypes = String.Join(", ", pContext.Request.AcceptTypes);
            request.AnonymousID = (pContext.Request.AnonymousID != null ? pContext.Request.AnonymousID : null);
            request.ApplicationPath = pContext.Request.ApplicationPath;
            request.RequestEncoding = pContext.Request.ContentEncoding.EncodingName;
            request.RequestType = pContext.Request.ContentType;
            request.RequestCookies = pContext.Request.Cookies.ToCSVString();
            request.RequestFormValues = pContext.Request.Form.ToCSVString();
            request.RequestHttpMethod = pContext.Request.HttpMethod;
            request.RequestIsAuthenticated = pContext.Request.IsAuthenticated;
            request.RequestIsLocal = pContext.Request.IsLocal;
            request.RequestIsSecure = pContext.Request.IsSecureConnection;
            request.RequestQueryString = pContext.Request.QueryString.ToCSVString();
            request.RequestServerVariables = pContext.Request.ServerVariables.ToCSVString();
            request.RequestBytes = pContext.Request.TotalBytes;
            request.URL = pContext.Request.RawUrl;
            request.UserAgent = pContext.Request.UserAgent;
            request.UserHost = pContext.Request.UserHostAddress;
            request.UserHostName = pContext.Request.UserHostName;
            request.UserRequestTime = pContext.Timestamp;
            request.ResponseEncoding = pContext.Response.ContentEncoding.EncodingName;
            request.ResponseType = pContext.Response.ContentType;
            request.ResponseCookies = pContext.Response.Cookies.ToCSVString();
            request.ResponseStatus = pContext.Response.Status;

            request.Handler = (pContext.Handler != null ? pContext.Handler.GetType().Name : null);

            return request;
        }