public static void ToString(TypeRef obj, MethodReturnEventArgs <string> e) { e.Result = String.Format("{0}{1}", obj.Deleted == true ? "(DELETED) " : string.Empty, obj.FullName); ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(Zetbox.App.Base.AccessControl obj, MethodReturnEventArgs <string> e) { e.Result = String.Format("{0} ({1}) {2}", obj.Name ?? string.Empty, obj.Rights != null ? obj.Rights.ToString() : "None", obj.Description ?? string.Empty); ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(RelationEnd obj, MethodReturnEventArgs <string> e) { e.Result = String.Format("RelationEnd {0}({1})", obj.RoleName, obj.Type == null ? "no type" : obj.Type.Name); ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(DataType obj, MethodReturnEventArgs <string> e) { e.Result = String.Format("{0}.{1}", obj.Module == null ? "[no module]" : obj.Module.Namespace, obj.Name); ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(BaseParameter obj, MethodReturnEventArgs <string> e) { e.Result = string.Format("{0}{1} {2}", obj.IsReturnParameter ? "[Return] " : String.Empty, obj.GetParameterTypeString(), obj.Name); ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(Method obj, MethodReturnEventArgs <string> e) { // TODO: IsValid? if (obj.ObjectClass != null && obj.ObjectClass.Module != null) { e.Result = obj.ObjectClass.Module.Namespace + "." + obj.ObjectClass.Name + "." + obj.Name; ToStringHelper.FixupFloatingObjectsToString(obj, e); } else { e.Result = String.Format("new Method #{0}: {1}", obj.ID, obj.Name); } }
public static void ToString(Property obj, MethodReturnEventArgs <string> e) { if (obj.ObjectClass == null) { e.Result = String.Join(" ", new[] { "unattached", obj.Name }); } else { e.Result = String.Format("{0} {1}.{2}", obj.GetPropertyTypeString(), obj.ObjectClass.Name, obj.Name); } ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(Relation obj, MethodReturnEventArgs <string> e) { if (obj.A == null || obj.B == null || obj.A.Type == null || obj.B.Type == null) { e.Result = "incomplete relation:"; if (obj.A == null) { e.Result += " A missing"; } else { e.Result += " A.Type missing"; } if (obj.B == null) { e.Result += " B missing"; } else { e.Result += " B.Type missing"; } } else { string aDesc = (obj.A.RoleName ?? String.Empty).Equals(obj.A.Type.Name) ? obj.A.RoleName : String.Format("{0}({1})", obj.A.RoleName, obj.A.Type.Name); string bDesc = (obj.B.RoleName ?? String.Empty).Equals(obj.B.Type.Name) ? obj.B.RoleName : String.Format("{0}({1})", obj.B.RoleName, obj.B.Type.Name); e.Result = String.Format("Relation: {0} {1} {2}", aDesc, obj.Verb, bDesc); } ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(Assembly obj, MethodReturnEventArgs <string> e) { e.Result = obj.Name; ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(EnumerationEntry obj, MethodReturnEventArgs <string> e) { e.Result = obj.Enumeration + "." + obj.Name; ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(Zetbox.App.Base.Identity obj, MethodReturnEventArgs <string> e) { e.Result = (obj.DisplayName ?? string.Empty) + " (" + (obj.UserName ?? string.Empty) + ")"; ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(Zetbox.App.Base.Blob obj, MethodReturnEventArgs <System.String> e) { e.Result = obj.OriginalName; ToStringHelper.FixupFloatingObjectsToString(obj, e); }
public static void ToString(Zetbox.App.Base.ServiceDescriptor obj, MethodReturnEventArgs <System.String> e) { e.Result = obj.Description; ToStringHelper.FixupFloatingObjectsToString(obj, e); }