// // ImapImplementation.cs // // Author: Jeffrey Stedfast // // Copyright (c) 2013-2020 .NET Foundation and Contributors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // using System.Collections.Generic; namespace MailKit.Net.Imap { /// /// The details of an IMAP client or server implementation. /// /// /// Allows an IMAP client and server to share their implementation details /// with each other for the purposes of debugging. /// /// /// /// public class ImapImplementation { /// /// Initializes a new instance of the class. /// /// /// Creates a new . /// /// /// /// public ImapImplementation () { Properties = new Dictionary (); } string GetProperty (string property) { string value; Properties.TryGetValue (property, out value); return value; } /// /// Get the identification properties. /// /// /// Gets the dictionary of raw identification properties. /// /// /// /// /// The properties. public Dictionary Properties { get; private set; } /// /// Get or set the name of the program. /// /// /// Gets or sets the name of the program. /// /// /// /// /// The program name. public string Name { get { return GetProperty ("name"); } set { Properties["name"] = value; } } /// /// Get or set the version of the program. /// /// /// Gets or sets the version of the program. /// /// /// /// /// The program version. public string Version { get { return GetProperty ("version"); } set { Properties["version"] = value; } } /// /// Get or set the name of the operating system. /// /// /// Gets or sets the name of the operating system. /// /// The name of the operation system. public string OS { get { return GetProperty ("os"); } set { Properties["os"] = value; } } /// /// Get or set the version of the operating system. /// /// /// Gets or sets the version of the operating system. /// /// The version of the operation system. public string OSVersion { get { return GetProperty ("os-version"); } set { Properties["os-version"] = value; } } /// /// Get or set the name of the vendor. /// /// /// Gets or sets the name of the vendor. /// /// The name of the vendor. public string Vendor { get { return GetProperty ("vendor"); } set { Properties["vendor"] = value; } } /// /// Get or set the support URL. /// /// /// Gets or sets the support URL. /// /// The support URL. public string SupportUrl { get { return GetProperty ("support-url"); } set { Properties["support-url"] = value; } } /// /// Get or set the postal address of the vendor. /// /// /// Gets or sets the postal address of the vendor. /// /// The postal address. public string Address { get { return GetProperty ("address"); } set { Properties["address"] = value; } } /// /// Get or set the release date of the program. /// /// /// Gets or sets the release date of the program. /// /// The release date. public string ReleaseDate { get { return GetProperty ("date"); } set { Properties["date"] = value; } } /// /// Get or set the command used to start the program. /// /// /// Gets or sets the command used to start the program. /// /// The command used to start the program. public string Command { get { return GetProperty ("command"); } set { Properties["command"] = value; } } /// /// Get or set the command-line arguments used to start the program. /// /// /// Gets or sets the command-line arguments used to start the program. /// /// The command-line arguments used to start the program. public string Arguments { get { return GetProperty ("arguments"); } set { Properties["arguments"] = value; } } /// /// Get or set the environment variables available to the program. /// /// /// Get or set the environment variables available to the program. /// /// The environment variables. public string Environment { get { return GetProperty ("environment"); } set { Properties["environment"] = value; } } } }