Пример #1
0
        public void AddAdditionalInfoDescriptor(AdditionalInfoDescriptor newDesc)
        {
            if (m_AdditionaInfoDescriptors == null)
                m_AdditionaInfoDescriptors = new List<AdditionalInfoDescriptor>();

            m_AdditionaInfoDescriptors.Add(newDesc);
        }
Пример #2
0
        public static List<TriggeringNodeDefinition> GetAttachedTemplateDef(PartInfo settingsPart, OpenXmlFormat openXmlFormat)
        {
            List<TriggeringNodeDefinition> results = new List<TriggeringNodeDefinition>();
            EffectDescriptor td = new EffectDescriptor();
            td.ContentType = ContentType.AttachedTemplate;
            td.BlockType = Effect.BlockType.Structure;

            td.DictStringToStringLookup = ConstructTemplateLookup(settingsPart, openXmlFormat);

            AdditionalInfoDescriptor adi = new AdditionalInfoDescriptor("Path", "id", AdditionalInfoDescriptor.MappingType.StringToStringLookup);
            adi.LookupNamespace = NamespaceId.r;
            adi.StringMangler = URLToPath;
            td.AddAdditionalInfoDescriptor(adi);
            adi = new AdditionalInfoDescriptor("Name", "id", AdditionalInfoDescriptor.MappingType.StringToStringLookup);
            adi.LookupNamespace = NamespaceId.r;
            adi.StringMangler = URLToFilename;
            td.AddAdditionalInfoDescriptor(adi);


            results.Add(new TriggeringNodeDefinition(NamespaceId.w, "attachedTemplate", null, null, td));

            return results;
        }