SessionFactory not found

133 views Asked by At

I'm just starting using CMIS. I'm trying to get the first sample from the Apache site to work (https://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html) but the compiler does not accept the SessionFactory. What am I doing wrong?

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();
    }
}

}

1

There are 1 answers

0
Johannes Schacht On

It turns out I was just missing a using statement. I just had to add:

using DotCMIS.Client.Impl;