public async Task<bool> Initialize(JryVideoDataSourceProviderManagerMode mode) { var builder = new MongoUrlBuilder(); builder.Server = MongoServerAddress.Parse("127.0.0.1:50710"); builder.DatabaseName = "admin"; builder.Username = "******"; builder.Password = "******"; this.Client = new MongoClient(builder.ToMongoUrl()); this.Database = this.Client.GetDatabase("JryVideo_" + mode.ToString()); return true; }
public async Task <bool> Initialize(JryVideoDataSourceProviderManagerMode mode) { var builder = new MongoUrlBuilder(); builder.Server = MongoServerAddress.Parse("127.0.0.1:50710"); builder.DatabaseName = "admin"; builder.Username = "******"; builder.Password = "******"; this.Client = new MongoClient(builder.ToMongoUrl()); this.Database = this.Client.GetDatabase("JryVideo_" + mode.ToString()); return(true); }
public Task<bool> Initialize(JryVideoDataSourceProviderManagerMode mode) { if (!Enum.IsDefined(typeof(JryVideoDataSourceProviderManagerMode), mode)) throw new ArgumentOutOfRangeException(nameof(mode)); this.Mode = mode; var builder = new MongoUrlBuilder(); builder.Server = MongoServerAddress.Parse("127.0.0.1:50710"); builder.DatabaseName = "admin"; builder.Username = "******"; builder.Password = "******"; this.Client = new MongoClient(builder.ToMongoUrl()); this.Database = this.Client.GetDatabase("JryVideo_" + mode.ToString()); return Task.FromResult(true); }
public Task <bool> Initialize(JryVideoDataSourceProviderManagerMode mode) { if (!Enum.IsDefined(typeof(JryVideoDataSourceProviderManagerMode), mode)) { throw new ArgumentOutOfRangeException(nameof(mode)); } this.Mode = mode; var builder = new MongoUrlBuilder(); builder.Server = MongoServerAddress.Parse("127.0.0.1:50710"); builder.DatabaseName = "admin"; builder.Username = "******"; builder.Password = "******"; this.Client = new MongoClient(builder.ToMongoUrl()); this.Database = this.Client.GetDatabase("JryVideo_" + mode.ToString()); return(Task.FromResult(true)); }