public IDsDocument?Create(IDsDocumentService documentService, DsDocumentInfo documentInfo)
        {
            if (documentInfo.Type == DocumentConstants.DOCUMENTTYPE_INMEMORY)
            {
                var getFileData = documentInfo.Data as Func <(byte[]? filedata, bool isFileLayout)>;
                Debug2.Assert(getFileData is not null);
                if (getFileData is not null)
                {
                    var info = getFileData();
                    if (info.filedata is not null)
                    {
                        return(documentService.CreateDocument(documentInfo, info.filedata, documentInfo.Name, info.isFileLayout));
                    }
                }
                return(null);
            }

            var filename = GetFilename(documentInfo);

            if (filename is not null)
            {
                return(documentService.CreateDocument(documentInfo, filename));
            }
            return(null);
        }
示例#2
0
        public IDsDocument Create(IDsDocumentService documentService, DsDocumentInfo documentInfo)
        {
            var filename = GetFilename(documentInfo);

            if (filename != null)
            {
                return(documentService.CreateDocument(documentInfo, filename));
            }
            return(null);
        }
		public IDsDocument Create(IDsDocumentService documentService, DsDocumentInfo documentInfo) {
			var filename = GetFilename(documentInfo);
			if (filename != null)
				return documentService.CreateDocument(documentInfo, filename);
			return null;
		}