/// <summary> /// Adds the list of Capabilities /// </summary> /// <param name="cap">List of Resource Capabilities</param> public void AddCapability(List <ResourceCapability> cap) { if (Capabilities == null) { Capabilities = new List <ResourceCapability>(); } Capabilities.AddRange(cap); }
private async Task RequestCapabilitiesAsync() { //TODO why read to end ??? timeout caused by it //await ReadToEndAsync(); await WriteAsync(string.Format("{0} {1}", SmtpCommands.Ehlo, Environment.MachineName)); var response = await ReadAsync(); if (response.IsError) { // Fallback to HELO command, EHLO probably not supported. await WriteAsync(string.Format("{0} {1}", SmtpCommands.Helo, Environment.MachineName)); } Capabilities.Clear(); Capabilities.AddRange(await ReadCapabilitiesAsync()); }