public RefData(string name, EComponentType eComponent, object bindVal = null) { this.name = name; this.bindObj = null; this.bindVal = bindVal; this.TypeName = eComponent.ToString(); }
public RefData(string name, EComponentType eComponent, UnityEngine.Object bindObj) { this.name = name; this.bindObj = bindObj; this.bindVal = null; this.TypeName = eComponent.ToString(); }
/// <summary> /// generates id for the component, adds it to an adequate list, and sends returning message /// </summary> /// <param name="client"></param> /// <param name="type"></param> /// <param name="parallelThreads"></param> /// <param name="solvableProblems"></param> public void RegisterComponent(TcpClient client, EComponentType type, int parallelThreads = 1, List <string> solvableProblems = null) { var componentsInfo = new ComponentsInfo(type, ++_maxComponentId, client, _timeout, parallelThreads, solvableProblems); componentsInfo.ComponentTimedOut += componentsInfo_ComponentTimedOut; switch (type.ToString()) { case ("TaskManager"): _taskManagers.Add(componentsInfo); break; case ("ComputationalNode"): _computationalNodes.Add(componentsInfo); break; case ("ComputationalClient"): _computationalClients.Add(componentsInfo); break; } var responseMsg = new RegisterResponseMessage(_maxComponentId, DateTime.Now); SendMessage(responseMsg.Serialize(), client); EventLogger.GetLog().InfoFormat("Zarejestrowano {0} z Id:{1}", componentsInfo.Type, componentsInfo.Id); }
// Token: 0x06000017 RID: 23 RVA: 0x00003088 File Offset: 0x00001288 private RefData GetData(GameObject go) { bool flag = go != null; RefData result; if (flag) { RefData refData = null; for (int i = 0; i < 18; i++) { EComponentType ecomponentType = (EComponentType)i; bool flag2 = ecomponentType != EComponentType.GameObject; if (flag2) { Component component = go.GetComponent(ecomponentType.ToString()); bool flag3 = component != null; if (flag3) { refData = new RefData(go.name, ecomponentType, component); break; } } } bool flag4 = refData == null; if (flag4) { refData = new RefData(go.name, EComponentType.GameObject, go); } result = refData; } else { result = null; } return(result); }