InfoPathScraper.Model.InfoPathManifest.Create C# (CSharp) Method

Create() public static method

public static Create ( Microsoft.Deployment.Compression.Cab.CabFileInfo cabFileInfo ) : InfoPathManifest
cabFileInfo Microsoft.Deployment.Compression.Cab.CabFileInfo
return InfoPathManifest
        public static InfoPathManifest Create(CabFileInfo cabFileInfo)
        {
            InfoPathManifest manifest = new InfoPathManifest();
            manifest.CabFileInfo = cabFileInfo;
            return manifest;
        }

Usage Example

Example #1
0
        private void InitializeManifest()
        {
            if (_infoPathManifest != null)
            {
                return;
            }

            // get the files named manifest.xsf (there should be one)
            IList <CabFileInfo> cbInfos = CabInfo.GetFiles("manifest.xsf");

            if (cbInfos.Count != 1)
            {
                throw new ArgumentException("Invalid InfoPath xsn");
            }
            _infoPathManifest = InfoPathManifest.Create(cbInfos[0]);
        }