コード例 #1
0
        public Microsoft.XLANGs.Core.StopConditions segment2(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[2];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[2];
            __CreateGuard_1 __ctx1__ = (__CreateGuard_1)_stateMgrs[1];
            ____scope35_2 __ctx2__ = (____scope35_2)_stateMgrs[2];
            ____scope36_3 __ctx3__ = (____scope36_3)_stateMgrs[3];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                if ( !PreProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[8],__eventData[2],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 2;
            case 2:
                {
                    __messagetype_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);
                    IGuardService_CreateGuard_InputMessage __CreateGuardRequest = new IGuardService_CreateGuard_InputMessage("CreateGuardRequest", __ctx1__);

                    ApplyTransform(typeof(MedegaImport.MapCreateGuardRequest), new object[] {__CreateGuardRequest.parameters}, new object[] {__ctx1__.__CreateGuardNodeMsg.part});
                    __Context.part.CopyFrom(__CreateGuardRequest.parameters);
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = __CreateGuardRequest.parameters.TypedValue;

                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                    if (__ctx1__.__CreateGuardRequest != null)
                        __ctx1__.UnrefMessage(__ctx1__.__CreateGuardRequest);
                    __ctx1__.__CreateGuardRequest = __CreateGuardRequest;
                    __ctx1__.RefMessage(__ctx1__.__CreateGuardRequest);
                }
                __ctx1__.__Context.ConstructionCompleteEvent(true);
                __ctx1__.__CreateGuardRequest.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 3;
            case 3:
                if ( !PreProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Construct);
                    __edata.Messages.Add(__ctx1__.__Context);
                    __edata.Messages.Add(__ctx1__.__CreateGuardRequest);
                    __edata.Messages.Add(__ctx1__.__CreateGuardNodeMsg);
                    Tracker.FireEvent(__eventLocations[9],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 4;
            case 4:
                if ( !PreProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[10],__eventData[3],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 5;
            case 5:
                __ctx3__ = new ____scope36_3(this);
                _stateMgrs[3] = __ctx3__;
                if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 6;
            case 6:
                __ctx2__.StartContext(__seg__, __ctx3__);
                if ( !PostProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 7:
                if ( !PreProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx1__ != null && __ctx1__.__CreateGuardRequest != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__CreateGuardRequest);
                    __ctx1__.__CreateGuardRequest = null;
                }
                Tracker.FireEvent(__eventLocations[23],__eventData[10],_stateMgrs[2].TrackDataStream );
                __ctx3__.Finally();
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 8;
            case 8:
                if (!__ctx2__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PreProgressInc( __seg__, __ctx__, 10 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx2__.OnCommit();
                goto case 10;
            case 10:
                __seg__.SegmentDone();
                _segments[1].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }
コード例 #2
0
        public Microsoft.XLANGs.Core.StopConditions segment2(Microsoft.XLANGs.Core.StopConditions stopOn)
        {
            Microsoft.XLANGs.Core.Envelope __msgEnv__ = null;
            bool __condition__;
            Microsoft.XLANGs.Core.Segment __seg__ = _segments[2];
            Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[2];
            __subImportFile_root_0 __ctx0__ = (__subImportFile_root_0)_stateMgrs[0];
            ____scope35_2 __ctx2__ = (____scope35_2)_stateMgrs[2];
            ____scope36_3 __ctx3__ = (____scope36_3)_stateMgrs[3];
            __subImportFile_1 __ctx1__ = (__subImportFile_1)_stateMgrs[1];

            switch (__seg__.Progress)
            {
            case 0:
                __ctx2__.__xpathString = default(System.String);
                __ctx__.PrologueCompleted = true;
                if ( !PostProgressInc( __seg__, __ctx__, 1 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 1;
            case 1:
                __ctx2__.__xpathString = "";
                if ( !PostProgressInc( __seg__, __ctx__, 2 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 2;
            case 2:
                if ( !PreProgressInc( __seg__, __ctx__, 3 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[9],__eventData[6],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 3;
            case 3:
                __condition__ = (__ctx1__.__GuardsFile.GetPropertyValueNoThrow(typeof(FILE.ReceivedFileName)) != null);
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 6 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 6;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 4 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 4;
            case 4:
                __ctx1__.__receivedFileName = (System.String)__ctx1__.__GuardsFile.GetPropertyValueThrows(typeof(FILE.ReceivedFileName));
                if ( !PostProgressInc( __seg__, __ctx__, 5 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 5;
            case 5:
                if ( !PostProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 12;
            case 6:
                if ( !PreProgressInc( __seg__, __ctx__, 7 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[7],__eventData[6],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 7;
            case 7:
                __condition__ = (__ctx1__.__GuardsFile.GetPropertyValueNoThrow(typeof(FTP.ReceivedFileName)) != null);
                if (!__condition__)
                {
                    if ( !PostProgressInc( __seg__, __ctx__, 10 ) )
                        return Microsoft.XLANGs.Core.StopConditions.Paused;
                    goto case 10;
                }
                if ( !PostProgressInc( __seg__, __ctx__, 8 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 8;
            case 8:
                __ctx1__.__receivedFileName = (System.String)__ctx1__.__GuardsFile.GetPropertyValueThrows(typeof(FTP.ReceivedFileName));
                if ( !PostProgressInc( __seg__, __ctx__, 9 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 9;
            case 9:
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 10:
                __ctx1__.__receivedFileName = "";
                if ( !PostProgressInc( __seg__, __ctx__, 11 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 11;
            case 11:
                if ( !PreProgressInc( __seg__, __ctx__, 12 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[8],__eventData[7],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 12;
            case 12:
                if ( !PreProgressInc( __seg__, __ctx__, 13 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[10],__eventData[7],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 13;
            case 13:
                __ctx1__.__tmpString = __ctx1__.__receivedFileName.Substring(0, __ctx1__.__receivedFileName.LastIndexOf('.'));
                if ( !PostProgressInc( __seg__, __ctx__, 14 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 14;
            case 14:
                __ctx1__.__splittedFileName = new GeneralBiztalkHelper.SplitString(__ctx1__.__tmpString, '_');
                if ( !PostProgressInc( __seg__, __ctx__, 15 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 15;
            case 15:
                if ( !PreProgressInc( __seg__, __ctx__, 16 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[11],__eventData[2],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 16;
            case 16:
                {
                    __messagetype_MedegaImportSchema_Schemas_GeneralFileInfo __FileInfo = new __messagetype_MedegaImportSchema_Schemas_GeneralFileInfo("FileInfo", __ctx1__);
                    __messagetype_MedegaImport_Schemas_DB2_ImportFile_ImportFileRequest __DB2ImportFileRequest = new __messagetype_MedegaImport_Schemas_DB2_ImportFile_ImportFileRequest("DB2ImportFileRequest", __ctx1__);
                    __messagetype_System_Xml_XmlDocument __Context = new __messagetype_System_Xml_XmlDocument("Context", __ctx1__);

                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument = new System.Xml.XmlDocument();
                    __ctx1__.__tempXmlDoc.UnderlyingXmlDocument.LoadXml("<ns0:FileInfo xmlns:ns0='http://www.riziv.fgov.be/medega/v1.0'><PeriodFromDay></PeriodFromDay><PeriodFromMonth></PeriodFromMonth><PeriodFromYear></PeriodFromYear><PeriodToDay></PeriodToDay><PeriodToMonth></PeriodToMonth><PeriodToYear></PeriodToYear><FileName></FileName></ns0:FileInfo>");
                    __FileInfo.part.LoadFrom((System.Xml.XmlDocument)__ctx1__.__tempXmlDoc.UnderlyingXmlDocument);
                    __FileInfo.part.SetDistinguishedField("PeriodFromDay", __ctx1__.__splittedFileName.Elements[2]);
                    __FileInfo.part.SetDistinguishedField("PeriodFromMonth", __ctx1__.__splittedFileName.Elements[3]);
                    __FileInfo.part.SetDistinguishedField("PeriodFromYear", __ctx1__.__splittedFileName.Elements[4]);
                    __FileInfo.part.SetDistinguishedField("PeriodToDay", __ctx1__.__splittedFileName.Elements[5]);
                    __FileInfo.part.SetDistinguishedField("PeriodToMonth", __ctx1__.__splittedFileName.Elements[6]);
                    __FileInfo.part.SetDistinguishedField("PeriodToYear", __ctx1__.__splittedFileName.Elements[7]);
                    __FileInfo.part.SetDistinguishedField("FileName", __ctx1__.__receivedFileName);
                    ApplyTransform(typeof(MedegaImport.Mappings.CreateDB2ImportFileRequest), new object[] {__DB2ImportFileRequest.part}, new object[] {__FileInfo.part});
                    __Context.CopyFrom(__DB2ImportFileRequest);

                    if (__ctx1__.__FileInfo != null)
                        __ctx1__.UnrefMessage(__ctx1__.__FileInfo);
                    __ctx1__.__FileInfo = __FileInfo;
                    __ctx1__.RefMessage(__ctx1__.__FileInfo);
                    if (__ctx1__.__DB2ImportFileRequest != null)
                        __ctx1__.UnrefMessage(__ctx1__.__DB2ImportFileRequest);
                    __ctx1__.__DB2ImportFileRequest = __DB2ImportFileRequest;
                    __ctx1__.RefMessage(__ctx1__.__DB2ImportFileRequest);
                    if (__ctx1__.__Context != null)
                        __ctx1__.UnrefMessage(__ctx1__.__Context);
                    __ctx1__.__Context = __Context;
                    __ctx1__.RefMessage(__ctx1__.__Context);
                }
                __ctx1__.__FileInfo.ConstructionCompleteEvent(true);
                __ctx1__.__DB2ImportFileRequest.ConstructionCompleteEvent(true);
                __ctx1__.__Context.ConstructionCompleteEvent(true);
                if ( !PostProgressInc( __seg__, __ctx__, 17 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 17;
            case 17:
                if ( !PreProgressInc( __seg__, __ctx__, 18 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Construct);
                    __edata.Messages.Add(__ctx1__.__FileInfo);
                    __edata.Messages.Add(__ctx1__.__DB2ImportFileRequest);
                    __edata.Messages.Add(__ctx1__.__Context);
                    Tracker.FireEvent(__eventLocations[12],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__FileInfo != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__FileInfo);
                    __ctx1__.__FileInfo = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 18;
            case 18:
                if ( !PreProgressInc( __seg__, __ctx__, 19 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[13],__eventData[8],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 19;
            case 19:
                if (!__ctx2__.PrepareToPendingCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 20 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 20;
            case 20:
                if ( !PreProgressInc( __seg__, __ctx__, 21 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                DB2_ImportFile.SendMessage(0, __ctx1__.__DB2ImportFileRequest, null, null, out __ctx0__.__subWrapper0, __ctx2__, __seg__ );
                if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0)
                    return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst;
                goto case 21;
            case 21:
                if ( !PreProgressInc( __seg__, __ctx__, 22 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Send);
                    __edata.Messages.Add(__ctx1__.__DB2ImportFileRequest);
                    __edata.PortName = @"DB2_ImportFile";
                    Tracker.FireEvent(__eventLocations[14],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (__ctx1__ != null && __ctx1__.__DB2ImportFileRequest != null)
                {
                    __ctx1__.UnrefMessage(__ctx1__.__DB2ImportFileRequest);
                    __ctx1__.__DB2ImportFileRequest = null;
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 22;
            case 22:
                if ( !PreProgressInc( __seg__, __ctx__, 23 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[15],__eventData[9],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 23;
            case 23:
                if (!DB2_ImportFile.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__, _locations[0]))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if (__ctx0__ != null && __ctx0__.__subWrapper0 != null)
                {
                    __ctx0__.__subWrapper0.Destroy(this, __ctx0__);
                    __ctx0__.__subWrapper0 = null;
                }
                if (__ctx1__.__DB2ImportFileResponse != null)
                    __ctx1__.UnrefMessage(__ctx1__.__DB2ImportFileResponse);
                __ctx1__.__DB2ImportFileResponse = new __messagetype_MedegaImport_Schemas_DB2_ImportFile_ImportFileResponse("DB2ImportFileResponse", __ctx1__);
                __ctx1__.RefMessage(__ctx1__.__DB2ImportFileResponse);
                DB2_ImportFile.ReceiveMessage(0, __msgEnv__, __ctx1__.__DB2ImportFileResponse, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[2], __seg__);
                if ( !PostProgressInc( __seg__, __ctx__, 24 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 24;
            case 24:
                if ( !PreProgressInc( __seg__, __ctx__, 25 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                {
                    Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Receive);
                    __edata.Messages.Add(__ctx1__.__DB2ImportFileResponse);
                    __edata.PortName = @"DB2_ImportFile";
                    Tracker.FireEvent(__eventLocations[16],__edata,_stateMgrs[2].TrackDataStream );
                }
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 25;
            case 25:
                if ( !PreProgressInc( __seg__, __ctx__, 26 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                Tracker.FireEvent(__eventLocations[17],__eventData[5],_stateMgrs[2].TrackDataStream );
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 26;
            case 26:
                __ctx3__ = new ____scope36_3(this);
                _stateMgrs[3] = __ctx3__;
                if ( !PostProgressInc( __seg__, __ctx__, 27 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 27;
            case 27:
                __ctx2__.StartContext(__seg__, __ctx3__);
                if ( !PostProgressInc( __seg__, __ctx__, 28 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                return Microsoft.XLANGs.Core.StopConditions.Blocked;
            case 28:
                if ( !PreProgressInc( __seg__, __ctx__, 29 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                if (__ctx2__ != null)
                    __ctx2__.__xpathString = null;
                Tracker.FireEvent(__eventLocations[29],__eventData[13],_stateMgrs[2].TrackDataStream );
                __ctx3__.Finally();
                if (IsDebugged)
                    return Microsoft.XLANGs.Core.StopConditions.InBreakpoint;
                goto case 29;
            case 29:
                if (!__ctx2__.CleanupAndPrepareToCommit(__seg__))
                    return Microsoft.XLANGs.Core.StopConditions.Blocked;
                if ( !PostProgressInc( __seg__, __ctx__, 30 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                goto case 30;
            case 30:
                if ( !PreProgressInc( __seg__, __ctx__, 31 ) )
                    return Microsoft.XLANGs.Core.StopConditions.Paused;
                __ctx2__.OnCommit();
                goto case 31;
            case 31:
                __seg__.SegmentDone();
                _segments[1].PredecessorDone(this);
                break;
            }
            return Microsoft.XLANGs.Core.StopConditions.Completed;
        }