public ICoordinationListener Add(ITwoPhaseCommitCoordinator serviceInstance)
        {
            DebugTrace.TraceEnter("CoordinationService.Add (ITwoPhaseCommitCoordinator)");
            this.AssertProtocolServiceMode();
            IWSTwoPhaseCommitCoordinator dispatcher = TwoPhaseCommitCoordinatorDispatcher.Instance(this, serviceInstance);
            ICoordinationListener        listener   = this.CreateService(dispatcher, dispatcher.ContractType, BindingStrings.TwoPhaseCommitCoordinatorSuffix(this.protocolVersion));

            DebugTrace.TraceLeave("CoordinationService.Add (ITwoPhaseCommitCoordinator)");
            return(listener);
        }
 public TwoPhaseCommitCoordinatorDispatcher(CoordinationService service, ITwoPhaseCommitCoordinator dispatch) : base(service.ProtocolVersion)
 {
     this.service         = service;
     this.dispatch        = dispatch;
     this.protocolVersion = service.ProtocolVersion;
 }
        public static IWSTwoPhaseCommitCoordinator Instance(CoordinationService service, ITwoPhaseCommitCoordinator dispatch)
        {
            ProtocolVersionHelper.AssertProtocolVersion(service.ProtocolVersion, typeof(TwoPhaseCommitCoordinatorDispatcher), "V");
            switch (service.ProtocolVersion)
            {
            case ProtocolVersion.Version10:
                return(new TwoPhaseCommitCoordinatorDispatcher10(service, dispatch));

            case ProtocolVersion.Version11:
                return(new TwoPhaseCommitCoordinatorDispatcher11(service, dispatch));
            }
            return(null);
        }
 public TwoPhaseCommitCoordinatorDispatcher11(CoordinationService service, ITwoPhaseCommitCoordinator dispatch)
 {
     ProtocolVersionHelper.AssertProtocolVersion11(service.ProtocolVersion, typeof(TwoPhaseCommitCoordinatorDispatcher11), "constr");
     this.twoPhaseCommitCoordinatorDispatcher = new TwoPhaseCommitCoordinatorDispatcher(service, dispatch);
 }
 public TwoPhaseCommitCoordinatorDispatcher(CoordinationService service, ITwoPhaseCommitCoordinator dispatch) : base(service.ProtocolVersion)
 {
     this.service = service;
     this.dispatch = dispatch;
     this.protocolVersion = service.ProtocolVersion;
 }
        public static IWSTwoPhaseCommitCoordinator Instance(CoordinationService service, ITwoPhaseCommitCoordinator dispatch)
        {
            ProtocolVersionHelper.AssertProtocolVersion(service.ProtocolVersion, typeof(TwoPhaseCommitCoordinatorDispatcher), "V");
            switch (service.ProtocolVersion)
            {
                case ProtocolVersion.Version10:
                    return new TwoPhaseCommitCoordinatorDispatcher10(service, dispatch);

                case ProtocolVersion.Version11:
                    return new TwoPhaseCommitCoordinatorDispatcher11(service, dispatch);
            }
            return null;
        }
 public TwoPhaseCommitCoordinatorDispatcher11(CoordinationService service, ITwoPhaseCommitCoordinator dispatch)
 {
     ProtocolVersionHelper.AssertProtocolVersion11(service.ProtocolVersion, typeof(TwoPhaseCommitCoordinatorDispatcher11), "constr");
     this.twoPhaseCommitCoordinatorDispatcher = new TwoPhaseCommitCoordinatorDispatcher(service, dispatch);
 }