Пример #1
0
        /// <summary>
        /// Construct ITranformPlug based on source and target plug
        /// </summary>
        /// <param name="sourcePlug"></param>
        /// <param name="targetPlug"></param>
        /// <returns></returns>
        public static ITransformPlug CreateTransformPlug(IDocumentPlug sourcePlug, IDocumentPlug targetPlug)
        {
            //TODO: Implement this - currently hard coded path
            string path = Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\..\..\..\"),
                                       @"sources\test\GCommerceSuperSpec\GCommerceSuperSpecInbound850FromBuyer\InboundPO.btm");
            FileInfo btmFileInfo = new FileInfo(path);

            XElement btmRoot = XElement.Load(btmFileInfo.FullName);

            return(MapperHelper.CreateTransformPlugFromBTM(btmRoot, sourcePlug, targetPlug));
        }
Пример #2
0
        /// <summary>
        /// Construct TransformPlug (only Facets) fa from given stream.
        /// </summary>
        /// <param name="btmStream"></param>
        /// <returns></returns>
        public static ITransformPlug CreateTransformPlugFromBTM(Stream btmStream)
        {
            XElement btmRoot = XElement.Load(btmStream);

            return(MapperHelper.CreateTransformPlugFromBTM(btmRoot));
        }
Пример #3
0
        /// <summary>
        /// Construct TransformPlug (only Facets) fa from given File.
        /// </summary>
        /// <param name="btmFileInfo"></param>
        /// <returns></returns>
        public static ITransformPlug CreateTransformPlugFromBTM(FileInfo btmFileInfo)
        {
            XElement btmRoot = XElement.Load(btmFileInfo.FullName);

            return(MapperHelper.CreateTransformPlugFromBTM(btmRoot));
        }