public static ProtoServer WithAuthentication(this ProtoServer server, string remoteUserName, string remotePassword) { var interpolator = new CaseInsensitiveInterpolator(); remoteUserName = interpolator.ReplaceTokens(HUB.Settings, remoteUserName); remotePassword = interpolator.ReplaceTokens(HUB.Settings, remotePassword); WmiService.WithAuthentication(remoteUserName, remotePassword); return(server); }
public void one_replacement() { CaseInsensitiveInterpolator i = new CaseInsensitiveInterpolator(); var settings = new Bill() { Name = "dru" }; var input = "hi {{Name}}"; var output = i.ReplaceTokens(settings, input); Assert.AreEqual("hi dru", output); }