コード例 #1
0
        /// <summary>
        /// Create a document layout from an already created DocumentPackage. Will only save document fields for one document
        /// in the package.
        /// </summary>
        /// <returns>The layout id.</returns>
        /// <param name="layout">The DocumentPackage with one document from which to create layout.</param>
        public string CreateLayout(DocumentPackage layout)
        {
            Package layoutToCreate = new DocumentPackageConverter(layout).ToAPIPackage();
            foreach (Silanis.ESL.SDK.Document document in layout.Documents.Values)
            {
                layoutToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(layoutToCreate));
            }

            return apiClient.CreateLayout(layoutToCreate, layout.Id.Id);
        }
コード例 #2
0
        /// <summary>
        /// Create a document layout from an already created DocumentPackage. Will only save document fields for one document
        /// in the package.
        /// </summary>
        /// <returns>The layout id.</returns>
        /// <param name="layout">The DocumentPackage with one document from which to create layout.</param>
        public string CreateLayout(DocumentPackage layout)
        {
            Package layoutToCreate = new DocumentPackageConverter(layout).ToAPIPackage();

            foreach (Silanis.ESL.SDK.Document document in layout.Documents.Values)
            {
                layoutToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(layoutToCreate));
            }

            return(apiClient.CreateLayout(layoutToCreate, layout.Id.Id));
        }
コード例 #3
0
ファイル: LayoutService.cs プロジェクト: vanroth1/esl.sdk.net
        /// <summary>
        /// Create a document layout from an already created DocumentPackage. Will only save document fields for one document
        /// in the package.
        /// </summary>
        /// <returns>DocumentPackage layout.</returns>
        /// <param name="layout">The DocumentPackage with one document from which to create layout.</param>
        public DocumentPackage CreateAndGetLayout(DocumentPackage layout)
        {
            Package layoutToCreate = new DocumentPackageConverter(layout).ToAPIPackage();

            foreach (Silanis.ESL.SDK.Document document in layout.Documents)
            {
                layoutToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(layoutToCreate));
            }

            Package createdLayout = apiClient.CreateAndGetLayout(layoutToCreate, layout.Id.Id);

            return(new DocumentPackageConverter(createdLayout).ToSDKPackage());
        }
コード例 #4
0
ファイル: EslClient.cs プロジェクト: vtcharlie/esl.sdk.net
        public PackageId CreatePackageOneStep(DocumentPackage package)
        {
            if (!IsSdkVersionSetInPackageData(package))
            {
                SetSdkVersionInPackageData(package);
            }

            Silanis.ESL.API.Package packageToCreate = new DocumentPackageConverter(package).ToAPIPackage();
            foreach (Silanis.ESL.SDK.Document document in package.Documents.Values)
            {
                packageToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(packageToCreate));
            }
            PackageId id = packageService.CreatePackageOneStep(packageToCreate, package.Documents.Values);

            return(id);
        }
コード例 #5
0
ファイル: EslClient.cs プロジェクト: vtcharlie/esl.sdk.net
        public PackageId CreatePackageOneStep(DocumentPackage package)
        {
            if (!IsSdkVersionSetInPackageData(package))
            {
                SetSdkVersionInPackageData(package);
            }

            Silanis.ESL.API.Package packageToCreate = new DocumentPackageConverter(package).ToAPIPackage();
            foreach(Silanis.ESL.SDK.Document document in package.Documents.Values){
                packageToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(packageToCreate));
            }
            PackageId id = packageService.CreatePackageOneStep (packageToCreate, package.Documents.Values);
            return id;
        }