Example #1
0
        internal Access(SWIG.UplinkAccess access)
        {
            Init();

            try
            {
                _access = access;

                _projectResult = SWIG.storj_uplink.uplink_config_open_project(_config, _access);
                if (_projectResult.error != null && !string.IsNullOrEmpty(_projectResult.error.message))
                {
                    throw new ArgumentException(_projectResult.error.message);
                }

                _project = _projectResult.project;
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }
Example #2
0
        internal Access(SWIG.UplinkAccess access)
        {
            Init();

            try
            {
                _access = access;

                var uplinkConfigSWIG = GetUplinkConfig();
                using (var projectResult = SWIG.storj_uplink.uplink_config_open_project(uplinkConfigSWIG, _access))
                {
                    if (projectResult.error != null && !string.IsNullOrEmpty(projectResult.error.message))
                    {
                        throw new ArgumentException(projectResult.error.message);
                    }

                    _project = projectResult.project;
                }
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }