コード例 #1
0
 public static bool TryGetConstructor(this IHasConstructors hasConstructors, out ICommonConstructor foundCommonConstructor)
 {
     return((foundCommonConstructor = hasConstructors.GetConstructor()) != null);
 }
コード例 #2
0
 public static ICommonConstructor GetConstructor(this IHasConstructors hasConstructors, bool throwExceptionIfNotFound = false)
 {
     return(hasConstructors.GetConstructor(Type.EmptyTypes, throwExceptionIfNotFound));
 }
コード例 #3
0
 public static ICommonConstructor GetConstructor(this IHasConstructors hasConstructors, IHasType[] constructorParameterHasTypes, bool throwExceptionIfNotFound = false)
 {
     return(hasConstructors.GetConstructor(constructorParameterHasTypes.Select(type => type.Type).ToArray(), throwExceptionIfNotFound));
 }
コード例 #4
0
 public static bool TryGetConstructor(this IHasConstructors hasConstructors, string[] constructorParameterTypeFullNames, out ICommonConstructor foundCommonConstructor)
 {
     return((foundCommonConstructor = hasConstructors.GetConstructor(constructorParameterTypeFullNames)) != null);
 }