当前位置: 首页>>代码示例>>C#>>正文


C# Plug.At方法代码示例

本文整理汇总了C#中Plug.At方法的典型用法代码示例。如果您正苦于以下问题:C# Plug.At方法的具体用法?C# Plug.At怎么用?C# Plug.At使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plug的用法示例。


在下文中一共展示了Plug.At方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AmazonS3Client

 //--- Constructors ---
 /// <summary>
 /// Create new client instance 
 /// </summary>
 /// <param name="config">Client configuration.</param>
 /// <param name="timerFactory">Timer factory.</param>
 public AmazonS3Client(AmazonS3ClientConfig config, TaskTimerFactory timerFactory)
 {
     _config = config;
     _bucketPlug = Plug.New(_config.S3BaseUri)
         .WithS3Authentication(_config.PrivateKey, _config.PublicKey)
         .WithTimeout(_config.Timeout)
         .At(_config.Bucket);
     _rootPlug = _bucketPlug;
     if(!string.IsNullOrEmpty(_config.RootPath)) {
         _keyRootParts = _config.RootPath.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
         if(_keyRootParts != null && _keyRootParts.Any()) {
             _rootPlug = _rootPlug.At(_keyRootParts);
         }
     }
     _expirationEntries = new ExpiringHashSet<string>(timerFactory);
     _expirationEntries.EntryExpired += OnDelete;
 }
开发者ID:nataren,项目名称:DReAM,代码行数:23,代码来源:AmazonS3Client.cs

示例2: Init

 public void Init()
 {
     _hostInfo = DreamTestHelper.CreateRandomPortHost();
     _hostInfo.Host.Self.At("load").With("name", "test.mindtouch.dream").Post(DreamMessage.Ok());
     var config = new XDoc("config")
        .Elem("path", "test")
        .Elem("sid", "http://services.mindtouch.com/dream/test/2010/07/featuretestserver");
     DreamMessage result = _hostInfo.LocalHost.At("host", "services").With("apikey", _hostInfo.ApiKey).PostAsync(config).Wait();
     Assert.IsTrue(result.IsSuccessful, result.ToText());
     _plug = Plug.New(_hostInfo.LocalHost.Uri.WithoutQuery()).At("test");
     _blueprint = _plug.At("@blueprint").Get().ToDocument();
 }
开发者ID:aaronmars,项目名称:DReAM,代码行数:12,代码来源:DreamFeatureTests.cs

示例3: Init

 public void Init()
 {
     var builder = new ContainerBuilder();
     builder.RegisterType<Foo>().As<IFoo>().RequestScoped();
     _hostInfo = DreamTestHelper.CreateRandomPortHost(new XDoc("config"), builder.Build(ContainerBuildOptions.None));
     _hostInfo.Host.Self.At("load").With("name", "test.mindtouch.dream").Post(DreamMessage.Ok());
     var config = new XDoc("config")
        .Elem("path", "test")
        .Elem("sid", "http://services.mindtouch.com/dream/test/2010/07/featuretestserver");
     DreamMessage result = _hostInfo.LocalHost.At("host", "services").With("apikey", _hostInfo.ApiKey).Post(config, new Result<DreamMessage>()).Wait();
     Assert.IsTrue(result.IsSuccessful, result.ToText());
     _plug = Plug.New(_hostInfo.LocalHost.Uri.WithoutQuery()).At("test");
     _blueprint = _plug.At("@blueprint").Get().ToDocument();
 }
开发者ID:nataren,项目名称:DReAM,代码行数:14,代码来源:DreamFeatureTests.cs


注:本文中的Plug.At方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。