Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseObject"/> class.
        /// </summary>
        /// <param name="sOrigUrl">The original URL.</param>
        /// <param name="sPathToFile">The path to file.</param>
        /// <param name="sFileName">Name of the file.</param>
        /// <param name="sFileExtension">The file extension.</param>
        /// <param name="sContentType">Type of the content.</param>
        /// <param name="oRequestMsg">The request message.</param>
        /// <param name="listCookieInformation">The list cookie information.</param>
        public BaseObject(
            string sOrigUrl,
            string sPathToFile,
            string sFileName,
            string sFileExtension,
            string sContentType,
            HTTPMsg oRequestMsg,
            List <string> listCookieInformation)
        {
            this.RequestMessage = oRequestMsg;
            this.OriginalUrl    = sOrigUrl;
            this.PathToFileName = sPathToFile;
            this.FileName       = sFileName;
            this.FileExtension  = sFileExtension;
            this.ContentType    = sContentType;

            this.Referrer    = ObjectParser.ParseReferer((HttpRequestHeader)oRequestMsg.HTTPHeader);
            this.HostAddress = ObjectParser.ParseHostAddress((HttpRequestHeader)oRequestMsg.HTTPHeader);

            this.Content      = oRequestMsg.PairMessages[0].HTTPContent.Content;
            this.TimeStamp    = oRequestMsg.TimeStamp;
            this.ExportSource = oRequestMsg.ExportSources[0];

            this.CookieInformation = listCookieInformation;
            this.UniqueHash        = ComputeHash.GetMd5Hash(this.Content);


            this.FileSize            = this.Content.LongLength;
            this.ListOfNewReferences = new List <string>();
        }