aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/IRemoteAssistanceProvider.cs
blob: 3b7d489e698c74d4f18afbb01a874ce9aa84d233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.PPC.Common.RemoteAssistance
{
    /// <summary>
    /// Represents a remote assistance provider.
    /// </summary>
    public interface IRemoteAssistanceProvider
    {
        /// <summary>
        /// Gets a value indicating whether the remote assistance service is enabled.
        /// </summary>
        bool IsEnabled { get; }

        /// <summary>
        /// Enables the remote assistance.
        /// </summary>
        /// <returns></returns>
        Task EnableRemoteAssistance();

        /// <summary>
        /// Disables the remote assistance.
        /// </summary>
        /// <returns></returns>
        Task DisableRemoteAssistance();

        /// <summary>
        /// Installs the remote assistance.
        /// </summary>
        /// <param name="machineSerialNumber">The machine serial number.</param>
        /// <param name="group">The remote assistance group.</param>
        /// <param name="environment">The machine working environment.</param>
        /// <returns></returns>
        Task InstallRemoteAssistance(String machineSerialNumber, String group, String environment);
    }
}
s="w"> = "Sending with SendGrid is Fun"; var to = new EmailAddress("roy@twine-s.com", "Roy Ben Shabat"); var plainTextContent = "and easy to do anywhere, even with C#"; var htmlContent = "<div style='color:red;'>and easy to do anywhere, even with C#</strong>"; var msg = MailHelper.CreateSingleEmail(from, to, subject, plainTextContent, htmlContent); var bytes = File.ReadAllBytes(@"D:\Downloads\Twine TWN Spec (3).pdf"); var file = Convert.ToBase64String(bytes); msg.AddAttachment("Twine Spec.pdf", file, "application/pdf"); var response = client.SendEmailAsync(msg).GetAwaiter().GetResult(); Assert.IsTrue(response.StatusCode == System.Net.HttpStatusCode.Accepted); } [TestMethod] public void Send_Template_Email() { var client = new SendGridClient(KEY); SendGridMessage msg = new SendGridMessage(); msg.SetFrom("test@example.com"); msg.AddTo("roy.mail.net@gmail.com"); msg.Subject = "SnapMatch Color Result"; msg.SetTemplateId("d-619b8adc604d4f6fa486d7bbc9e3c2cc"); var dynamicTemplateData = new { Message = "This is my personal note...", R = 0, G = 255, B = 0, }; msg.SetTemplateData(dynamicTemplateData); DetectionColorFile file = new DetectionColorFile(); file.RawColor = new DetectionColor() { R = 10, G = 20, B = 30 }; file.ProcessedColor = new DetectionColor() { R = 11, G = 21, B = 31 }; var base64 = Convert.ToBase64String(file.ToBytes()); msg.AddAttachment("SnapMatch Color.tcc", base64, "application/octet-stream"); var result = client.SendEmailAsync(msg).GetAwaiter().GetResult(); Assert.IsTrue(result.StatusCode == HttpStatusCode.Accepted); } } }