Example #1
0
        /// <inheritdoc/>
        public RemoteRDMP(IRepository repository, DbDataReader r) : base(repository, r)
        {
            // need a new copy of the catalogue repository so a new DB connection can be made to use with the encrypted host.
            _encryptedPasswordHost = new EncryptedPasswordHost((ICatalogueRepository)repository);

            URL      = r["URL"].ToString();
            Name     = r["Name"].ToString();
            Username = r["Username"] as string;
            Password = r["Password"] as string;
        }
Example #2
0
        /// <inheritdoc/>
        public RemoteRDMP(ICatalogueRepository repository) : base()
        {
            // need a new copy of the catalogue repository so a new DB connection can be made to use with the encrypted host.
            _encryptedPasswordHost = new EncryptedPasswordHost(repository);

            repository.InsertAndHydrate(this, new Dictionary <string, object>()
            {
                { "Name", "Unnamed remote" },
                { "URL", "https://example.com" }
            });

            if (ID == 0 || Repository != repository)
            {
                throw new ArgumentException("Repository failed to properly hydrate this class");
            }
        }