Mono.Debugger.DebuggerSession.MapFileName C# (CSharp) Method

MapFileName() public method

public MapFileName ( string path ) : string
path string
return string
        public string MapFileName(string path)
        {
            path = DebuggerConfiguration.WindowsToUnix (path);
            foreach (KeyValuePair<string,string> map in directory_maps) {
                if (map_file_name (ref path, map.Key, map.Value))
                    return path;
            }

            foreach (KeyValuePair<string,string> map in Config.DirectoryMaps) {
                if (map_file_name (ref path, map.Key, map.Value))
                    return path;
            }

            return path;
        }

Usage Example

Beispiel #1
0
        public SourceFile(DebuggerSession session, Module module, string name)
        {
            this.id     = ++next_id;
            this.module = module;

            if ((name == "") || (name == null))
            {
                this.path = this.filename = "";
            }
            else if (session.Config.OpaqueFileNames)
            {
                this.path = this.filename = name;
            }
            else
            {
                if ((name.Length > 1) && (name [1] == ':'))
                {
                    name = session.MapFileName(name);
                }

                if ((name.Length > 1) && (name [1] == ':'))
                {
                    this.path = this.filename = name;
                }
                else
                {
                    name          = session.MapFileName(name);
                    this.path     = Path.GetFullPath(name);
                    this.filename = Path.GetFileName(name);
                }
            }
        }
All Usage Examples Of Mono.Debugger.DebuggerSession::MapFileName