WriteMetadataToSourceRedirectPrefix() 공개 정적인 메소드

public static WriteMetadataToSourceRedirectPrefix ( StreamWriter writer ) : void
writer System.IO.StreamWriter
리턴 void
예제 #1
0
        public static void GenerateRedirectFile(
            string solutionDestinationFolder,
            string projectDestinationFolder,
            Dictionary <string, IEnumerable <string> > symbolIDToListOfLocationsMap,
            string prefix = "")
        {
            var fileName = Path.Combine(projectDestinationFolder, Constants.IDResolvingFileName + prefix + ".html");

            File.Delete(fileName);
            using (var writer = new StreamWriter(fileName, append: false, encoding: Encoding.UTF8))
            {
                Markup.WriteMetadataToSourceRedirectPrefix(writer);

                if (prefix == "")
                {
                    writer.WriteLine("redirectToNextLevelRedirectFile();");

                    var maps = SplitByFirstLetter(symbolIDToListOfLocationsMap);
                    foreach (var map in maps)
                    {
                        GenerateRedirectFile(
                            solutionDestinationFolder,
                            projectDestinationFolder,
                            map.Value,
                            map.Key.ToString());
                    }
                }
                else
                {
                    WriteMapping(
                        writer,
                        solutionDestinationFolder,
                        projectDestinationFolder,
                        symbolIDToListOfLocationsMap);
                }

                Markup.WriteMetadataToSourceRedirectSuffix(writer);
            }
        }