コード例 #1
0
        /// <summary>
        /// Create a sessionXml from the session summary provided
        /// </summary>
        /// <returns></returns>
        public static SessionXml ToSessionXml(ISessionSummary sessionSummary)
        {
            if (sessionSummary == null)
            {
                throw new ArgumentNullException(nameof(sessionSummary));
            }


            SessionXml newObject = ToSessionXml(sessionSummary.Id, sessionSummary.ComputerId, 0, false, false, true, sessionSummary.StartDateTime, sessionSummary.EndDateTime, sessionSummary.FullyQualifiedUserName,
                                                sessionSummary.Product, sessionSummary.Application, sessionSummary.Environment,
                                                sessionSummary.PromotionLevel, sessionSummary.ApplicationVersion.ToString(), sessionSummary.ApplicationType.ToString(),
                                                sessionSummary.ApplicationDescription, sessionSummary.Caption, sessionSummary.Status.ToString(),
                                                sessionSummary.TimeZoneCaption, sessionSummary.StartDateTime, sessionSummary.EndDateTime, Convert.ToInt32(sessionSummary.Duration.TotalSeconds),
                                                sessionSummary.AgentVersion.ToString(), sessionSummary.UserName, sessionSummary.UserDomainName,
                                                sessionSummary.HostName, sessionSummary.DnsDomainName, sessionSummary.MessageCount, sessionSummary.CriticalCount,
                                                sessionSummary.ErrorCount, sessionSummary.WarningCount, sessionSummary.OSPlatformCode,
                                                sessionSummary.OSVersion.ToString(), sessionSummary.OSServicePack, sessionSummary.OSCultureName, sessionSummary.OSArchitecture.ToString(),
                                                sessionSummary.OSBootMode.ToString(), sessionSummary.OSSuiteMask, sessionSummary.OSProductType, sessionSummary.RuntimeVersion.ToString(),
                                                sessionSummary.RuntimeArchitecture.ToString(), sessionSummary.CurrentCultureName, sessionSummary.CurrentUICultureName,
                                                sessionSummary.MemoryMB, sessionSummary.Processors, sessionSummary.ProcessorCores, sessionSummary.UserInteractive,
                                                sessionSummary.TerminalServer, sessionSummary.ScreenWidth, sessionSummary.ScreenHeight, sessionSummary.ColorDepth,
                                                sessionSummary.CommandLine, false, 0, sessionSummary.Properties);

            return(newObject);
        }
コード例 #2
0
        /// <summary>
        /// Create a single session XML object from its minimal raw information.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="version"></param>
        /// <param name="deleted"></param>
        /// <returns></returns>
        public static SessionXml ToSessionXml(Guid id, long version, bool deleted)
        {
            SessionXml newObject = new SessionXml();

            newObject.id      = id.ToString();
            newObject.version = version;
            newObject.deleted = deleted;

            return(newObject);
        }
コード例 #3
0
        public static void ParseSessions(SessionXml input, List <ContentProviderOperation> batch, ContentResolver resolver)
        {
            ContentProviderOperation.Builder builder = ContentProviderOperation.NewInsert(ScheduleContract.Sessions.CONTENT_URI);
            builder.WithValue(ScheduleContract.SyncColumns.UPDATED, 0);

            if (input.SessionId == null)
            {
                input.SessionId = ScheduleContract.Sessions.GenerateSessionId(input.Title);
            }

            if (input.RoomId != null)
            {
                builder.WithValue(ScheduleContract.Sessions.ROOM_ID, input.RoomId);
            }

            if (input.Abstract != null)
            {
                builder.WithValue(ScheduleContract.Sessions.SESSION_ABSTRACT, input.Abstract);
            }
            else
            {
                builder.WithValue(ScheduleContract.Sessions.SESSION_ABSTRACT, "");
            }

            builder.WithValue(ScheduleContract.Sessions.SESSION_ID, input.SessionId);
            builder.WithValue(ScheduleContract.Sessions.SESSION_TITLE, input.Title);

            // Use empty strings to make sure SQLite search trigger has valid data
            // for updating search index.
            builder.WithValue(ScheduleContract.Sessions.SESSION_REQUIREMENTS, "");
            builder.WithValue(ScheduleContract.Sessions.SESSION_KEYWORDS, "");

            input.BlockId = ParserUtils.FindBlock(input.Title, input.Start, input.End);
            builder.WithValue(ScheduleContract.Sessions.BLOCK_ID, input.BlockId);

            // Propagate any existing starred value
            Uri sessionUri = ScheduleContract.Sessions.BuildSessionUri(input.SessionId);
            int starred    = QuerySessionStarred(sessionUri, resolver);

            if (starred != -1)
            {
                builder.WithValue(ScheduleContract.Sessions.SESSION_STARRED, starred);
            }

            batch.Add(builder.Build());

            if (input.TrackId != null)
            {
                // TODO: support parsing multiple tracks per session
                Uri sessionTracks = ScheduleContract.Sessions.BuildTracksDirUri(input.SessionId);
                batch.Add(ContentProviderOperation.NewInsert(sessionTracks)
                          .WithValue(ScheduleDatabase.SessionsTracks.SESSION_ID, input.SessionId)
                          .WithValue(ScheduleDatabase.SessionsTracks.TRACK_ID, input.TrackId).Build());
            }
        }
コード例 #4
0
ファイル: StorageHandle.cs プロジェクト: yycmmc/Swiddler
        public static StorageHandle OpenSession(string fileName, SessionXml session)
        {
            var storage = new StorageHandle()
            {
                FileName             = fileName,
                LowestAllowedOffset  = session.LowestOffset,
                HighestAllowedOffset = session.HighestOffset,
                ChunkCount           = session.ChunkCount,
                LinesCountApprox     = session.LinesCountApprox,
            };

            storage.Open();
            return(storage);
        }
コード例 #5
0
        /// <summary>
        /// Implemented by inheritors to perform the request on the provided web client.
        /// </summary>
        /// <param name="connection"></param>
        protected override async Task OnProcessRequest(IWebChannelConnection connection)
        {
            string strRequestUrl = string.Format("/Hub/Hosts/{0}/Sessions/{1}/session.xml", ClientId, SessionId);

            SessionXml sessionHeaderXml = new SessionXml();

            sessionHeaderXml.id                  = SessionId.ToString();
            sessionHeaderXml.isComplete          = true;
            sessionHeaderXml.isCompleteSpecified = true;

            //we can't encode using XmlSerializer because it will only work with public types, and we
            //aren't public if we get ILMerged into something.
            byte[] encodedXml = DataConverter.SessionXmlToByteArray(sessionHeaderXml);

            await connection.UploadData(strRequestUrl, HttpMethod.Post, "text/xml", encodedXml).ConfigureAwait(false);
        }
コード例 #6
0
		public static void ParseSessions(SessionXml input, List<ContentProviderOperation> batch, ContentResolver resolver)
		{
			
			ContentProviderOperation.Builder builder = ContentProviderOperation.NewInsert(ScheduleContract.Sessions.CONTENT_URI);
        	builder.WithValue(ScheduleContract.SyncColumns.UPDATED, 0);
			
			if (input.SessionId == null)
	            input.SessionId = ScheduleContract.Sessions.GenerateSessionId(input.Title);
	
			if(input.RoomId != null)
				builder.WithValue(ScheduleContract.Sessions.ROOM_ID, input.RoomId);
			
			if(input.Abstract != null)
				builder.WithValue(ScheduleContract.Sessions.SESSION_ABSTRACT, input.Abstract);
			else
				builder.WithValue(ScheduleContract.Sessions.SESSION_ABSTRACT, "");
			
	        builder.WithValue(ScheduleContract.Sessions.SESSION_ID, input.SessionId);
	        builder.WithValue(ScheduleContract.Sessions.SESSION_TITLE, input.Title);
	
	        // Use empty strings to make sure SQLite search trigger has valid data
	        // for updating search index.
	        builder.WithValue(ScheduleContract.Sessions.SESSION_REQUIREMENTS, "");
	        builder.WithValue(ScheduleContract.Sessions.SESSION_KEYWORDS, "");
	
	        input.BlockId = ParserUtils.FindBlock(input.Title, input.Start, input.End);
	        builder.WithValue(ScheduleContract.Sessions.BLOCK_ID, input.BlockId);
	
	        // Propagate any existing starred value
	        Uri sessionUri = ScheduleContract.Sessions.BuildSessionUri(input.SessionId);
	        int starred = QuerySessionStarred(sessionUri, resolver);
	        if (starred != -1) {
	            builder.WithValue(ScheduleContract.Sessions.SESSION_STARRED, starred);
	        }
	
	        batch.Add(builder.Build());
	
	        if (input.TrackId != null) {
	            // TODO: support parsing multiple tracks per session
	            Uri sessionTracks = ScheduleContract.Sessions.BuildTracksDirUri(input.SessionId);
	            batch.Add(ContentProviderOperation.NewInsert(sessionTracks)
	                    .WithValue(ScheduleDatabase.SessionsTracks.SESSION_ID, input.SessionId)
	                    .WithValue(ScheduleDatabase.SessionsTracks.TRACK_ID, input.TrackId).Build());
	        }
		}
コード例 #7
0
        /// <summary>
        /// Upload the session summary for one session.
        /// </summary>
        /// <param name="sessionSummary"></param>
        private async Task PerformSessionHeaderUpload(SessionXml sessionSummary)
        {
            var sessionId = new Guid(sessionSummary.id);

            Debug.Assert(!String.IsNullOrEmpty(sessionSummary.sessionDetail.productName));
            Debug.Assert(!String.IsNullOrEmpty(sessionSummary.sessionDetail.applicationName));
            Debug.Assert(!String.IsNullOrEmpty(sessionSummary.sessionDetail.applicationVersion));

            //we consider a session complete (since we're the source repository) with just the header if there
            //is no session file.
            sessionSummary.sessionDetail.isComplete = !m_SourceRepository.SessionDataExists(sessionId);

            var uploadRequest = new SessionHeaderUploadRequest(sessionSummary, m_SourceRepository.Id);

            //get our web channel to upload this request for us.
            await m_HubConnection.ExecuteRequest(uploadRequest, -1).ConfigureAwait(false);

            //and if we were successful (must have been - we got to here) then mark the session as not being new any more.
            m_SourceRepository.SetSessionsNew(new[] { sessionId }, false);
        }
コード例 #8
0
        /// <summary>
        /// Upload the session summary for one session.
        /// </summary>
        /// <param name="sessionSummary"></param>
        private async Task PerformSessionHeaderUpload(ISessionSummary sessionSummary)
        {
            SessionXml sessionSummaryXml = DataConverter.ToSessionXml(sessionSummary);

            await PerformSessionHeaderUpload(sessionSummaryXml).ConfigureAwait(false);
        }
コード例 #9
0
        /// <summary>
        /// Create a single session XML object from its detail information
        /// </summary>
        public static SessionXml ToSessionXml(Guid id, Guid?computerId, long version, bool deleted,
                                              bool IsComplete, bool IsNew, DateTimeOffset AddedDt, DateTimeOffset UpdatedDt,
                                              string UpdatedUser, string ProductName, string ApplicationName,
                                              string environmentName, string promotionLevelName, string ApplicationVersion,
                                              string ApplicationTypeName, string ApplicationDescription, string Caption, string StatusName,
                                              string TimeZoneCaption, DateTimeOffset StartDt, DateTimeOffset EndDt, int DurationSec,
                                              string AgentVersion, string UserName, string UserDomainName, string HostName,
                                              string DNSDomainName, int MessageCount, int CriticalMessageCount, int ErrorMessageCount,
                                              int WarningMessageCount, int OSPlatformCode, string OSVersion, string OSServicePack,
                                              string OSCultureName, string OSArchitectureName, string OSBootModeName, int OSSuiteMaskCode,
                                              int OSProductTypeCode, string RuntimeVersion, string RuntimeArchitectureName, string CurrentCultureName,
                                              string CurrentUICultureName, int MemoryMB, int Processors, int ProcessorCores, bool UserInteractive,
                                              bool TerminalServer, int ScreenWidth, int ScreenHeight, int ColorDepth, string CommandLine,
                                              bool fileAvailable, int fileSize, IDictionary <string, string> properties)
        {
            SessionXml newObject = ToSessionXml(id, version, deleted);

            SessionDetailXml newDetailObject = new SessionDetailXml();

            newDetailObject.addedDt                = ToDateTimeOffsetXml(AddedDt);
            newDetailObject.agentVersion           = AgentVersion;
            newDetailObject.applicationDescription = ApplicationDescription;
            newDetailObject.applicationName        = ApplicationName;
            newDetailObject.environmentName        = environmentName;
            newDetailObject.promotionLevelName     = promotionLevelName;
            newDetailObject.applicationType        = ToApplicationTypeXml(ApplicationTypeName);
            newDetailObject.applicationVersion     = ApplicationVersion;
            newDetailObject.caption                = Caption;
            newDetailObject.colorDepth             = ColorDepth;
            newDetailObject.commandLine            = CommandLine;
            newDetailObject.computerId             = computerId.HasValue ? computerId.ToString() : null;
            newDetailObject.criticalMessageCount   = CriticalMessageCount;
            newDetailObject.currentCultureName     = CurrentCultureName;
            newDetailObject.currentUiCultureName   = CurrentUICultureName;
            newDetailObject.dnsDomainName          = DNSDomainName;
            newDetailObject.durationSec            = DurationSec;
            newDetailObject.endDt               = ToDateTimeOffsetXml(EndDt);
            newDetailObject.errorMessageCount   = ErrorMessageCount;
            newDetailObject.fileAvailable       = fileAvailable;
            newDetailObject.fileSize            = fileSize;
            newDetailObject.hostName            = HostName;
            newDetailObject.isComplete          = IsComplete;
            newDetailObject.isNew               = IsNew;
            newDetailObject.memoryMb            = MemoryMB;
            newDetailObject.messageCount        = MessageCount;
            newDetailObject.osArchitecture      = ToProcessorArchitectureXml(OSArchitectureName);
            newDetailObject.osBootMode          = ToBootModeXml(OSBootModeName);
            newDetailObject.osCultureName       = OSCultureName;
            newDetailObject.osPlatformCode      = OSPlatformCode;
            newDetailObject.osProductTypeCode   = OSProductTypeCode;
            newDetailObject.osServicePack       = OSServicePack;
            newDetailObject.osSuiteMaskCode     = OSSuiteMaskCode;
            newDetailObject.osVersion           = OSVersion;
            newDetailObject.processorCores      = ProcessorCores;
            newDetailObject.processors          = Processors;
            newDetailObject.productName         = ProductName;
            newDetailObject.runtimeArchitecture = ToProcessorArchitectureXml(RuntimeArchitectureName);
            newDetailObject.runtimeVersion      = RuntimeVersion;
            newDetailObject.screenHeight        = ScreenHeight;
            newDetailObject.screenWidth         = ScreenWidth;
            newDetailObject.startDt             = ToDateTimeOffsetXml(StartDt);
            newDetailObject.status              = ToSessionStatusXml(StatusName);
            newDetailObject.terminalServer      = TerminalServer;
            newDetailObject.timeZoneCaption     = TimeZoneCaption;
            newDetailObject.updatedDt           = ToDateTimeOffsetXml(UpdatedDt);
            newDetailObject.updateUser          = UpdatedUser;
            newDetailObject.userDomainName      = UserDomainName;
            newDetailObject.userInteractive     = UserInteractive;
            newDetailObject.userName            = UserName;
            newDetailObject.warningMessageCount = WarningMessageCount;
            newDetailObject.properties          = ToSessionPropertiesXml(properties);
            newObject.sessionDetail             = newDetailObject;

            return(newObject);
        }
コード例 #10
0
        /// <summary>
        /// Converts a session XML object to a byte array without relying on XML Serializer
        /// </summary>
        /// <param name="sessionXml"></param>
        /// <returns></returns>
        public static byte[] SessionXmlToByteArray(SessionXml sessionXml)
        {
            using (MemoryStream outputStream = new MemoryStream(2048))
            {
                using (TextWriter textWriter = new StreamWriter(outputStream, Encoding.UTF8))
                {
                    using (XmlWriter xmlWriter = XmlWriter.Create(textWriter, new XmlWriterSettings()))
                    {
                        // Write XML using xmlWriter.  This has to be kept precisely in line with the XSD or we fail.
                        xmlWriter.WriteStartElement("SessionXml");

                        WriteXmlAttribute(xmlWriter, "id", sessionXml.id);
                        WriteXmlAttribute(xmlWriter, "version", sessionXml.version);
                        WriteXmlAttribute(xmlWriter, "deleted", sessionXml.deleted);

                        if (sessionXml.isCompleteSpecified)
                        {
                            WriteXmlAttribute(xmlWriter, "isComplete", sessionXml.isComplete);
                        }

                        //start the session detail
                        SessionDetailXml detailXml = sessionXml.sessionDetail;

                        if (detailXml != null)
                        {
                            xmlWriter.WriteStartElement("sessionDetail", "http://www.gibraltarsoftware.com/Gibraltar/Repository.xsd");

                            WriteXmlAttribute(xmlWriter, "productName", detailXml.productName);
                            WriteXmlAttribute(xmlWriter, "applicationName", detailXml.applicationName);
                            WriteXmlAttribute(xmlWriter, "environmentName", detailXml.environmentName);
                            WriteXmlAttribute(xmlWriter, "promotionLevelName", detailXml.promotionLevelName);
                            WriteXmlAttribute(xmlWriter, "applicationVersion", detailXml.applicationVersion);
                            WriteXmlAttribute(xmlWriter, "applicationType", detailXml.applicationType.ToString()); //enums won't auto-convert
                            WriteXmlAttribute(xmlWriter, "applicationDescription", detailXml.applicationDescription);
                            WriteXmlAttribute(xmlWriter, "caption", detailXml.caption);
                            WriteXmlAttribute(xmlWriter, "status", detailXml.status.ToString()); //enums won't auto-convert
                            WriteXmlAttribute(xmlWriter, "timeZoneCaption", detailXml.timeZoneCaption);
                            WriteXmlAttribute(xmlWriter, "durationSec", detailXml.durationSec);
                            WriteXmlAttribute(xmlWriter, "agentVersion", detailXml.agentVersion);
                            WriteXmlAttribute(xmlWriter, "userName", detailXml.userName);
                            WriteXmlAttribute(xmlWriter, "userDomainName", detailXml.userDomainName);
                            WriteXmlAttribute(xmlWriter, "hostName", detailXml.hostName);
                            WriteXmlAttribute(xmlWriter, "dnsDomainName", detailXml.dnsDomainName);
                            WriteXmlAttribute(xmlWriter, "isNew", detailXml.isNew);
                            WriteXmlAttribute(xmlWriter, "isComplete", detailXml.isComplete);
                            WriteXmlAttribute(xmlWriter, "messageCount", detailXml.messageCount);
                            WriteXmlAttribute(xmlWriter, "criticalMessageCount", detailXml.criticalMessageCount);
                            WriteXmlAttribute(xmlWriter, "errorMessageCount", detailXml.errorMessageCount);
                            WriteXmlAttribute(xmlWriter, "warningMessageCount", detailXml.warningMessageCount);
                            WriteXmlAttribute(xmlWriter, "updateUser", detailXml.updateUser);
                            WriteXmlAttribute(xmlWriter, "osPlatformCode", detailXml.osPlatformCode);
                            WriteXmlAttribute(xmlWriter, "osVersion", detailXml.osVersion);
                            WriteXmlAttribute(xmlWriter, "osServicePack", detailXml.osServicePack);
                            WriteXmlAttribute(xmlWriter, "osCultureName", detailXml.osCultureName);
                            WriteXmlAttribute(xmlWriter, "osArchitecture", detailXml.osArchitecture.ToString()); //enums won't auto-convert
                            WriteXmlAttribute(xmlWriter, "osBootMode", detailXml.osBootMode.ToString());         //enums won't auto-convert
                            WriteXmlAttribute(xmlWriter, "osSuiteMaskCode", detailXml.osSuiteMaskCode);
                            WriteXmlAttribute(xmlWriter, "osProductTypeCode", detailXml.osProductTypeCode);
                            WriteXmlAttribute(xmlWriter, "runtimeVersion", detailXml.runtimeVersion);
                            WriteXmlAttribute(xmlWriter, "runtimeArchitecture", detailXml.runtimeArchitecture.ToString()); //enums won't auto-convert
                            WriteXmlAttribute(xmlWriter, "currentCultureName", detailXml.currentCultureName);
                            WriteXmlAttribute(xmlWriter, "currentUiCultureName", detailXml.currentUiCultureName);
                            WriteXmlAttribute(xmlWriter, "memoryMb", detailXml.memoryMb);
                            WriteXmlAttribute(xmlWriter, "processors", detailXml.processors);
                            WriteXmlAttribute(xmlWriter, "processorCores", detailXml.processorCores);
                            WriteXmlAttribute(xmlWriter, "userInteractive", detailXml.userInteractive);
                            WriteXmlAttribute(xmlWriter, "terminalServer", detailXml.terminalServer);
                            WriteXmlAttribute(xmlWriter, "screenWidth", detailXml.screenWidth);
                            WriteXmlAttribute(xmlWriter, "screenHeight", detailXml.screenHeight);
                            WriteXmlAttribute(xmlWriter, "colorDepth", detailXml.colorDepth);
                            WriteXmlAttribute(xmlWriter, "commandLine", detailXml.commandLine);
                            WriteXmlAttribute(xmlWriter, "fileSize", detailXml.fileSize);
                            WriteXmlAttribute(xmlWriter, "fileAvailable", detailXml.fileAvailable);
                            WriteXmlAttribute(xmlWriter, "computerId", detailXml.computerId);

                            //and now the elements
                            DateTimeOffsetXmlToXmlWriter(xmlWriter, "startDt", detailXml.startDt);
                            DateTimeOffsetXmlToXmlWriter(xmlWriter, "endDt", detailXml.endDt);
                            DateTimeOffsetXmlToXmlWriter(xmlWriter, "addedDt", detailXml.addedDt);
                            DateTimeOffsetXmlToXmlWriter(xmlWriter, "updatedDt", detailXml.updatedDt);

                            xmlWriter.WriteEndElement();
                        }

                        xmlWriter.WriteEndElement();

                        xmlWriter.Flush(); // to make sure it writes it all out now.

                        return(outputStream.ToArray());
                    }
                }
            }
        }
コード例 #11
0
        /// <summary>
        /// Convert a byte array to sessions list XML object without relying on XML Serializer
        /// </summary>
        /// <param name="rawData"></param>
        /// <returns></returns>
        public static SessionsListXml ByteArrayToSessionsListXml(byte[] rawData)
        {
            SessionsListXml sessionsListXml = new SessionsListXml();

            using (MemoryStream inputStream = new MemoryStream(rawData))
            {
                using (TextReader textReader = new StreamReader(inputStream, Encoding.UTF8))
                {
                    using (XmlReader xmlReader = XmlReader.Create(textReader))
                    {
                        //to load up the first element.
                        if (xmlReader.ReadToFollowing("SessionsListXml") == false)
                        {
                            //it isn't a sessions list..
                            throw new InvalidDataException("The provided XML data is not a sessions list");
                        }

                        string sessionsVersionRaw = xmlReader.GetAttribute("version");
                        if (string.IsNullOrEmpty(sessionsVersionRaw) == false)
                        {
                            sessionsListXml.version = long.Parse(sessionsVersionRaw);
                        }

                        if (xmlReader.ReadToFollowing("sessions"))
                        {
                            //this is a repeating section so we have to be ready for that...
                            List <SessionXml> sessions = new List <SessionXml>();
                            bool moreSessions          = true;
                            while (moreSessions)
                            {
                                xmlReader.ReadStartElement();
                                if (xmlReader.LocalName.Equals("session"))
                                {
                                    string guidRaw    = xmlReader.GetAttribute("id");
                                    string versionRaw = xmlReader.GetAttribute("version");
                                    string deletedRaw = xmlReader.GetAttribute("deleted");

#if DEBUG
                                    if ((string.IsNullOrEmpty(guidRaw)) && (Debugger.IsAttached))
                                    {
                                        Debugger.Break();
                                    }
#endif

                                    //now convert to a SessionXml object and add to the item.
                                    SessionXml newSession = new SessionXml();
                                    newSession.id      = guidRaw;
                                    newSession.version = long.Parse(versionRaw);
                                    newSession.deleted = bool.Parse(deletedRaw);
                                    sessions.Add(newSession);

                                    //and if this isn't an empty session element, we need to end it.
                                    if (xmlReader.IsEmptyElement == false)
                                    {
                                        xmlReader.ReadEndElement();
                                    }
                                }
                                else
                                {
                                    moreSessions = false;
                                }
                            }

                            sessionsListXml.sessions = sessions.ToArray();
                        }
                    }
                }
            }

            return(sessionsListXml);
        }
コード例 #12
0
 /// <summary>
 /// Create a new session header upload request.
 /// </summary>
 /// <param name="sessionHeader"></param>
 /// <param name="clientId"></param>
 public SessionHeaderUploadRequest(SessionXml sessionHeader, Guid clientId)
     : base(true, false)
 {
     ClientId      = clientId;
     SessionHeader = sessionHeader;
 }