Пример #1
0
        private static bool IsNullable([NotNull] Type type)
        {
            Invariant.IsNotNull(type, "type");

            return(type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable <>)));
        }
Пример #2
0
        /// <summary>
        /// Register a new convention
        /// </summary>
        /// <param name="convention"><see cref="IPropertyMetadataConvention"/> class</param>
        public virtual void RegisterConvention([NotNull] IPropertyMetadataConvention convention)
        {
            Invariant.IsNotNull(convention, "convention");

            conventions.Add(convention);
        }
Пример #3
0
 /// <summary>
 /// Register configuration types from the assembly containing type
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static IEnumerable <Assembly> AssemblyContainingType([NotNull] Type type)
 {
     Invariant.IsNotNull(type, "type");
     yield return(type.Assembly);
 }