91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 19.36MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-07
  • 語言: 其他
  • 標簽: Owin??WebApi??Odata??

資源簡介

控制臺程序采用自宿主方式提供您webApi服務和Odata服務。本例子采用兩種方式做實現,一個是console控制程序自身采用Owin方式將Odata服務自宿主在自身。另一種方式是Console控制體程序采用Owin方式加載webApi網站dll方式。同時控制臺程序實現了windows服務的注冊和刪除功能。

資源截圖

代碼片段和文件信息

using?System;
using?System.Linq;
using?System.ServiceProcess;
using?DebuggableOwinService1.framework;

namespace?DebuggableOwinService1
{
????static?class?Program
????{
????????//?The?main?entry?point?for?the?windows?service?application.
????????static?void?Main(string[]?args)
????????{
????????????try
????????????{
????????????????//?If?install?was?a?command?line?flag?then?run?the?installer?at?runtime.
????????????????if?(args.Contains(“-install“?StringComparer.InvariantCultureIgnoreCase))
????????????????{
????????????????????WindowsServiceInstaller.RuntimeInstall();
????????????????}

????????????????//?If?uninstall?was?a?command?line?flag?run?uninstaller?at?runtime.
????????????????else?if?(args.Contains(“-uninstall“?StringComparer.InvariantCultureIgnoreCase))
????????????????{
????????????????????WindowsServiceInstaller.RuntimeUnInstall();
????????????????}

????????????????//?Otherwise?fire?up?the?service?as?either?console?or?windows?service?based?on?UserInteractive?property.
????????????????else
????????????????{
????????????????????var?implementation?=?new?ServiceImplementation();

????????????????????//?If?started?from?console?file?explorer?etc?run?as?console?app.
????????????????????if?(Environment.UserInteractive)
????????????????????{
????????????????????????ConsoleHarness.Run(args?implementation);
????????????????????}

????????????????????//?Otherwise?run?as?a?windows?service
????????????????????else
????????????????????{
????????????????????????Servicebase.Run(new?WindowsServiceHarness(implementation));
????????????????????}
????????????????}
????????????}

????????????catch?(Exception?ex)
????????????{
????????????????ConsoleHarness.WriteToConsole(ConsoleColor.Red?“An?exception?occurred?in?Main():?{0}“?ex);
????????????}
????????}
????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????2140??2018-04-03?09:57??DebuggableOwinService1\App.config

?????文件??????66224??2013-08-16?10:43??DebuggableOwinService1\bin\Debug\de\Microsoft.Data.Edm.resources.dll

?????文件?????282800??2013-08-16?10:55??DebuggableOwinService1\bin\Debug\de\Microsoft.Data.OData.resources.dll

?????文件??????17584??2013-08-16?10:57??DebuggableOwinService1\bin\Debug\de\System.Spatial.resources.dll

?????文件??????25088??2018-04-03?10:48??DebuggableOwinService1\bin\Debug\DebuggableOwinService1.exe

?????文件???????2140??2018-04-03?09:57??DebuggableOwinService1\bin\Debug\DebuggableOwinService1.exe.config

?????文件??????58880??2018-04-03?10:48??DebuggableOwinService1\bin\Debug\DebuggableOwinService1.pdb

?????文件??????65712??2013-08-16?10:43??DebuggableOwinService1\bin\Debug\es\Microsoft.Data.Edm.resources.dll

?????文件?????278192??2013-08-16?10:55??DebuggableOwinService1\bin\Debug\es\Microsoft.Data.OData.resources.dll

?????文件??????17584??2013-08-16?10:57??DebuggableOwinService1\bin\Debug\es\System.Spatial.resources.dll

?????文件??????67248??2013-08-16?10:43??DebuggableOwinService1\bin\Debug\fr\Microsoft.Data.Edm.resources.dll

?????文件?????292016??2013-08-16?10:55??DebuggableOwinService1\bin\Debug\fr\Microsoft.Data.OData.resources.dll

?????文件??????18096??2013-08-16?10:57??DebuggableOwinService1\bin\Debug\fr\System.Spatial.resources.dll

?????文件??????65712??2013-08-16?10:43??DebuggableOwinService1\bin\Debug\it\Microsoft.Data.Edm.resources.dll

?????文件?????276656??2013-08-16?10:55??DebuggableOwinService1\bin\Debug\it\Microsoft.Data.OData.resources.dll

?????文件??????17584??2013-08-16?10:57??DebuggableOwinService1\bin\Debug\it\System.Spatial.resources.dll

?????文件??????71856??2013-08-16?10:43??DebuggableOwinService1\bin\Debug\ja\Microsoft.Data.Edm.resources.dll

?????文件?????315056??2013-08-16?10:55??DebuggableOwinService1\bin\Debug\ja\Microsoft.Data.OData.resources.dll

?????文件??????18608??2013-08-16?10:57??DebuggableOwinService1\bin\Debug\ja\System.Spatial.resources.dll

?????文件??????66736??2013-08-16?10:43??DebuggableOwinService1\bin\Debug\ko\Microsoft.Data.Edm.resources.dll

?????文件?????282288??2013-08-16?10:55??DebuggableOwinService1\bin\Debug\ko\Microsoft.Data.OData.resources.dll

?????文件??????18096??2013-08-16?10:57??DebuggableOwinService1\bin\Debug\ko\System.Spatial.resources.dll

?????文件?????659120??2013-08-16?10:43??DebuggableOwinService1\bin\Debug\Microsoft.Data.Edm.dll

?????文件?????654503??2013-08-16?10:43??DebuggableOwinService1\bin\Debug\Microsoft.Data.Edm.xml

?????文件????1518256??2013-08-16?10:55??DebuggableOwinService1\bin\Debug\Microsoft.Data.OData.dll

?????文件????3702833??2013-08-16?10:55??DebuggableOwinService1\bin\Debug\Microsoft.Data.OData.xml

?????文件?????101032??2015-02-13?13:16??DebuggableOwinService1\bin\Debug\Microsoft.Owin.dll

?????文件??????88232??2015-02-13?13:16??DebuggableOwinService1\bin\Debug\Microsoft.Owin.Host.HttpListener.dll

?????文件???????8129??2015-02-13?13:16??DebuggableOwinService1\bin\Debug\Microsoft.Owin.Host.HttpListener.xml

?????文件??????64680??2015-02-13?13:16??DebuggableOwinService1\bin\Debug\Microsoft.Owin.Hosting.dll

............此處省略379個文件信息

評論

共有 條評論