Example #1
0
        public async Task <IObjectManager> GetObjectManagerAsync(string host, IAuthentication authentication)
        {
            var version = await _versionResolver.GetRelativityVersionAsync();

            if (version == new System.Version("9.5.411.4"))
            {
                return(new ObjectManagerV1(host, authentication));
            }
            else if (version >= new System.Version("9.6.50.31"))
            {
                return(new ObjectManagerV2(host, authentication));
            }
            else
            {
                return(new RSAPIObjectManager());
            }
        }
Example #2
0
        public virtual async Task <IObjectManager> GetObjectManagerAsync(IAuthentication authentication)
        {
            var version = await _versionResolver.GetRelativityVersionAsync();

            if (version >= new Version("9.5.411.4") && version < new Version("9.6.50.31"))
            {
                var host = GetRestUrl(_helper);
                return(new ObjectManagerV1(host, authentication));
            }
            else if (version >= new Version("9.6.50.31"))
            {
                var host = GetRestUrl(_helper);
                return(new ObjectManagerV2(host, authentication));
            }
            else
            {
                return(GetLegacyManager(_helper));
            }
        }