Acceleratio.SPDG.Generator.GenerationTasks.ItemsAndDocumentsDataGenerationTask.getFileContent C# (CSharp) 메소드

getFileContent() 개인적인 메소드

private getFileContent ( ) : byte[]
리턴 byte[]
        private byte[] getFileContent()
        {
            byte[] content = null;
            if( _currentFileType == "test")
            {
                FileStream fstream = File.OpenRead("C:\\Temp\\test.docx");
                content = new byte[fstream.Length];
                fstream.Read(content, 0, (int)fstream.Length);
                fstream.Close();
            }
            else if (_currentFileType == "docx")
            {
                content = SampleData.CreateDocx();
            }
            else if (_currentFileType == "xlsx")
            {
                content = SampleData.CreateExcel();
            }
            else if (_currentFileType == "pdf")
            {
                content = SampleData.CreatePDF(WorkingDefinition.MinDocumentSizeKB, WorkingDefinition.MaxDocumentSizeMB * 1024);
            }
            else if (_currentFileType == "png")
            {
                content = SampleData.AddRandomPngFile();
            }

            return content;
        }