public static T GetProxy <T>(this IServicesMgr svcmgr, string username, string password) where T : IDisposable
        {
            //Create the ServiceFactory with the given credentials and urls
            ServiceFactorySettings serviceFactorySettings = new ServiceFactorySettings(svcmgr.GetServicesURL(), svcmgr.GetKeplerUrl(), new Relativity.Services.ServiceProxy.UsernamePasswordCredentials(username, password));

            Relativity.Services.ServiceProxy.ServiceFactory serviceFactory = new Relativity.Services.ServiceProxy.ServiceFactory(serviceFactorySettings);
            //Create proxy
            T proxy = serviceFactory.CreateProxy <T>();

            return(proxy);
        }
Esempio n. 2
0
 public static T GetProxy <T>(this IServicesMgr svcmgr, string username, string password) where T : IDisposable
 {
     return(new global::Relativity.Services.ServiceProxy.ServiceFactory(new ServiceFactorySettings(svcmgr.GetServicesURL(), svcmgr.GetKeplerUrl(), (Credentials) new global::Relativity.Services.ServiceProxy.UsernamePasswordCredentials(username, password))).CreateProxy <T>());
 }