コード例 #1
0
 /// <summary>
 /// Create a new IndexHelper.
 /// </summary>
 /// <param name="client">The AlgoliaClient to use for index management.</param>
 /// <param name="indexName">The name of the Algolia index.</param>
 /// <param name="objectIdField">The name of the field to use for mapping to the Algolia objectID.</param>
 public IndexHelper(IAlgoliaClient client, string indexName, string objectIdField = "Id")
     : base(client, indexName)
 {
     // Save
     base._client   = client;
     _indexName     = indexName;
     _objectIdField = objectIdField;
 }
コード例 #2
0
        public BaseTest()
        {
            _testApiKey        = Environment.GetEnvironmentVariable("ALGOLIA_API_KEY");
            _testApplicationID = Environment.GetEnvironmentVariable("ALGOLIA_APPLICATION_ID");
            _client            = new AlgoliaClient(_testApplicationID, _testApiKey);
            _index             = _client.InitIndex(GetSafeName("àlgol?à-csharp"));
            _analytics         = new Analytics(_client);
            _indexHelper       = new IndexHelper <TestModel>(_client, GetSafeName("àlgol?à-csharp"));

            _testApiKeyMCM        = Environment.GetEnvironmentVariable("ALGOLIA_API_KEY_MCM");
            _testApplicationIDMCM = Environment.GetEnvironmentVariable("ALGOLIA_APPLICATION_ID_MCM");
            _clientMCM            = new AlgoliaClient(_testApplicationIDMCM, _testApiKeyMCM);
            _userID = GetUniqueUserID("csharp-client");
        }
コード例 #3
0
 public void TestCleanup()
 {
     _client.DeleteIndex(GetSafeName("àlgol?à-csharp"));
     _client = null;
 }
コード例 #4
0
 public Analytics(IAlgoliaClient client)
 {
     _client = client;
 }