示例#1
0
 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()));
     }
 }
示例#2
0
 public static Reference Get(Type type, NameRef nameRef)
 {
     return(CreateInstance(type, nameRef));
 }
示例#3
0
 public static Reference <T> Get <T>(NameRef nameRef)
 {
     return(new ReferenceImpl <T>(nameRef));
 }
示例#4
0
 public ReferenceImpl(NameRef nameRef)
 {
     this.NameRef = nameRef;
 }