本文整理汇总了C#中IHttpService类的典型用法代码示例。如果您正苦于以下问题:C# IHttpService类的具体用法?C# IHttpService怎么用?C# IHttpService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IHttpService类属于命名空间,在下文中一共展示了IHttpService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProxyServerConnection
internal ProxyServerConnection(IHttpService service, Endpoints endpoints)
{
_service = service;
_endpoints = endpoints;
_timer = new System.Timers.Timer();
_timer.Elapsed += _timer_Elapsed;
}
示例2: Subscribe
public void Subscribe(IHttpService service, HttpMessagePipe pipe)
{
Ensure.NotNull(service, "service");
Ensure.NotNull(pipe, "pipe");
SubscribeCore(service, pipe);
}
示例3: NetkanTransformer
public NetkanTransformer(
IHttpService http,
IFileService fileService,
IModuleService moduleService,
string githubToken,
bool prerelease
)
{
_transformers = new List<ITransformer>
{
new MetaNetkanTransformer(http),
new KerbalstuffTransformer(new KerbalstuffApi(http)),
new GithubTransformer(new GithubApi(githubToken), prerelease),
new HttpTransformer(),
new JenkinsTransformer(),
new InternalCkanTransformer(http, moduleService),
new AvcTransformer(http, moduleService),
new VersionEditTransformer(),
new ForcedVTransformer(),
new EpochTransformer(),
new VersionedOverrideTransformer(),
new DownloadSizeTransformer(http, fileService),
new GeneratedByTransformer(),
new OptimusPrimeTransformer(),
new StripNetkanMetadataTransformer(),
new PropertySortTransformer()
};
}
示例4: SubscribeCore
protected override void SubscribeCore(IHttpService service)
{
Ensure.NotNull(service, "service");
service.RegisterAction(new ControllerAction("/stats", HttpMethod.Get, Codec.NoCodecs, SupportedCodecs), OnGetFreshStats);
service.RegisterAction(new ControllerAction("/stats/{*statPath}", HttpMethod.Get, Codec.NoCodecs, SupportedCodecs), OnGetFreshStats);
}
示例5: GoogleReaderClientLogin
public GoogleReaderClientLogin(string username, string password, IHttpService httpService, IUriBuilder urlBuilder)
{
Username = username;
Password = password;
_httpService = httpService;
_urlBuilder = urlBuilder;
}
示例6: NetkanTransformer
public NetkanTransformer(
IHttpService http,
IFileService fileService,
IModuleService moduleService,
string githubToken,
bool prerelease
)
{
_transformers = InjectVersionedOverrideTransformers(new List<ITransformer>
{
new MetaNetkanTransformer(http),
new SpacedockTransformer(new SpacedockApi(http)),
new GithubTransformer(new GithubApi(githubToken), prerelease),
new HttpTransformer(),
new JenkinsTransformer(http),
new InternalCkanTransformer(http, moduleService),
new AvcTransformer(http, moduleService),
new VersionEditTransformer(),
new ForcedVTransformer(),
new EpochTransformer(),
// This is the "default" VersionedOverrideTransformer for compatability with overrides that don't
// specify a before or after property.
new VersionedOverrideTransformer(before: new string[] { null }, after: new string[] { null }),
new DownloadAttributeTransformer(http, fileService),
new GeneratedByTransformer(),
new OptimusPrimeTransformer(),
new StripNetkanMetadataTransformer(),
new PropertySortTransformer()
});
}
示例7: ArasHttpConnection
public ArasHttpConnection(IHttpService service, string innovatorServerUrl)
{
_service = service;
this.Compression = CompressionType.none;
_factory = new ElementFactory(_context);
if (innovatorServerUrl.EndsWith("Server/InnovatorServer.aspx", StringComparison.OrdinalIgnoreCase))
{
innovatorServerUrl = innovatorServerUrl.Substring(0, innovatorServerUrl.Length - 20);
}
else if (innovatorServerUrl.EndsWith("/Server", StringComparison.OrdinalIgnoreCase)
|| innovatorServerUrl.EndsWith("/Server/", StringComparison.OrdinalIgnoreCase))
{
innovatorServerUrl += (innovatorServerUrl.EndsWith("/") ? "" : "/");
}
else
{
innovatorServerUrl += (innovatorServerUrl.EndsWith("/") ? "" : "/") + "Server/";
}
this._innovatorServerBaseUrl = new Uri(innovatorServerUrl);
this._innovatorServerUrl = new Uri(this._innovatorServerBaseUrl, "InnovatorServer.aspx");
this._innovatorClientBin = new Uri(this._innovatorServerBaseUrl, "../Client/cbin/");
_vaultConn = new ArasVaultConnection(this);
}
示例8: SubscribeCore
protected override void SubscribeCore(IHttpService service, HttpMessagePipe pipe)
{
_singleNodeWeb.RegisterControllerActions(service);
_commonWeb.RegisterControllerActions(service);
_singleNodeJs.RegisterControllerActions(service);
RegisterRedirectAction(service, "", "/web/home.htm");
RegisterRedirectAction(service, "/web", "/web/home.htm");
RegisterRedirectAction(service, "/web/projections", "/web/projections.htm");
}
示例9: SubscribeCore
protected override void SubscribeCore(IHttpService service, HttpMessagePipe pipe)
{
service.RegisterControllerAction(new ControllerAction("/shutdown",
HttpMethod.Post,
SupportedCodecs,
SupportedCodecs,
DefaultResponseCodec),
OnPostShutdown);
}
示例10: SubscribeCore
protected override void SubscribeCore(IHttpService service)
{
service.RegisterControllerAction(new ControllerAction("/admin/halt", HttpMethod.Post, Codec.NoCodecs, SupportedCodecs),
OnPostHalt);
service.RegisterControllerAction(new ControllerAction("/admin/shutdown", HttpMethod.Post, Codec.NoCodecs, SupportedCodecs),
OnPostShutdown);
service.RegisterControllerAction(new ControllerAction("/admin/scavenge", HttpMethod.Post, Codec.NoCodecs, SupportedCodecs),
OnPostScavenge);
}
示例11: SubscribeCore
protected override void SubscribeCore(IHttpService service, HttpMessagePipe pipe)
{
service.RegisterControllerAction(new ControllerAction("/streams/{stream}/event/{version}?resolve={resolve}",
HttpMethod.Get,
Codec.NoCodecs,
SupportedCodecs,
DefaultResponseCodec),
OnGetRead);
}
示例12: CkanValidator
public CkanValidator(Metadata netkan, IHttpService downloader, IModuleService moduleService)
{
_validators = new List<IValidator>
{
new IsCkanModuleValidator(),
new MatchingIdentifiersValidator(netkan.Identifier),
new InstallsFilesValidator(downloader, moduleService)
};
}
示例13: SubscribeCore
protected override void SubscribeCore(IHttpService service)
{
Register(service, "/subscriptions/{stream}/{subscription}", HttpMethod.Get, GetSubscriptionInfo, Codec.NoCodecs, DefaultCodecs);
Register(service, "/subscriptions/{stream}", HttpMethod.Get, GetSubscriptionInfoForStream, Codec.NoCodecs, DefaultCodecs);
Register(service, "/subscriptions", HttpMethod.Get, GetAllSubscriptionInfo, Codec.NoCodecs, DefaultCodecs);
Register(service, "/subscriptions/{stream}/{subscription}", HttpMethod.Put, PutSubscription, DefaultCodecs, DefaultCodecs);
Register(service, "/subscriptions/{stream}/{subscription}", HttpMethod.Post, PostSubscription, DefaultCodecs, DefaultCodecs);
RegisterUrlBased(service, "/subscriptions/{stream}/{subscription}", HttpMethod.Delete, DeleteSubscription);
RegisterUrlBased(service, "/subscriptions/{stream}/{subscription}/replayParked", HttpMethod.Post, ReplayParkedMessages);
}
示例14: SubscribeCore
protected override void SubscribeCore(IHttpService service)
{
_clusterNodeWeb.RegisterControllerActions(service);
RegisterRedirectAction(service, "", "/web/home.htm");
RegisterRedirectAction(service, "/web", "/web/home.htm");
service.RegisterAction(
new ControllerAction("/sys/subsystems", HttpMethod.Get, Codec.NoCodecs, new ICodec[] { Codec.Json }),
OnListNodeSubsystems);
}
示例15: RegisterControllerActions
public void RegisterControllerActions(IHttpService service)
{
var pattern = _localWebRootPath + "/{*remaining_path}";
_logger.Trace("Binding MiniWeb to {0}", pattern);
service.RegisterAction(new ControllerAction(pattern,
HttpMethod.Get,
Codec.NoCodecs,
new ICodec[] { Codec.ManualEncoding }),
OnStaticContent);
}