public static Dictionary <string, bool> CheckDomains(string name, string[] extensions) { Guard.ArgumentNotNullOrWhiteSpace(name, "name"); Guard.ArgumentNotNull(extensions, "extensions"); Dictionary <string, bool> result = new Dictionary <string, bool>(); extensions.Each(x => { result.AddOrUpdate(x, false); }); IDomainProxy proxy = XmlRpcProxyGen.Create <IDomainProxy>(); XmlRpcStruct rpcResult = null; while (rpcResult == null || ShouldRevalidate(rpcResult)) { rpcResult = proxy.Available(CloudConfigurationManager.GetSetting(Constants.ConfigurationKeys.GandiApiKey), GetDomains(name, extensions)); } foreach (var key in rpcResult.Keys) { var skey = key.ToString(); var indexOf = skey.IndexOf('.') + 1; var extension = skey.Substring(indexOf, skey.Length - indexOf); if (result.ContainsKey(extension)) { result[extension] = IsDomainStatusAvailable(rpcResult[key].ToString()); } } return(result); }
public static Task<long> Count<T>(this IDomainProxy repository) where T : class, ISearchable { if (repository == null) throw new ArgumentNullException("repository can't be null"); return repository.Count<T>(null); }
public ClientPersistableRepository( IDomainProxy domainProxy, IStandardProxy standardProxy) : base(domainProxy) { this.StandardProxy = standardProxy; }
public static Task<T[]> Search<T>( this IDomainProxy repository, ISpecification<T> specification) where T : class, ISearchable { if (repository == null) throw new ArgumentNullException("repository can't be null"); return repository.Search<T>(specification, null, null, null); }
public static Task<T[]> FindAll<T>( this IDomainProxy repository, int? limit, int? offset) where T : class, ISearchable { if (repository == null) throw new ArgumentNullException("repository can't be null"); return repository.Search<T>(null, limit, offset, null); }
public ClientDomainStore(IDomainProxy domainProxy) { this.DomainProxy = domainProxy; }
public ClientSearchableRepository(IDomainProxy domainProxy) { this.DomainProxy = domainProxy; }
public ClientRepository(IDomainProxy domainProxy) : base(domainProxy) { }