Beispiel #1
0
        public ContextDescriptor GenerateContextDescriptor(XmlNode element, string filePath)
        {
            var    name = element.Name;
            string label;
            string guid;

            switch (name)
            {
            case SharedConstants.Header:
                return(new ContextDescriptor("header for context", ""));

            // Nobody has <rt> element names these days.
            //case SharedConstants.RtTag:
            //    var className = element.Attributes[SharedConstants.Class].Value;
            //    label = className;
            //    guid = element.Attributes[SharedConstants.GuidStr].Value;
            //    break;
            default:
                guid  = FieldWorksMergeServices.GetGuid(element);
                label = GetLabel(element);
                break;
            }

            return(FieldWorksMergeServices.GenerateContextDescriptor(filePath, guid, label));
        }
Beispiel #2
0
 public ContextDescriptor GenerateContextDescriptor(XmlNode mergeElement, string filePath)
 {
     LoadPosList();
     return(FieldWorksMergeServices.GenerateContextDescriptor(filePath,
                                                              FieldWorksMergeServices.GetGuid(mergeElement),
                                                              GetLabel(mergeElement)));
 }