Example #1
0
        public virtual List <RegistryEntry> Register(string name, string database, EndPoint listenerEndPoint, params string[] tags)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (database == null)
            {
                throw new ArgumentNullException(nameof(database));
            }
            if (listenerEndPoint == null)
            {
                throw new ArgumentNullException(nameof(listenerEndPoint));
            }

            var response = client.Post <Registration, RegistrationResponse>(
                REGISTRY_RESOURCE,
                new Registration
            {
                Name     = name,
                Database = database,
                Source   = listenerEndPoint,
                Tags     = tags
            });

            return(response.Registry);
        }