Пример #1
0
        public void Title_Changed()
        {
            if (string.IsNullOrWhiteSpace(title))
            {
                return;
            }

            SelectNewRamlOption();
            NewRamlFilename  = NetNamingMapper.RemoveIndalidChars(Title) + RamlFileExtension;
            NewRamlNamespace = GetNamespace(NewRamlFilename);
        }
        private static string GetFilename(string url)
        {
            var filename = Path.GetFileName(url);

            if (string.IsNullOrEmpty(filename))
            {
                filename = "reference.raml";
            }

            if (!filename.ToLowerInvariant().EndsWith(RamlFileExtension))
            {
                filename += RamlFileExtension;
            }

            filename = NetNamingMapper.RemoveIndalidChars(Path.GetFileNameWithoutExtension(filename)) +
                       RamlFileExtension;
            return(filename);
        }