src/Foundation/Net/Gimela.Net.Http/Resources/EmbeddedResourceLoader.cs
/// <summary>
/// Add resources in a folder and it's sub folder
/// </summary>
/// <param name="path"></param>
/// <param name="assembly"></param>
/// <param name="rootNameSpace"></param>
/// <remarks>
/// <para>This method is not going to map files but keep the mapping and 
/// try to look up views every time they are requested. This is the method
/// to use to add a resource folder that has sub folders.
/// </para>
/// </remarks>
Add resources in a folder and it's sub folder
Add resources in a folder and it ' s sub folder
public void AddPath(string path, Assembly assembly, string rootNameSpace)
    {
      var mapping = new PathMapping
                        {
                          Assembly = assembly,
                          UriPath = path.ToLower(),
                          RootNameSpace = rootNameSpace
                        };
      _pathMappings.Add(mapping);
      foreach (var resourceName in assembly.GetManifestResourceNames())
      {
        if (!resourceName.StartsWith(rootNameSpace))
          continue;
        mapping.Resources.Add(resourceName);
      }
    }
public void AddPath ( string path , Assembly assembly , string rootNameSpace ) { var mapping = new PathMapping { Assembly = assembly , UriPath = path . ToLower ( ) , RootNameSpace = rootNameSpace } ; _pathMappings . Add ( mapping ) ; foreach ( var resourceName in assembly . GetManifestResourceNames ( ) ) { if ( ! resourceName . StartsWith ( rootNameSpace ) ) continue ; mapping . Resources . Add ( resourceName ) ; } }
Add resources in a folder and it's sub folder
Add resources in a folder and it ' s sub folder
// We need to create a resource index since resource loading  // is case sensitive and paths supplied by web client will probably not have // the correct case.
path
string
None
assembly
Assembly
None
rootNameSpace
string
None
remarks
This method is not going to map files but keep the mapping and
try to look up views every time they are requested. This is the method
to use to add a resource folder that has sub folders.
This method is not going to map files but keep the mapping and try to look up views every time they are requested . This is the method to use to add a resource folder that has sub folders .