public SessionProperties(string userAgentName, string apiKey, 
     EncryptionPreferences encryptionPreferences)
 {
     UserAgentName = userAgentName;
     APIKey = apiKey;
     EncryptionPreferences = encryptionPreferences;
 }
 public void SetSecurityPreference(EncryptionPreferences preferences, bool secureChannelRequested)
 {
     bool secure;
     switch (preferences)
     {
         case EncryptionPreferences.AlwaysHttp:
             secure = false;
             break;
         case EncryptionPreferences.AlwaysHttps:
             secure = true;
             break;
         case EncryptionPreferences.Default:
             secure = secureChannelRequested;
             break;
         default:
             throw new InvalidOperationException("Invalid enumeration value.");
     }
     _builder.Scheme = secure ? "https" : "http";
 }
 public SessionProperties(Assembly assm, string apiKey,
     EncryptionPreferences encryptionPreferences)
     : this(SmugRestHelpers.UserAgentNameFromAssembly(assm), apiKey, encryptionPreferences)
 {
 }