Beispiel #1
0
        public override void Execute(Manager.IMetaManager myMetaManager)
        {
            IEnumerable <IVertexType> typesToRebuild = null;

            if (_request.Types == null || !_request.Types.CountIsGreater(0))
            {
                typesToRebuild = myMetaManager.VertexTypeManager.ExecuteManager.GetAllTypes(Int64, SecurityToken);
            }
            else
            {
                HashSet <IVertexType> types = new HashSet <IVertexType>();
                #region Get types by name and return on error

                foreach (var typeName in _request.Types)
                {
                    var type = myMetaManager.VertexTypeManager.ExecuteManager.GetType(typeName, Int64, SecurityToken);

                    if (type == null)
                    {
                        throw new IndexTypeDoesNotExistException(typeName, "");
                    }

                    types.Add(type);
                }

                typesToRebuild = types;

                #endregion
            }

            foreach (var aType in typesToRebuild)
            {
                myMetaManager.IndexManager.RebuildIndices(aType.ID, Int64, SecurityToken);
            }
        }
Beispiel #2
0
 public override void Validate(Manager.IMetaManager myMetaManager)
 {
 }