/// <summary> /// Create from class template. Just a typed placeholder. e.g. parameter and in LINQ local variables /// </summary> /// <param name="type"></param> internal static ObjectNode Create(Type type, DescriptiveInfoAttribute descriptiveInfo) { var objectNode = new ObjectNode(null, descriptiveInfo); objectNode.SourceObjectInfo = new OtherDomainModelRefInfo(type, SourceReferenceType.parameter); return(objectNode); }
// The basic ctor protected ObjectNode(ObjectNode parent, DescriptiveInfoAttribute attribute = null) { Parent = parent; TryGetDescriptiveInfo(attribute); }
/// <summary> /// Appends descriptive info to the designated object /// </summary> /// <typeparam name="T">Accepts only reference types. </typeparam> /// <param name="target"> the target object </param> /// <param name="descriptiveInfoAttribute"> descriptive info in the form of <c>Visible</c> attribute </param> /// <example><code>object.AppendVisibleAttribute(new Visible(""))</code></example> public static T AppendVisibleAttribute <T>(this T target, DescriptiveInfoAttribute descriptiveInfoAttribute) where T : class { Misc.ObjectTable.Add(target, descriptiveInfoAttribute); return(target); }