internal static DocumentDBContext CreateContext(DocumentDBConfiguration config, DocumentDBAttribute attribute, INameResolver resolver)
        {
            string resolvedConnectionString = config.ConnectionString;

            if (!string.IsNullOrEmpty(attribute.ConnectionString))
            {
                resolvedConnectionString = DocumentDBConfiguration.GetSettingFromConfigOrEnvironment(attribute.ConnectionString);
            }

            return(new DocumentDBContext
            {
                Service = config.DocumentDBServiceFactory.CreateService(resolvedConnectionString),
                ResolvedDatabaseName = Resolve(attribute.DatabaseName, resolver),
                ResolvedCollectionName = Resolve(attribute.CollectionName, resolver)
            });
        }
 public DocumentDBAttributeBindingProvider(JobHostConfiguration config, DocumentDBConfiguration documentDBConfig)
 {
     _jobHostConfig = config;
     _docDBConfig   = documentDBConfig;
 }
 public DocumentDBEnumerableBuilder(DocumentDBConfiguration config)
 {
     _config = config;
 }