src/Shared/EntityFramework/Core/Metadata/Edm/MetadataArtifactLoaderCompositeResource.cs
// <summary>
// Splits the supplied path into the assembly portion and the resource
// part (if any)
// </summary>
// <param name="path"> The resource path to parse </param>
Splits the supplied path into the assembly portion and the resource
part (if any)
Splits the supplied path into the assembly portion and the resource part ( if any )
private static void ParseResourcePath(string path, out string assemblyName, out string resourceName)
        {
            var prefixLength = resPathPrefix.Length;
            var result = path.Substring(prefixLength).Split(
                new[]
                    {
                        resPathSeparator,
                        altPathSeparator
                    },
                StringSplitOptions.RemoveEmptyEntries
                );
            if (result.Length == 0
                || result.Length > 2)
            {
                throw new MetadataException(Strings.InvalidMetadataPath);
            }
            if (result.Length >= 1)
            {
                assemblyName = result[0];
            }
            else
            {
                assemblyName = null;
            }
            if (result.Length == 2)
            {
                resourceName = result[1];
            }
            else
            {
                resourceName = null;
            }
        }
private static void ParseResourcePath ( string path , out string assemblyName , out string resourceName ) { var prefixLength = resPathPrefix . Length ; var result = path . Substring ( prefixLength ) . Split ( new [ ] { resPathSeparator , altPathSeparator } , StringSplitOptions . RemoveEmptyEntries ) ; if ( result . Length == 0 || result . Length > 2 ) { throw new MetadataException ( Strings . InvalidMetadataPath ) ; } if ( result . Length >= 1 ) { assemblyName = result [ 0 ] ; } else { assemblyName = null ; } if ( result . Length == 2 ) { resourceName = result [ 1 ] ; } else { resourceName = null ; } }
Splits the supplied path into the assembly portion and the resource
part (if any)
Splits the supplied path into the assembly portion and the resource part ( if any )
// Extract the components from the path
path
string
The resource path to parse
The resource path to parse
string
out