Пример #1
0
            private static IProduct NewExtension(IElementContainer parent, IPatternElementInfo info, string name)
            {
                var productInfo = (IPatternInfo)info;

                return(parent.CreateExtension(e =>
                {
                    e.DefinitionId = productInfo.Id;
                    e.InstanceName = name;
                    e.ExtensionId = productInfo.ExtensionId;
                }));
            }