public void ProcessRequest(RequestMessage request, OrchestrationType orchestrationType)
 {
     new OrchestrationState <TRequest, TReturn>(
         Process,
         this,
         request.Opid,
         ((OrchestrationMessage <TRequest>)request).Request,
         orchestrationType,
         request.LockedByCaller,
         request.Parent,
         request.Clock);
 }
        public OrchestrationState(
            Process process,
            OrchestrationInfo <TRequest, TReturn> info,
            ulong opid,
            TRequest request,
            OrchestrationType orchestrationType,
            bool lockedByCaller,
            ulong parent,
            ulong clock)
        {
            this.Opid              = opid;
            this.Request           = request;
            this.Parent            = parent;
            this.StartingClock     = clock;
            this.LockedByCaller    = lockedByCaller;
            this.OrchestrationType = orchestrationType;
            this.History           = new List <Record>();
            this.Continuations     = new Dictionary <ulong, IContinuationInfo>();
            this.process           = process;
            this.info              = info;

            process.OrchestrationStates[opid] = this;
            StartOrResume();
        }