public static RegisterFailureRecordSchema Instance(string transactionId, ControlProtocol protocol, EndpointAddress protocolService, string reason, ProtocolVersion protocolVersion)
        {
            ProtocolVersionHelper.AssertProtocolVersion(protocolVersion, typeof(RegisterFailureRecordSchema), "Instance");
            switch (protocolVersion)
            {
            case ProtocolVersion.Version10:
                return(new RegisterFailureRecordSchema10(transactionId, protocol, protocolService, reason));

            case ProtocolVersion.Version11:
                return(new RegisterFailureRecordSchema11(transactionId, protocol, protocolService, reason));
            }
            return(null);
        }
コード例 #2
0
        private static int GetCode(ProtocolVersion protocolVersion)
        {
            ProtocolVersionHelper.AssertProtocolVersion(protocolVersion, type, "GetCode");
            switch (protocolVersion)
            {
            case ProtocolVersion.Version10:
                return(0xb0003);

            case ProtocolVersion.Version11:
                return(0xb002b);
            }
            return(0);
        }
        public static RegistrationCoordinatorResponseInvalidMetadataSchema Instance(CoordinationContext context, ControlProtocol protocol, EndpointAddress coordinatorService, ProtocolVersion protocolVersion)
        {
            ProtocolVersionHelper.AssertProtocolVersion(protocolVersion, typeof(RegistrationCoordinatorResponseInvalidMetadataSchema), "Instance");
            switch (protocolVersion)
            {
            case ProtocolVersion.Version10:
                return(new RegistrationCoordinatorResponseInvalidMetadataSchema10(context, protocol, coordinatorService));

            case ProtocolVersion.Version11:
                return(new RegistrationCoordinatorResponseInvalidMetadataSchema11(context, protocol, coordinatorService));
            }
            return(null);
        }
コード例 #4
0
        public static VolatileEnlistmentInDoubtRecordSchema Instance(Guid enlistmentId, EndpointAddress replyTo, ProtocolVersion protocolVersion)
        {
            ProtocolVersionHelper.AssertProtocolVersion(protocolVersion, typeof(VolatileEnlistmentInDoubtRecordSchema), "Instance");
            switch (protocolVersion)
            {
            case ProtocolVersion.Version10:
                return(new VolatileEnlistmentInDoubtRecordSchema10(enlistmentId, replyTo));

            case ProtocolVersion.Version11:
                return(new VolatileEnlistmentInDoubtRecordSchema11(enlistmentId, replyTo));
            }
            return(null);
        }
コード例 #5
0
        public static string Name(ProtocolVersion protocolVersion)
        {
            ProtocolVersionHelper.AssertProtocolVersion(protocolVersion, typeof(PluggableProtocol), "Name");
            switch (protocolVersion)
            {
            case ProtocolVersion.Version10:
                return("WS-AtomicTransaction 1.0");

            case ProtocolVersion.Version11:
                return("WS-AtomicTransaction 1.1");
            }
            return(null);
        }
コード例 #6
0
        public static Guid Id(ProtocolVersion protocolVersion)
        {
            ProtocolVersionHelper.AssertProtocolVersion(protocolVersion, typeof(PluggableProtocol), "ProtocolGuid");
            switch (protocolVersion)
            {
            case ProtocolVersion.Version10:
                return(PluggableProtocol10.ProtocolGuid);

            case ProtocolVersion.Version11:
                return(PluggableProtocol11.ProtocolGuid);
            }
            return(Guid.NewGuid());
        }
コード例 #7
0
        public static RecoverParticipantRecordSchema Instance(string transactionId, Guid enlistmentId, EndpointAddress participantService, ProtocolVersion protocolVersion)
        {
            ProtocolVersionHelper.AssertProtocolVersion(protocolVersion, typeof(RecoverParticipantRecordSchema), "Instance");
            switch (protocolVersion)
            {
            case ProtocolVersion.Version10:
                return(new RecoverParticipantRecordSchema10(transactionId, enlistmentId, participantService));

            case ProtocolVersion.Version11:
                return(new RecoverParticipantRecordSchema11(transactionId, enlistmentId, participantService));
            }
            return(null);
        }