Exemple #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);
        }
Exemple #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);
        }
Exemple #3
0
        private static FastField <T> CreateField(string name)
        {
            FieldInfo info = FastField.GetField(typeof(T), name);

            return(info == null ? null : new FastField <T>(info));
        }