protected override Value BuildValue(ShortList <string> entries, RulesCreationContext creationContext) { return(Value.CreateValue(entries.Select(delegate(string protocolString) { int result; if (int.TryParse(protocolString, out result)) { return (ClientAccessProtocol)result; } if (protocolString != null) { if (protocolString == "EWS") { return ClientAccessProtocol.ExchangeWebServices; } if (protocolString == "RPS") { return ClientAccessProtocol.RemotePowerShell; } if (protocolString == "OA") { return ClientAccessProtocol.OutlookAnywhere; } } return (ClientAccessProtocol)Enum.Parse(typeof(ClientAccessProtocol), protocolString); }))); }
protected override Value BuildValue(ShortList <string> entries, RulesCreationContext creationContext) { return(Value.CreateValue(entries.Select(delegate(string authenticationTypeString) { int result; if (int.TryParse(authenticationTypeString, out result)) { return (ClientAccessAuthenticationMethod)result; } return (ClientAccessAuthenticationMethod)Enum.Parse(typeof(ClientAccessAuthenticationMethod), authenticationTypeString); }))); }
protected override Value BuildValue(ShortList <string> entries, RulesCreationContext creationContext) { return(Value.CreateValue(entries.Select(new Func <string, IPRange>(IPRange.Parse)))); }
protected override Value BuildValue(ShortList <string> entries, RulesCreationContext creationContext) { return(Value.CreateValue(entries.Select(new Func <string, Regex>(ClientAccessRulesUsernamePatternProperty.GetWildcardPatternRegex)))); }