Exemplo n.º 1
0
        } // End Function GetGetter

        // ------------------------------------



        public static System.Reflection.MemberInfo[] GetFieldsAndProperties(System.Type t)
        {
            System.Reflection.TypeInfo ti = System.Reflection.IntrospectionExtensions.GetTypeInfo(t);

            System.Reflection.FieldInfo[]    fis = ti.GetFields();
            System.Reflection.PropertyInfo[] pis = ti.GetProperties();
            System.Reflection.MemberInfo[]   mis = new System.Reflection.MemberInfo[fis.Length + pis.Length];
            System.Array.Copy(fis, mis, fis.Length);
            System.Array.Copy(pis, 0, mis, fis.Length, pis.Length);

            return(mis);
        } // End Function GetFieldsAndProperties
Exemplo n.º 2
0
 private static bool IsTypeFieldsShallowCopyable(TypeInfo typeInfo)
 {
     return typeInfo.GetFields().All(f => !(f.FieldType.IsEquivalentTo(typeInfo)) && IsOrleansShallowCopyable(f.FieldType));
 }
Exemplo n.º 3
0
 private static bool IsValueTypeFieldsShallowCopyable(TypeInfo typeInfo)
 {
     return typeInfo.GetFields().All(f => f.FieldType != typeInfo.AsType() && IsOrleansShallowCopyable(f.FieldType));
 }