Example #1
0
        private ContextDescriptor GetContextDescriptor(XmlNode ours, IGenerateContextDescriptor generator)
        {
            if (generator == null)
                return new NullContextDescriptor(); // Can't produce one from 'generator', so use default.

            var contextDescriptorFromNode = generator as IGenerateContextDescriptorFromNode;
            var retval = (contextDescriptorFromNode != null)
                ? contextDescriptorFromNode.GenerateContextDescriptor(ours, MergeSituation.PathToFileInRepository)
                : generator.GenerateContextDescriptor(ours.OuterXml, MergeSituation.PathToFileInRepository);
            return retval ?? new NullContextDescriptor();
        }
Example #2
0
        internal ContextDescriptor GetContextDescriptor(XmlNode ours, IGenerateContextDescriptor generator)
        {
            if (generator == null)
                return null; // can't produce one.

            var contextDescriptorFromNode = generator as IGenerateContextDescriptorFromNode;
            return (contextDescriptorFromNode != null)
                                               ? contextDescriptorFromNode.GenerateContextDescriptor(ours, MergeSituation.PathToFileInRepository)
                                               : generator.GenerateContextDescriptor(ours.OuterXml, MergeSituation.PathToFileInRepository);
        }