0
How do I use a class that was created in the project Droid
in the PCL
?
I created a new class that will save the image in a folder in the project,
but I need to call this class PCL
.
My class:
namespace PCI.APP.Droid
{
public class SalvarFoto
{
public bool SalvarFotoPasta(string Imagem, string ImgNome)
{
try
{
String caminho = ConfigurationManager.AppSettings["ImageUsers"];
if (!System.IO.Directory.Exists(caminho))
{
System.IO.Directory.CreateDirectory(caminho);
}
string imagemNome = ImgNome + ".png";
string imgPasta = Path.Combine(caminho, imagemNome);
byte[] imageBytes = Convert.FromBase64String(Imagem);
File.WriteAllBytes(imgPasta, imageBytes);
return true;
}
catch (Exception ex)
{
throw ex;
}
}
}
}