Exemple #1
0
 /// <summary>
 /// Finds all dependency runtime types (instantiable types) which matches the criteria
 /// </summary>
 /// <param name="runtimeTypes">Types</param>
 /// <param name="typeParser">Parset</param>
 /// <param name="typeId">Id</param>
 /// <param name="args">Values</param>
 /// <returns></returns>
 public static IRuntimeType[] GetRuntimeTypes(this IEnumerable <IRuntimeType> runtimeTypes, ITypeParser typeParser, string typeId, string[] args) =>
 typeParser.FindRuntimeTypes(typeId, Format.GetNames(args), runtimeTypes.Where((p) => p.Attribute is IDependencyAttribute)).ToArray();
Exemple #2
0
 /// <summary>
 /// Finds the specified identifier.
 /// </summary>
 /// <param name="typeId">The identifier.</param>
 /// <param name="args">The arguments.</param>
 /// <param name="types">The types.</param>
 /// <returns></returns>
 public static IRuntimeType Find(this ITypeParser typeParser, string typeId, IEnumerable <string> args, IEnumerable <IRuntimeType> types) => typeParser.FindRuntimeTypes(typeId, args, types).FirstOrDefault();
Exemple #3
0
 /// <summary>
 /// Finds all dependency runtime types (instantiable types) which matches the criteria
 /// </summary>
 /// <param name="runtimeTypes">Types</param>
 /// <param name="typeParser">Parset</param>
 /// <param name="runtimeType">Id</param>
 /// <param name="args">Values</param>
 /// <returns></returns>
 public static IRuntimeType[] FindRuntimeTypes(this IEnumerable <IRuntimeType> runtimeTypes, ITypeParser typeParser, IRuntimeType runtimeType, object[] args) =>
 typeParser.FindRuntimeTypes(runtimeType.TypeFullName, Format.GetNames(args), runtimeTypes.Where((p) => p.Attribute is IDependencyAttribute)).Where((p) => p.ActivatorType == runtimeType.ActivatorType).ToArray();