コード例 #1
0
        private static FastProperty <T, TResult> GetProperty <T, TResult>(string name)
        {
            FastProperty <T, TResult> property = FastProperty <T, TResult> .Get(name);

            if (property == null)
            {
                throw new ArgumentException(string.Format("Cannot find the specified property '{0}' in type {1}.", name,
                                                          typeof(T)));
            }
            return(property);
        }
コード例 #2
0
        private static FastProperty GetProperty(Type type, string name)
        {
            FastProperty property = FastProperty.Get(type, name);

            if (property == null)
            {
                throw new ArgumentException(string.Format("Cannot find the specified property '{0}' in type {1}.", name,
                                                          type));
            }
            return(property);
        }
コード例 #3
0
        private static FastProperty <T, TProperty> CreateProperty(string name)
        {
            PropertyInfo info = FastProperty.GetProperty(typeof(T), name);

            return(info == null ? null : new FastProperty <T, TProperty>(info));
        }