我刚刚开始使用CMIS。我正在尝试从Apache站点获取第一个样本(https://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html),但编译器不接受SessionFactory。我做错了什么?
using System;
using System.Collections.Generic;
using System.Linq;
using DotCMIS;
using DotCMIS.Client;
namespace CMIS_TestAndExplore
{
class Program
{
static void Main(string[] args)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters[SessionParameter.BindingType] = BindingType.AtomPub;
parameters[SessionParameter.AtomPubUrl] = "http://<http://localhost:8081/inmemory/atom";
parameters[SessionParameter.User] = "test";
parameters[SessionParameter.Password] = "";
SessionFactory factory = SessionFactory.NewInstance();
ISession session = factory.GetRepositories(parameters)[0].CreateSession();
}
}
}
答案 0 :(得分:0)
事实证明我错过了一个使用声明。我只需要添加:
using DotCMIS.Client.Impl;