/// <summary> /// Finds the group metadata associated with the given id. /// </summary> public RSGroupInfo GetGroup(string inId) { if (string.IsNullOrEmpty(inId)) { return(null); } RSGroupInfo meta; if (!m_Groups.TryGetValue(ScriptUtils.Hash(inId), out meta)) { Log.Error("[RSMetaDatabase] No group with id '{0}' registered", inId); } return(meta); }
/// <summary> /// Finds the action metadata with the given id. /// </summary> public RSActionInfo GetAction(string inId) { if (string.IsNullOrEmpty(inId)) { return(null); } RSActionInfo meta; if (!m_Actions.TryGetValue(ScriptUtils.Hash(inId), out meta)) { Log.Error("[RSMetaDatabase] No action type with id '{0}' registered", inId); } return(meta); }
/// <summary> /// Finds the query metadata with the given id. /// </summary> public RSQueryInfo GetQuery(string inId) { if (string.IsNullOrEmpty(inId)) { return(null); } RSQueryInfo meta; if (!m_Queries.TryGetValue(ScriptUtils.Hash(inId), out meta)) { Log.Error("[RSMetaDatabase] No query type with id '{0}' registered", inId); } return(meta); }
/// <summary> /// Finds the component metadata with the given id. /// </summary> public RSComponentInfo GetComponent(string inId) { if (string.IsNullOrEmpty(inId)) { return(null); } RSComponentInfo meta; if (!m_Components.TryGetValue(ScriptUtils.Hash(inId), out meta)) { Log.Error("[RSMetaDatabase] No component type with id '{0}' registered", inId); } return(meta); }
public RSInfo(RSMemberAttribute inAttribute, MemberInfo inMember) { Id = inAttribute.Id; IdHash = ScriptUtils.Hash(Id); Name = inAttribute.Name ?? inMember.Name; Description = inAttribute.Description ?? string.Empty; Icon = inAttribute.Icon ?? string.Empty; if (inMember is Type) { OwnerType = InternalScriptUtils.GetLikelyBindingType((Type)inMember); } else { OwnerType = InternalScriptUtils.GetLikelyBindingType(inMember.DeclaringType); } }
public RSGroupInfo(RSGroupAttribute inAttribute, FieldInfo inFieldInfo) { Id = inAttribute.Id; IdHash = ScriptUtils.Hash(Id); GroupId = new RSGroupId(IdHash); Name = inAttribute.Name ?? inFieldInfo.Name; Description = inAttribute.Description ?? string.Empty; Icon = inAttribute.Icon ?? string.Empty; using (var psb = PooledStringBuilder.Alloc()) { psb.Builder.Append(Name); if (!string.IsNullOrEmpty(Description)) { psb.Builder.Append("\n - ").Append(Description); } Tooltip = psb.Builder.ToString(); } }
public void Trigger(IRSRuntimeEntity inEntity, string inTriggerId, bool inbForce = false) { Trigger(inEntity, new RSTriggerId(ScriptUtils.Hash(inTriggerId)), RSValue.Null, inbForce); }