我正在学习Xamarin Forms for Visual Studio 2015并尝试使用Xaml创建一个简单的共享项目,但我一直不知道InitializeComponent是否存在(以及对cs类中的Xaml控件的任何引用).
据我所知,在最新版本的Xamarin中,Xaml可以在Shared Xamarin Forms Projects中工作(而不仅仅是在PCL项目中).我试过运行不到一个月前发布的最新测试版,但仍然没有运气.
任何意见是极大的赞赏.
我在尝试让Quartz.NET与AdoJobStore一起工作时遇到了麻烦.这里没有其他问题似乎遇到了我的问题.我能够在没有AdoJobStore配置的情况下使其工作正常,但最终会保留所有内容,但是在尝试GetScheduler()我无法弄清楚时会遇到错误.
这是我的石英app.config部分:
<quartz>
<add key="quartz.scheduler.instanceName" value="XxxDefaultQuartzScheduler"/>
<add key="quartz.scheduler.instanceId" value="instance_one"/>
<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz"/>
<add key="quartz.threadPool.threadCount" value="10"/>
<add key="quartz.threadPool.threadPriority" value="1"/>
<add key="quartz.jobStore.type" value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz"/>
<add key="quartz.jobStore.misfireThreshold" value="60000"/>
<add key="quartz.jobStore.dataSource" value="default"/>
<add key="quartz.jobStore.driverDelegateType" value="Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz"/>
<add key="quartz.jobStore.lockHandler.type" value="Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz"/>
<add key="quartz.jobStore.tablePrefix" value="QRTZ_"/>
<add key="quartz.dataSource.default.connectionString" value="Server=(local);Database=Quartz;UID=XXXX;PWD=XXXX"/>
<add key="quartz.dataSource.default.provider" value="SqlServer-20"/>
<add key="quartz.dataSource.useProperties" value="true"/>
</quartz>
Run Code Online (Sandbox Code Playgroud)
这是相关的初始化代码:
var config = (NameValueCollection) ConfigurationManager.GetSection("quartz");
ISchedulerFactory factory = new StdSchedulerFactory(config);
// This is where an ArgumentOutOfRange exception occurs:
IScheduler scheduler = factory.GetScheduler();
Run Code Online (Sandbox Code Playgroud)
而我得到的错误是ArgumentOutOfRangeException: …
我在Web API 2项目中使用ASP.NET Identity 2.2,但我不确定如何连接使用Autofac的ISecureDataFormat<AuthenticationTicket>依赖项.AccountController
我试过这个:
builder.RegisterType<ISecureDataFormat<AuthenticationTicket>>()
.As<TicketDataFo??rmat>();
Run Code Online (Sandbox Code Playgroud)
并得到错误:
类型'Microsoft.Owin.Security.ISecureDataFormat`1 [Microsoft.Owin.Security.Authenticat ionTicket]'不能分配给服务'Microsoft.Owin.Security.DataHandler.TicketDataFormat'
我遇到的所有问题似乎都没有使用最新的ASP.NET身份稳定版本.
任何帮助是极大的赞赏.
asp.net dependency-injection autofac asp.net-web-api2 asp.net-identity-2