Beispiel #1
0
        public bool RemoveKeyFromIndex(IndexRemoveKeyFromIndexSpecification definition)
        {
            IIndex idx;

            if (_fallen8.IndexFactory.TryGetIndex(out idx, definition.IndexId))
            {
                return(idx.TryRemoveKey(ServiceHelper.CreateObject(definition.Key)));
            }
            Logger.LogError(String.Format("Could not find index {0}.", definition.IndexId));
            return(false);
        }
Beispiel #2
0
        public bool AddToIndex(IndexAddToSpecification definition)
        {
            IIndex idx;

            if (_fallen8.IndexFactory.TryGetIndex(out idx, definition.IndexId))
            {
                AGraphElement graphElement;
                if (_fallen8.TryGetGraphElement(out graphElement, definition.GraphElementId))
                {
                    idx.AddOrUpdate(ServiceHelper.CreateObject(definition.Key), graphElement);
                    return(true);
                }

                Logger.LogError(String.Format("Could not find graph element {0}.", definition.GraphElementId));
                return(false);
            }
            Logger.LogError(String.Format("Could not find index {0}.", definition.IndexId));
            return(false);
        }