Exemple #1
0
 /// <summary>
 /// Obtains a type expression from the <paramref name="target"/> provided.
 /// </summary>
 /// <param name="target">The <see cref="Type"/> to receive the type reference
 /// expression of.</param>
 /// <param name="identityManager">The <see cref="ICliManager"/>
 /// which is responsible for marshalling type and assembly identities
 /// within the current type model.</param>
 /// <returns>A new <see cref="ITypeReferenceExpression"/>.</returns>
 /// <remarks>Used to obtain a type as an expression for linking a type as the
 /// origin of a primary expression.</remarks>
 /// <exception cref="System.ArgumentNullException">thrown when <paramref name="target"/> is null.</exception>
 public static ITypeReferenceExpression GetTypeExpression(this Type target, ICliManager identityManager)
 {
     if (target == null)
     {
         throw new ArgumentNullException("target");
     }
     return(identityManager.ObtainTypeReference(target).GetTypeExpression());
 }
Exemple #2
0
 public static IExpressionFusionExpression Fuse(this Type target, string term, ICliManager identityManager)
 {
     return(identityManager.ObtainTypeReference(target).Fuse(term));
 }
Exemple #3
0
 public static IType GetTypeReference(this Type target, ICliManager identityManager)
 {
     return(identityManager.ObtainTypeReference(target));
 }
Exemple #4
0
 public static IControlledTypeCollection ToCollection(this Type[] entries, ICliManager identityManager)
 {
     return(new TypeCollection((from t in entries
                                select identityManager.ObtainTypeReference(t)).ToArray()));
 }
Exemple #5
0
 public static ICreateInstanceExpression GetNewExpression(this Type target, ICliManager identityManager, params IExpression[] parameters)
 {
     return(identityManager.ObtainTypeReference(target).GetNewExpression(parameters));
 }