private void SaveSdmxOBJ(ISdmxObjects SdmxOBJ, string FileName)
        {
            if (SdmxOBJ == null)
            {
                return;
            }

            StructureWriterManager swm     = new StructureWriterManager();
            StructureOutputFormat  sofType = StructureOutputFormat.GetFromEnum(StructureOutputFormatEnumType.SdmxV2RegistryQueryResponseDocument);
            SdmxStructureFormat    sof     = new SdmxStructureFormat(sofType);
            string FullNamePath            = Path.Combine(Utils.GetTreeCachePath(), FileName);

            using (Stream ms = File.Create(FullNamePath))
            {
                swm.WriteStructures(SdmxOBJ, sof, ms);
            }
        }
예제 #2
0
        private void SaveSDMXFile(ISdmxObjects sdmxObjects, StructureOutputFormatEnumType version, string outputFileName)
        {
            StructureWriterManager swm = new StructureWriterManager();

            StructureOutputFormat soFormat     = StructureOutputFormat.GetFromEnum(version);
            IStructureFormat      outputFormat = new SdmxStructureFormat(soFormat);

            MemoryStream memoryStream = new MemoryStream();

            swm.WriteStructures(sdmxObjects, outputFormat, memoryStream);


            byte[] bytesInStream = memoryStream.ToArray();
            memoryStream.Close();

            SendAttachment(bytesInStream, outputFileName);
        }