Exemple #1
0
        public DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.HistogramBucket HistogramBucket_To_HIstogramBucket_2Reversed(DSS1_RetailerDriverStockOptimisation.BO.HIstogramBucket domainHIstogramBucketInput)
        {
            //Leave, if there is nothing to transform
            if (domainHIstogramBucketInput == null)
            {
                return(default(DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.HistogramBucket));
            }
            // If the same Transformation has already ran, get the stored Output and return
            if (HistogramBucket_To_HIstogramBucket_2Reversed_Transformations.ContainsKey(domainHIstogramBucketInput))
            {
                return(HistogramBucket_To_HIstogramBucket_2Reversed_Transformations[domainHIstogramBucketInput]);
            }
            // Instantiate target root
            var interfacesElasticsearchHistogramBucketOutput = new DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.HistogramBucket();

            HistogramBucket_To_HIstogramBucket_2Reversed_Transformations.Add(domainHIstogramBucketInput, interfacesElasticsearchHistogramBucketOutput);
            // HIstogramBucket.key to HistogramBucket.Key
            interfacesElasticsearchHistogramBucketOutput.Key = domainHIstogramBucketInput?.key;
            // HIstogramBucket.doc_count to HistogramBucket.DocCount
            interfacesElasticsearchHistogramBucketOutput.DocCount = domainHIstogramBucketInput?.doc_count;
            // HIstogramBucket.keyAsString to HistogramBucket.Key
            interfacesElasticsearchHistogramBucketOutput.Key = zAppDev.DotNet.Framework.Utilities.Common.ConvertToNullableDecimal(domainHIstogramBucketInput?.keyAsString.ToString());
            return(interfacesElasticsearchHistogramBucketOutput);
        }
Exemple #2
0
        public DSS1_RetailerDriverStockOptimisation.BO.HIstogramBucket HistogramBucket_To_HIstogramBucket_2(DSS1_RetailerDriverStockOptimisation.ExternalStructs.Elasticsearch.HistogramBucket interfacesElasticsearchHistogramBucketInput, DSS1_RetailerDriverStockOptimisation.BO.HIstogramBucket domainHIstogramBucketInstance)
        {
            //Leave, if there is nothing to transform
            if (interfacesElasticsearchHistogramBucketInput == null)
            {
                return(default(DSS1_RetailerDriverStockOptimisation.BO.HIstogramBucket));
            }
            if (domainHIstogramBucketInstance == null)
            {
                return(HistogramBucket_To_HIstogramBucket_2(interfacesElasticsearchHistogramBucketInput));
            }
            // If the same Transformation has already ran, get the stored Output and return
            if (HistogramBucket_To_HIstogramBucket_2_MappingTransformations.ContainsKey(interfacesElasticsearchHistogramBucketInput))
            {
                return(HistogramBucket_To_HIstogramBucket_2_MappingTransformations[interfacesElasticsearchHistogramBucketInput]);
            }
            // Instantiate target root
            var domainHIstogramBucketOutput = domainHIstogramBucketInstance;

            HistogramBucket_To_HIstogramBucket_2_MappingTransformations.Add(interfacesElasticsearchHistogramBucketInput, domainHIstogramBucketOutput);
            // HistogramBucket.Key to HIstogramBucket.key
            domainHIstogramBucketOutput.key = interfacesElasticsearchHistogramBucketInput?.Key;
            // HistogramBucket.DocCount to HIstogramBucket.doc_count
            domainHIstogramBucketOutput.doc_count = interfacesElasticsearchHistogramBucketInput?.DocCount;
            // HistogramBucket.Key to HIstogramBucket.keyAsString
            domainHIstogramBucketOutput.keyAsString = interfacesElasticsearchHistogramBucketInput?.Key.ToString();
            return(domainHIstogramBucketOutput);
        }