Beispiel #1
0
        // Token: 0x060000F6 RID: 246 RVA: 0x00004394 File Offset: 0x00002594
        internal ConnectResponse Execute(ConnectRequest connectRequest, IServerCapabilities requiredCapabilities)
        {
            ConnectResponse connectResponse = this.Execute(connectRequest);

            connectResponse.UserSmtpAddressString = base.EasConnectionSettings.EasEndpointSettings.UserSmtpAddressString;
            if (connectResponse.ConnectStatus != ConnectStatus.Success || requiredCapabilities == null)
            {
                return(connectResponse);
            }
            OptionsCommand  optionsCommand  = new OptionsCommand(base.EasConnectionSettings);
            OptionsResponse optionsResponse = optionsCommand.Execute(new OptionsRequest());

            connectResponse.OptionsResponse = optionsResponse;
            EasServerCapabilities easServerCapabilities = optionsResponse.EasServerCapabilities;

            if (easServerCapabilities.Supports(requiredCapabilities))
            {
                base.EasConnectionSettings.ExtensionCapabilities = optionsResponse.EasExtensionCapabilities;
                return(connectResponse);
            }
            IEnumerable <string> values = requiredCapabilities.NotIn(easServerCapabilities);
            string text = string.Join(", ", values);

            base.EasConnectionSettings.Log.Debug("ConnectCommand, missing capabilities: '{0}'.", new object[]
            {
                text
            });
            throw new MissingCapabilitiesException(text);
        }
Beispiel #2
0
        // Token: 0x06000077 RID: 119 RVA: 0x000028E4 File Offset: 0x00000AE4
        public bool Supports(IServerCapabilities desiredCapabilities)
        {
            IEnumerable <string> source = desiredCapabilities.NotIn(this);

            return(!source.Any <string>());
        }