public void Update(SystemEntity entity) { if (!_universalSearchItemGenerator.CanGenerate(entity)) { return; } var data = new UniversalSearchIndexData { Action = UniversalSearchIndexAction.Update, UniversalSearchItem = _universalSearchItemGenerator.GenerateItem(entity) }; if (!AnyExistInEndRequest(data)) { CurrentRequestData.OnEndRequest.Add(new AddUniversalSearchTaskInfo(data)); } }
public UniversalSearchIndexDataComparison(UniversalSearchIndexData data) { _guid = data.UniversalSearchItem.SearchGuid; _action = data.Action; }
private static bool AnyExistInEndRequest(UniversalSearchIndexData data) { return (CurrentRequestData.OnEndRequest.OfType <AddUniversalSearchTaskInfo>() .Any(task => UniversalSearchIndexData.Comparer.Equals(data, task.Data))); }
public override void SetData(string data) { UniversalSearchIndexData = JsonConvert.DeserializeObject <UniversalSearchIndexData>(data); }