src/Foundation/Net/Gimela.Net.Http/Resources/EmbeddedResourceLoader.cs
/// <summary>
/// Loads all files in a resource directory
/// </summary>
/// <param name="path"></param>
Loads all files in a resource directory
Loads all files in a resource directory
private void LoadFromPathMappings(string path)
    {
      if (path != "/")
        path = path.TrimEnd('/');
      foreach (var mapping in _pathMappings)
      {
        if (!path.StartsWith(mapping.UriPath))
          continue;
        string relativePath = path.Remove(0, mapping.UriPath.Length);
        string myNamespace = mapping.RootNameSpace + '.' + relativePath.Replace('/', '.');
        if (AddFilesInFolder(path + "/", mapping.Assembly, myNamespace.ToLower()))
          Logger.Debug("Added all files in namespace '" + myNamespace + "' from uri '" + path + "'.");
      }
    }
private void LoadFromPathMappings ( string path ) { if ( path != " " ) path = path . TrimEnd ( ' ' ) ; foreach ( var mapping in _pathMappings ) { if ( ! path . StartsWith ( mapping . UriPath ) ) continue ; string relativePath = path . Remove ( 0 , mapping . UriPath . Length ) ; string myNamespace = mapping . RootNameSpace + ' ' + relativePath . Replace ( ' ' , ' ' ) ; if ( AddFilesInFolder ( path + " " , mapping . Assembly , myNamespace . ToLower ( ) ) ) Logger . Debug ( " " + myNamespace + " " + path + " " ) ; } }
Loads all files in a resource directory
Loads all files in a resource directory
// get path that should be added to the namespace // create namespace to load files from // Load files
path
string
None