我正在尝试为outlook开发一个插件,我找到了一个提供商http://www.add-in-express.com.但是,他们在一个(http://www.add-in-express.com/add-in-net/index.php)中有两个产品,它们允许在使用VS 2010和.Net Framework 4.0中创建COM添加(如何是可能的,我一直认为COM只能在VB6中创建,否则你必须创建一个COM可调用包装器(CCW)).
另一个产品是VSTO Tools(http://www.add-in-express.com/add-in-vsto/index.php),它也使用.Net Framework 4.0,这完全令人困惑.
请帮我理解.
关心Mohit Thakral
根据Service Stack Ormlite文档.我应该在调试模式下生成sql查询.但是,我无法看到这些疑问.简单的代码
private static readonly string DataDirLoc =
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +
"\\TargetIntegration\\Test\\Debug\\";
private readonly string dbFileName = DataDirLoc +
"Test.db3";
[Test]
public void Can_Generate_log() {
//var writer = new TextWriterTraceListener(System.Console.Out);
//Debug.Listeners.Add(writer);
Debug.Write("this is a try");
var dbFact = new OrmLiteConnectionFactory("Data Source={0};Version=3;".FormatParams(dbFileName), true,
SqliteOrmLiteDialectProvider.Instance);
IDbConnection dbConnection = dbFact.OpenDbConnection();
var dbCommand = dbConnection.CreateCommand();
dbCommand.CreateTable<Contact>();
}
Run Code Online (Sandbox Code Playgroud) 这里的问题是特定于编程语言或技术的设计模式,
就像你只能用C#,Java而不是VB6.0那样做复合模式.这是真的,如果是的那么什么是用面向对象编程语言无法实现的模式.
以下是代码.创建一个类lib将ref添加到NUnit框架2.5.3.9345和Moq.dll 4.0.0.0并粘贴以下代码.尝试在我抛出的机器上运行它
TestCase'MoqTest.TryClassTest.IsMessageNotNull
'
失败:Moq.MockException:
模拟上的预期调用至少一次,
但从未执行过:v => v.Model
= It.Is(value(Moq.It + <> c__DisplayClass2 1 mock, Action 1.VerifySet(Action`1 setterExpression)Class1.cs( 22,0 ):at MoqTest.TryClassTest.IsMessageNotNull()1[MoqTest.GenInfo]).match)
at
Moq.Mock.ThrowVerifyException(IProxyCall
expected, Expression expression, Times
times, Int32 callCount) at
Moq.Mock.VerifyCalls(Interceptor
targetInterceptor, MethodCall
expected, Expression expression, Times
times) at
Moq.Mock.VerifySet[T](Mock1 setterExpression, Times
times, String failMessage) at
Moq.Mock
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Moq;
using NUnit.Framework;
namespace MoqTest
{
[TestFixture]
public class TryClassTest
{
[Test]
public void IsMessageNotNull()
{
var mockView = new …Run Code Online (Sandbox Code Playgroud) 我正在Windows XP和Visual Studio 2008上开发一个ASP.NET MVC Web应用程序(使用Visual Studio Web服务器).我最近安装了Windows 7 64位Ultimate版本,IIS 7.5并使用迁移了我的应用程序appcmd.
如果我enable32BitAppOnWin64 == false在我的应用程序池上设置标志,我的应用程序工作正常.一旦我将其设置为true(因为我希望它以64位运行),它会抛出此异常:
HTTP Error 500.0 - Internal Server Error
Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_filter.dll" failed
Run Code Online (Sandbox Code Playgroud)
如果我去删除所有ISAPI过滤器但是离开ASP.Net_2.0.50727-64则此错误消失.
我该如何解决这个问题?
我正在尝试使用knockoutjs 1.2.l并使用以下代码
$(function() {
var viewModel = {
categories: ko.observableArray([
{"Selected": false, "Text": "Rooms", "Value": "1"},
{"Selected": false, "Text": "Automobile", "Value": "2"},
{"Selected": false, "Text": "Buy & Sell", "Value": "3"},
{"Selected": false, "Text": "Tutions", "Value": "4"},
{"Selected": false, "Text": "Immigration", "Value": "5"}
]),
initialData: {
"Description": null,
"SubCategoryId": 0,
"Title": null,
"UserId": 0,
"AdTypeId": 0,
"AddressId": null,
"SubCategory": null,
"User": null,
"AdType": null,
"Address": null,
"Id": 0,
"CreatedOn": "\/Date(1307627158991)\/",
"CreatedBy": 0,
"LastUpdatedOn": "\/Date(1307627158991)\/",
"LastUpdatedBy": 0
},
chosenCategory: ko.observable()
};
ko.applyBindings(viewModel); …Run Code Online (Sandbox Code Playgroud) c# ×2
com ×1
html ×1
iis-7.5 ×1
javascript ×1
knockout-1.2 ×1
knockout.js ×1
moq ×1
nunit ×1
servicestack ×1
unit-testing ×1
vsto ×1