private static Uri GetRootUrl(ExtraMessageType messageType, ExtraTransportDirection transportDirection)
        {
            var type = typeof(DrvExtraValidationResources);
            var result = new Uri($"res:///Dataline.{type.Namespace}/Schemas/");
            switch (messageType)
            {
                case ExtraMessageType.SupplyData:
                    result = new Uri(result, new Uri("DataSupply/", UriKind.Relative));
                    break;
                case ExtraMessageType.GetProcessingResultQuery:
                case ExtraMessageType.GetProcessingResult:
                    result = new Uri(result, new Uri("DataResponse/", UriKind.Relative));
                    break;
                case ExtraMessageType.AcknowledgeProcessingResultQuery:
                case ExtraMessageType.AcknowledgeProcessingResult:
                    result = new Uri(result, new Uri("DataAcknowledge/", UriKind.Relative));
                    break;
                default:
                    throw new NotSupportedException();
            }

            switch (transportDirection)
            {
                case ExtraTransportDirection.Request:
                    result = new Uri(result, new Uri("request/", UriKind.Relative));
                    break;
                case ExtraTransportDirection.Response:
                    result = new Uri(result, new Uri("response/", UriKind.Relative));
                    break;
            }

            return result;
        }
        private static Uri GetRootUrl(Uri baseUrl, ExtraMessageType messageType, ExtraTransportDirection transportDirection)
        {
            string step;
            switch (messageType)
            {
                case ExtraMessageType.SupplyData:
                    step = "01";
                    break;
                case ExtraMessageType.GetProcessingResultQuery:
                case ExtraMessageType.GetProcessingResult:
                    step = "02";
                    break;
                case ExtraMessageType.AcknowledgeProcessingResultQuery:
                case ExtraMessageType.AcknowledgeProcessingResult:
                    step = "03";
                    break;
                default:
                    throw new NotSupportedException();
            }

            Uri result;
            switch (transportDirection)
            {
                case ExtraTransportDirection.Request:
                    result = new Uri(baseUrl, new Uri($"_{step}_Request/", UriKind.Relative));
                    break;
                case ExtraTransportDirection.Response:
                    result = new Uri(baseUrl, new Uri($"_{step}_Response/", UriKind.Relative));
                    break;
                default:
                    throw new NotSupportedException();
            }

            return result;
        }
        /// <summary>
        /// Initialisiert eine neue Instanz der <see cref="GkvExtraValidationResources"/> Klasse.
        /// </summary>
        /// <param name="messageType">Art der Meldung</param>
        /// <param name="transportDirection">Sendung oder Antwort?</param>
        /// <param name="isError">Liegt eine Fehlermeldung vor?</param>
        public GkvExtraValidationResources(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
        {
            var type = GetType();
#if HAS_FULL_TYPE
            ResourceAssembly = type.Assembly;
#else
            ResourceAssembly = type.GetTypeInfo().Assembly;
#endif
            RootUrl = new Uri($"res:///Dataline.{type.Namespace}/Schemas/");
            StartXmlSchemaFileName = GetXsdFileName(messageType, transportDirection, isError);
        }
        public OstcExtraValidationResources(OstcMessageType messageType, ExtraTransportDirection transportDirection)
        {
            var type = GetType();
#if HAS_FULL_TYPE
            ResourceAssembly = type.Assembly;
#else
            ResourceAssembly = type.GetTypeInfo().Assembly;
#endif
            RootUrl = new Uri($"res:///{type.Namespace?.Replace('.', '/')}/Schema/");
            StartXmlSchemaFileName = GetXsdFileName(messageType, transportDirection);
        }
        /// <summary>
        /// Initialisiert eine neue Instanz der <see cref="DrvExtraValidationResources"/> Klasse.
        /// </summary>
        /// <param name="messageType">Art der Meldung</param>
        /// <param name="transportDirection">Sendung oder Antwort?</param>
        /// <param name="isError">Liegt eine Fehlermeldung vor?</param>
        public DrvExtraValidationResources(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
        {
            var type = GetType();
#if HAS_FULL_TYPE
            ResourceAssembly = type.Assembly;
#else
            ResourceAssembly = type.GetTypeInfo().Assembly;
#endif
            RootUrl = GetRootUrl(messageType, transportDirection);
            StartXmlSchemaFileName = GetXsdFileName(messageType, transportDirection, isError);
        }
 private static string GetXsdFileName(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
 {
     string src;
     if (isError)
     {
         src = "xsd_KomServer_0_error.xsd";
     }
     else
     {
         switch (messageType)
         {
             case ExtraMessageType.SupplyData:
                 switch (transportDirection)
                 {
                     case ExtraTransportDirection.Request:
                         src = "xsd_KomServer_1_request_senden_datenlieferungen.xsd";
                         break;
                     default:
                         throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                 }
                 break;
             case ExtraMessageType.GetProcessingResultQuery:
                 src = "xsd_KomServer_3_Body_request_anfordern_rueckmeldungen.xsd";
                 break;
             case ExtraMessageType.GetProcessingResult:
                 switch (transportDirection)
                 {
                     case ExtraTransportDirection.Request:
                         src = "xsd_KomServer_3_request_anfordern_rueckmeldungen.xsd";
                         break;
                     default:
                         throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                 }
                 break;
             case ExtraMessageType.AcknowledgeProcessingResultQuery:
                 src = "xsd_KomServer_5_Body_request_senden_empfangsquittungen.xsd";
                 break;
             case ExtraMessageType.AcknowledgeProcessingResult:
                 switch (transportDirection)
                 {
                     case ExtraTransportDirection.Request:
                         src = "xsd_KomServer_5_request_senden_empfangsquittungen.xsd";
                         break;
                     default:
                         throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                 }
                 break;
             default:
                 throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
         }
     }
     return src;
 }
        /// <summary>
        /// Initialisiert eine neue Instanz der <see cref="DrvExtraValidationResources"/> Klasse.
        /// </summary>
        /// <param name="messageType">Art der Meldung</param>
        /// <param name="transportDirection">Sendung oder Antwort?</param>
        /// <param name="isError">Liegt eine Fehlermeldung vor?</param>
        public DrvExtraValidationResources(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
        {
            var type = GetType();

#if HAS_FULL_TYPE
            ResourceAssembly = type.Assembly;
#else
            ResourceAssembly = type.GetTypeInfo().Assembly;
#endif
            RootUrl = GetRootUrl(messageType);
            StartXmlSchemaFileName = GetXsdFileName(messageType, transportDirection, isError);
        }
        /// <summary>
        /// Initialisiert eine neue Instanz der <see cref="GenericExtraValidationResources"/> Klasse.
        /// </summary>
        /// <param name="messageType">Art der Meldung</param>
        /// <param name="transportDirection">Sendung oder Antwort?</param>
        /// <param name="isError">Liegt eine Fehlermeldung vor?</param>
        public GenericExtraValidationResources(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
        {
            var type = GetType();

#if HAS_FULL_TYPE
            ResourceAssembly = type.Assembly;
#else
            ResourceAssembly = type.GetTypeInfo().Assembly;
#endif
            RootUrl = new Uri($"res:///Dataline.{type.Namespace}/Schemas/");
            StartXmlSchemaFileName = GetXsdFileName(messageType, transportDirection, isError);
        }
        public OstcExtraValidationResources(OstcMessageType messageType, ExtraTransportDirection transportDirection)
        {
            var type = GetType();

#if HAS_FULL_TYPE
            ResourceAssembly = type.Assembly;
#else
            ResourceAssembly = type.GetTypeInfo().Assembly;
#endif
            RootUrl = new Uri($"res:///{type.Namespace?.Replace('.', '/')}/Schema/");
            StartXmlSchemaFileName = GetXsdFileName(messageType, transportDirection);
        }
        private static string GetXsdFileName(OstcMessageType messageType, ExtraTransportDirection transportDirection)
        {
            int    methodId;
            string src;

            switch (messageType)
            {
            case OstcMessageType.Application:
                src      = "Antrag";
                methodId = 1;
                break;

            case OstcMessageType.Order:
                src      = "Auftrag";
                methodId = 2;
                break;

            case OstcMessageType.Key:
                src      = "SchlüsselAnfragen";
                methodId = 3;
                break;

            case OstcMessageType.List:
                src      = "ListeAnfragen";
                methodId = 4;
                break;

            default:
                if (transportDirection == ExtraTransportDirection.Request)
                {
                    switch (messageType)
                    {
                    case OstcMessageType.ApplicationData:
                        return("OSTC 1a-Antragsdaten.xsd");

                    case OstcMessageType.OrderData:
                        return("OSTC 2a-Auftragsdaten.xsd");

                    case OstcMessageType.KeyData:
                        return("OSTC 3a-Schlüsseldaten.xsd");

                    case OstcMessageType.ListData:
                        return("OSTC 4a-Listedaten.xsd");
                    }
                }
                throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
            }
            return(string.Format("OSTC-{0}{2}-{1}-1.xsd", methodId, src, (transportDirection == ExtraTransportDirection.Request ? "a-request" : "b-response")));
        }
        private static Uri GetRootUrl(Uri baseUrl, ExtraMessageType messageType, ExtraTransportDirection transportDirection)
        {
            string step;

            switch (messageType)
            {
            case ExtraMessageType.SupplyData:
                step = "01";
                break;

            case ExtraMessageType.GetProcessingResultQuery:
            case ExtraMessageType.GetProcessingResult:
                step = "02";
                break;

            case ExtraMessageType.AcknowledgeProcessingResultQuery:
            case ExtraMessageType.AcknowledgeProcessingResult:
                step = "03";
                break;

            default:
                throw new NotSupportedException();
            }

            Uri result;

            switch (transportDirection)
            {
            case ExtraTransportDirection.Request:
                result = new Uri(baseUrl, new Uri($"_{step}_Request/", UriKind.Relative));
                break;

            case ExtraTransportDirection.Response:
                result = new Uri(baseUrl, new Uri($"_{step}_Response/", UriKind.Relative));
                break;

            default:
                throw new NotSupportedException();
            }

            return(result);
        }
 private static string GetXsdFileName(OstcMessageType messageType, ExtraTransportDirection transportDirection)
 {
     int methodId;
     string src;
     switch (messageType)
     {
         case OstcMessageType.Application:
             src = "Antrag";
             methodId = 1;
             break;
         case OstcMessageType.Order:
             src = "Auftrag";
             methodId = 2;
             break;
         case OstcMessageType.Key:
             src = "SchlüsselAnfragen";
             methodId = 3;
             break;
         case OstcMessageType.List:
             src = "ListeAnfragen";
             methodId = 4;
             break;
         default:
             if (transportDirection == ExtraTransportDirection.Request)
             {
                 switch (messageType)
                 {
                     case OstcMessageType.ApplicationData:
                         return "OSTC 1a-Antragsdaten.xsd";
                     case OstcMessageType.OrderData:
                         return "OSTC 2a-Auftragsdaten.xsd";
                     case OstcMessageType.KeyData:
                         return "OSTC 3a-Schlüsseldaten.xsd";
                     case OstcMessageType.ListData:
                         return "OSTC 4a-Listedaten.xsd";
                 }
             }
             throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
     }
     return string.Format("OSTC-{0}{2}-{1}-1.xsd", methodId, src, (transportDirection == ExtraTransportDirection.Request ? "a-request" : "b-response"));
 }
        private static string GetXsdFileName(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
        {
            string src;

            if (isError)
            {
                src = "eXTra-error-1.xsd";
            }
            else
            {
                switch (messageType)
                {
                case ExtraMessageType.SupplyData:
                case ExtraMessageType.GetProcessingResult:
                case ExtraMessageType.AcknowledgeProcessingResult:
                    switch (transportDirection)
                    {
                    case ExtraTransportDirection.Request:
                        src = "eXTra-request-1.xsd";
                        break;

                    case ExtraTransportDirection.Response:
                        src = "eXTra-response-1.xsd";
                        break;

                    default:
                        throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                    }
                    break;

                case ExtraMessageType.GetProcessingResultQuery:
                case ExtraMessageType.AcknowledgeProcessingResultQuery:
                    src = "eXTra-messages-1.xsd";
                    break;

                default:
                    throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                }
            }
            return(src);
        }
Esempio n. 14
0
        private static Uri GetRootUrl(ExtraMessageType messageType, ExtraTransportDirection transportDirection)
        {
            var type   = typeof(DrvExtraValidationResources);
            var result = new Uri($"res:///Dataline.{type.Namespace}/Schemas/");

            switch (messageType)
            {
            case ExtraMessageType.SupplyData:
                result = new Uri(result, new Uri("DataSupply/", UriKind.Relative));
                break;

            case ExtraMessageType.GetProcessingResultQuery:
            case ExtraMessageType.GetProcessingResult:
                result = new Uri(result, new Uri("DataResponse/", UriKind.Relative));
                break;

            case ExtraMessageType.AcknowledgeProcessingResultQuery:
            case ExtraMessageType.AcknowledgeProcessingResult:
                result = new Uri(result, new Uri("DataAcknowledge/", UriKind.Relative));
                break;

            default:
                throw new NotSupportedException();
            }

            switch (transportDirection)
            {
            case ExtraTransportDirection.Request:
                result = new Uri(result, new Uri("request/", UriKind.Relative));
                break;

            case ExtraTransportDirection.Response:
                result = new Uri(result, new Uri("response/", UriKind.Relative));
                break;
            }

            return(result);
        }
 private static string GetXsdFileName(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
 {
     string src;
     if (isError)
     {
         src = "eXTra-error-1.xsd";
     }
     else
     {
         switch (messageType)
         {
             case ExtraMessageType.SupplyData:
             case ExtraMessageType.GetProcessingResult:
             case ExtraMessageType.AcknowledgeProcessingResult:
                 switch (transportDirection)
                 {
                     case ExtraTransportDirection.Request:
                         src = "eXTra-request-1.xsd";
                         break;
                     case ExtraTransportDirection.Response:
                         src = "eXTra-response-1.xsd";
                         break;
                     default:
                         throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                 }
                 break;
             case ExtraMessageType.GetProcessingResultQuery:
             case ExtraMessageType.AcknowledgeProcessingResultQuery:
                 src = "eXTra-messages-1.xsd";
                 break;
             default:
                 throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
         }
     }
     return src;
 }
Esempio n. 16
0
 /// <summary>
 /// Initialisiert eine neue Instanz der <see cref="OstcExtraValidator"/> Klasse.
 /// </summary>
 /// <param name="messageType">Die Meldungsart die zu prüfen ist</param>
 /// <param name="transportDirection">Gesendete oder empfangene Meldung?</param>
 public OstcExtraValidator(OstcMessageType messageType, ExtraTransportDirection transportDirection)
     : base(new OstcExtraValidationResources(messageType, transportDirection))
 {
 }
 /// <summary>
 /// Initialisiert eine neue Instanz der <see cref="DrvExtraValidator"/> Klasse.
 /// </summary>
 /// <param name="messageType">Die Meldungsart die zu prüfen ist</param>
 /// <param name="transportDirection">Gesendete oder empfangene Meldung?</param>
 /// <param name="isError">Liegt eine Fehlermeldung vor?</param>
 public DrvExtraValidator(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
     : base(new DrvDsvExtraValidationResources(messageType, transportDirection, isError))
 {
 }
 /// <summary>
 /// Initialisiert eine neue Instanz der <see cref="OstcExtraValidator"/> Klasse.
 /// </summary>
 /// <param name="messageType">Die Meldungsart die zu prüfen ist</param>
 /// <param name="transportDirection">Gesendete oder empfangene Meldung?</param>
 public OstcExtraValidator(OstcMessageType messageType, ExtraTransportDirection transportDirection)
     : base(new OstcExtraValidationResources(messageType, transportDirection))
 {
 }
Esempio n. 19
0
 public IExtraValidator Create(OstcMessageType messageType, ExtraTransportDirection transportDirection)
 {
     return(new OstcExtraValidator(messageType, transportDirection));
 }
 public IExtraValidator Create(OstcMessageType messageType, ExtraTransportDirection transportDirection)
 {
     return new OstcExtraValidator(messageType, transportDirection);
 }
 /// <inheritdoc />
 public IDrvDsvExtra14Validator Create(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
 {
     return(new DrvExtraValidator(messageType, transportDirection, isError));
 }
 /// <inheritdoc />
 public IExtra14Validator Create(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
 {
     return new GenericExtraValidator(messageType, transportDirection, isError);
 }
Esempio n. 23
0
        private static string GetXsdFileName(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
        {
            string src;

            if (isError)
            {
                src = "xsd_KomServer_0_error.xsd";
            }
            else
            {
                switch (messageType)
                {
                case ExtraMessageType.SupplyData:
                    switch (transportDirection)
                    {
                    case ExtraTransportDirection.Request:
                        src = "xsd_KomServer_1_request_senden_datenlieferungen.xsd";
                        break;

                    default:
                        throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                    }
                    break;

                case ExtraMessageType.GetProcessingResultQuery:
                    src = "xsd_KomServer_3_Body_request_anfordern_rueckmeldungen.xsd";
                    break;

                case ExtraMessageType.GetProcessingResult:
                    switch (transportDirection)
                    {
                    case ExtraTransportDirection.Request:
                        src = "xsd_KomServer_3_request_anfordern_rueckmeldungen.xsd";
                        break;

                    default:
                        throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                    }
                    break;

                case ExtraMessageType.AcknowledgeProcessingResultQuery:
                    src = "xsd_KomServer_5_Body_request_senden_empfangsquittungen.xsd";
                    break;

                case ExtraMessageType.AcknowledgeProcessingResult:
                    switch (transportDirection)
                    {
                    case ExtraTransportDirection.Request:
                        src = "xsd_KomServer_5_request_senden_empfangsquittungen.xsd";
                        break;

                    default:
                        throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                    }
                    break;

                default:
                    throw new NotSupportedException($"The combination {messageType}/{transportDirection} is not supported yet.");
                }
            }
            return(src);
        }
 /// <inheritdoc />
 public IOstcExtra11Validator Create(ExtraMessageType messageType, ExtraTransportDirection transportDirection, bool isError)
 {
     return(new OstcExtraValidator(messageType, transportDirection, isError));
 }