コード例 #1
0
ファイル: Extension.cs プロジェクト: mmooney/dropkick
        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);
        }
コード例 #2
0
ファイル: TestIt.cs プロジェクト: rossbeehler/dropkick
        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);
        }