Пример #1
0
        private static FastField <T, TResult> GetField <T, TResult>(string name)
        {
            FastField <T, TResult> field = FastField <T, TResult> .Get(name);

            if (field == null)
            {
                throw new ArgumentException(string.Format("Cannot find the specified field '{0}' in the type {1}.", name,
                                                          typeof(T)));
            }
            return(field);
        }
Пример #2
0
        private static FastField GetField(Type type, string name)
        {
            FastField field = FastField.Get(type, name);

            if (field == null)
            {
                throw new ArgumentException(string.Format("Cannot find the specified field '{0}' in the type {1}.", name,
                                                          type));
            }
            return(field);
        }