public void PrintTicket(Sale sale, Destination destination) { if (destination == Destination.Console) { Console.WriteLine(sale.GetTextToPrint()); } else { File.WriteAllText("Ticket.txt", sale.GetTextToPrint()); } }
public void PrintTicket(Sale sale) { TwitterApi api = new TwitterApi("dtOgpyjBBXglAzMEjMMZtFf73", "Qzm0FxotJ9YyoXiGLJ4JI9IZFWmYvB4LWpteWPGVYofxSG4FnN", "13uONd7FgFVXhW1xhUCQshKgGv4UOnKeDipg4cz", "HXtlP1SRnJCL5a37R98hFrIRlEIouZX3Ra4s6JuFOpXZF"); api.Tweet(sale.GetTextToPrint()); }
public void PrintTicket(Sale sale) { IPrinter Print = new FilePrinter(); sale.DateTime = DateTime.Now; var twitter = new TwitterApi("dtOgpyjBBXglAzMEjMMZtFf73", "Qzm0FxotJ9YyoXiGLJ4JI9IZFWmYvB4LWpteWPGVYofxSG4FnN", "1396065818-13uONd7FgFVXhW1xhUCQshKgGv4UOnKeDipg4cz", "HXtlP1SRnJCL5a37R98hFrIRlEIouZX3Ra4s6JuFOpXZF"); twitter.Tweet(sale.GetTextToPrint()).Wait(); }
public void PrintTicket(Sale sale) { string consumerKey = "dtOgpyjBBXglAzMEjMMZtFf73"; string consumerKeySecret = "Qzm0FxotJ9YyoXiGLJ4JI9IZFWmYvB4LWpteWPGVYofxSG4FnN"; string accessToken = "1396065818-13uONd7FgFVXhW1xhUCQshKgGv4UOnKeDipg4cz"; string accessTokenSecret = "HXtlP1SRnJCL5a37R98hFrIRlEIouZX3Ra4s6JuFOpXZF"; var twitter = new TwitterApi(consumerKey, consumerKeySecret, accessToken, accessTokenSecret); twitter.Tweet(sale.GetTextToPrint()).Wait(); }
public void PrintTicket(Sale sale) { // URL al Twitter de destino: https://twitter.com/POOUCU?lang=en&lang=en // Se sustituyeron las primeras letras letras mayúsculas de los nombres de las siguientes variables // por sus respectivas letras minúscula, como forma de quitar el 1 % de los mensajes de advertencia al ejecutar. // Pero publica en Twitter, no pienses lo contrario... string consumerKey = "dtOgpyjBBXglAzMEjMMZtFf73"; string consumerKeySecret = "Qzm0FxotJ9YyoXiGLJ4JI9IZFWmYvB4LWpteWPGVYofxSG4FnN"; string accessToken = "1396065818-13uONd7FgFVXhW1xhUCQshKgGv4UOnKeDipg4cz"; string accessTokenSecret = "HXtlP1SRnJCL5a37R98hFrIRlEIouZX3Ra4s6JuFOpXZF"; var twitter = new TwitterApi(consumerKey, consumerKeySecret, accessToken, accessTokenSecret); twitter.Tweet(sale.GetTextToPrint()).Wait(); }
public void PrintTicket(Sale sale) { Console.WriteLine(sale.GetTextToPrint()); }
public void PrintTicket(Sale sale) { File.WriteAllText("Ticket.txt", sale.GetTextToPrint()); }
public void PrintTicket(Sale sale) { sale.DateTime = new DateTime(2001, 01, 01); Console.WriteLine(sale.GetTextToPrint()); }