Plugin.EmbeddedResource/ResourceWriter.cs
/// <summary>
/// Writes an embedded resource to the file system 
/// </summary>
/// <param name="assembly"><see cref="Assembly"/> containing embedded resources.</param>
/// <param name="source">Relative path to embedded resource in <see cref="Assembly"/>.</param>
/// <param name="targetDirectory">Path to folder where resources will be written.</param>
/// <returns>
/// A <see cref="Task"/> which will complete after the file is written
/// </returns>
Writes an embedded resource to the file system
Writes an embedded resource to the file system
public static async Task WriteFile (Assembly assembly, string source, string targetDirectory = "", CreationCollisionOption option =  CreationCollisionOption.ReplaceExisting) {
			var resource = String.Format ("{0}.{1}",
				assembly.GetName ().Name,
				ConvertPathToResourceName (source));
			source = source.Replace("\\", "/");
			var fileName = source.Substring (
				source.LastIndexOf ("/") + 1);
			await WriteResource (
				assembly,
				PortablePath.Combine(targetDirectory, fileName),
				resource, 
				option);
		}
public static async Task WriteFile ( Assembly assembly , string source , string targetDirectory = " " , CreationCollisionOption option = CreationCollisionOption . ReplaceExisting ) { var resource = String . Format ( " " , assembly . GetName ( ) . Name , ConvertPathToResourceName ( source ) ) ; source = source . Replace ( " \\ " , " " ) ; var fileName = source . Substring ( source . LastIndexOf ( " " ) + 1 ) ; await WriteResource ( assembly , PortablePath . Combine ( targetDirectory , fileName ) , resource , option ) ; }
Writes an embedded resource to the file system
Writes an embedded resource to the file system
// handle either slash as path delimiter
A  which will complete after the file is written
A which will complete after the file is written
assembly
Assembly
containing embedded resources.
containing embedded resources .
source
string
Relative path to embedded resource in .
Relative path to embedded resource in .
targetDirectory
string
Path to folder where resources will be written.
Path to folder where resources will be written .
option
CreationCollisionOption