Nez.Portable/Utils/NezContentManager.cs
/// <summary>
/// override that will load embedded resources if they have the "nez://" prefix
/// </summary>
/// <returns>The stream.</returns>
/// <param name="assetName">Asset name.</param>
override that will load embedded resources if they have the "nez://" prefix
override that will load embedded resources if they have the " nez : // " prefix
protected override Stream OpenStream(string assetName)
        {
            if (assetName.StartsWith("nez://"))
            {
                var assembly = ReflectionUtils.getAssembly(this.GetType());
#if FNA
				foreach( var item in assembly.GetManifestResourceNames() )
				{
					if( item.EndsWith( assetName.Substring( assetName.Length - 20 ) ) )
					{
						assetName = "nez://" + item;
						break;
					}
				}
				#endif
                return assembly.GetManifestResourceStream(assetName.Substring(6));
            }
            return base.OpenStream(assetName);
        }
protected override Stream OpenStream ( string assetName ) { if ( assetName . StartsWith ( " " ) ) { var assembly = ReflectionUtils . getAssembly ( this . GetType ( ) ) ; if FNA foreach ( var item in assembly . GetManifestResourceNames ( ) ) { if ( item . EndsWith ( assetName . Substring ( assetName . Length - 20 ) ) ) { assetName = " " + item ; break ; } } endif return assembly . GetManifestResourceStream ( assetName . Substring ( 6 ) ) ; } return base . OpenStream ( assetName ) ; }
override that will load embedded resources if they have the "nez://" prefix
override that will load embedded resources if they have the " nez : // " prefix
// for FNA, we will just search for the file by name since the assembly name will not be known at runtime
None
assetName
string
None