/// <summary> /// /// </summary> /// <returns></returns> public override string ToString() { FixedString512 temp = default; ToFixedString(ref temp); return(temp.ToString()); }
public static void IsTrue(bool condition, FixedString512 message) { if (condition) { return; } throw new InvalidOperationException(message.ToString()); }
public override string ToString() { #if NET_DOTS if (TypeIndex == 0) { return("None"); } var info = TypeManager.GetTypeInfo(TypeIndex); FixedString512 ns = default; ns.Append(info.Debug.TypeName); if (IsBuffer) { ns.Append(" [B]"); } if (AccessModeType == AccessMode.Exclude) { ns.Append(" [S]"); } if (AccessModeType == AccessMode.ReadOnly) { ns.Append(" [RO]"); } return(ns.ToString()); #else var name = GetManagedType().Name; if (IsBuffer) { return($"{name} [B]"); } if (AccessModeType == AccessMode.Exclude) { return($"{name} [S]"); } if (AccessModeType == AccessMode.ReadOnly) { return($"{name} [RO]"); } if (TypeIndex == 0) { return("None"); } return(name); #endif }
public static BindingInfo GetBindingInfo(EntityManager entityManager, Entity entity, FixedString512 propertyPath) { var path = propertyPath.ToString(); if (string.IsNullOrEmpty(path)) { Debug.LogWarning("Could not find a proper mapping with an empty path."); return(BindingInfo.UnsuccessfulBinding); } var container = new EntityContainer(entityManager, entity); var operation = new GetBindingInfoOperation(path); PropertyContainer.Visit(ref container, operation); return(operation.GetResult()); }