コード例 #1
0
 public JobAssignmentRepository(DocumentDbSettings settings)
 {
     // Save the document db settings into a private data member and
     // instantiate an instance of the client.
     _documentDbSettings = settings;
     _documentClient     = new DocumentClient(new Uri(_documentDbSettings.Endpoint),
                                              _documentDbSettings.AuthKey);
 }
コード例 #2
0
        internal static DocumentDbSettings GetDbSettings()
        {
            var settings = new DocumentDbSettings
            {
                AuthKey      = Environment.GetEnvironmentVariable("DocumentDbAuthKey"),
                CollectionId = Environment.GetEnvironmentVariable("DocumentDbCollectionId"),
                Endpoint     = Environment.GetEnvironmentVariable("DocumentDbEndpoint"),
                DatabaseId   = Environment.GetEnvironmentVariable("DocumentDbDatabaseId")
            };

            return(settings);
        }
コード例 #3
0
 public JobAssignmentRepository() : this(DocumentDbSettings.GetDbSettings())
 {
 }