public static GuidRef <T> Create(T obj) { GuidRef <T> result = new GuidRef <T>(); result.guid = Guid.NewGuid().ToString(); result.reference = obj; return(result); }
public override string ToString() { if (NameRef != null) { return(string.Format("[refByName: {0}]", NameRef.ToString())); } else if (GuidRef != null) { return(string.Format("[refByGuid: {0}]", GuidRef.ToString())); } else { return(string.Format("[refByTarget: {0}]", Target.ToString())); } }