public TransportClassStorage3(TransportClassMainAshx oTransportClassMainAshx, InputCommand oInputCommand, Storage oStorage, Stream stream, string sKey, TransportClassSaveChanges2 oSaveChanges2)
     : base(oTransportClassMainAshx, oInputCommand, oStorage, stream, sKey)
 {
     m_oSaveChanges2 = oSaveChanges2;
 }
    private void RequestToCoAuthoring(TransportClassSaveChanges2 oTransportClassSaveChanges, string sStatus)
    {
        try
        {
            InputCommand cmd = oTransportClassSaveChanges.m_oInputCommand;
            
            string sUrl = ConfigurationSettings.AppSettings["editor.settings.coauthoring.url"] + oTransportClassSaveChanges.m_oInputCommand.url + sStatus;
			Uri oAbsUrl;
            if (!(Uri.TryCreate(sUrl, UriKind.Absolute, out oAbsUrl) && (Uri.UriSchemeHttps == oAbsUrl.Scheme || Uri.UriSchemeHttp == oAbsUrl.Scheme || Uri.UriSchemeFtp == oAbsUrl.Scheme)))
			{
				Uri baseUri = new Uri("http://localhost");
                oAbsUrl = new Uri(baseUri, sUrl);
			}
            _log.DebugFormat("RequestToCoAuthoring url:{0}", oAbsUrl.AbsoluteUri);
            oTransportClassSaveChanges.m_oAsyncWebRequestOperation = new AsyncWebRequestOperation();
            oTransportClassSaveChanges.m_oAsyncWebRequestOperationResult = oTransportClassSaveChanges.m_oAsyncWebRequestOperation.RequestBegin(oAbsUrl.AbsoluteUri, "POST", "text/plain", new byte[0], RequestToCoAuthoringCallback, oTransportClassSaveChanges);
        }
        catch (Exception e)
        {
            _log.Error("Exception catched in RequestToCoAuthoring:", e);
            WriteOutputCommand(oTransportClassSaveChanges, new OutputCommand(ErrorTypes.Unknown));
        }
    }
    private void SendFileRequest(OutputSfc oOutputSfc, TransportClassSaveChanges2 oTransportClassSaveChanges2)
    {

        string sJson = new JavaScriptSerializer().Serialize(oOutputSfc);
        uint attempcount = uint.Parse(ConfigurationSettings.AppSettings["sfc.webrequest.attempcount"] ?? "1");
        uint attempdelay = uint.Parse(ConfigurationSettings.AppSettings["sfc.webrequest.attempdelay"] ?? "0");
        AsyncWebRequestOperation oAsyncWebRequestOperation = new AsyncWebRequestOperation(attempcount, attempdelay);
        oTransportClassSaveChanges2.m_oAsyncWebRequestOperation = oAsyncWebRequestOperation;
        _log.DebugFormat("TaskResultRemoveCallback4 url:{0}", oTransportClassSaveChanges2.m_sCallbackUrl);
        oTransportClassSaveChanges2.m_oAsyncWebRequestOperationResult = oAsyncWebRequestOperation.RequestBegin(oTransportClassSaveChanges2.m_sCallbackUrl, "POST", "application/json", Encoding.UTF8.GetBytes(sJson), RequestCallback2, oTransportClassSaveChanges2);
    }
 private void RemoveFromCoAuthoringHandler(TransportClassSaveChanges2 oTransportClassSaveChanges2)
 {
     try
     {
         
         AsyncClearCacheOperation oAsyncClearCacheOperation = new AsyncClearCacheOperation();
         oTransportClassSaveChanges2.m_oAsyncClearCacheOperation = oAsyncClearCacheOperation;
         oAsyncClearCacheOperation.ClearCacheBegin(oTransportClassSaveChanges2.m_oTaskQueueData.m_sKey, TaskResultRemoveCallback4, oTransportClassSaveChanges2);
     }
     catch (Exception e)
     {
         _log.Error("Exception catched in RemoveFromCoAuthoringHandler:", e);
         WriteOutputCommand(oTransportClassSaveChanges2, new OutputCommand(ErrorTypes.Unknown));
     }
 }
 private void SaveFileChangesCallbackCommand(TransportClassContextRead oTransportClassContextRead, InputCommand cmd)
 {
     try
     {
         _log.DebugFormat("Enter SaveFileChangesCallbackCommand(id={0})", cmd.id);
         TransportClassSaveChanges2 oTransportClassSaveChanges = new TransportClassSaveChanges2(oTransportClassContextRead);
         oTransportClassSaveChanges.m_oInputCommand = cmd;
         oTransportClassSaveChanges.m_oTaskQueueData = cmd.task_queue_data;
         oTransportClassSaveChanges.m_oTaskResultDataToUpdate = new TaskResultDataToUpdate();
         oTransportClassSaveChanges.m_oTaskResultDataToUpdate.eStatus = (FileStatus)cmd.status;
         oTransportClassSaveChanges.m_oTaskResultDataToUpdate.nStatusInfo = cmd.status_info;
         oTransportClassSaveChanges.m_oTaskResult = TaskResult.NewTaskResult();
         oTransportClassSaveChanges.m_oTaskResult.GetBegin(oTransportClassSaveChanges.m_oTaskQueueData.m_sKey, TaskResultGetSfcCallback, oTransportClassSaveChanges);
     }
     catch (Exception e)
     {
         _log.Error("Exception catched in SaveFileChangesCallbackCommand:", e);
         WriteOutputCommand(oTransportClassContextRead, new OutputCommand(ErrorTypes.Unknown));
     }
 }