// Start is called before the first frame update
    void Start()
    {
        searchersArray = new searcher[searcherAmount];
        spawnPos       = this.transform;

        for (int i = 0; i < searcherAmount; i++)
        {
            searchersArray[i] = new searcher(spawnPos.position, searcherSpeed, lookatSpeed, sphereMesh, sphereMaterial, Target.position, randomPosMod);
            Debug.Log("Added searcher");
        }
    }
Beispiel #2
0
        public IActionResult Index(searcher val)
        {
            if (HttpContext.Session.GetString("LoginID") == null)
            {
                return(RedirectToAction("Login", "Users"));
            }
            CentricsContext context = HttpContext.RequestServices.GetService(typeof(Centrics.Models.CentricsContext)) as CentricsContext;

            ViewData["viewer"] = context.SearchClientAddress(val.searchvalue);

            return(View());
        }
Beispiel #3
0
            /// <summary>
            /// 创建内存对象关系图
            /// </summary>
            public graphBuilder()
            {
                HashSet <Type> checkTypes = hashSet.CreateOnly <Type>();

                foreach (Type type in fastCSharp.checkMemory.GetTypes().ToArray())
                {
                    if (checkTypes.Contains(type))
                    {
                        fastCSharp.log.Error.Add("重复类型 " + type.fullName(), new System.Diagnostics.StackFrame(), false);
                    }
                    else
                    {
                        checkTypes.Add(type);
                    }
                }
                int count = checkTypes.Count;

                if (count != 0)
                {
                    StaticTypes = new staticType[count];
                    types       = dictionary.CreateOnly <Type, typeInfo>();
                    values      = dictionary <objectReference> .Create <value>();

                    arrayBuilders = dictionary.CreateOnly <Type, Action>();
                    staticValues  = new list <staticValue>();
                    foreach (Type type in checkTypes)
                    {
                        currentType = type;
                        buildStatic();
                        StaticTypes[checkTypes.Count - count].Set(type, staticValues);
                        if (--count == 0)
                        {
                            break;
                        }
                        staticValues.Empty();
                    }
                    values        = null;
                    arrayBuilders = null;
                    staticValues  = null;
                    checkTypes    = null;
                    typeNames     = dictionary.CreateOnly <string, typeInfo>();
                    foreach (typeInfo type in types.Values)
                    {
                        typeNames[type.Type.FullName] = type;
                    }
                    types           = null;
                    searcher        = new searcher(StaticTypes);
                    searcher.OnType = searchTypeFields;
                    searcher.Start();
                }
            }
 internal PartitionedFulltextIndexReader(IList <PartitionSearcher> partitionSearchers, string[] properties, Analyzer analyzer, TokenHolder propertyKeyTokenHolder) : this(partitionSearchers.Select(PartitionSearcherReference::new).Select(searcher->new SimpleFulltextIndexReader(searcher, properties, analyzer, propertyKeyTokenHolder)).ToList())
 /// <summary>
 /// 删除域名服务信息
 /// </summary>
 /// <param name="domain"></param>
 /// <param name="server">域名服务信息</param>
 /// <returns></returns>
 public domainSearcher Remove(byte[] domain, out domainSearcher removeDomains, out domainServer server)
 {
     byte[][] domains = this.domains;
     domainServer[] servers = Servers;
     pointer data = this.data;
     if (data.Data != null && domain.Length != 0)
     {
         int index = new searcher(data).Search(domain);
         if (index >= 0)
         {
             domainSearcher searcher = Default;
             if (domains.Length != 1)
             {
                 int length = domains.Length - 1;
                 byte[][] newDomains = new byte[length][];
                 domainServer[] newServers = new domainServer[length];
                 Array.Copy(domains, 0, newDomains, 0, index);
                 Array.Copy(servers, 0, newServers, 0, index);
                 Array.Copy(domains, index + 1, newDomains, index, length - index);
                 Array.Copy(servers, index + 1, newServers, index, length - index);
                 searcher = new domainSearcher(newDomains, newServers);
             }
             server = servers[index];
             removeDomains = this;
             return searcher;
         }
     }
     server = null;
     removeDomains = null;
     return this;
 }
 /// <summary>
 /// 获取域名服务信息
 /// </summary>
 /// <param name="domain">域名</param>
 /// <returns>域名服务信息</returns>
 public domainServer Get(subArray<byte> domain)
 {
     pointer data = this.data;
     if (domain.Count != 0 && data.Data != null)
     {
         int index = new searcher(data).Search(domain);
         if (index >= 0) return Servers[index];
     }
     return null;
 }